@zonos/elements 1.3.183 → 1.3.185
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-3d0c0f0b.js → cart-f9df3ac8.js} +3209 -10
- package/dist/cjs/debounce-3eaa4f7e.js +357 -0
- package/dist/cjs/{getBorderRadius-94ef609c.js → getBorderRadius-87f3b69c.js} +1 -1
- package/dist/cjs/getGenericSettingsOverride-c0ca32b9.js +104 -0
- package/dist/cjs/helpers-5bdbb68c.js +100 -0
- package/dist/cjs/{index-2f90486e.js → index-0993f42d.js} +15 -3
- package/dist/cjs/index.cjs.js +41 -9
- package/dist/cjs/{isDarkColor-ec4a4e7d.js → isDarkColor-d0c67c3d.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-9eaa9196.js → paypal-5e73c8f5.js} +3 -3
- package/dist/cjs/zonos-address_11.cjs.entry.js +7917 -0
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +18 -7
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +113 -21
- package/dist/cjs/zonos-checkout.cjs.entry.js +24 -10
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +233 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +7 -358
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- 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-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +31 -12
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
- package/dist/cjs/{zonosStore-3812b318.js → zonosStore-adc42868.js} +2 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +11 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +37 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +162 -17
- package/dist/collection/components/common/zonos-button/zonos-button.js +14 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +0 -6
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +2 -2
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +2 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +105 -8
- package/dist/collection/components/common/zonos-stripe-phone-input/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.css +222 -0
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +481 -0
- package/dist/collection/components/common/zonos-stripe-select/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-select/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +178 -0
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +455 -0
- 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 +24 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +24 -7
- package/dist/collection/components/store/translationStore/strings.arabic.js +159 -0
- package/dist/collection/components/store/translationStore/strings.base.js +161 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +159 -0
- package/dist/collection/components/store/translationStore/strings.french.js +159 -0
- package/dist/collection/components/store/translationStore/strings.german.js +159 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +159 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +159 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +159 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +159 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +159 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +159 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.css +86 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +192 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +67 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +978 -0
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/getGenericSettingsOverride.js +10 -0
- package/dist/collection/components/utils/api/getZonosSettings.js +7 -1
- package/dist/collection/components/utils/checkout/form/helpers.js +95 -0
- package/dist/collection/components/utils/checkout/form/isValidZip.js +18 -0
- package/dist/collection/components/utils/checkout/initCheckout.js +8 -1
- package/dist/collection/components/utils/iframe/CheckoutAddressService.js +193 -0
- package/dist/collection/components/utils/iframe/IframeHelpers.js +86 -0
- package/dist/collection/components/utils/mergeAddress.js +5 -0
- package/dist/collection/constants/phone-formats.js +658 -0
- package/dist/collection/scripts/_getCartInfoById.js +7 -1
- package/dist/collection/scripts/_zonosBase.js +29 -1
- package/dist/collection/types/CountryFields.js +1 -0
- package/dist/collection/types/checkout/form/CustomAddressErrors.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +11 -0
- package/dist/collection/types/generated/graphql.internal.types.js +129 -0
- package/dist/collection/types/index.js +0 -1
- package/dist/esm/{cart-3fb04f1f.js → cart-4725a63b.js} +3209 -10
- package/dist/esm/debounce-3cf0793c.js +355 -0
- package/dist/esm/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
- package/dist/esm/getGenericSettingsOverride-0bc3e118.js +99 -0
- package/dist/esm/helpers-2f6955b1.js +97 -0
- package/dist/esm/{index-d82f06f2.js → index-a457c60c.js} +15 -3
- package/dist/esm/index.js +41 -9
- package/dist/esm/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-1f2e863c.js → paypal-a09943f4.js} +3 -3
- package/dist/esm/zonos-address_11.entry.js +7903 -0
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +18 -7
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_13.entry.js +113 -21
- package/dist/esm/zonos-checkout.entry.js +24 -10
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +233 -8
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +8 -8
- package/dist/esm/zonos-hello-dialog.entry.js +9 -9
- package/dist/esm/zonos-hello.entry.js +6 -357
- package/dist/esm/zonos-input.entry.js +3 -3
- 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-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +31 -12
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +3 -3
- package/dist/esm/zonos-v-stack.entry.js +4 -4
- package/dist/esm/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +2 -1
- package/dist/esm-es5/cart-4725a63b.js +1 -0
- package/dist/esm-es5/debounce-3cf0793c.js +1 -0
- package/dist/esm-es5/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
- package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +1 -0
- package/dist/esm-es5/helpers-2f6955b1.js +1 -0
- package/dist/esm-es5/index-a457c60c.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-1f2e863c.js → paypal-a09943f4.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -0
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.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-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-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.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-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.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/esm-es5/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +1 -1
- package/dist/scripts/index.d.ts +3905 -3284
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +28 -1
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +4 -0
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +22 -0
- package/dist/types/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.d.ts +88 -0
- package/dist/types/components/common/zonos-stripe-select/zonos-stripe-select.d.ts +86 -0
- package/dist/types/components/main/zonos-controller.d.ts +1 -0
- package/dist/types/components/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +159 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +159 -0
- package/dist/types/components/store/zonosStore.d.ts +6 -1
- package/dist/types/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.d.ts +38 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +150 -0
- package/dist/types/components/utils/api/getGenericSettingsOverride.d.ts +5 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/getZonosSettings.d.ts +2 -2
- package/dist/types/components/utils/checkout/form/helpers.d.ts +19 -0
- package/dist/types/components/utils/checkout/form/isValidZip.d.ts +5 -0
- package/dist/types/components/utils/iframe/CheckoutAddressService.d.ts +38 -0
- package/dist/types/components/utils/iframe/IframeHelpers.d.ts +81 -0
- package/dist/types/components/utils/mergeAddress.d.ts +4 -0
- package/dist/types/components/utils/resetToSelectedTab.d.ts +1 -1
- package/dist/types/components.d.ts +472 -4
- package/dist/types/constants/phone-formats.d.ts +5 -0
- package/dist/types/environment.d.ts +1 -1
- package/dist/types/scripts/_zonosBase.d.ts +13 -1
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
- package/dist/types/types/CountryFields.d.ts +40 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -0
- package/dist/types/types/checkout/form/CustomAddressErrors.d.ts +13 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +166 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +148 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +180 -8
- package/dist/types/types/generated/graphql.internal.types.ts +218 -8
- package/dist/types/types/global.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/utils/ZonosSettings.d.ts +17 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-4622cca6.entry.js → p-0104d3ba.entry.js} +1 -1
- package/dist/zonos-elements/{p-7cb87ea7.system.entry.js → p-04303b56.system.entry.js} +1 -1
- package/dist/zonos-elements/p-06f798ee.system.js +1 -0
- package/dist/zonos-elements/{p-739014f8.system.entry.js → p-0fdd7034.system.entry.js} +1 -1
- package/dist/zonos-elements/p-15dd7ea4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a1cfbd0a.js → p-17299200.js} +1 -1
- package/dist/zonos-elements/{p-58f660d4.system.entry.js → p-1b29bc5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe2c27c4.entry.js → p-1e612c29.entry.js} +1 -1
- package/dist/zonos-elements/{p-98aa88b1.js → p-2097fae5.js} +1 -1
- package/dist/zonos-elements/{p-81084be5.system.entry.js → p-240ee490.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2416aaa1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-cedf08f0.entry.js → p-313ef896.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa65b53d.entry.js → p-314fbfe1.entry.js} +1 -1
- package/dist/zonos-elements/{p-5187ba8f.system.js → p-31e90130.system.js} +1 -1
- package/dist/zonos-elements/{p-4ca666ea.system.entry.js → p-341f40c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d49c6a3e.system.entry.js → p-35f33601.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4160bbc2.system.js +1 -0
- package/dist/zonos-elements/p-43633269.system.js +2 -0
- package/dist/zonos-elements/p-443b5db2.entry.js +1 -0
- package/dist/zonos-elements/p-46d3e378.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3d221556.system.entry.js → p-488ad646.system.entry.js} +1 -1
- package/dist/zonos-elements/p-53ffdb91.js +1 -0
- package/dist/zonos-elements/p-56b56caa.system.entry.js +1 -0
- package/dist/zonos-elements/p-5e15616f.entry.js +1 -0
- package/dist/zonos-elements/{p-3eac4b10.entry.js → p-5f896e9a.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8c70c7d.system.entry.js → p-609c32a3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64ea232c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f378b4d3.system.entry.js → p-678ccc3f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8048932d.entry.js → p-67b904c2.entry.js} +1 -1
- package/dist/zonos-elements/p-6b40da70.system.js +1 -0
- package/dist/zonos-elements/p-70d4d436.entry.js +1 -0
- package/dist/zonos-elements/{p-64dbc282.entry.js → p-818d6f17.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5b9aa6c.entry.js → p-81ee1683.entry.js} +1 -1
- package/dist/zonos-elements/{p-236f32c8.system.entry.js → p-89fcd305.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4fa8524.system.entry.js → p-94a80d93.system.entry.js} +1 -1
- package/dist/zonos-elements/p-961620ae.entry.js +1 -0
- package/dist/zonos-elements/{p-4eff2f8a.system.entry.js → p-98e4a965.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5bebcfc2.system.js → p-9913c186.system.js} +1 -1
- package/dist/zonos-elements/{p-29e8c9e8.system.entry.js → p-991c85f1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-995761ea.system.entry.js +1 -0
- package/dist/zonos-elements/p-9a6eb099.entry.js +1 -0
- package/dist/zonos-elements/p-9a7a9b1c.entry.js +1 -0
- package/dist/zonos-elements/{p-d367c9ae.system.entry.js → p-9f7b9d66.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a2dab25e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-587568b5.entry.js → p-aaff5dcc.entry.js} +1 -1
- package/dist/zonos-elements/{p-3731e7f5.entry.js → p-abc66a0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb294265.entry.js → p-aca3a2bb.entry.js} +1 -1
- package/dist/zonos-elements/p-afa34aff.system.js +1 -0
- package/dist/zonos-elements/{p-69f84611.entry.js → p-b2241919.entry.js} +1 -1
- package/dist/zonos-elements/p-b5edee66.system.js +1 -0
- package/dist/zonos-elements/p-b610f70c.system.js +1 -0
- package/dist/zonos-elements/{p-69255ed2.system.js → p-bbbaea3a.system.js} +1 -1
- package/dist/zonos-elements/p-c137dc82.js +2 -0
- package/dist/zonos-elements/{p-be9e1818.system.entry.js → p-c140a0bd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de221545.entry.js → p-cf6ae7dc.entry.js} +1 -1
- package/dist/zonos-elements/{p-90633d63.entry.js → p-d0f4b6c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-112aecac.js → p-de462b9b.js} +2 -2
- package/dist/zonos-elements/{p-107b08c1.entry.js → p-e5d081d8.entry.js} +1 -1
- package/dist/zonos-elements/p-e7b0c156.js +1 -0
- package/dist/zonos-elements/{p-30fdcbee.js → p-e892fb29.js} +1 -1
- package/dist/zonos-elements/p-e90cb997.entry.js +1 -0
- package/dist/zonos-elements/{p-db3f381d.entry.js → p-e91b244c.entry.js} +1 -1
- package/dist/zonos-elements/{p-41dfc828.entry.js → p-e99354d5.entry.js} +1 -1
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -0
- package/dist/zonos-elements/p-eef5b0cc.js +1 -0
- package/dist/zonos-elements/{p-d0944cc8.system.entry.js → p-f3f27bf2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e63259c.system.entry.js → p-f4cc688e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc6d9f7d.entry.js → p-f7d3e48b.entry.js} +1 -1
- package/dist/zonos-elements/p-fa6de0f3.js +1 -0
- package/dist/zonos-elements/{p-c5c8f803.system.entry.js → p-fd348fd4.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +3 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +0 -772
- package/dist/esm/zonos-address_7.entry.js +0 -762
- package/dist/esm-es5/cart-3fb04f1f.js +0 -1
- package/dist/esm-es5/index-d82f06f2.js +0 -2
- package/dist/esm-es5/zonos-address_7.entry.js +0 -1
- package/dist/zonos-elements/p-358043a2.system.entry.js +0 -1
- package/dist/zonos-elements/p-43feb95e.entry.js +0 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +0 -1
- package/dist/zonos-elements/p-4aca92c5.system.entry.js +0 -1
- package/dist/zonos-elements/p-4caffd96.system.js +0 -2
- package/dist/zonos-elements/p-59e31080.system.js +0 -1
- package/dist/zonos-elements/p-6c0c8722.system.entry.js +0 -1
- package/dist/zonos-elements/p-7decb19b.entry.js +0 -1
- package/dist/zonos-elements/p-829f6a40.entry.js +0 -1
- package/dist/zonos-elements/p-8f640b28.entry.js +0 -1
- package/dist/zonos-elements/p-a69dbe14.js +0 -1
- package/dist/zonos-elements/p-ab68ad11.js +0 -2
- package/dist/zonos-elements/p-ac889f52.entry.js +0 -1
- package/dist/zonos-elements/p-b998494a.entry.js +0 -1
- package/dist/zonos-elements/p-bc0f885e.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6d96a42.system.js +0 -1
- package/dist/zonos-elements/p-ce853f8f.system.entry.js +0 -1
- package/dist/zonos-elements/p-e4f8114a.system.js +0 -1
- package/dist/zonos-elements/p-e99e75dd.system.entry.js +0 -1
- package/dist/zonos-elements/p-f66a5c7c.system.entry.js +0 -1
- package/dist/zonos-elements/p-febb90e0.entry.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.o?$(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(m),b(v),(p=m.length>0)&&f.raf(w)},$=e=>h().then(e),g=y(v,!0),S=e=>{const t=new URL(e,f.l);return t.origin!==u.location.origin?t.href:t.pathname},j={},O=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>E,unwrap:()=>A,unwrapErr:()=>R});var E=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return C(e.value);throw"should never get here"}var x,P,A=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},D=(e,t,...n)=>{let o=null,l=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!O(o))&&(o+=""),s&&r?i[i.length-1].i+=o:i.push(s?F(null,o):o),r=s)};if(c(n),t){t.key&&(l=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,L);const u=F(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=l,u},F=(e,t)=>({o:0,m:e,i:t,v:null,h:null,u:null,p:null}),H={},L={forEach:(e,t)=>e.map(T).forEach(t),map:(e,t)=>e.map(T).map(t).map(U)},T=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.$,vtag:e.m,vtext:e.i}),U=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),D(e.vtag,t,...e.vchildren||[])}const t=F(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.$=e.vname,t},N=(e,t,n,o,s,r)=>{if(n!==o){let i=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=q(n),s=q(o);e["s-si"]&&s.indexOf(e["s-si"])<0&&s.push(e["s-si"]),t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=O(o);if((i||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?i=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(z);t=t.replace(B,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},W=/\s/,q=e=>e?e.split(W):[],z="Capture",B=RegExp(z+"$"),G=(e,t,n)=>{const o=11===t.v.nodeType&&t.v.host?t.v.host:t.v,l=e&&e.u||j,s=t.u||j;for(const e of V(Object.keys(l)))e in s||N(o,e,l[e],void 0,n,t.o);for(const e of V(Object.keys(s)))N(o,e,l[e],s[e],n,t.o)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,I=!1,J=(e,t,n,o)=>{const l=t.h[n];let s,r,i=0;if(null!==l.i)s=l.v=a.createTextNode(l.i);else{if(I||(I="svg"===l.m),s=l.v=a.createElementNS(I?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),I&&"foreignObject"===l.m&&(I=!1),G(null,l,I),!!s.getRootNode().querySelector("body")&&null!=x&&s["s-si"]!==x&&s.classList.add(s["s-si"]=x),ne(s,o),l.h)for(i=0;i<l.h.length;++i)r=J(e,l,i,s),r&&s.appendChild(r);"svg"===l.m?I=!1:"foreignObject"===s.tagName&&(I=!0)}return s["s-hn"]=P,s},K=(e,t,n,o,l,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===P&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=J(null,n,l,e),r&&(o[l].v=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.v;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Y=(e,t,n=!1)=>{const o=t.v=e.v,l=e.h,s=t.h,r=t.m,i=t.i;null===i?(I="svg"===r||"foreignObject"!==r&&I,("slot"!==r||_)&&G(e,t,I),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=o.length-1,m=o[0],v=o[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(X(h,m,l))Y(h,m,l),h=t[++i],m=o[++c];else if(X(d,v,l))Y(d,v,l),d=t[--f],v=o[--p];else if(X(h,v,l))Y(h,v,l),ee(e,h.v,d.v.nextSibling),h=t[++i],v=o[--p];else if(X(d,m,l))Y(d,m,l),ee(e,d.v,h.v),d=t[--f],m=o[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=J(t&&t[c],n,u,e):(Y(r,m,l),t[u]=void 0,s=r.v),m=o[++c]):(s=J(t&&t[c],n,c,e),m=o[++c]),s&&ee(h.v.parentNode,s,h.v)}i>f?K(e,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Q(t,i,f)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),K(o,null,t,s,0,s.length-1)):!n&&null!==l&&Q(l,0,l.length-1),I&&"svg"===r&&(I=!1)):e.i!==i&&(o.data=i)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>{const o=null==e?void 0:e.insertBefore(t,n);return ne(t,e),o},te=e=>{const t=[];return e&&t.push(...e["s-scs"]||[],e["s-si"],e["s-sc"],...te(e.parentElement)),t},ne=(e,t,n=!1)=>{var o;if(e&&t&&1===e.nodeType){const l=new Set(te(t).filter(Boolean));if(l.size&&(null==(o=e.classList)||o.add(...e["s-scs"]=Array.from(l)),e["s-ol"]||n))for(const t of Array.from(e.__childNodes||e.childNodes))ne(t,e,!0)}},oe=(e,t)=>null==e||O(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e,le=e=>n(e).$hostElement$,se=(e,t,n)=>{const o=le(e);return{emit:e=>re(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},re=(e,t,n)=>{const o=f.ce(t,n);return e.dispatchEvent(o),o},ie=new WeakMap,ce=e=>"sc-"+e.S,ue=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},ae=(e,t)=>{if(e.o|=16,!(4&e.o))return ue(e,e.O),g((()=>fe(e,t)));e.o|=512},fe=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(e.o|=256,e.k&&(e.k.map((([e,t])=>ge(n,e,t))),e.k=void 0),o=ge(n,"componentWillLoad")),he(o,(()=>pe(e,n,t)))},he=(e,t)=>de(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),de=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,pe=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=ce(t),l=i.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,r=ie.get(e=e.head||e);if(r||ie.set(e,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const o=null!=(n=f.M)?n:k(a);if(null!=o&&s.setAttribute("nonce",o),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),r&&r.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"),2&o&&n.classList.add(l+"-s"))})(e);ve(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>be(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},me=null,ve=(e,t,n,o)=>{try{me=t,t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.C,s=e.P||F(null,null),r=(e=>e&&e.m===H)(t)?t:D(null,null,t);if(P=o.tagName,n&&r.u)for(const e of Object.keys(r.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=o[e]);r.m=null,r.o|=4,e.P=r,r.v=s.v=o.shadowRoot||o,x=o["s-sc"],_=!!(1&l.o),Y(s,r,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return me=null,null},ye=()=>me,be=e=>{const t=e.$hostElement$,n=e.t,o=e.O;ge(n,"componentDidRender"),64&e.o||(e.o|=64,Se(t),ge(n,"componentDidLoad"),e.A(t),o||$e()),e.R(t),e.j&&(e.j(),e.j=void 0),512&e.o&&$((()=>ae(e,!1))),e.o&=-517},we=e=>{{const t=n(e),o=t.$hostElement$.isConnected;return o&&2==(18&t.o)&&ae(t,!1),o}},$e=()=>{Se(a.documentElement),$((()=>re(u,"appload",{detail:{namespace:"zonos-elements"}})))},ge=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Se=e=>e.classList.add("hydrated"),je=(e,t,o,l)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.D.get(t),u=r.o,a=r.t;if(o=oe(o,l.F[t][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.D.set(t,o),a)){if(l.H&&128&u){const e=l.H[t];e&&e.map((e=>{try{a[e](o,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ae(r,!1)}},Oe=(e,t,o)=>{var l,s;const r=e.prototype;if(t.F||t.H||e.watchers){e.watchers&&!t.H&&(t.H=e.watchers);const i=Object.entries(null!=(l=t.F)?l:{});if(i.map((([e,[l]])=>{if(31&l||2&o&&32&l)if(2048&l){if(1&o&&2048&l&&(Object.defineProperty(r,e,{get(){const t=n(this),o=t?t.t:r;if(o)return o[e]},configurable:!0,enumerable:!0}),4096&l)){const o=Object.getOwnPropertyDescriptor(r,e).set;Object.defineProperty(r,e,{set(l){const s=n(this);if(o){const n=s.$hostElement$[e];return!s.D.get(e)&&n&&s.D.set(e,n),o.call(this,oe(l,t.F[e][0])),void je(this,e,s.$hostElement$[e],t)}if(!s)return;const r=()=>{const n=s.t[e];!s.D.get(e)&&n&&s.D.set(e,n),s.t[e]=oe(l,t.F[e][0]),je(this,e,s.t[e],t)};s.t?r():s.L.then((()=>r()))}})}}else Object.defineProperty(r,e,{get(){return((e,t)=>n(this).D.get(t))(0,e)},set(n){je(this,e,n,t)},configurable:!0,enumerable:!0});else 1&o&&64&l&&Object.defineProperty(r,e,{value(...t){var o;const l=n(this);return null==(o=null==l?void 0:l.T)?void 0:o.then((()=>{var n;return null==(n=l.t)?void 0:n[e](...t)}))}})})),1&o){const o=new Map;r.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var i;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),r=null==o?void 0:o.o;if(r&&!(8&r)&&128&r&&s!==l){const n=o.t,r=null==(i=t.H)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}const u=Object.getOwnPropertyDescriptor(r,c);u.get&&!u.set||(this[c]=(null!==s||"boolean"!=typeof this[c])&&s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.H)?s:{}),...i.filter((([e,t])=>15&t[0])).map((([e,t])=>{const n=t[1]||e;return o.set(n,e),n}))]))}}return e},ke=e=>{ge(e,"connectedCallback")},Ee=e=>{ge(e,"disconnectedCallback")},Ce=(e,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let $,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],S:o[1],F:o[2],U:o[3]};4&c.o&&(S=!0),c.F=o[2],c.U=o[3],c.H=null!=(l=o[4])?l:{};const u=c.S,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,C:n,D:new Map};o.T=new Promise((e=>o.R=e)),o.L=new Promise((e=>o.A=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open",delegatesFocus:!!(16&c.o)})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,xe(this,e,c.U)),$&&(clearTimeout($),$=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.C,l=()=>{};if(1&t.o)xe(e,t,o.U),(null==t?void 0:t.t)?ke(t.t):(null==t?void 0:t.L)&&t.L.then((()=>ke(t.t)));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ue(t,t.O=n);break}}o.F&&Object.entries(o.F).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.N){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.N;if(!n)return;const o=r.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.S}#${t.W}" was not found`);o.isProxied||(n.H=o.watchers,Oe(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,t.o|=128,l(),ke(t.t)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=ce(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.O,c=()=>ae(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const e=n(this);e.q&&(e.q.map((e=>e())),e.q=void 0),(null==e?void 0:e.t)?Ee(e.t):(null==e?void 0:e.L)&&e.L.then((()=>Ee(e.t)))}})()))}componentOnReady(){return n(this).L}};c.N=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,Oe(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(l=f.M)?l:k(a);null!=e&&b.setAttribute("nonce",e),v.insertBefore(b,y?y.nextSibling:v.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>$=setTimeout($e,30)))},Me=(e,t)=>t,xe=(e,t,n)=>{n&&n.map((([n,o,l])=>{const s=Ae(e,n),r=Pe(t,l),i=Re(n);f.ael(s,o,r,i),(t.q=t.q||[]).push((()=>f.rel(s,o,r,i)))}))},Pe=(e,t)=>n=>{var o;try{256&e.o?null==(o=e.t)||o[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},Ae=(e,t)=>4&t?a:8&t?u:16&t?a.body:e,Re=e=>({passive:!!(1&e),capture:!!(2&e)}),De=e=>f.M=e;export{Me as F,H,S as a,Ce as b,se as c,le as d,we as f,ye as g,D as h,h as p,o as r,De as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as n,H as e}from"./p-ab68ad11.js";import{G as i,f as s,H as r,e as c,a}from"./p-a69dbe14.js";import{z as l,b as d,d as h}from"./p-30fdcbee.js";import{h as u,b as f,l as m}from"./p-0fc02cde.js";import"./p-98aa88b1.js";import"./p-a1cfbd0a.js";const w=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},p=o=>{switch(o){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},v=({position:o="bottom-right"})=>{const t=".zonos--hello-mobile-wrapper";if(document.querySelector(t))return t;const n=document.createElement("div");return n.className="zonos--hello-mobile-wrapper",n.style.position="fixed","top-right"===o&&(n.style.top="72px",n.style.right="24px"),"top-left"===o&&(n.style.top="72px",n.style.left="24px"),"bottom-right"===o&&(n.style.bottom="72px",n.style.right="24px"),"bottom-left"===o&&(n.style.bottom="72px",n.style.left="24px"),n.style.zIndex="2147483007",document.body.appendChild(n),t},b=async o=>{if(window.Zonos.isLegacyCheckout)return void m("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:t}=o;let n=t;if(!o.anchorElementSelector&&o.desktopLocation){const o=v({position:"bottom-right"});n=o}if(n&&i(n)){if(m("Hello init complete"),!w(n)){const t=new MutationObserver((()=>{w(n)&&t.disconnect()}));t.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{w(n)}),1e3),setTimeout((()=>{if(o.notFoundElementFallback){m(`Hello anchor selector ${o.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${o.notFoundElementFallback}`,"info");const t=v({position:p(o.notFoundElementFallback)});w(t)}}),3e3)}}else f(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)},g=class{constructor(n){o(this,n),this.paypalInitEvent=t(this,"paypalInitEvent",7),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(s.stripe=o,((t=l.checkoutSettings).placeOrderButtonSelector||window.Zonos.cartData)&&(!t.placeOrderButtonSelector||i(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():f(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),m("init checkout element")):m("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||h();if("Inter"===e){if(!o)return;m("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:o})}const i=new URLSearchParams;i.set("family",e);const{errors:s,json:r}=await u(`/api/zonos-elements/get-font-detail?${i.toString()}`);if(s.length>0)return m(`Failed to load font ${e}`,"warn"),void(l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:"Inter"}));const c=null==r?void 0:r.fontUrl;c&&(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,c)),o&&(m(`[FONT] ${o} font override applied`),l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:o}))}handleLocationChange(){b(l.helloSettings)}initHistoryListener(){const o=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),o.apply(this,arguments)};const t=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)}}injectCustomHTML(o){if(!o)return;if(!window.Zonos.isLegacyCheckout)return void m("=== Skip injecting custom HTML for hosted checkout","info");m("=== Injecting custom HTML for hosted checkout");const t=document.createElement("template");t.innerHTML=o,t.content.querySelectorAll("script").forEach((o=>{const t=document.createElement("script");o.src?(t.src=o.src,t.async=o.async):t.textContent=o.innerHTML,document.body.appendChild(t)}))}async componentWillLoad(){this.initHistoryListener(),l.zonosApiKey=this.zonosApiKey,(async()=>{var o,t,n,e,i,s;const{errors:c,json:a,zonosMode:h}=await(async()=>{if(window.Zonos.cartSettings)return{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const{errors:o,json:t,zonosMode:n}=await u("/api/zonos-elements/zonos-settings");return o.length?(f("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null,zonosMode:n}):{errors:[],json:t,zonosMode:n}})();if("403"===(null===(t=null===(o=c[0])||void 0===o?void 0:o.type)||void 0===t?void 0:t.toString()))return void m("Failed to load zonos settings. This domain may not have access","warn");const w=(null===(n=null==a?void 0:a.checkoutSettings)||void 0===n?void 0:n.customHTML)||"";this.injectCustomHTML(w),this.initZonosNotification();const p=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(e=this.config.checkoutSettings)||void 0===e?void 0:e.successBehavior),v=Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var o,t,n;return window.Zonos.isLegacyCheckout?(null===(o=null==a?void 0:a.appearanceSettings)||void 0===o?void 0:o.logoUrl)||(null===(t=this.config.appearance)||void 0===t?void 0:t.logoUrl):null===(n=this.config.appearance)||void 0===n?void 0:n.logoUrl})()}),checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0,successBehavior:p?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:p?(null===(i=window.Zonos.cartData)||void 0===i?void 0:i.storeBaseUrl)||(null==a?void 0:a.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl}):void 0});d({overrideSettings:v,zonosSettings:a}),l.zonosMode=h,this.setupGoogleFont(),"DISABLED"===l.helloSettings.visibilityStatus&&m("=== Hello is disabled by store owner ===","warn"),l.helloSettings&&"ENABLED"===l.helloSettings.visibilityStatus&&(m("Initializing hello"),b(l.helloSettings)),await r();const g=(null===(s=null==a?void 0:a.checkoutSettings)||void 0===s?void 0:s.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(g&&this.stripeInitEvent)return"INACTIVE"===l.checkoutSettings.subscriptionStatus?(m('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void m("zonos controller loaded")):"DISABLED"===l.checkoutSettings.visibilityStatus?(m("=== Checkout is disabled by store owner ===","warn"),void m("zonos controller loaded")):void this.stripeInitEvent.emit({publishableKey:g.token});m("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):m("Failed to show notification - zonos-notification not found","warn")}async reset(){c.checkoutSessionId=null,s.clientSecret=""}async overrideConfig(o){d({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){m(`Override country code to ${o}`),a(o)}async getAppearanceSetting(){return l.appearance}async updateOrganizationName(o){l.organizationName=o}render(){return n(e,{key:"eed6d0d8b034a43bb4bccf5937b8eccc5d5744c9",class:"zonos--elements"})}};g.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{g as zonos_controller}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,H as t,F as s}from"./p-ab68ad11.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as l,e as h,f as u,g as m,h as p,j as z,k as g,m as f,n as k,o as w,t as b,p as y,q as v,r as C,u as x,v as S,w as O,x as I,y as A,z as T,A as P,B as j,C as D,D as L,E as B}from"./p-a69dbe14.js";import{p as E,s as U,a as _,b as N}from"./p-112aecac.js";import{z as $,g as R,m as M}from"./p-30fdcbee.js";import{h as H,l as Z,b as F,s as W,c as K,d as G,e as V,g as q,j as Y,a as Q,i as J}from"./p-0fc02cde.js";import{c as X}from"./p-b4b7f705.js";import{c as oo}from"./p-595f5dd2.js";import{g as eo}from"./p-a1cfbd0a.js";import{i as to}from"./p-98aa88b1.js";import{s as so}from"./p-96d77739.js";import{_ as no,c as io,d as co}from"./p-fe253cc1.js";import{R as ro}from"./p-08e7107d.js";const ao=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},lo=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&Z("Checkout: not shippable country"),1));let ho=0;const uo=async({cartId:o,retries:e})=>{const t=q(),{errors:s,json:n}=await H("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(Z("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),uo({cartId:o,retries:e-1})):i?null:n},mo='<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',po=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||$.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:E()})},this.handleCartExpiredCheck=()=>{var o;if(q())return Z("Not checking for cart expiration in test mode"),!1;if(!$.checkoutSettings.defaultCartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),t=(new Date).getTime(),s=Math.floor((t-e)/1e3);return Z(`Cart has been created for ${s/60} minutes`),!!($.checkoutSettings.defaultCartExpiration&&s>$.checkoutSettings.defaultCartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${io}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return Z("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(Z("Payment intent exist, checking stripe payment intent status"),!n)return Z("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:c,status:r}=await l({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(Z(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,h.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):t?(Z("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(Z("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=h.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.overrideStagingMode=void 0,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.clientSecret=u.clientSecret,this.stripeCustomerSessionClientSecret=u.stripeCustomerSessionClientSecret}async initCartInfoHandler(o){m({adjustments:h.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,U("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==h.step||p(),h.step="customer-info",z(),g(),null===(t=(e=$.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof $.checkoutSettings.createCartId){Z('"createCartId" is provided, start building cart');const o=await $.checkoutSettings.createCartId();let e;"object"==typeof o?(Z("object detected, use cartId and prefill address from createCartId"),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),h.customerAuthenticationToken=o.customerAuthenticationToken||null):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=no(o);if(!t&&!e)return F("[ZONOS - loadZonos] invalid cart id"),null;const s=await uo({cartId:o,retries:5});return Z("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(F("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return F("Failed to build cart, please try again."),!1;if(window.Zonos.cartData=s,this.handleCartExpiredCheck())return!1;const{adjustments:n,cartItems:i}=ao(s);await m({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){if(Z("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return!1;const{adjustments:o,cartItems:e}=ao(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if($.checkoutSettings.buildCartDetail&&n.selectedCountryCode){Z("build cart detail");const o=await $.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:t,cartItems:e})}if(!h.checkoutSessionId){const o=await f();if(Z(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return h.isStagingMode||k(),await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===$.checkoutSettings.successBehavior||!!h.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=Y(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;Z(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return Z(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,Z("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,h.checkoutSessionId&&H("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||$.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=$.checkoutSettings.placeOrderButtonSelector;if(Z(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const e=[o,`#${co}`,`#${io}`].filter(Boolean);document.querySelectorAll(e.join(",")).forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(Z(`attached event to button ${o}`,"info",{button:e}),e.addEventListener("click",(async o=>{var e;const t=performance.now();if(!window.Zonos.isLegacyCheckout&&(!lo()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&Z("Checkout: disabled country"),!0))()))return;o.preventDefault(),o.stopPropagation(),Z("zonos checkout button clicked");const{shouldAllowOrder:s}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(s){window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;Z("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await H("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),ho++,ho>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");w({isPreview:this.preview,sessionTimeout:54e5}),U("zonos-checkout-start"),b({checkoutSessionId:h.checkoutSessionId,eventName:"checkout_open"});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await H("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(h.shouldHideDiscountInput=!e,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=K(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:G},V()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};H("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:G},V()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};H("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-t})}}catch(o){if(u.isFetchingSession=!1,F(o),this.isCartExpired)return;W({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:G,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:(null===(e=window.Zonos.cartData)||void 0===e?void 0:e.storeBaseUrl)||$.onlineStoreSettings.url}}),v({messages:[C("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:C("Error creating Checkout")})}}}),{capture:!0,passive:!1}),$.checkoutSettings.disablePlaceOrderButtonActivation||e.removeAttribute("disabled"),e.setAttribute("data-zonos-checkout-attached","true"),e.matches(co)&&(e.dispatchEvent(oo("click")),r(),e.remove()),e.matches(`#${io}`)&&(e.dispatchEvent(oo("click")),e.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;Z("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:i,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:l}=o,h=new URLSearchParams(window.location.search),u=i||x(h)||n.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:u,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:l})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);Z("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=x(o)||n.selectedCountryCode,s=e("customerCity"),i=e("customerEmail"),c=e("customerAddress1"),r=e("customerAddress2"),a=e("customerName"),d=e("customerPhone"),l=e("customerZip"),h=e("customerState");this.applyPrefillAddress({customerAddress1:c,customerAddress2:r,customerCity:s,customerCountry:t,customerEmail:i,customerName:a,customerPhone:d,customerState:h,customerZip:l})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",i=o.customerCity||"",c=o.customerEmail||"",r=o.customerName||"",a=o.customerPhone||"",d=o.customerZip||"",l=o.customerState||"";e&&r&&a&&t?t&&n.shippingZoneCountries&&!(t in n.shippingZoneCountries)?Z(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:i||"",country:t,line1:e,line2:s,postal_code:d,state:l},email:c,name:r,phone:a}],Z("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):Z("Missing required query params so it can not be prefilled","info",[!e&&"line1",!r&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){h.isStagingMode=!!this.overrideStagingMode}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,h.isStagingMode=Q(),void 0!==this.overrideStagingMode&&(h.isStagingMode=this.overrideStagingMode),(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const t=new MutationObserver((async()=>{const s=document.querySelector(o),n=i();if(!s&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void t.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");d&&l&&(t.disconnect(),l.addEventListener("click",(async o=>{var e,t;const s=d.value;if(!s)return;if(c(s),!lo(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),l=document.querySelector("input#addressLine1Input"),h={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:l&&l.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(t=i.get("shippingAddress.stateOrProvince"))&&void 0!==t?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(h).some((o=>null==o)))return F("One or more shipping address field is missing",Object.entries(h)),void W({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(h))],metadata:{storeId:$.storeId}});a({address1:h.address1,address2:h.address2,city:h.city,countryCode:h.countryCode,firstName:h.firstName,lastName:h.lastName,phone:h.phone,postalCode:h.postalCode,state:h.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));t.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:co,onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(Z("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):Z("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){h.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){S(o)}async handleCustomerInfoContinue(){U("zonos-checkout-customer-info"),b({checkoutSessionId:h.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0,await O();const o=setInterval((()=>{!h.landedCostData&&u.isFetchingLandedCost||(h.landedCostData&&(_({currency:h.currency}),I()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{I(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){h.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"!==u.checkoutSettlementCurrency||!u.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,N.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,h.inventoryCheckErrorMessage=null,!await A())return u.hasPaymentError=!0,u.customErrorMessage=C("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:u.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{h.inventoryCheckErrorMessage=await T()}catch(o){h.inventoryCheckErrorMessage=C("Unable to check inventory. Please try again.")}if(h.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await P(),I(),g()}catch(o){F(o),U("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(j(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}else this.payInUsdConfirmDialogOpen=!0}async handleFinishClick(){if(D(),this.preview)return h.step="customer-info",void await this.init();if(p(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||$.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=J(this.mobile),this.applyStripeTheme(),Z(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=J(this.mobile),this.applyStripeTheme(),Z(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=R(this.appearanceSettingsOverride.theme))}handleAddressChange(){D()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return Z("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);Z("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=u.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=u.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){Z("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=J(this.mobile),this.isIframed=window.self!==window.top,Z(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=L("selectedLocale",(()=>{this.applyStripeTheme()})),Z(`mobile: ${this.isMobile}`)}disconnectedCallback(){D(),p(),this.onChangeLocaleListener()}render(){var o,i,c,r;this.customerProfile=u.customerProfile,this.clientSecret=u.clientSecret,u.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=u.stripeCustomerSessionClientSecret);const a="finish"!==h.step&&"error"!==h.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:l,logoUrl:m,style:p}=M($.appearance,this.appearanceSettingsOverride||null),z="ENABLED"===$.appearance.zonosAttribution,g=$.appearance.theme,f=d&&to(d)?"DARK":"LIGHT",k=this.isMobile?g:f,w=this.isMobile?void 0:l,{customMessages:b}=n,y=null===(o=b.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),x=b.filter((o=>o.pageName===v)),S=this.getBaseCurrencySettlementInfo(),O=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${$.organizationName} logo`,src:o}))},I=q(),A=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||Q();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},O(),I&&e("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},C("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:mo,message:o.message}))))},T=()=>h.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:C("Your checkout session has expired. Please reload the page to continue."),restStateTitle:C("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},C("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":eo({overrideBorderStyle:p})}},"finish"!==h.step&&"error"!==h.step&&e(s,null,e("div",{class:"zonos--left","data-theme":k,style:so({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&A(),"customer-info"===h.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:w}),"shipping"===h.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:w}),"payment"===h.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:w})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:ro}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:w}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:mo,message:y})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:mo,message:y}))))),("finish"===h.step||"error"===h.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},O(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:ro}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:p,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===h.step&&h.error?Object.assign(Object.assign({},h.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(t,{class:X(["zonos--checkout zonos--elements",z&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?T():e("zonos-dialog",{borderStyle:p,"data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:C("Don't close"),dialogConfirmBtnText:C("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:C("Would you like to close checkout and return to the site?"),dialogTitle:C("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:C("Return to merchant site"),dialogConfirmBtnText:C("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?C("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):C("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:C("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:C("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:C("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),S&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:B({amount:S.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:C("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:C("You are being sent back to the shop to re-add items to your cart."),dialogTitle:C("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};po.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{po as zonos_checkout}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,s,t){function n(o){return o instanceof s?o:new s((function(e){e(o)}))}return new(s||(s=Promise))((function(s,i){function a(o){try{d(t.next(o))}catch(o){i(o)}}function r(o){try{d(t["throw"](o))}catch(o){i(o)}}function d(o){o.done?s(o.value):n(o.value).then(a,r)}d((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return d([o,e])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(s=0)),s)try{if(t=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:s.label++;return{value:r[1],done:false};case 5:s.label++;n=r[1];r=[0];continue;case 7:r=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){s=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(r[0]===6&&s.label<i[1]){s.label=i[1];i=r;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(r);break}if(i[2])s.ops.pop();s.trys.pop();continue}r=e.call(o,s)}catch(o){r=[6,o];n=0}finally{t=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-c6d96a42.system.js","./p-5187ba8f.system.js","./p-1b75aa35.system.js","./p-2670438c.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-e4f8114a.system.js","./p-69255ed2.system.js"],(function(o){"use strict";var e,s,t,n,i,a,r,d,l,c,h,u,f,b,p,m,z,v,y,g,x,k;return{setters:[function(o){e=o.r;s=o.c;t=o.h;n=o.H;i=o.d},function(o){a=o.e;r=o.f;d=o.t;l=o.V;c=o.r;h=o.l},function(o){u=o.z;f=o.d},function(o){b=o.b;p=o.l;m=o.i},function(o){z=o.i;v=o.c},function(o){y=o.c},function(o){g=o.R},function(o){x=o.g},function(o){k=o.i}],execute:function(){var w=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var C=w;var A=o("zonos_address",function(){function o(o){e(this,o);this.invalidCharacters=s(this,"invalidCharacters",7);this.isAutoCompleteAdjusted=false;this.trackingSent=false;this.type=undefined;this.titleText=undefined;this.defaultAddress=[];this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=a.checkoutSessionId}o.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:r.stripeBillingAddressElement,stripeAddressEventData:r.stripeBillingAddressEventData,stripeElements:r.stripeElementsForBillingAddress}}return{stripeAddressElement:r.stripeAddressElement,stripeAddressEventData:r.stripeAddressEventData,stripeElements:r.stripeElements}};o.prototype.updateAddressEventData=function(o){var e=o.event,s=o.type;switch(s){case"billing":r.stripeBillingAddressEventData=e;break;default:{r.stripeAddressEventData=e;break}}};o.prototype.isAddressFilledChanged=function(){if(!a.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var o=a.checkoutSessionId;void d({checkoutSessionId:o,eventName:"checkout_customerInfoFilled"})}};o.prototype.updateAddressElement=function(o){var e=o.stripeAddressElement,s=o.type;if(s==="shipping"){r.stripeAddressElement=e;return}r.stripeBillingAddressElement=e};o.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d,c;var u=this;return __generator(this,(function(f){this.stripe=window.Zonos.stripe;o=this.getStripeAddressInstance(),e=o.stripeAddressEventData,s=o.stripeElements;if(!this.stripe||!s){b("Stripe is not initialized. Couldn't load stripe element.");return[2]}t=this.defaultAddress.map((function(o){return Object.assign(Object.assign({},o),{name:o.name,phone:o.phone||undefined})}));n=h.shippingZoneCountries;i=n?Object.values(n).map((function(o){return o.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");r=this.type==="shipping"?i:[];d=(e===null||e===void 0?void 0:e.value.address.country)||l(r);p("Stripe country code: ".concat(d),"info");c=s.create("address",{allowedCountries:a?[]:r,contacts:t.length&&!e?this.defaultAddress:[],defaultValues:{address:Object.assign(Object.assign({},e===null||e===void 0?void 0:e.value.address),{country:d}),firstName:e===null||e===void 0?void 0:e.value.firstName,lastName:e===null||e===void 0?void 0:e.value.lastName,phone:e===null||e===void 0?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));c.on("change",(function(o){var e=o.value;if(!u.isDirtyAddress&&e.address.line1.length>=3){u.isDirtyAddress=true;setTimeout((function(){if(!u.isAutoCompleteAdjusted){var o=u.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(o){o.style.zIndex="2"}u.isAutoCompleteAdjusted=true}if(m()){u.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var e=u.type==="shipping"?100:600;var s=u.el.closest(".zonos--group");var t=u.el.getBoundingClientRect().top+e;s===null||s===void 0?void 0:s.scrollTo({behavior:"smooth",top:t})}}),600)}u.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:u.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:u.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};o.prototype.defaultAddressChanged=function(o,e){var s=JSON.stringify(e);var t=JSON.stringify(o);if(s===t){return}p("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.clear();n===null||n===void 0?void 0:n.destroy();if(this.type==="shipping"){r.stripeAddressEventData=null}else{r.stripeBillingAddressEventData=null}void this.watchInitStripe()};o.prototype.renderCompanyNameInput=function(){var o;if(this.type==="billing"){return null}if(!((o=u.genericSettings)===null||o===void 0?void 0:o.companyNameInputEnabled)){r.companyName="";return null}return t("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:c("Company name (optional)"),inputValue:r.companyName,onInputChange:function(o){r.companyName=o.detail}})};o.prototype.disconnectedCallback=function(){var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.destroy()};o.prototype.componentDidLoad=function(){var o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0;void this.watchInitStripe()};o.prototype.render=function(){var o;this.checkoutSessionId=a.checkoutSessionId;if((o=r.stripeAddressEventData)===null||o===void 0?void 0:o.complete){this.isAddressFilled=true}return t(n,{key:"f31fc745e5c024dd2b594a26a0a81ebe3a5f8060",class:"zonos--address zonos--elements"},t("zonos-text",{key:"7b51df49edb4d7abbff9733b1e220771caca7f12",class:"zonos--title",type:"semiBoldLabel"},this.titleText),this.renderCompanyNameInput(),t("div",{key:"781cd2076d8319979bb5ed2ea3bb24dfa97f7010",class:"zonos--address-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return o}());A.style=C;var j=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var I=j;var O=o("zonos_address_display",function(){function o(o){e(this,o);this.currentAddress=undefined;this.addressType=undefined}o.prototype.render=function(){var o;var e=this.currentAddress,s=e.city,i=e.country,a=e.email,r=e.line1,d=e.line2,l=e.name,u=e.phone,f=e.postal_code,b=e.state;var p=(o=h.shippingZoneCountries)===null||o===void 0?void 0:o[i];var m=function(o){var e=o.bold,s=o.content;var n=z(s)?"red-600":"gray-1000";return t("zonos-text",{textColor:n,type:e?"boldLabel":"body"},s)};return t(n,{class:"zonos--address-form zonos--elements"},t("div",{class:"zonos--title"},t("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?c("Shipping"):c("Billing"))),t("div",{class:"zonos--address-group"},l&&t("div",{class:"zonos--address-line"},m({bold:true,content:l})),a&&t("div",{class:"zonos--address-line"},m({content:a})),u&&t("div",{class:"zonos--address-line"},m({content:u})),r&&t("div",{class:"zonos--address-line"},m({content:r})),d&&t("div",{class:"zonos--address-line"},m({content:d})),t("div",{class:"zonos--address-line"},s&&m({content:s}),b&&m({content:b}),f&&m({content:f})),p&&t("div",{class:"zonos--address-line"},t("zonos-country-flag",{class:"zonos--country-flag",countryCode:p.code})," ",m({content:p.displayName}))))};return o}());O.style=I;var _=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var E=_;var L=o("zonos_address_form",function(){function o(o){var t=this;e(this,o);this.addressChange=s(this,"addressChange",7);this.onInputChange=function(o){var e;var s=o.key,n=o.value;t.addressChange.emit(Object.assign(Object.assign({},t.localAddress),(e={},e[s]=n,e)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}o.prototype.watchCurrentAddress=function(){var o,e,s,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,u=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((o=this.translatedAddress.city)===null||o===void 0?void 0:o[r])||r,line1:((e=this.translatedAddress.line1)===null||e===void 0?void 0:e[d])||d,line2:((s=this.translatedAddress.line2)===null||s===void 0?void 0:s[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[u])||u})};o.prototype.componentWillLoad=function(){this.watchCurrentAddress()};o.prototype.render=function(){var o=this;var e=this.localAddress,s=e.city,i=e.country,a=e.line1,r=e.line2,d=e.name,l=e.phone,h=e.postal_code,u=e.state;var f=d.split(" ")[0]||"";var b=d.split(" ").slice(1).join(" ")||"";return t(n,{key:"8b578737e33203a23563be7e9be0778deec99bbf",class:"zonos--address-form zonos--elements"},t("div",{key:"793675a1348547bf3f781788956befe325191011",class:"zonos--title"},t("zonos-text",{key:"13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?c("Shipping"):c("Billing"))),t("div",{key:"2c5de5b5283fb99ee5f8b61d7a217177986fc2db",class:"zonos--address-group"},t("div",{key:"23bf3c893071000d5995a5f175867bab11929193",class:"zonos--contact"},t("zonos-text",{key:"7cdfe2a84ebad89ba5b16498d75def99cf392384",type:"label"},c("Contact")),t("zonos-input",{key:"1c39c38767fd306c5eb1164cdc989b8291209cf0",class:"zonos--form-email",inputLabel:c("Email"),inputValue:this.currentAddress.email,isDisabled:true}),t("div",{key:"cbdf61217125e22b1a6cec9a340ef0aca2c75670",class:"zonos--name zonos--address-row"},t("zonos-input",{key:"360c99e7b2c6caa64580d5768b5bb53368927275",class:"zonos--form-first-name",inputLabel:c("First name"),inputValue:f,isError:z(f),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(e.detail," ").concat(b)})}}),t("zonos-input",{key:"8ce5fa5c15c6f7928339ea10009ce0e68954a91f",class:"zonos--form-last-name",inputLabel:c("Last name"),inputValue:b,isError:z(b),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(f," ").concat(e.detail)})}}))),t("div",{key:"7b4fa2d3baa6cb257e7688e5ba6777123898b3fd",class:"zonos--address"},t("zonos-text",{key:"9d5782331b2642755a755aeb7f98c9f4d87f9a20",type:"label"},c("Address")),t("zonos-input",{key:"a622025924ca86bdbf1d3c04b79e6dee172b4c42",class:"zonos--form-country",inputLabel:c("Country"),inputValue:i,isDisabled:true}),t("zonos-input",{key:"f99b3a74db09ab5730878e80705b9aeac76bf800",class:"zonos--form-line1",inputLabel:c("Address line 1"),inputValue:a,isError:z(a),onInputChange:function(e){return o.onInputChange({key:"line1",value:e.detail})}}),t("zonos-input",{key:"5d16aefa45a78045c87d166aaaec0255606e455e",class:"zonos--form-line2",inputLabel:c("Address line 2"),inputValue:r,isError:z(r),onInputChange:function(e){return o.onInputChange({key:"line2",value:e.detail})}}),t("div",{key:"dc166be9381142835d72e731cb38a718522a068a",class:"zonos--address-row"},t("zonos-input",{key:"4f1a98f9d10ce0cff3ef18a3037a12382552b31d",class:"zonos--form-city",inputLabel:c("City"),inputValue:s,isError:z(s),onInputChange:function(e){return o.onInputChange({key:"city",value:e.detail})}}),t("zonos-input",{key:"d4f97900b5fe2e1619950a52d1d1f716a8bc19ff",class:"zonos--form-state",inputLabel:c("State/Province"),inputValue:u,isError:z(u),onInputChange:function(e){return o.onInputChange({key:"state",value:e.detail})}})),t("zonos-input",{key:"cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733",class:"zonos--form-postal-code",inputLabel:c("Postal code"),inputValue:h,isError:z(h),onInputChange:function(e){return o.onInputChange({key:"postal_code",value:e.detail})}}),t("zonos-input",{key:"7421c82847eded6bdbcce49ef8196124d8e50c1d",class:"zonos--form-phone",inputLabel:c("Phone number"),inputValue:l,onInputChange:function(e){return o.onInputChange({key:"phone",value:e.detail})}}))))};Object.defineProperty(o,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return o}());L.style=E;var S=":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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var B=S;var T=o("zonos_address_update_dialog",function(){function o(o){var t=this;e(this,o);this.closeUpdateDialog=s(this,"closeUpdateDialog",7);this.continueClicked=s(this,"continueClicked",7);this.closeUpdateDialogHandler=function(){t.closeUpdateDialog.emit()};this.getTranslatedAddress=function(o){var e=o.currentAddress,s=o.translatedAddress;var t,n,i,a,r,d;var l=e.city,c=e.line1,h=e.line2,u=e.name,f=e.postal_code,b=e.state;return{city:((t=s.city)===null||t===void 0?void 0:t[l])||l,line1:((n=s.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=s.line2)===null||i===void 0?void 0:i[h])||h,name:((a=s.name)===null||a===void 0?void 0:a[u])||u,postal_code:((r=s.postal_code)===null||r===void 0?void 0:r[f])||f,state:((d=s.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d,l,c,h,u;return __generator(this,(function(f){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=v(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&v(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];u=((e=c===null||c===void 0?void 0:c.shadowRoot)===null||e===void 0?void 0:e.querySelector(".has-error"))||((s=h===null||h===void 0?void 0:h.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"));if(u){u.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(o){var e,s,t,n,i,a;var r=o.currentAddress,d=o.translatedAddress;var l=r.city,c=r.line1,h=r.line2,u=r.name,f=r.postal_code,b=r.state;return{city:(e={},e[l]=d.city,e),line1:(s={},s[c]=d.line1,s),line2:(t={},t[h]=d.line2,t),name:(n={},n[u]=d.name,n),postal_code:(i={},i[f]=d.postal_code,i),state:(a={},a[b]=d.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}o.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};o.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};o.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};o.prototype.render=function(){var o=this;var e=this.submitBtnColor||u.appearance.colorSecondary;var s=e==="#ffffff"?"outline":this.submitBtnType||"standard";var i=this.billingAddress;var a=this.shippingAddress;return t(n,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:y(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},t("zonos-dialog",{key:"eab429bb78ce6f05ba463d8748d7edd5499402fa",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeUpdateDialog.emit()},open:this.dialogOpen,width:"568px"},t("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},t("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},t("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},t("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},c("Update your address")),t("zonos-button",{key:"66abf7b74045e68e84e631298504236d32ca9c4e",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:g}),noBackground:true,onClick:function(){return o.closeUpdateDialogHandler()}})),t("zonos-text",{key:"ffb3d8f169867d5f6dff269e1becd99c98c5a7da"},c("To ensure delivery all address details must be in Latin characters."))),t("div",{key:"2cb61f06ce174e2317870decfdd337c67c5cf128",class:"zonos--group"},t("zonos-text",{key:"a616c540984120b468e52bccfb380ea3974ced22",class:"zonos--what-you-entered",type:"semiBoldLabel"},c("What you entered")),t("div",{key:"6ac8f9c14472370c501af1b0d50bd8f8746b7694",class:"zonos--address-display-group"},t("zonos-address-display",{key:"ea2c67a7bba51c99f80be968e448beeffcf1f863",addressType:"shipping",currentAddress:a}),i&&t("zonos-address-display",{key:"7ea1683dc04a292810e04ed6550d86086f25186f",addressType:"billing",currentAddress:i})),t("div",{key:"4d1cd9096943518b8b4e267608a5e1542befb6a9",class:"zonos--address-form-section"},t("zonos-text",{key:"e4184a2cc618d26d43979fa8cfe06070cf8b5af8",type:"semiBoldLabel"},c("Translated address")),t("zonos-address-form",{key:"c55d9d3c658565ceb7c7b879f444e3937b9f7ad6",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:a,onAddressChange:function(e){var s=e.detail;o.translatedShippingAddressState=o.buildTranslateAddressState({currentAddress:a,translatedAddress:s})},translatedAddress:this.translatedShippingAddressState}),i&&t("zonos-address-form",{key:"c3facc295b1322bb00baa6081f343dcea4f10777",addressType:"billing",class:"zonos--billing-address-form",currentAddress:i,onAddressChange:function(e){var s=e.detail;o.translatedBillingAddressState=o.buildTranslateAddressState({currentAddress:i,translatedAddress:s})},translatedAddress:this.translatedBillingAddressState}))),t("div",{key:"1c89c9604ba0dece40275fcfac97e7f93706b430",class:"zonos--group-btn"},t("div",{key:"e47d393940b094b4e123864e4070daa87f0616f0",class:"zonos--button-wrapper"},t("zonos-button",{key:"216b7afe268a4acd6bb8a76b7f5a32dc09bdd4f6",class:"zonos--cancel-btn",onClick:function(){return o.closeUpdateDialogHandler()},variant:"subtle"},c("Cancel")),t("zonos-button",{key:"acbacb92cedb325b46843d8f3aff13f4e7c86ab5",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"sm",variant:s},c("Update address")))))))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return o}());T.style=B;var V=["blue","cyan","green","orange","purple","red","gray","glass"];var D=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var N=D;var P=o("zonos_checkbox",function(){function o(o){e(this,o);this.checkboxSelected=s(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}o.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};o.prototype.render=function(){var o=this;var e=V.includes(this.backgroundColor);var s=e?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=e?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!k(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var a=x({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return t(n,{key:"7a2972128b04d5dffe09f60b5292d90f7201066a",class:y(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":a,"--zonos--font-family":f(),"--zonos--size":"".concat(this.size,"px")}},t("label",{key:"b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41",class:y([this.isDisabled&&"disabled"])},t("input",{key:"f3b86525ef7988d6df87f9147f5aa22b447c1303",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){o.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),t("span",{key:"2007c2fbc4d8437f75b9a3d7a4e65d394922abf4",class:"checkmark-container"},t("svg",{key:"481b9272c99cf464d8d88ab24a8dba35de921abf",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"ab7690fba113135175248c8926907312dfe478d5","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&t("zonos-text",{key:"99689099e7469f2ff928619daa2fcee0ce35a418",size:this.fontSize},this.label)))};return o}());P.style=N;var Z='<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 M=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var F=M;var R=o("zonos_dialog",function(){function o(o){var t=this;e(this,o);this.closeDialog=s(this,"closeDialog",3);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!t.open){return}t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.minHeight=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.handleKeyDown=function(o){if(o.key==="Escape"){this.closeButtonHandler()}};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){var o=x({overrideBorderStyle:this.borderStyle});return t(n,{key:"a9932187bccf8e7fa505c7e07175d03541d66852",class:y(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":f(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},t("div",{key:"0298cf365a50e3544656a6d27ae59e922b9e3aed",class:"zonos--backdrop"}),t("div",{key:"9fce580a07147d51f17c898a22204c3d9ce6ac7b",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},t("div",{key:"b168439cd985cc5c0166a653db206688504cf7dd",class:"zonos--dialog"},this.isLoading&&t("div",{key:"e0b6215f3c7bc939721669069bc294e08558d8b5",class:"zonos--loading"},t("zonos-spinner",{key:"687bcd6d2695933de828484c34aff1230bf71d49",size:30})),(this.headerText||!this.noCloseButton)&&t("div",{key:"04a57a4add896e3d96faca8b77321bba5f00b889",class:"zonos--header"},this.headerText&&t("h3",{key:"d084cb3aedcb7e5bb8fd82012b57f441d7dce4a2",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{key:"7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close dialog",content:Z}),noBackground:true,onClick:this.closeButtonHandler,variant:"subtle"})),t("div",{key:"7af04c281b6410b87bfe53913e74fa215f6de24b",class:y(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",{key:"8c6ce4437d2bc98f9eccea0280cee31794883b77"})),t("slot",{key:"11f97e705b3cc1bad11c037ede940d2f392d67e7",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());R.style=F;var U=function(o){var e=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return e.test(o)};var H=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var J=H;var q=o("zonos_link_authentication",function(){function o(o){var t=this;e(this,o);this.linkAuthenticationChange=s(this,"linkAuthenticationChange",7);this.setCustomEmailInputToLinkEvent=function(o){var e=U(o);var s={complete:!!e,elementType:"linkAuthentication",empty:!o,value:{email:o}};r.stripeLinkEventData=s};this.handleNormalEmailInput=function(o){var e;var s=o.detail;t.setCustomEmailInputToLinkEvent(s);(e=t.linkAuthenticationChange)===null||e===void 0?void 0:e.emit()};this.titleText=undefined;this.defaultEmail=null;this.isEmailError=false;this.stripe=r.stripe;this.isStagingMode=a.isStagingMode;this.clientSecret=r.clientSecret}o.prototype.watchIsStagingMode=function(){var o=this;setTimeout((function(){o.watchInitStripe()}),0)};o.prototype.watchInitStripe=function(){var o=this;if(!this.stripe||!r.stripeElements){return}if(a.isStagingMode||!this.clientSecret){return}var e=this.defaultEmail?{email:this.defaultEmail}:undefined;var s=r.stripeLinkElement||r.stripeElements.create("linkAuthentication",{defaultValues:e});var t=this.el.querySelector(".zonos--link-authentication-component");if(!t){b("Cannot find container element for linkAuthenticationElement");return}s.mount(t);s.on("change",(function(e){var s;r.stripeLinkEventData=e;(s=o.linkAuthenticationChange)===null||s===void 0?void 0:s.emit()}));r.stripeLinkElement=s};o.prototype.watchDefaultEmail=function(o,e){var s=this;var t,n;p("Default email is changed","info",{newDefaultEmail:o,oldDefaultEmail:e});if(e===o){return}if(!o){r.stripeLinkEventData=null}if(a.isStagingMode){this.setCustomEmailInputToLinkEvent(o||"");return}(t=r.stripeLinkElement)===null||t===void 0?void 0:t.clear();(n=r.stripeLinkElement)===null||n===void 0?void 0:n.destroy();r.stripeLinkElement=null;r.stripeLinkEventData=null;p("Reset stripe link element when default email is changed","info",{defaultEmail:o});setTimeout((function(){void s.watchInitStripe()}),5)};o.prototype.componentDidLoad=function(){this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};o.prototype.render=function(){var o=this;this.isStagingMode=a.isStagingMode;this.clientSecret=r.clientSecret;var e=function(){var e;if(a.isStagingMode){return t("zonos-stripe-input",{inputLabel:c("Email"),inputValue:o.defaultEmail||((e=r.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",isError:o.isEmailError,onBlur:function(){var e;var s=((e=r.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"";if(!s){return}var t=U(s);o.isEmailError=!t},onInputChange:o.handleNormalEmailInput})}return t("div",{class:"zonos--link-authentication-component ".concat(o.isEmailError&&"zonos--input-invalid")})};return t(n,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":x()}},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e(),this.isEmailError&&t("zonos-text",{textColor:"red-600"},c("Please enter a valid email address.")))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return o}());q.style=J}}}));
|