@zonos/elements 1.4.2 → 1.5.1
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/{TaxId-Q6aDqqWv.js → TaxId-ChhNwG04.js} +36 -0
- package/dist/cjs/{cart-B6Aty-21.js → cart-CiXlehwQ.js} +88 -52
- package/dist/cjs/{collect-DnrvaXUI.js → collect-Drr8fY-q.js} +3 -3
- package/dist/cjs/{debounce-Cd2emZPn.js → debounce-BhgA8_3W.js} +2 -2
- package/dist/cjs/{debounce-vY0QYT6o.js → debounce-DRPMxNew.js} +1 -1
- package/dist/cjs/{getBorderRadius-CyYZw4qq.js → getBorderRadius-CJ_95w3o.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-D03ICqss.js → getMissingRequiredShippingFields-DI6qF1z3.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-CPCoVeU3.js → hasInclusivePrice-84KS94yH.js} +1 -1
- package/dist/cjs/index.cjs.js +19 -8
- package/dist/cjs/{invoice-Cj8W7NW0.js → invoice-5hVfSXpb.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-BzNeXeDe.js → localization-B2mjW0Xa.js} +701 -41
- package/dist/cjs/{paypal-CuKshRmZ.js → paypal-pd8Nz_R_.js} +4 -4
- package/dist/cjs/{placeTestOrder-7czjwkjm.js → placeTestOrder-DrI8rD9o.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-BH8t2b2x.js → renderCheckoutCurrency-u5q8YdUb.js} +2 -2
- package/dist/cjs/shouldRenderShortAddressCodeInput-gpu_bMfp.js +21 -0
- package/dist/cjs/{shouldShowLanguageSelect-yAbtCmd8.js → shouldShowLanguageSelect-gBg4KeTQ.js} +1 -1
- package/dist/cjs/{submitGtag-D79e8u6s.js → submitGtag-Rc-S3PnH.js} +1 -1
- package/dist/cjs/{throttle-zSVRQLC0.js → taxIdFields-BrIaPTcd.js} +57 -2
- package/dist/cjs/taxIdRules-BBj8kQxJ.js +58 -0
- package/dist/cjs/{updateCheckoutSessionAttributes-jMtfOL2m.js → updateCheckoutSessionAttributes-d0IKpwW8.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +25 -30
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +27 -30
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +7 -6
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +8 -7
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +148 -80
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +31 -20
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -5
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +12 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -8
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -6
- 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-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -7
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +12 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -8
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +7 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-Bx9jK82G.js → zonosStore-CDV83QyK.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +6 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
- package/dist/collection/components/store/checkout/stripe.js +10 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
- package/dist/collection/components/store/translationStore/strings.base.js +35 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
- package/dist/collection/components/store/translationStore/strings.french.js +35 -2
- package/dist/collection/components/store/translationStore/strings.german.js +35 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
- package/dist/collection/components/store/zonosStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
- package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
- package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
- package/dist/collection/components/utils/checkout/isHostedVsNativeTestAllowed.js +13 -0
- package/dist/collection/components/utils/checkout/itemCustomization.js +53 -0
- package/dist/collection/components/utils/checkout/parseItemCustomizations.js +6 -0
- package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
- package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
- package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
- package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
- package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/checkout/TaxId.js +31 -0
- package/dist/collection/types/checkout/itemCustomization.js +1 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
- package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
- package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
- package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
- package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
- package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm/index.js +9 -8
- package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
- package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
- package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
- package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
- package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
- package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
- package/dist/esm/zonos-address-display_2.entry.js +3 -3
- package/dist/esm/zonos-address_4.entry.js +25 -28
- package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +8 -7
- package/dist/esm/zonos-cart-items_12.entry.js +147 -79
- package/dist/esm/zonos-checkbox_2.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +31 -20
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
- package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
- package/dist/esm/zonos-collect.entry.js +9 -8
- package/dist/esm/zonos-controller.entry.js +7 -6
- 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-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
- package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
- package/dist/esm/zonos-invoice.entry.js +9 -8
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
- package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
- package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
- package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
- package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
- package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
- package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
- package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm-es5/index.js +11 -11
- package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-DHM91diu.js +348 -0
- package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
- package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
- package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +8 -9
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +40 -26
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +7 -7
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- 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 +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
- package/dist/scripts/index.d.ts +97 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
- package/dist/types/components/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
- package/dist/types/components/store/zonosStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
- package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
- package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
- package/dist/types/components/utils/checkout/isHostedVsNativeTestAllowed.d.ts +11 -0
- package/dist/types/components/utils/checkout/itemCustomization.d.ts +23 -0
- package/dist/types/components/utils/checkout/parseItemCustomizations.d.ts +7 -0
- package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
- package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
- package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
- package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
- package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
- package/dist/types/components.d.ts +22 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/checkout/TaxId.d.ts +45 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
- package/dist/types/types/checkout/itemCustomization.d.ts +4 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
- package/dist/zonos-elements/p-107f287b.entry.js +1 -0
- package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
- package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
- package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
- package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
- package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
- package/dist/zonos-elements/{p-5016d71b.system.entry.js → p-1fda4aec.system.entry.js} +132 -117
- package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
- package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
- package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
- package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
- package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
- package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
- package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
- package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
- package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
- package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
- package/dist/zonos-elements/p-678b9214.entry.js +1 -0
- package/dist/zonos-elements/p-6e691736.entry.js +1 -0
- package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
- package/dist/zonos-elements/p-74659d88.entry.js +1 -0
- package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
- package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
- package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84e76348.entry.js +1 -0
- package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
- package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
- package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
- package/dist/zonos-elements/p-BD-9rD53.js +1 -0
- package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
- package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
- package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
- package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
- package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
- package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
- package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
- package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
- package/dist/zonos-elements/p-CTiqplrr.js +1 -0
- package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
- package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
- package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
- package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
- package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
- package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
- package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
- package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
- package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
- package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
- package/dist/zonos-elements/{p-DCS8qcL6.system.js → p-DQrMfUzi.system.js} +41 -41
- package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
- package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
- package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
- package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
- package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
- package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
- package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
- package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
- package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
- package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
- package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
- package/dist/zonos-elements/p-U33isUJG.js +1 -0
- package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
- package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
- package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
- package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
- package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
- package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
- package/dist/zonos-elements/{p-be1237fc.system.entry.js → p-f3d9a380.system.entry.js} +97 -97
- package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
- package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
- package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
- package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
- package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
- package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
- package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
- package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
- package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/item-customization.d.ts +25 -0
- package/item-customization.js +52 -0
- package/package.json +7 -4
- package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
- package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
- package/dist/esm/throttle-Cvlvb-dm.js +0 -85
- package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
- package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
- package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
- package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
- package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
- package/dist/zonos-elements/p-0457f579.entry.js +0 -1
- package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
- package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
- package/dist/zonos-elements/p-34656e6c.entry.js +0 -1
- package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
- package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
- package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
- package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
- package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
- package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
- package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
- package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
- package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
- package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
- package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
- package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
- package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
- package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
- package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
- package/dist/zonos-elements/p-FRWZayxL.js +0 -1
- package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
- package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
- package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
- package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
- package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
- package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
- package/dist/zonos-elements/p-clDfq9AL.js +0 -1
- package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
- package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
- package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
- package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
- package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s,a as o,g as e}from"./p-_lt63o7c.js";import{a as i}from"./p-
|
|
1
|
+
import{r as t,h as s,a as o,g as e}from"./p-_lt63o7c.js";import{a as i}from"./p-CqB9AfBf.js";import"./p-BJmZPrZl.js";const h=class{constructor(s){t(this,s),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var t,s,o;this.iframe=(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("iframe"))||null,null===(o=null===(s=this.iframe)||void 0===s?void 0:s.contentWindow)||void 0===o||o.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),s(o,{key:"ccd63ae063383c197ef9e3de5fdea5bdfcc1951b",class:"zonos--elements zonos--collapse",style:{"--zonos--font-family":i(),height:this.getElementHeight()}},s("div",{key:"49d68d13f7d3fab4104908ec06706ded803b32fa"},s("iframe",{key:"55c8aa296b517b1c69849c0fa56f407b217ad713",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),s("slot",{key:"81207ecc6e59c358edbe4a653064d29c27ac5500"})))}get el(){return e(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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";export{h as zonos_collapse}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,i){function r(o){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,i){function r(o){try{l(t.next(o))}catch(o){i(o)}}function a(o){try{l(t["throw"](o))}catch(o){i(o)}}function l(o){o.done?n(o.value):s(o.value).then(r,a)}l((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,s,i,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(e){return l([o,e])}}function l(a){if(t)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(n=0)),n)try{if(t=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=e.call(o,n)}catch(o){a=[6,o];s=0}finally{t=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,n){if(n||arguments.length===2)for(var t=0,s=e.length,i;t<s;t++){if(i||!(t in e)){if(!i)i=Array.prototype.slice.call(e,0,t);i[t]=e[t]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-CIevpRv_.system.js","./p-DprOoI2W.system.js","./p-Dtu_Japy.system.js","./p-6vSUiBfr.system.js","./p-DTgUqgwV.system.js","./p-zVLAvre1.system.js","./p-DBOI98r5.system.js","./p-zsTASoh2.system.js","./p-BbgqQIHv.system.js","./p-CLDnjFm5.system.js","./p-C2j7R11h.system.js","./p-DgUrB-1a.system.js","./p-CbhN65lj.system.js","./p-CGNVm52g.system.js","./p-XoQH3S7Z.system.js","./p-CeLaK0Ff.system.js","./p-CzKlS3E-.system.js","./p-DsBuZ6ob.system.js","./p-DW-fW8yR.system.js","./p-B3GRrRtL.system.js","./p-ojtNq-r5.system.js"],(function(o){"use strict";var e,n,t,s,i,r,a,l,c,d,u,h,f,p,m,v,g,b,y,z,x,w,k,C,_,j,S,I,L,M,Z,H,P,D,V,U,B,O,R,T,F;return{setters:[function(o){e=o.r;n=o.d;t=o.h;s=o.F;i=o.a;r=o.g},function(o){a=o.b;l=o.c;c=o.t;d=o.P;u=o.H;h=o.Q;f=o.d;p=o.x;m=o.I},function(o){v=o.s;g=o.c;b=o.a;y=o.b},function(o){z=o.t;x=o.s;w=o.k;k=o.l},function(o){C=o.z},function(o){_=o.h;j=o.s;S=o.g;I=o.i;L=o.a},function(o){M=o.c},function(o){Z=o.g},function(o){H=o.l;P=o.b},function(o){D=o.i;V=o.a},function(o){U=o.c},function(o){B=o.s},function(o){O=o.c},function(o){R=o.r},function(o){T=o.p},function(o){F=o.r},null,null,null,null,null],execute:function(){var N='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>';var A='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var W=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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}"};
|
|
2
2
|
/**
|
|
3
3
|
* Maximum number of retries to pull order info (gap between each retry is 1 second)
|
|
4
|
-
*/var E=30;var
|
|
4
|
+
*/var E=30;var q=o("zonos_invoice_finish",/** @class */function(){function o(o){var t=this;e(this,o);this.closeClick=n(this,"closeClick",7);
|
|
5
5
|
/**
|
|
6
6
|
* The border radius style of the dialog
|
|
7
7
|
*/this.borderRadius="ROUNDED";
|
|
@@ -10,27 +10,27 @@ var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o ins
|
|
|
10
10
|
*/this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=z("Keep shopping");this.order=null;
|
|
11
11
|
/**
|
|
12
12
|
* Is waiting to redirect to a different page
|
|
13
|
-
*/this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,r,a;return __generator(this,(function(
|
|
13
|
+
*/this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,r,a;return __generator(this,(function(l){switch(l.label){case 0:n=x.checkoutSessionId;t=new URLSearchParams;t.set("checkoutSessionId",n||"");return[4/*yield*/,_("/api/zonos-elements/get-order?".concat(t.toString()))];case 1:s=l.sent(),i=s.baseUrl,r=s.errors,a=s.json;if(r.length||!(a===null||a===void 0?void 0:a.id)){return[2/*return*/,{baseUrl:i,order:null}]}
|
|
14
14
|
// onOrderSuccess callback may be provided on Zonos.init
|
|
15
15
|
return[4/*yield*/,(e=(o=C.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:i,zonosOrder:a})];case 2:
|
|
16
16
|
// onOrderSuccess callback may be provided on Zonos.init
|
|
17
|
-
|
|
17
|
+
l.sent();return[2/*return*/,{baseUrl:i,order:a}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:
|
|
18
18
|
// Do nothing, display Zonos success page
|
|
19
19
|
this.isLoading=false;return[4/*yield*/,this.getPullOrder()];case 1:o.sent();return[2/*return*/]}}))}))};
|
|
20
20
|
// TODO: This method of pulling orders is temporary. Once we have a working event registry system, we will rely on that to tell us when the order is ready to trigger onOrderSuccess
|
|
21
|
-
this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var e,n,t,s,i,r,a,
|
|
21
|
+
this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var e,n,t,s,i,r,a,l;if(o===void 0){o=0}return __generator(this,(function(c){switch(c.label){case 0:if(o===0){H("=== Start to poll for order info","info")}return[4/*yield*/,this.pullOrder()];case 1:t=c.sent(),s=t.baseUrl,i=t.order;r=!!((n=(e=i===null||i===void 0?void 0:i.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value);a=x.checkoutSessionId;l=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||E;H("=== Polling order (".concat(o," attemps)"),"info");if(!
|
|
22
22
|
// Order found, in legacy checkout facade and still haven't found the legacy order number
|
|
23
23
|
i)
|
|
24
24
|
// Order found, in legacy checkout facade and still haven't found the legacy order number
|
|
25
|
-
return[3/*break*/,2];
|
|
25
|
+
return[3/*break*/,2];H("=== InvoiceOrder info found","info");if(o>10){
|
|
26
26
|
// Log out all the logs if we have tried more than 10 times
|
|
27
|
-
void j({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(o," attempts")],metadata:{allLogs:P,checkoutSessionId:x.checkoutSessionId||"",orderId:i.id,storeId:C.storeId}})}this.order=i;return[3/*break*/,6];case 2:if(!((!i||!r)&&o<
|
|
27
|
+
void j({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(o," attempts")],metadata:{allLogs:P,checkoutSessionId:x.checkoutSessionId||"",orderId:i.id,storeId:C.storeId}})}this.order=i;return[3/*break*/,6];case 2:if(!((!i||!r)&&o<l))return[3/*break*/,5];
|
|
28
28
|
// Wait for 1 second before the next attempt
|
|
29
29
|
return[4/*yield*/,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:
|
|
30
30
|
// Wait for 1 second before the next attempt
|
|
31
|
-
|
|
31
|
+
c.sent();return[4/*yield*/,this.getPullOrder(o+1)];case 4:c.sent();return[3/*break*/,6];case 5:void j({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a),errors:["Invoice order not found after ".concat(l," attempts")],metadata:{allLogs:P,checkoutSessionId:x.checkoutSessionId||"",storeId:C.storeId}});c.label=6;case 6:return[2/*return*/]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,r,h,f;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(!(o||this.storybookForceStatus))return[3/*break*/,4];return[4/*yield*/,l({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),n=e.error,t=e.messages,s=e.status;i=s==="requires_action"||n;this.notificationType=i?"error":"success";this.notificationMessages=t||[];this.notificationTitle=i?z("Payment failed"):z("You're all set!");H("=== Payment intent retrieve status","info",{clientSecret:o,error:n,messages:t,status:s});r=new URL(window.location.href);r.searchParams.delete("payment_intent_client_secret");r.searchParams.delete("payment_intent");r.searchParams.delete("redirect_status");
|
|
32
32
|
// Clean up the url if it's a redirect behavior
|
|
33
|
-
r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(n&&(t===null||t===void 0?void 0:t.length)))return[3/*break*/,2];v({event:"zonos-checkout-payment-fail"});void j({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(x.checkoutSessionId)],metadata:{allLogs:P,credentialToken:window.Zonos.zonosApiKey}});return[3/*break*/,4];case 2:v({event:"zonos-checkout-success"});h=x.checkoutSessionId;void
|
|
33
|
+
r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(n&&(t===null||t===void 0?void 0:t.length)))return[3/*break*/,2];v({event:"zonos-checkout-payment-fail"});void j({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(x.checkoutSessionId)],metadata:{allLogs:P,credentialToken:window.Zonos.zonosApiKey}});return[3/*break*/,4];case 2:v({event:"zonos-checkout-success"});h=x.checkoutSessionId;void c({checkoutSessionId:h,eventName:"checkout_orderCompleted"});f=M("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(f);
|
|
34
34
|
// wait this to finish before resetting store and checkout session id
|
|
35
35
|
return[4/*yield*/,this.handleSuccessBehavior()];case 3:
|
|
36
36
|
// wait this to finish before resetting store and checkout session id
|
|
@@ -40,40 +40,40 @@ this.isLoading=false;
|
|
|
40
40
|
// reset promo when checkout is finished
|
|
41
41
|
d();u();x.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=h("succeeded").messages;return[4/*yield*/,this.handleSuccessBehavior()];case 1:o.sent();
|
|
42
42
|
// reset promo when checkout is finished
|
|
43
|
-
d();u();
|
|
43
|
+
d();u();g();x.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:
|
|
44
44
|
// render error message if there's an error
|
|
45
|
-
if(
|
|
45
|
+
if(b.paypalErrorMessage){this.notificationType="error";this.notificationTitle=z("Payment failed");this.notificationMessages=[b.paypalErrorMessage];this.isLoading=false;return[2/*return*/]}
|
|
46
46
|
// show success message right away when order id is already created
|
|
47
|
-
this.isLoading=false;if(!
|
|
47
|
+
this.isLoading=false;if(!b.orderIdCreated)return[3/*break*/,2];v({event:"zonos-checkout-success"});o=x.checkoutSessionId;void c({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=h("succeeded").messages;
|
|
48
48
|
// wait this to finish before resetting store and checkout session id
|
|
49
49
|
return[4/*yield*/,this.handleSuccessBehavior()];case 1:
|
|
50
50
|
// wait this to finish before resetting store and checkout session id
|
|
51
51
|
e.sent();e.label=2;case 2:
|
|
52
52
|
// reset promo when checkout is finished
|
|
53
|
-
d();u();
|
|
53
|
+
d();u();g();x.checkoutSessionId=null;return[2/*return*/]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var n=new URL("".concat(window.location.origin,"/receipt"));n.searchParams.set("referenceId",e);
|
|
54
54
|
// is test mode
|
|
55
|
-
var t=
|
|
55
|
+
var t=S();if(t){n.searchParams.set("zonosTestMode","1")}
|
|
56
56
|
// Carry over the zonosQaUrl if it exists
|
|
57
57
|
var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){n.searchParams.set("zonosQaUrl",s)}return n.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){
|
|
58
58
|
// just show the notification and don't check any of the payment status
|
|
59
|
-
this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(g.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return t(i,{key:"755581819b6a2e9d97e0faf671320e9390a3000a",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":H({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"a5112a4c35f95d80d567d1d9ca690c297f75bba8",class:"zonos--finish-details"},t("div",{key:"f17f25e741a7a846e4d0d653f2e67c6b36ebd77a",class:"zonos--group"},this.notificationType==="success"?t("zonos-icon",{"aria-label":"Order success",content:q,iconColor:"blue-800",size:50}):t("zonos-icon",{"aria-label":"Order failed",content:N,iconColor:"red-800",size:50}),t("zonos-text",{key:"1169bd299d16f1b063de9638c6c6fce00cf9d0a6",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"db6aebf906ad52207c8bc898c856b7a2a7f061e1",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"fd5516196ec5f645718b7fbf0c9de66ab322505b",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return t(s,null,o,t("br",null))}))),this.order&&e&&t("div",{key:"f50f1e9ed26e609346cdf3bdc1f93689d3c99d06",class:"zonos--button-container"},t("zonos-button",{key:"3dadbbfe5113e02412bb6b890b4d2923101e3c31",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},z("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=A();var Q='<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 Y='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var G='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var K=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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}"};var X=o("zonos_invoice_footer",/** @class */function(){function o(o){e(this,o);
|
|
59
|
+
this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(b.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return t(i,{key:"755581819b6a2e9d97e0faf671320e9390a3000a",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":Z({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"a5112a4c35f95d80d567d1d9ca690c297f75bba8",class:"zonos--finish-details"},t("div",{key:"f17f25e741a7a846e4d0d653f2e67c6b36ebd77a",class:"zonos--group"},this.notificationType==="success"?t("zonos-icon",{"aria-label":"Order success",content:A,iconColor:"blue-800",size:50}):t("zonos-icon",{"aria-label":"Order failed",content:N,iconColor:"red-800",size:50}),t("zonos-text",{key:"1169bd299d16f1b063de9638c6c6fce00cf9d0a6",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"db6aebf906ad52207c8bc898c856b7a2a7f061e1",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"fd5516196ec5f645718b7fbf0c9de66ab322505b",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return t(s,null,o,t("br",null))}))),this.order&&e&&t("div",{key:"f50f1e9ed26e609346cdf3bdc1f93689d3c99d06",class:"zonos--button-container"},t("zonos-button",{key:"3dadbbfe5113e02412bb6b890b4d2923101e3c31",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},z("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());q.style=W();var Q='<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 G='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var K='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var Y=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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}"};var J=o("zonos_invoice_footer",/** @class */function(){function o(o){e(this,o);
|
|
60
60
|
/**
|
|
61
61
|
* Override mobile mode
|
|
62
62
|
*/this.mobile=false;
|
|
63
63
|
/**
|
|
64
64
|
* Override tablet mode
|
|
65
|
-
*/this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=D(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=
|
|
65
|
+
*/this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=D(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=D(this.mobile);this.isTablet=V(this.tablet)};o.prototype.render=function(){var o=this;var e;
|
|
66
66
|
// label resolves against every language, not just the offered ones, so the current
|
|
67
67
|
// locale always renders even if the merchant later drops it from the selector
|
|
68
68
|
var n=(e=w.find((function(o){return o.code===k.selectedLocale})))===null||e===void 0?void 0:e.label;
|
|
69
69
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
70
|
-
var r="gray-1000";return t(i,{key:"1cd5499e17c070498d65ebbca71d0cbe3c825456",class:
|
|
70
|
+
var r="gray-1000";return t(i,{key:"1cd5499e17c070498d65ebbca71d0cbe3c825456",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"2f31caade367c351d84571034eda59179c227084",class:"zonos--invoice-footer"},t("div",{key:"25f127514ad98939aee122c6b4772198e095b26d",class:"zonos--invoice-locale-wrapper"},B()&&t(s,{key:"03d37a0e0e94cf42d74a5c59905f7e7219533274"},t("zonos-button",{key:"76aab1e78afa3a51f579f865a24591acea0baadc",buttonColor:r,class:"zonos--invoice-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:G,iconColor:r}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},t("span",{key:"28642dac198b7c61bef48d211c8a820e0c8d1fcc",class:"zonos--invoice-locale-label"},n,t("zonos-icon",{key:"364b048befa8c5f45b6869f18b90b27da4b37056","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:Q,iconColor:r,size:18}))),t("div",{key:"ed4b425741e6aecc49882993be57da58de7d437b",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},t("zonos-language-select",{key:"e4c5e31e8cfdf0ca52a5b935743bda347f9fa7c1",handleOnClose:function(){return o.toggleLanguageDialog()}})))),t("div",{key:"1d0a2613e3a0d487b059fc66fb48f53858a4e6c7",class:"zonos--invoice-footer-icon-wrapper"},t("div",{key:"a27c7eebe0dca7fedbc1e6e22438393391ec9024",class:"zonos--invoice-footer-logo"},t("zonos-text",{key:"1013250d247fdb33ec365f8b3ffe9ca65d431d9d",textColor:r},z("Powered by")),t("a",{key:"ef93dda1f051f353da9e5f286942cc0a0e8015f7",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"de7cc9e5027eb85e7c578afda15a3b3f4e260e91",autoHeight:true,content:K,size:42}))),t("div",{key:"180e60cdd756303a14a4a80b72b81b4a4e1c124a",class:"dot"}),t("a",{key:"7f46908aa8cd49974d7525d7110dbb25402586ab",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"bba7017be84a8e320ca4d8fb2074822cd7e9f917",textColor:r},z("Privacy policy"))))))};Object.defineProperty(o.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:[{handleMobileChange:0}],tablet:[{handleTabletChange:0}]}},enumerable:false,configurable:true});return o}());J.style=Y();var X='<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 $='<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="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var oo=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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}"};var eo=o("zonos_invoice_order_details",/** @class */function(){function o(o){e(this,o);this.collapseClicked=n(this,"collapseClicked",7);
|
|
71
71
|
/**
|
|
72
72
|
* Whether or not the component is being rendered with mobile styles
|
|
73
73
|
*/this.mobile=true;
|
|
74
74
|
/**
|
|
75
75
|
* The landed cost id that is used to fetch the shipping address
|
|
76
|
-
*/this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=
|
|
76
|
+
*/this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=I(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return t("zonos-icon",{"aria-label":"Collapse expanded section",content:X,iconColor:"gray-1200"})}return t("zonos-icon",{"aria-label":"Expand collapsed section",content:$,iconColor:"gray-1200"})};return t(i,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},t("div",{class:"zonos--order-details-header-text"},t("zonos-text",{type:"boldSubheader"},z("Pay [organizationName]",{organizationName:C.organizationName})),e()),t("zonos-text",{type:"boldSubheader"},R({amount:O.amountTotalDue||0,isForeign:true}))),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--invoice-order-details-content"},t("zonos-invoice-cart-items",{isMobile:this.isMobile}),t("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:[{handleCollapseChangeFromProp:0}],collapseState:[{handleCollapseChange:0}]}},enumerable:false,configurable:true});return o}());eo.style=oo();var no='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var to='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var so=function(){return".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}"};var io=o("zonos_invoice_payment",/** @class */function(){function o(o){var t=this;e(this,o);this.continueClicked=n(this,"continueClicked",7);this.paypalSessionFailed=n(this,"paypalSessionFailed",7);this.paypalSessionDone=n(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];
|
|
77
77
|
/**
|
|
78
78
|
* Whether or not the continue button is loading
|
|
79
79
|
*/this.continueLoading=false;
|
|
@@ -101,7 +101,7 @@ void((n=a.stripeElements)===null||n===void 0?void 0:n.submit());setTimeout((func
|
|
|
101
101
|
v({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2/*return*/]}))}))};this.copyCardToClipboard=function(o){return __awaiter(t,void 0,void 0,(function(){var e,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4/*yield*/,navigator.clipboard.writeText(o)];case 1:t.sent();return[3/*break*/,3];case 2:e=t.sent();n=document.createElement("textarea");n.style.position="fixed";n.style.left="-1000px";n.style.top="-1000px";n.style.width="1px";n.style.height="1px";n.value=o;n.id="zonos-copy-card-number";document.body.appendChild(n);n.select();
|
|
102
102
|
// Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
|
|
103
103
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
104
|
-
document.execCommand("copy");document.body.removeChild(n);return[3/*break*/,3];case 3:window.Zonos.showNotification({message:z("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2/*return*/]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4/*yield*/,
|
|
104
|
+
document.execCommand("copy");document.body.removeChild(n);return[3/*break*/,3];case 3:window.Zonos.showNotification({message:z("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2/*return*/]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4/*yield*/,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2/*return*/]}this.internalContinueLoading=false;
|
|
105
105
|
// continue to the next step
|
|
106
106
|
p();return[2/*return*/]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;
|
|
107
107
|
// scroll to the top of the page when the payment error is shown
|
|
@@ -111,13 +111,13 @@ void y({currency:f.currency})}))];
|
|
|
111
111
|
// start init paypal with the presentment currency when landed cost is fetched
|
|
112
112
|
void y({currency:f.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=a.hasPaymentError;if(!a.stripeElements){return null}if(!a.clientSecret){return null}
|
|
113
113
|
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
114
|
-
if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=
|
|
114
|
+
if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=S();var r=f.isStagingMode||L();var l=((e=a.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var c=function(){if(r){
|
|
115
115
|
// If in mobile, use the theme from the store since the UI is solely by theme
|
|
116
116
|
var e=C.appearance.theme;return t(s,null,o.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:z("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",
|
|
117
117
|
// use primary type when on mobile mode
|
|
118
|
-
variant:o.submitBtnType},z("Place test order"))))}if(a.isFetchingSession||
|
|
118
|
+
variant:o.submitBtnType},z("Place test order"))))}if(a.isFetchingSession||O.isFetchingPayorInfo){return null}return t(s,null,o.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},z("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||z("We couldn't complete your payment. Please verify the payment details and try again.")),b.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},b.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!l&&t(s,null,t("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&a.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&a.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!f.checkoutSession){H("Checkout session is not found");return[2/*return*/]}return[4/*yield*/,this.continueClickHandler({currencyCode:f.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",
|
|
119
119
|
// use primary type when on mobile mode
|
|
120
|
-
variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:R({amount:
|
|
120
|
+
variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:R({amount:O.amountTotalDue||0,isForeign:true})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&a.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&a.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",variant:"subtle"},z("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:function(e){var n=e.detail.orderId;o.paypalSessionDone.emit(n)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:l?"block":"none"}})),n&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},z("Test cards")),t("zonos-text",{textColor:"gray-700"},z("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:no}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},z("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:to}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},z("Failure")," (****0002)")),t("zonos-notification",null)))};return t(i,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},z("Payment method")),c()))};Object.defineProperty(o.prototype,"ele",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:[{continueLoadingWatcher:0}],hasStripePaymentError:[{stripePaymentErrorWatcher:0}]}},enumerable:false,configurable:true});return o}());io.style=so();var ro=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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}'};var ao=o("zonos_invoice_review",/** @class */function(){function o(o){e(this,o);
|
|
121
121
|
/**
|
|
122
122
|
* Whether or not the component is being rendered with mobile styles
|
|
123
123
|
*/this.mobile=false;
|
|
@@ -128,6 +128,6 @@ variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:R({amount:U.amountTota
|
|
|
128
128
|
* Whether or not to show the collapse icon
|
|
129
129
|
* This is controled from the collapsed state of the zonos-collapse component
|
|
130
130
|
* to show the collapse icon
|
|
131
|
-
*/this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=D(this.mobile);this.isTablet=
|
|
131
|
+
*/this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=D(this.mobile);this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();
|
|
132
132
|
// Wait for the data to load
|
|
133
|
-
setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return t(i,{key:"46c130c8e6aeacdd5f74feb613ec5829c0be396d",class:
|
|
133
|
+
setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return t(i,{key:"46c130c8e6aeacdd5f74feb613ec5829c0be396d",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"9649e31a3053c9772363620cf2acfe557ace8715",class:"zonos--title"},t("zonos-text",{key:"1b365c27c2280e61c4849c7382a945716ec2abf8",textColor:o,type:"semiBoldLabel"},z("Pay [organizationName]",{organizationName:C.organizationName}))),t("div",{key:"a1f24eb0f3080ec0ddad9ca323f49dd391117326",class:"zonos--total-pay"},F({content:t("zonos-text",{type:"secondaryPageHeader"},R({amount:O.amountTotalDue||0,isForeign:true})),isLoading:O.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());ao.style=ro()}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as n,a as s,F as i}from"./p-_lt63o7c.js";import{b as e,i as t,c,d as a,r,e as l,k as z,l as d,z as v,E as h,J as m,H as p,f as u}from"./p-BMPYH-LT.js";import{i as g,a as f,b,c as w}from"./p-D6xXnsM_.js";import{p as x,a as y}from"./p-DpwmHU8R.js";import{s as k,t as C,h as I,j,k as S,l as T}from"./p-CTiqplrr.js";import{z as D}from"./p-CqB9AfBf.js";import{b as L}from"./p-BycjkdlE.js";import{h as O,s as E,l as _,g as U}from"./p-DE4a-QD5.js";import{i as P,a as A}from"./p-Clej0Ffe.js";import{c as N}from"./p-BJHSB96f.js";import{l as B}from"./p-BJmZPrZl.js";import"./p-Dwg61Ft_.js";import"./p-DMIgN_sT.js";import"./p-YdrG78th.js";import"./p-r-YGHhLa.js";import"./p-CICjAi70.js";import"./p-D1e9zNDA.js";const F=class{constructor(n){o(this,n),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=e.clientSecret,this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=a.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:n}}=o;return n?{settlementAmount:(n.discounts||0)+n.items+n.landedCostTotal+n.shipping}:null},this.applyStripeTheme=async()=>{const o=D.appearance.theme;await t({overrideTheme:this.isMobile?o:void 0,paypalEnabled:x()})},this.fetchCheckoutSession=async o=>{const{json:n}=await O("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return n},this.checkStripePaymentIntentStatus=async()=>{var o;const n=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,i=s.get("payment_intent_client_secret"),t=s.get("zonosCheckoutSessionId");if(B("Payment intent exist, checking stripe payment intent status"),!i)return B("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:n};const{error:a,status:r}=await c({clientSecret:i});if(new URLSearchParams(window.location.search).get("redirect_status")&&t){B(a?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const n=await this.fetchCheckoutSession(t);return this.confirmationId=(null===(o=null==n?void 0:n.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,k.checkoutSessionId=t,e.clientSecret=i,this.setToFinishStep(r),{shouldAllowOrder:!1}}return n?(B("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(B("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})}}resizeListener(){this.isMobile=P(this.mobile),this.isTablet=A(this.tablet)}async setToFinishStep(o){e.stripe=window.Zonos.stripe,a.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initInvoiceCart(){var o,n,s,i,e,t,v,h,m,p,u;if(!window.Zonos.cartData)return;const b=null===(n=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===n?void 0:n.currencyCode;b&&(a.currency=b);const w=null===(i=null===(s=window.Zonos.cartData)||void 0===s?void 0:s.references)||void 0===i?void 0:i.checkoutSessionId,x=null===(t=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===t?void 0:t.landedCostId;if(!x)return void r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:D.organizationName})],title:C("Invalid session")});w?(B("Setting checkout session id from cart reference","info",w),k.checkoutSessionId=w):(B("Clear checkout session id from storage so we start from a fresh session for the invoice cart"),k.checkoutSessionId=null);const{shouldAllowOrder:y}=await this.checkStripePaymentIntentStatus();if(y){try{const{adjustments:o,cartItems:n}=L(window.Zonos.cartData);if(await l({adjustments:o,cartItems:n,landedCostId:x,shouldInitSessionOnFailure:!1}),!k.checkoutSessionId&&!w){const o=await z();if(B(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}if((!a.checkoutSession||(null===(v=a.checkoutSession)||void 0===v?void 0:v.completedAt))&&w){const o=await this.fetchCheckoutSession(w);if(this.confirmationId=(null===(h=null==o?void 0:o.checkoutSession.landedCost)||void 0===h?void 0:h.shortId)||null,(null==o?void 0:o.checkoutSession.completedAt)&&o.checkoutSession.order)return void this.setToFinishStep("succeeded");if(null==o?void 0:o.checkoutSession.clientSecret){const{status:n}=await c({clientSecret:o.checkoutSession.clientSecret});if("processing"===n||"succeeded"===n)return void this.setToFinishStep(n)}throw E({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:w,cartId:null===(m=window.Zonos.cartData)||void 0===m?void 0:m.id,cartLandedCostId:x}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!a.checkoutSession)throw E({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:null===(p=window.Zonos.cartData)||void 0===p?void 0:p.id,cartLandedCostId:x||"N/A"}}),new Error("Could not update/create checkout session for this invoice cart");d();const s=null===(u=a.checkoutSession)||void 0===u?void 0:u.landedCost;if(!s)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await g(Object.assign(Object.assign({},a.checkoutSession),{id:k.checkoutSessionId||""})),f({landedCostId:s.id}),this.applyStripeTheme()}catch(o){_(o),r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:D.organizationName})],title:C("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,n,s,i;if(null===(o=e.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(n=e.stripeLinkEventData)||void 0===n?void 0:n.complete)if(null===(s=e.stripeBillingAddressEventData)||void 0===s?void 0:s.complete)if("USD"!==e.checkoutSettlementCurrency||!e.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,y.paypalErrorMessage=null,e.hasPaymentError=!1,this.submitLoading=!0,a.inventoryCheckErrorMessage=null,!await v())return e.hasPaymentError=!0,e.customErrorMessage=C("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:e.checkoutSettlementCurrency}),void(this.submitLoading=!1);await b();try{return await h({noLandedCostCheck:!0}),a.step="finish",void(this.confirmationId=w.landedCostShortId||(null===(i=a.selectedLandedCost)||void 0===i?void 0:i.landedCostId)||null)}catch(o){_(o),e.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){e.stripe=window.Zonos.stripe,a.step="payment",this.initInvoiceCart(),this.resizeListener(),this.storeUnsubscribeList=[m("clientSecret",(()=>{this.applyStripeTheme()})),I("selectedLocale",(()=>{this.applyStripeTheme()}))],B(`mobile: ${this.isMobile}`)}disconnectedCallback(){p(),u(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=e.clientSecret,e.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:t,theme:c}=D.appearance,r=()=>{const o=`${t}?timestamp=${Date.now()}`;return n("div",{class:"zonos--logo"},o&&n("img",{alt:`${D.organizationName} logo`,src:o}))},l=U(),z=()=>{var o;const s=new URLSearchParams(window.location.search),e=s.get("zonosQaUrl"),t=s.get("zonosDebug"),c=null===(o=S.find((o=>o.code===T.selectedLocale)))||void 0===o?void 0:o.label;return n(i,null,n("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},n("div",{class:"zonos--logo-wrapper"},r(),l&&n("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),"1"===t&&n("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),e&&n("zonos-badge",{badgeColor:"purple",size:"small"},e)),n("div",{class:"zonos--header-right"},n("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},c,n("zonos-icon",{"aria-label":"Language select",content:'<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>',iconColor:"gray-1200"})),n("div",{class:N(["zonos--invoice-language-dialog",this.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},n("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))))};return n(s,{class:N(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":c},(()=>this.isOverlayLoading||e.isFetchingSession?null:n("div",{class:"zonos--content"},"finish"!==a.step&&"error"!==a.step&&n(i,null,(this.isMobile||this.isTablet)&&z(),n("div",{class:"zonos--left","data-theme":c},!this.isMobile&&!this.isTablet&&z(),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},C("Billing info")),n("zonos-v-stack",{spacing:16},n("zonos-link-authentication",{titleText:""}),n("zonos-address",{titleText:"",type:"billing"})),n("zonos-invoice-payment",{class:N(["zonos--invoice-container"]),continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),n("div",{class:"zonos--right","data-theme":c},!this.isMobile&&n("zonos-invoice-review",{mobile:this.isMobile,tablet:this.isTablet}),n("div",{class:"zonos--order-details-container"},!this.isMobile&&n("zonos-invoice-cart-items",null),this.isMobile&&n("zonos-invoice-order-details",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReviewMobile=!this.collapseReviewMobile}})),n("div",{class:"flex--wrapper"},!this.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-invoice-subtotal",null)),!this.isMobile&&!this.isTablet&&n("zonos-invoice-footer",{"data-theme":c,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===a.step||"error"===a.step)&&n("div",{class:"zonos--done","data-theme":c},n("div",{class:"zonos--header"},r()),n("zonos-invoice-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===a.step&&a.error?Object.assign(Object.assign({},a.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===a.step||"error"===a.step)&&n("zonos-invoice-footer",{"data-theme":c,mobile:this.isMobile,tablet:this.isTablet})))(),o&&n("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:j({amount:o.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:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),n("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};F.style=".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}";export{F as zonos_invoice}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-DTgUqgwV.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js"],(function(o){"use strict";var e,s,n,r,t;return{setters:[function(o){e=o.r;s=o.h;n=o.a},function(o){r=o.a},function(o){t=o.c},null],execute:function(){var a=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{border-radius:var(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}'};var l=o("zonos_banner",/** @class */function(){function o(o){var s=this;e(this,o);
|
|
2
2
|
/**
|
|
3
3
|
* Whether or not the button has content
|
|
4
4
|
*/this.hasContent=false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,a as t,g as s}from"./p-_lt63o7c.js";import{d as l}from"./p-Cxuiqv1I.js";import{l as n,n as i,t as r,g as a,p as h,q as d,r as c,u as m,j as f,v as z}from"./p-clDfq9AL.js";import{z as p,g,m as w}from"./p-W82paT5F.js";import{c as u}from"./p-BJHSB96f.js";import{h as b,l as v}from"./p-DE4a-QD5.js";import{g as x}from"./p-DAscqB23.js";import{l as y}from"./p-BJmZPrZl.js";import"./p-BpDCLBwW.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},O=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:n}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&i(l)&&document.querySelectorAll(l)||[],a=s&&i(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&i(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=a[t];if(s&&l){const n={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},L=o=>{if(null==o||"object"!=typeof o)return!1;const{anchor:e,horizontalOffset:t,verticalOffset:s}=o;return"string"==typeof e&&e.length>0&&"number"==typeof t&&Number.isFinite(t)&&"number"==typeof s&&Number.isFinite(s)},D=o=>Boolean(null==o?void 0:o.includes("LEFT")),C=({anchor:o,animateFromLeftOverride:e,horizontalOffset:t,isMobileWindow:s,isOnLeft:l,shouldFloat:n,verticalOffset:i})=>{return{anchor:o,horizontalOffset:t,isMobileWindow:s,isOnLeft:null!=l?l:Boolean(e)||D(o),isOnTop:(r=o,Boolean(null==r?void 0:r.includes("TOP"))),shouldFloat:n,verticalOffset:i};var r},B=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=n;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:n,json:i}=await b("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return n.length||!i?(v(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):i.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=O();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=O();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&a(o.searchParams))!==n.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!a(e.searchParams))return void h(n.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return n.helloCountryList}componentWillLoad(){this.isMobile=window.innerWidth<=768;const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(n.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return f({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||n.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){return(o=>{const{anchorElementSelector:e,animateFromLeftOverride:t,componentDesktopLocation:s,componentMobileLocation:l,desktopLocation:n,isMobileWindow:i,mobileLocation:r,settingsDesktopPlacement:a,settingsMobilePlacement:h,shouldAnimateLeftDesktop:d}=o;if(i)return l?C({anchor:l,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!0,shouldFloat:!0,verticalOffset:null}):L(h)?C({anchor:h.anchor,animateFromLeftOverride:t,horizontalOffset:h.horizontalOffset,isMobileWindow:!0,shouldFloat:!0,verticalOffset:h.verticalOffset}):C({anchor:r,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!0,shouldFloat:Boolean(r),verticalOffset:null});if(s)return C({anchor:s,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!1,shouldFloat:!0,verticalOffset:null});if(L(a))return C({anchor:a.anchor,animateFromLeftOverride:t,horizontalOffset:a.horizontalOffset,isMobileWindow:!1,shouldFloat:!0,verticalOffset:a.verticalOffset});const c=!e&&Boolean(n),m=Boolean(t)||(c&&n?D(n):Boolean(null==d?void 0:d()));return C({anchor:n,horizontalOffset:null,isMobileWindow:!1,isOnLeft:m,shouldFloat:c,verticalOffset:null})})({anchorElementSelector:p.helloSettings.anchorElementSelector,animateFromLeftOverride:this.animateFromLeftOverride,componentDesktopLocation:this.desktopLocationOverride,componentMobileLocation:this.mobileLocationOverride,desktopLocation:p.helloSettings.desktopLocation,isMobileWindow:this.isMobile,mobileLocation:p.helloSettings.mobileLocation,settingsDesktopPlacement:p.helloSettings.desktopLocationOverride,settingsMobilePlacement:p.helloSettings.mobileLocationOverride,shouldAnimateLeftDesktop:()=>Boolean(this.shouldAnimateLeftDesktop())})}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=g(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:i}=n,{horizontalOffset:r,isOnLeft:a,isOnTop:h,shouldFloat:d,verticalOffset:c}=this.getHelloLocation(),m=w(p.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,g=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const b=z()&&!!l;var v;b&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:i});const x={"--zonos-elements-hello-widget-size":`${null==(v=p.helloSettings.widgetSize)||!Number.isFinite(v)||v<=0?18:Math.min(64,Math.max(18,v))}px`};return null!=r&&null!=c&&(x["--zonos-elements-hello-float-inset-x"]=`${r}px`,x["--zonos-elements-hello-float-inset-y"]=`${c}px`),e(t,{class:"zonos--hello zonos--elements","data-theme":f,style:x},b&&e("div",{class:u(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},e("button",{class:u(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:u(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:a,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}}};B.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:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{width:auto;height:auto;z-index:1001}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .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;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{B as zonos_hello}
|
|
1
|
+
import{r as o,h as e,a as t,g as s}from"./p-_lt63o7c.js";import{d as l}from"./p-DW7I0zOF.js";import{l as n,n as i,t as r,g as a,p as h,q as d,r as c,u as m,j as f,v as z}from"./p-CTiqplrr.js";import{z as p,g,m as w}from"./p-CqB9AfBf.js";import{c as u}from"./p-BJHSB96f.js";import{h as b,l as v}from"./p-DE4a-QD5.js";import{g as x}from"./p-DAscqB23.js";import{l as y}from"./p-BJmZPrZl.js";import"./p-n5PZKz1k.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},O=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:n}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&i(l)&&document.querySelectorAll(l)||[],a=s&&i(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&i(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=a[t];if(s&&l){const n={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},L=o=>{if(null==o||"object"!=typeof o)return!1;const{anchor:e,horizontalOffset:t,verticalOffset:s}=o;return"string"==typeof e&&e.length>0&&"number"==typeof t&&Number.isFinite(t)&&"number"==typeof s&&Number.isFinite(s)},D=o=>Boolean(null==o?void 0:o.includes("LEFT")),C=({anchor:o,animateFromLeftOverride:e,horizontalOffset:t,isMobileWindow:s,isOnLeft:l,shouldFloat:n,verticalOffset:i})=>{return{anchor:o,horizontalOffset:t,isMobileWindow:s,isOnLeft:null!=l?l:Boolean(e)||D(o),isOnTop:(r=o,Boolean(null==r?void 0:r.includes("TOP"))),shouldFloat:n,verticalOffset:i};var r},B=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=n;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:n,json:i}=await b("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return n.length||!i?(v(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):i.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=O();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=O();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&a(o.searchParams))!==n.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!a(e.searchParams))return void h(n.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return n.helloCountryList}componentWillLoad(){this.isMobile=window.innerWidth<=768;const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(n.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return f({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||n.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){return(o=>{const{anchorElementSelector:e,animateFromLeftOverride:t,componentDesktopLocation:s,componentMobileLocation:l,desktopLocation:n,isMobileWindow:i,mobileLocation:r,settingsDesktopPlacement:a,settingsMobilePlacement:h,shouldAnimateLeftDesktop:d}=o;if(i)return l?C({anchor:l,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!0,shouldFloat:!0,verticalOffset:null}):L(h)?C({anchor:h.anchor,animateFromLeftOverride:t,horizontalOffset:h.horizontalOffset,isMobileWindow:!0,shouldFloat:!0,verticalOffset:h.verticalOffset}):C({anchor:r,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!0,shouldFloat:Boolean(r),verticalOffset:null});if(s)return C({anchor:s,animateFromLeftOverride:t,horizontalOffset:null,isMobileWindow:!1,shouldFloat:!0,verticalOffset:null});if(L(a))return C({anchor:a.anchor,animateFromLeftOverride:t,horizontalOffset:a.horizontalOffset,isMobileWindow:!1,shouldFloat:!0,verticalOffset:a.verticalOffset});const c=!e&&Boolean(n),m=Boolean(t)||(c&&n?D(n):Boolean(null==d?void 0:d()));return C({anchor:n,horizontalOffset:null,isMobileWindow:!1,isOnLeft:m,shouldFloat:c,verticalOffset:null})})({anchorElementSelector:p.helloSettings.anchorElementSelector,animateFromLeftOverride:this.animateFromLeftOverride,componentDesktopLocation:this.desktopLocationOverride,componentMobileLocation:this.mobileLocationOverride,desktopLocation:p.helloSettings.desktopLocation,isMobileWindow:this.isMobile,mobileLocation:p.helloSettings.mobileLocation,settingsDesktopPlacement:p.helloSettings.desktopLocationOverride,settingsMobilePlacement:p.helloSettings.mobileLocationOverride,shouldAnimateLeftDesktop:()=>Boolean(this.shouldAnimateLeftDesktop())})}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=g(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:i}=n,{horizontalOffset:r,isOnLeft:a,isOnTop:h,shouldFloat:d,verticalOffset:c}=this.getHelloLocation(),m=w(p.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,g=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const b=z()&&!!l;var v;b&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:i});const x={"--zonos-elements-hello-widget-size":`${null==(v=p.helloSettings.widgetSize)||!Number.isFinite(v)||v<=0?18:Math.min(64,Math.max(18,v))}px`};return null!=r&&null!=c&&(x["--zonos-elements-hello-float-inset-x"]=`${r}px`,x["--zonos-elements-hello-float-inset-y"]=`${c}px`),e(t,{class:"zonos--hello zonos--elements","data-theme":f,style:x},b&&e("div",{class:u(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},e("button",{class:u(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:u(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:a,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}}};B.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:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{width:auto;height:auto;z-index:1001}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .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;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:var(--zonos-elements-hello-float-inset-y, 72px);right:var(--zonos-elements-hello-float-inset-x, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:var(--zonos-elements-hello-float-inset-x, 32px);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-hello-float-inset-y, 32px)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{B as zonos_hello}
|