@zonos/elements 1.3.272 → 1.3.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-f1374a56.js → cart-660e115c.js} +32 -2
- package/dist/cjs/collect-286a9d04.js +3107 -0
- package/dist/cjs/{hasInclusivePrice-2f1232e3.js → hasInclusivePrice-b35e81aa.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-3760bec0.js → invoice-f032089f.js} +2 -2
- package/dist/cjs/isCollectMobileTablet-884d4280.js +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-503c8477.js → localization-f4a64f6f.js} +120 -0
- package/dist/cjs/{paypal-5e9b8224.js → paypal-125259ab.js} +2 -2
- package/dist/cjs/{placeTestOrder-d1be2c8e.js → placeTestOrder-02001a99.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-4486b06e.js → renderCheckoutCurrency-cad156a7.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +18 -18
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +170 -0
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +19 -19
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +150 -36
- package/dist/cjs/zonos-collect.cjs.entry.js +176 -38
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -14
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.css +43 -0
- package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.js +215 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +110 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +1 -17
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +21 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +167 -29
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/airwallex.js +195 -0
- package/dist/collection/components/store/checkout/collect.js +4 -1
- package/dist/collection/components/store/checkout/stripe.js +26 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
- package/dist/collection/components/store/translationStore/strings.base.js +6 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
- package/dist/collection/components/store/translationStore/strings.french.js +6 -0
- package/dist/collection/components/store/translationStore/strings.german.js +6 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/types/generated/graphql.internal.types.js +3 -0
- package/dist/esm/{cart-1415dcf0.js → cart-23e29950.js} +32 -2
- package/dist/esm/collect-a235299d.js +3092 -0
- package/dist/esm/{hasInclusivePrice-a3b0f71c.js → hasInclusivePrice-5e106f84.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-117efa2c.js → invoice-78f069c7.js} +2 -2
- package/dist/esm/isCollectMobileTablet-111b0dd7.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-29723d89.js → localization-17546792.js} +120 -0
- package/dist/esm/{paypal-cb5559d4.js → paypal-5bc6b0d0.js} +2 -2
- package/dist/esm/{placeTestOrder-443376eb.js → placeTestOrder-e842854a.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-8390b5bf.js → renderCheckoutCurrency-e3953f67.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +18 -18
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-airwallex-payment.entry.js +166 -0
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +9 -9
- package/dist/esm/zonos-cart-items_12.entry.js +19 -19
- package/dist/esm/zonos-checkbox_2.entry.js +5 -5
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
- package/dist/esm/zonos-collect-finish_6.entry.js +135 -21
- package/dist/esm/zonos-collect.entry.js +171 -33
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -8
- package/dist/esm/zonos-invoice-finish_5.entry.js +14 -14
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-23e29950.js +1 -0
- package/dist/esm-es5/collect-a235299d.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-a3b0f71c.js → hasInclusivePrice-5e106f84.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-117efa2c.js → invoice-78f069c7.js} +1 -1
- package/dist/esm-es5/isCollectMobileTablet-111b0dd7.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-17546792.js +1 -0
- package/dist/esm-es5/{paypal-cb5559d4.js → paypal-5bc6b0d0.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-443376eb.js → placeTestOrder-e842854a.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-8390b5bf.js → renderCheckoutCurrency-e3953f67.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -0
- package/dist/esm-es5/zonos-badge.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 +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- 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-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.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-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +61 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.d.ts +46 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +7 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +4 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +29 -0
- package/dist/types/components/store/checkout/airwallex.d.ts +83 -0
- package/dist/types/components/store/checkout/collect.d.ts +12 -1
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
- package/dist/types/components.d.ts +42 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +11 -1
- package/dist/types/types/checkout/api/PartyInfo.d.ts +6 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +20 -0
- package/dist/types/types/generated/graphql.internal.types.ts +29 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +6 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-013575f2.entry.js +1 -0
- package/dist/zonos-elements/{p-344a1fee.entry.js → p-055ef910.entry.js} +1 -1
- package/dist/zonos-elements/{p-3efe0875.entry.js → p-08b48608.entry.js} +1 -1
- package/dist/zonos-elements/{p-26ae4ee7.system.entry.js → p-0a54dae6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aafc2155.system.entry.js → p-0b59076d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c92a5ae5.system.entry.js → p-10571f94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-658ab5e2.entry.js → p-12a05647.entry.js} +1 -1
- package/dist/zonos-elements/{p-b453ae2b.system.js → p-14018649.system.js} +2 -2
- package/dist/zonos-elements/{p-d2ba9e3c.system.entry.js → p-1678d8b4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-171d0f9f.system.js +1 -0
- package/dist/zonos-elements/{p-5bd47a30.system.entry.js → p-1a105d6e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1a4083be.system.js +1 -0
- package/dist/zonos-elements/{p-792fce17.system.entry.js → p-1f31f5a0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2197d6ab.js +1 -0
- package/dist/zonos-elements/{p-536cbab5.system.entry.js → p-27e50593.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b4ba025.entry.js → p-2825431d.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-73730eb9.system.entry.js → p-2a1247f4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2adbbce7.system.js +1 -0
- package/dist/zonos-elements/{p-f98cdb98.system.entry.js → p-306e5499.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-831bcfb6.entry.js → p-31577ebd.entry.js} +1 -1
- package/dist/zonos-elements/{p-889a44fc.entry.js → p-328fd90e.entry.js} +1 -1
- package/dist/zonos-elements/p-33910e8b.js +1 -0
- package/dist/zonos-elements/{p-fb684748.system.entry.js → p-36b311f9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b4e5608.system.entry.js → p-3eba657b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41619f29.js +1 -0
- package/dist/zonos-elements/{p-cdea0f7d.js → p-42948a52.js} +1 -1
- package/dist/zonos-elements/p-46e72a90.entry.js +1 -0
- package/dist/zonos-elements/p-49d8a10f.entry.js +1 -0
- package/dist/zonos-elements/{p-54a9c772.system.entry.js → p-4a960329.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-93324ee5.entry.js → p-4b371b65.entry.js} +1 -1
- package/dist/zonos-elements/p-539bc46c.js +1 -0
- package/dist/zonos-elements/p-579932a7.js +1 -0
- package/dist/zonos-elements/{p-2afecda7.entry.js → p-59b10526.entry.js} +1 -1
- package/dist/zonos-elements/{p-98bea13e.system.entry.js → p-5aa35d1c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd849c69.system.js → p-62c68aee.system.js} +1 -1
- package/dist/zonos-elements/{p-48f3e2d2.system.entry.js → p-6c19310e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-16948eea.system.entry.js → p-732e7373.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e8c4a29.entry.js → p-734d646b.entry.js} +1 -1
- package/dist/zonos-elements/{p-60f0ff42.entry.js → p-7eb47eb0.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb254a96.system.entry.js → p-86a9f048.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8af57c2a.js +1 -0
- package/dist/zonos-elements/{p-18c9565b.system.entry.js → p-8c4761d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c45df586.system.entry.js → p-8e77a3cd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-919c5500.entry.js +1 -0
- package/dist/zonos-elements/p-91b921a4.system.js +1 -0
- package/dist/zonos-elements/{p-3b600b89.system.js → p-9574695a.system.js} +1 -1
- package/dist/zonos-elements/p-97917371.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7ce6b8f7.system.entry.js → p-9b003a15.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-53be08c8.entry.js → p-9c3276c8.entry.js} +1 -1
- package/dist/zonos-elements/p-9cd41234.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5f92db80.system.entry.js → p-a1a05de4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4c94cfd3.entry.js → p-a968ccba.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee00f232.entry.js → p-abd485df.entry.js} +1 -1
- package/dist/zonos-elements/{p-7d859914.entry.js → p-ad961f5d.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b87101d.system.entry.js → p-b5c01288.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bf8c98ab.system.js +1 -0
- package/dist/zonos-elements/{p-2d1055d5.entry.js → p-c13d2e3f.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b46f3bd.system.entry.js → p-c15476a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e36a7cf.system.entry.js → p-c6823974.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dae881f2.entry.js → p-c83bc4b3.entry.js} +1 -1
- package/dist/zonos-elements/{p-134c5010.system.entry.js → p-c846a5f3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aca66cd.entry.js → p-cc508de8.entry.js} +1 -1
- package/dist/zonos-elements/{p-6609467e.entry.js → p-ccd14aa5.entry.js} +1 -1
- package/dist/zonos-elements/{p-318e704a.system.js → p-d25759fb.system.js} +1 -1
- package/dist/zonos-elements/{p-a956e28f.entry.js → p-d5e66ea6.entry.js} +1 -1
- package/dist/zonos-elements/{p-7536cf94.system.entry.js → p-daf57db3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b35a0b1e.entry.js → p-dcef2202.entry.js} +1 -1
- package/dist/zonos-elements/{p-283ffaad.entry.js → p-dd6da3de.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd2daace.entry.js → p-df6fbf3f.entry.js} +1 -1
- package/dist/zonos-elements/{p-c16c7978.entry.js → p-e643346a.entry.js} +1 -1
- package/dist/zonos-elements/{p-b375372e.entry.js → p-e8cb382e.entry.js} +1 -1
- package/dist/zonos-elements/{p-f4be6ce5.system.entry.js → p-e8ec88a9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e9afd736.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c425d3d9.js → p-e9c8a235.js} +1 -1
- package/dist/zonos-elements/{p-ccc8d669.system.entry.js → p-f0eb6317.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f1cc659c.js +1 -0
- package/dist/zonos-elements/{p-b1b7d786.entry.js → p-f53c8a9f.entry.js} +1 -1
- package/dist/zonos-elements/{p-777d396e.entry.js → p-f72642de.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb77dd11.system.js → p-fcaec700.system.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/isCollectMobileTablet-d5c1a9ea.js +0 -176
- package/dist/esm/isCollectMobileTablet-2c62fdaa.js +0 -169
- package/dist/esm-es5/cart-1415dcf0.js +0 -1
- package/dist/esm-es5/isCollectMobileTablet-2c62fdaa.js +0 -1
- package/dist/esm-es5/localization-29723d89.js +0 -1
- package/dist/zonos-elements/p-0fa932e6.system.js +0 -1
- package/dist/zonos-elements/p-15c2dfea.entry.js +0 -1
- package/dist/zonos-elements/p-17c7a727.system.js +0 -1
- package/dist/zonos-elements/p-24aa6708.js +0 -1
- package/dist/zonos-elements/p-2585034d.entry.js +0 -1
- package/dist/zonos-elements/p-2cda42d5.system.js +0 -1
- package/dist/zonos-elements/p-53b65b80.js +0 -1
- package/dist/zonos-elements/p-58521b25.js +0 -1
- package/dist/zonos-elements/p-9259e19b.system.entry.js +0 -1
- package/dist/zonos-elements/p-99ef86c3.js +0 -1
- package/dist/zonos-elements/p-aa3a7538.js +0 -1
- package/dist/zonos-elements/p-c935390d.js +0 -1
- package/dist/zonos-elements/p-e77dd304.system.js +0 -1
- package/dist/zonos-elements/p-ea91600a.entry.js +0 -1
- package/dist/zonos-elements/p-f5d9e5e5.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function s(o){try{l(n.next(o))}catch(o){a(o)}}function r(o){try{l(n["throw"](o))}catch(o){a(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(t=0)),t)try{if(n=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){t.label=r[1];break}if(r[0]===6&&t.label<a[1]){t.label=a[1];a=r;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(r);break}if(a[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,F as Fragment,a as Host}from"./index-cfd394c8.js";import{l as localizationStore,t as translate,h as currencyFormat}from"./localization-29723d89.js";import{z as zonosStore}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{f as formatStringWithLinks}from"./formatStringWithLinks-9e819405.js";import{h as hasInclusivePrice,T as TAXES_KEY,D as DUTY_KEY}from"./hasInclusivePrice-a3b0f71c.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{e as euCountryCodes}from"./TaxId-50d72254.js";import"./handleFetch-a844cac1.js";import"./VarianceTest-572cecf5.js";var getHasMoreSpaceAbove=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var wrapStringWithLink=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var BagIcon='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var ImportIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var InclusivePricingIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var MessageIcon='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var MoneyIcon='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var RemoveIcon='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosHelloDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var ZonosHelloDialogStyle0=zonosHelloDialogCss;var ZonosHelloDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isOpen=false;this.setIsOpen=function(){};this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false;this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(e.dialogRef)&&e.isOpen){e.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(zonosStore.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=localizationStore.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.isDomesticCountry=function(){var o,e;var t=localizationStore.selectedCountryCode;return!!t&&!!((e=(o=zonosStore.genericSettings)===null||o===void 0?void 0:o.domesticCountries)===null||e===void 0?void 0:e.includes(t))};this.isNoThresholdCountry=function(o){if(!o||!e.hasTaxId()){return false}var t=__spreadArray(["AU","NZ","GB","NO","SG"],euCountryCodes,true);return t.includes(o)};this.getDutyMessage=function(){if(e.isDomesticCountry()){return null}var o=localizationStore.countryLandedCost;if(!(o===null||o===void 0?void 0:o.allowLowValueOrders)&&(o===null||o===void 0?void 0:o.countryCode)==="GB"){return translate("Duties will apply to all orders.")}var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?currencyFormat({amount:o.dutyDeminimus}):null;return t?translate("Spend up to [threshold] duty free.",{threshold:t}):translate("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=localizationStore.countryLandedCost;if(e.isDomesticCountry()){return null}if(!(o===null||o===void 0?void 0:o.allowLowValueOrders)&&(o===null||o===void 0?void 0:o.countryCode)==="GB"){return translate("Taxes will apply to all orders.")}var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?currencyFormat({amount:o.vatTaxDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend up to [threshold] tax free.",{threshold:t}):translate("Taxes will apply to all orders.")};this.getEuDutyTaxMessage=function(o){return["".concat(translate("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:translate("Learn more.")}))]};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return["".concat(translate("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:translate("Learn more.")}))]}var e=o.dutyDeminimus;return[translate("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:currencyFormat({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(hasInclusivePrice()){return[]}return["".concat(translate("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:translate("Learn more.")}))]};this.getNewZealandDutyTaxMessge=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:translate("Learn more.")}))]};this.getNorwayDutyTaxMessage=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:translate("Learn more.")}))]};this.getSingaporeDutyTaxMessage=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:translate("Learn more.")}))]};this.getInclusivePriceMessage=function(){var o=localizationStore.inclusivePricingConfigurations;var e=o===null||o===void 0?void 0:o.find(Boolean);var t=e===null||e===void 0?void 0:e.configurations[TAXES_KEY];var n=e===null||e===void 0?void 0:e.configurations[DUTY_KEY];if((t===null||t===void 0?void 0:t.status)==="DISABLED"&&(n===null||n===void 0?void 0:n.status)==="DISABLED"){return null}if((n===null||n===void 0?void 0:n.status)==="ENABLED"&&(t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"DUTIES_TAXES_AND_FEES",message:translate("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}}if((n===null||n===void 0?void 0:n.status)==="ENABLED"){return{inclusiveType:"DUTIES_FEES",message:translate("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}}if((t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"TAXES",message:translate("Product prices already include taxes. No additional taxes will be added at checkout.")}}return null};this.renderHelloMessage=function(o){var e=o.dutyDeMinimisMessage,t=o.inclusivePriceMessage,n=o.taxDeMinimisMessage;if(hasInclusivePrice()&&t){switch(t.inclusiveType){case"DUTIES_FEES":{return h(Fragment,null,t.message&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:InclusivePricingIcon}),h("zonos-text",{"aria-label":"Duty inclusive pricing message"},t.message)),n&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis icon",content:MoneyIcon}),h("zonos-text",{"aria-label":"Tax de minimis message"},n)))}case"TAXES":{return h(Fragment,null,t.message&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:InclusivePricingIcon}),h("zonos-text",{"aria-label":"Tax inclusive pricing message"},t.message)),e&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis icon",content:ImportIcon}),h("zonos-text",{"aria-label":"Duty de minimis message"},e)))}case"DUTIES_TAXES_AND_FEES":default:{return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:InclusivePricingIcon}),h("zonos-text",null,t.message))}}}return h(Fragment,null,e&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis icon",content:ImportIcon}),h("zonos-text",{"aria-label":"Duty de minimis message"},e)),n&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis icon",content:MoneyIcon}),h("zonos-text",{"aria-label":"Tax de minimis message"},n)))};this.getAdditionalDutyTaxMessage=function(){if(!localizationStore.countryLandedCost){return null}if(e.isDomesticCountry()){return null}if(!e.hasTaxId()){return null}switch(localizationStore.countryLandedCost.countryCode){case"GB":return e.getUkDutyTaxMessage(localizationStore.countryLandedCost);case"AU":return e.getAustraliaDutyTaxMessage(localizationStore.countryLandedCost);case"NZ":return e.getNewZealandDutyTaxMessge(localizationStore.countryLandedCost);case"NO":return e.getNorwayDutyTaxMessage(localizationStore.countryLandedCost);case"SG":return e.getSingaporeDutyTaxMessage(localizationStore.countryLandedCost);default:if(euCountryCodes.includes(localizationStore.countryLandedCost.countryCode)){return e.getEuDutyTaxMessage(localizationStore.countryLandedCost)}return null}}}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e,t;var n=localizationStore.selectedCountryCode;var i=this.getAdditionalDutyTaxMessage();var a=(e=this.animateFromLeftOverride)!==null&&e!==void 0?e:this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var s=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var r=localizationStore.customMessages;var l=translate("Welcome to [storeName]",{storeName:zonosStore.organizationName});var c=((t=r.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||translate("Know about duties and taxes before you buy. Shop with confidence!");var d=formatStringWithLinks(c);var u=this.getCurrentPageEnum();var f=r.filter((function(o){return o.pageName===u}));var g=this.getDutyMessage();var m=this.getTaxMessage();var v=this.getInclusivePriceMessage();return h(Host,{key:"4f03947b13c6e6d9f19d3d4241c427f9ef8cb07b",class:"zonos--elements"},h("div",{key:"c5001cd7c4c7bb0fcf2375fc211c9afbd2059f32",class:classes(["zonos--hello-dialog",a&&"zonos--hello-dialog-animate-from-left",s&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"cb86aadda605b075152c21009b11f57b87b1d815"},h("div",{key:"77a7e3bd67cd2b19f2adec81f15c642d76151f74",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"ac5d1386f34c2948ea087d64ba60d1af87e76487",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),h("zonos-v-stack",{key:"50fcf820665b013090f8b22bd011b48edd23e47d",spacing:24},h("zonos-country-flag",{key:"fba9eb926c23fdad59d4262582fefd102aa9e721",class:"zonos--hello-country-flag",countryCode:n}),h("zonos-v-stack",{key:"08438a0f1f7ab1ed7aa6077bd8c0c040d10a48e2",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"f3ed157753544a886c2362e48d4ff941135f69dd",type:"boldSubheader"},l),h("zonos-text",{key:"989155955d1b6b50e54b38b9aedf71041a1ca57e",innerHTML:d,textColor:"gray-800"})),h("zonos-v-stack",{key:"480acbed038550026005317e0fa41c74db4befe6",spacing:8},this.restrictedItems.map((function(o){var e;return o&&h("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return h("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),(g||m||v||!!(i===null||i===void 0?void 0:i.length))&&h("zonos-card",{key:"ec95384f56843f11e7ef678363c08718ce879bea",spacing:"12px"},h("zonos-v-stack",{key:"e56aedf0bf3c2e698b6911ae0d96f3c46059158e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:g,inclusivePriceMessage:v,taxDeMinimisMessage:m}),i===null||i===void 0?void 0:i.map((function(o){return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:BagIcon}),h("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o}))})))),f.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"103bcee4af2a3979a7db3e86b287063bec16310b",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"900e288096edd6aa4bcfddd3b80932a11c675a6a"},h("zonos-country-select",{key:"278e3cfe7dcd69332e6257517759ca2c8e959ae0",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"2d70d0c380fc681492b7b97b4d78677db88a78fc"},h("zonos-language-select",{key:"7debc2fa20436565b00c7f9832b89f388a814a96",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}();ZonosHelloDialog.style=ZonosHelloDialogStyle0;export{ZonosHelloDialog as zonos_hello_dialog};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function s(o){try{l(n.next(o))}catch(o){a(o)}}function r(o){try{l(n["throw"](o))}catch(o){a(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,r)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(e){return l([o,e])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(t=0)),t)try{if(n=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){t.label=r[1];break}if(r[0]===6&&t.label<a[1]){t.label=a[1];a=r;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(r);break}if(a[2])t.ops.pop();t.trys.pop();continue}r=e.call(o,t)}catch(o){r=[6,o];i=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,F as Fragment,a as Host}from"./index-cfd394c8.js";import{l as localizationStore,t as translate,h as currencyFormat}from"./localization-17546792.js";import{z as zonosStore}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{f as formatStringWithLinks}from"./formatStringWithLinks-9e819405.js";import{h as hasInclusivePrice,T as TAXES_KEY,D as DUTY_KEY}from"./hasInclusivePrice-5e106f84.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{e as euCountryCodes}from"./TaxId-50d72254.js";import"./handleFetch-a844cac1.js";import"./VarianceTest-572cecf5.js";var getHasMoreSpaceAbove=function(o){var e=o.getBoundingClientRect();var t=e.top;var n=window.innerHeight-e.bottom;return t>=n};var wrapStringWithLink=function(o){var e=o.href,t=o.text;return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var BagIcon='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var ImportIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var InclusivePricingIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var MessageIcon='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var MoneyIcon='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var RemoveIcon='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosHelloDialogCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var ZonosHelloDialogStyle0=zonosHelloDialogCss;var ZonosHelloDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isOpen=false;this.setIsOpen=function(){};this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false;this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(e.dialogRef)&&e.isOpen){e.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(zonosStore.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.showLanguageSelect=o;return[2]}))}))};this.hasTaxId=function(){var o;return(o=localizationStore.countryLandedCost)===null||o===void 0?void 0:o.hasTaxId};this.isDomesticCountry=function(){var o,e;var t=localizationStore.selectedCountryCode;return!!t&&!!((e=(o=zonosStore.genericSettings)===null||o===void 0?void 0:o.domesticCountries)===null||e===void 0?void 0:e.includes(t))};this.isNoThresholdCountry=function(o){if(!o||!e.hasTaxId()){return false}var t=__spreadArray(["AU","NZ","GB","NO","SG"],euCountryCodes,true);return t.includes(o)};this.getDutyMessage=function(){if(e.isDomesticCountry()){return null}var o=localizationStore.countryLandedCost;if(!(o===null||o===void 0?void 0:o.allowLowValueOrders)&&(o===null||o===void 0?void 0:o.countryCode)==="GB"){return translate("Duties will apply to all orders.")}var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?currencyFormat({amount:o.dutyDeminimus}):null;return t?translate("Spend up to [threshold] duty free.",{threshold:t}):translate("Duties will apply to all orders.")};this.getTaxMessage=function(){var o=localizationStore.countryLandedCost;if(e.isDomesticCountry()){return null}if(!(o===null||o===void 0?void 0:o.allowLowValueOrders)&&(o===null||o===void 0?void 0:o.countryCode)==="GB"){return translate("Taxes will apply to all orders.")}var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?currencyFormat({amount:o.vatTaxDeminimus}):null;return t&&!e.isNoThresholdCountry(o===null||o===void 0?void 0:o.countryCode)?translate("Spend up to [threshold] tax free.",{threshold:t}):translate("Taxes will apply to all orders.")};this.getEuDutyTaxMessage=function(o){return["".concat(translate("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:translate("Learn more.")}))]};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return["".concat(translate("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:translate("Learn more.")}))]}var e=o.dutyDeminimus;return[translate("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:currencyFormat({amount:e})})]};this.getAustraliaDutyTaxMessage=function(o){if(hasInclusivePrice()){return[]}return["".concat(translate("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:translate("Learn more.")}))]};this.getNewZealandDutyTaxMessge=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:translate("Learn more.")}))]};this.getNorwayDutyTaxMessage=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:translate("Learn more.")}))]};this.getSingaporeDutyTaxMessage=function(o){if(hasInclusivePrice()){return null}return["".concat(translate("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(o.vatTaxRate*100,"%")})," ").concat(wrapStringWithLink({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:translate("Learn more.")}))]};this.getInclusivePriceMessage=function(){var o=localizationStore.inclusivePricingConfigurations;var e=o===null||o===void 0?void 0:o.find(Boolean);var t=e===null||e===void 0?void 0:e.configurations[TAXES_KEY];var n=e===null||e===void 0?void 0:e.configurations[DUTY_KEY];if((t===null||t===void 0?void 0:t.status)==="DISABLED"&&(n===null||n===void 0?void 0:n.status)==="DISABLED"){return null}if((n===null||n===void 0?void 0:n.status)==="ENABLED"&&(t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"DUTIES_TAXES_AND_FEES",message:translate("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}}if((n===null||n===void 0?void 0:n.status)==="ENABLED"){return{inclusiveType:"DUTIES_FEES",message:translate("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}}if((t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"TAXES",message:translate("Product prices already include taxes. No additional taxes will be added at checkout.")}}return null};this.renderHelloMessage=function(o){var e=o.dutyDeMinimisMessage,t=o.inclusivePriceMessage,n=o.taxDeMinimisMessage;if(hasInclusivePrice()&&t){switch(t.inclusiveType){case"DUTIES_FEES":{return h(Fragment,null,t.message&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:InclusivePricingIcon}),h("zonos-text",{"aria-label":"Duty inclusive pricing message"},t.message)),n&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis icon",content:MoneyIcon}),h("zonos-text",{"aria-label":"Tax de minimis message"},n)))}case"TAXES":{return h(Fragment,null,t.message&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:InclusivePricingIcon}),h("zonos-text",{"aria-label":"Tax inclusive pricing message"},t.message)),e&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis icon",content:ImportIcon}),h("zonos-text",{"aria-label":"Duty de minimis message"},e)))}case"DUTIES_TAXES_AND_FEES":default:{return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis",content:InclusivePricingIcon}),h("zonos-text",null,t.message))}}}return h(Fragment,null,e&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Duty de minimis icon",content:ImportIcon}),h("zonos-text",{"aria-label":"Duty de minimis message"},e)),n&&h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Tax de minimis icon",content:MoneyIcon}),h("zonos-text",{"aria-label":"Tax de minimis message"},n)))};this.getAdditionalDutyTaxMessage=function(){if(!localizationStore.countryLandedCost){return null}if(e.isDomesticCountry()){return null}if(!e.hasTaxId()){return null}switch(localizationStore.countryLandedCost.countryCode){case"GB":return e.getUkDutyTaxMessage(localizationStore.countryLandedCost);case"AU":return e.getAustraliaDutyTaxMessage(localizationStore.countryLandedCost);case"NZ":return e.getNewZealandDutyTaxMessge(localizationStore.countryLandedCost);case"NO":return e.getNorwayDutyTaxMessage(localizationStore.countryLandedCost);case"SG":return e.getSingaporeDutyTaxMessage(localizationStore.countryLandedCost);default:if(euCountryCodes.includes(localizationStore.countryLandedCost.countryCode)){return e.getEuDutyTaxMessage(localizationStore.countryLandedCost)}return null}}}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var e,t;var n=localizationStore.selectedCountryCode;var i=this.getAdditionalDutyTaxMessage();var a=(e=this.animateFromLeftOverride)!==null&&e!==void 0?e:this.dialogRef&&getHasMoreSpaceOnRight(this.dialogRef);var s=this.dialogRef&&getHasMoreSpaceAbove(this.dialogRef);var r=localizationStore.customMessages;var l=translate("Welcome to [storeName]",{storeName:zonosStore.organizationName});var c=((t=r.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||translate("Know about duties and taxes before you buy. Shop with confidence!");var d=formatStringWithLinks(c);var u=this.getCurrentPageEnum();var f=r.filter((function(o){return o.pageName===u}));var g=this.getDutyMessage();var m=this.getTaxMessage();var v=this.getInclusivePriceMessage();return h(Host,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},h("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:classes(["zonos--hello-dialog",a&&"zonos--hello-dialog-animate-from-left",s&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(e){return e&&(o.dialogRef=e)}},!this.showCountrySelect&&!this.showLanguageSelect&&h("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},h("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},h("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),h("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},h("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:n}),h("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},h("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},l),h("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:d,textColor:"gray-800"})),h("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((function(o){var e;return o&&h("zonos-banner",{bannerTitle:o.name,intent:"error"},(e=o.itemRestrictions)===null||e===void 0?void 0:e.map((function(o){return h("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),(g||m||v||!!(i===null||i===void 0?void 0:i.length))&&h("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},h("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:g,inclusivePriceMessage:v,taxDeMinimisMessage:m}),i===null||i===void 0?void 0:i.map((function(o){return h("div",{class:"zonos--flex-message"},h("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:BagIcon}),h("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o}))})))),f.map((function(o){return h("zonos-custom-message",{icon:MessageIcon,message:o.message})}))))),h("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(e){return o.setShowCountrySelect(e)},setShowLanguageSelect:function(e){return o.setShowLanguageSelect(e)}})),this.showCountrySelect&&h("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},h("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&h("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},h("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}();ZonosHelloDialog.style=ZonosHelloDialogStyle0;export{ZonosHelloDialog as zonos_hello_dialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{d as debounce_1}from"./debounce-58e4ff3e.js";import{l as localizationStore,k as isValidSelector,t as translate,g as getZCountryUrlParam,n as setZCountryUrlParam,o as currencyDisplay,p as currencyConvertAndFormat,q as currencyConvert,h as currencyFormat,r as shouldShowHelloWidget}from"./localization-29723d89.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{l as log}from"./VarianceTest-572cecf5.js";var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){logError("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(i)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var HELLO_WIDGET_DEFAULT_SIZE=18;var HELLO_WIDGET_MIN_SIZE=18;var HELLO_WIDGET_MAX_SIZE=64;var getHelloWidgetSize=function(o){if(o==null||!Number.isFinite(o)||o<=0){return HELLO_WIDGET_DEFAULT_SIZE}return Math.min(HELLO_WIDGET_MAX_SIZE,Math.max(HELLO_WIDGET_MIN_SIZE,o))};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){log("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];if(l.length!==a.length){log("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==a.length){log('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<l.length;u++){var f=l[u];var g=a[u];var z=d[u];if(f&&g){var m={cartButtonNode:z||null,description:((o=g.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(m)}}return c};var zonosHelloCss=":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(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}: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:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}: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:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top: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:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top: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}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var i=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(i," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),i)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var i=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var t=new MutationObserver(e.handleProductCountChange);t.observe(document.body,{childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.watchPriceChange=function(){var o;var t=new MutationObserver((function(){return void e.displayCurrency()}));t.observe(document.body,{attributes:true,childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var i=getZCountryUrlParam(n.searchParams);if(!i){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=zonosStore.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=this.desktopLocationOverride||zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!!this.desktopLocationOverride||!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop());var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var i=localizationStore.selectedCountryCode,r=localizationStore.targetCurrency;var s=this.getHelloLocation(),l=s.isOnLeft,a=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var g=shouldShowHelloWidget()&&!!i;if(g&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:r})}var z=getHelloWidgetSize(zonosStore.helloSettings.widgetSize);return h(Host,{class:"zonos--hello zonos--elements","data-theme":u,style:{"--zonos-elements-hello-widget-size":"".concat(z,"px")}},g&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:l,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{d as debounce_1}from"./debounce-58e4ff3e.js";import{l as localizationStore,k as isValidSelector,t as translate,g as getZCountryUrlParam,n as setZCountryUrlParam,o as currencyDisplay,p as currencyConvertAndFormat,q as currencyConvert,h as currencyFormat,r as shouldShowHelloWidget}from"./localization-17546792.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{l as log}from"./VarianceTest-572cecf5.js";var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){logError("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(i)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var HELLO_WIDGET_DEFAULT_SIZE=18;var HELLO_WIDGET_MIN_SIZE=18;var HELLO_WIDGET_MAX_SIZE=64;var getHelloWidgetSize=function(o){if(o==null||!Number.isFinite(o)||o<=0){return HELLO_WIDGET_DEFAULT_SIZE}return Math.min(HELLO_WIDGET_MAX_SIZE,Math.max(HELLO_WIDGET_MIN_SIZE,o))};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){log("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];if(l.length!==a.length){log("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==a.length){log('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<l.length;u++){var f=l[u];var g=a[u];var z=d[u];if(f&&g){var m={cartButtonNode:z||null,description:((o=g.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(m)}}return c};var zonosHelloCss=":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(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}: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:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}: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:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top: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:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top: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}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var i=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(i," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),i)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var i=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var t=new MutationObserver(e.handleProductCountChange);t.observe(document.body,{childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.watchPriceChange=function(){var o;var t=new MutationObserver((function(){return void e.displayCurrency()}));t.observe(document.body,{attributes:true,childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var i=getZCountryUrlParam(n.searchParams);if(!i){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=zonosStore.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=this.desktopLocationOverride||zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!!this.desktopLocationOverride||!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop());var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var i=localizationStore.selectedCountryCode,r=localizationStore.targetCurrency;var s=this.getHelloLocation(),l=s.isOnLeft,a=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var g=shouldShowHelloWidget()&&!!i;if(g&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:r})}var z=getHelloWidgetSize(zonosStore.helloSettings.widgetSize);return h(Host,{class:"zonos--hello zonos--elements","data-theme":u,style:{"--zonos-elements-hello-widget-size":"".concat(z,"px")}},g&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:l,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-d23f47a6.js";import"./VarianceTest-572cecf5.js";var zonosInputCss=':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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-8e19daff.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-d23f47a6.js";import"./VarianceTest-572cecf5.js";var zonosInputCss=':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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"c4745840fd40940032af2a46f2dab9d0d3096265",class:classes(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"7044d3e1877088b30016193eabf24ee36b0ad3c3",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",{key:"6ec2033248f6176c9d5baab8b0a4e74201a6761c",class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),h("label",{key:"5d6eb65016ffb43f57a21520286eb9e46ef99913",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}();ZonosInput.style=ZonosInputStyle0;export{ZonosInput as zonos_input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";import{d as cartStore}from"./cart-
|
|
1
|
+
import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";import{d as cartStore}from"./cart-23e29950.js";import{t as translate}from"./localization-17546792.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-e3953f67.js";import{c as classes}from"./classes-0d95c529.js";import{c as invoiceStore}from"./invoice-78f069c7.js";import{r as renderFallback}from"./renderFallback-b250f4e9.js";import"./zonosStore-8e19daff.js";import"./VarianceTest-572cecf5.js";import"./handleFetch-a844cac1.js";import"./isDarkColor-566f04c5.js";import"./getBorderRadius-d23f47a6.js";var zonosInvoiceCartItemsCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var ZonosInvoiceCartItemsStyle0=zonosInvoiceCartItemsCss;var ZonosInvoiceCartItems=function(){function o(o){registerInstance(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"e6626df96493b9cd9110036f203492c008c8c802",class:classes(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"9a03b7868010f52560725fb4139a329b2b96066c",class:"zonos--cart-table"},h("tbody",{key:"f1aae5d161654014e4e5e5fd56383664c7fe5635"},t.map((function(t){var e,s,n,a;var i=(s=(e=t.attributes)===null||e===void 0?void 0:e.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||s===void 0?void 0:s.value;var r=(a=(n=t.attributes)===null||n===void 0?void 0:n.find((function(o){return o.key==="invoiceCreatedAt"})))===null||a===void 0?void 0:a.value;var c=r&&o.locale?new Date(r).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var l=i?"https://dashboard.zonos.com/billing/invoices/".concat(i):null;return h("tr",{class:"zonos--invoice-cart-item"},h("td",{class:"zonos--column zonos--cart-item-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Invoice:"))),h("td",{class:"zonos--column zonos--cart-item-link"},l&&i&&h("zonos-link",{href:l},i),o.isMobile&&h("zonos-text",{type:"caption"},c)),h("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&h("zonos-text",{type:"label"},c)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"label"},renderCheckoutCurrency({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceCartItems.style=ZonosInvoiceCartItemsStyle0;var zonosInvoiceSubtotalCss=":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;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var ZonosInvoiceSubtotalStyle0=zonosInvoiceSubtotalCss;var ZonosInvoiceSubtotal=function(){function o(o){registerInstance(this,o);this.isMobile=false}o.prototype.render=function(){return h(Host,{key:"869e194bb991686647a27c85e3287f8c87013697",class:classes(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"4e3a87b6ceeba8663c7d41797826e92a1d8df873",class:"zonos--invoice-table"},h("tr",{key:"4cc0be3427ded6e3dfc92fca9d6acf69915a5d96",class:"zonos--row zonos--invoice-total"},h("td",{key:"ca4cefc97914df89530a6ba06f93412773685d13",class:"zonos--column"}),h("td",{key:"7cad6266e244446fef196403f4e1628b4656c680",class:"zonos--column zonos--invoice-subtotal-title"},h("zonos-text",{key:"311ce310181fec1db2cd31e92e210d345e0c2871",type:"semiBoldLabel"},translate("Payment total"))),h("td",{key:"2aa6e7fb76e8a7c0d2b1c56fdcdf63ed2b3bed82",class:"zonos--column zonos--invoice-subtotal-price"},renderFallback({content:h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})),isLoading:invoiceStore.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceSubtotal.style=ZonosInvoiceSubtotalStyle0;export{ZonosInvoiceCartItems as zonos_invoice_cart_items,ZonosInvoiceSubtotal as zonos_invoice_subtotal};
|