@zonos/elements 1.3.262 → 1.3.264
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-d08c87e2.js → cart-d4486651.js} +4 -4
- package/dist/cjs/{debounce-3e17b4e9.js → debounce-606d1801.js} +1 -1
- package/dist/cjs/{getBorderRadius-db55a464.js → getBorderRadius-a91911e7.js} +1 -1
- package/dist/cjs/{getContrastColor-8ed1cb48.js → getContrastColor-68058615.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-c781c336.js → hasInclusivePrice-40358cb1.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-e64f97c6.js → invoice-600fa2a4.js} +3 -3
- package/dist/cjs/{isCollectMobileTablet-9675485f.js → isCollectMobileTablet-f56566ef.js} +3 -3
- package/dist/cjs/{isContrastColor-6a17f408.js → isContrastColor-a02c4889.js} +1 -1
- package/dist/cjs/{isDarkColor-bfe6d1eb.js → isDarkColor-e317bb06.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-a7fac4b4.js → localization-06cc0379.js} +16 -2
- package/dist/cjs/{paypal-e278f405.js → paypal-52c4a4d4.js} +5 -5
- package/dist/cjs/{placeTestOrder-aefd31e8.js → placeTestOrder-7c88197a.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-a374741a.js → renderCheckoutCurrency-2ebeff09.js} +2 -2
- package/dist/cjs/{submitGtag-4241212b.js → submitGtag-07a3b09e.js} +1 -1
- package/dist/cjs/{throttle-dac93461.js → throttle-8aebac7d.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-a3776bb0.js → updateCheckoutSessionAttributes-a9a97194.js} +1 -1
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +24 -24
- package/dist/cjs/zonos-address_4.cjs.entry.js +13 -13
- package/dist/cjs/zonos-badge.cjs.entry.js +4 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-card_5.cjs.entry.js +14 -14
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +25 -23
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +217 -67
- package/dist/cjs/zonos-collapse.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +27 -25
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +15 -13
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +13 -11
- package/dist/cjs/zonos-hello.cjs.entry.js +46 -14
- package/dist/cjs/zonos-input.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +22 -20
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
- package/dist/cjs/zonos-store-credit.cjs.entry.js +6 -6
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +7 -7
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +3 -3
- package/dist/cjs/{zonosStore-1c517e55.js → zonosStore-0662b95f.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +23 -15
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +45 -10
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +5 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +4 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +10 -8
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +1 -1
- package/dist/collection/components/utils/checkout/getBigCommerceCustomerAddresses.js +99 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +15 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +1 -1
- package/dist/collection/components/utils/hello/getHelloWidgetSize.js +22 -0
- package/dist/collection/types/generated/graphql.internal.types.js +67 -1
- package/dist/esm/{cart-c490d252.js → cart-41f41429.js} +4 -4
- package/dist/esm/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
- package/dist/esm/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
- package/dist/esm/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +2 -2
- package/dist/esm/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-3ea5715b.js → invoice-e6721745.js} +3 -3
- package/dist/esm/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-d02bb448.js} +3 -3
- package/dist/esm/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
- package/dist/esm/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-542dbe20.js → localization-ee06df70.js} +16 -2
- package/dist/esm/{paypal-d8804da5.js → paypal-ac74241f.js} +5 -5
- package/dist/esm/{placeTestOrder-d7001709.js → placeTestOrder-0416d327.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-99da51f5.js} +2 -2
- package/dist/esm/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
- package/dist/esm/{throttle-5a66b4fd.js → throttle-882b1f47.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
- package/dist/esm/zonos-address-display_8.entry.js +24 -24
- package/dist/esm/zonos-address_4.entry.js +13 -13
- package/dist/esm/zonos-badge.entry.js +4 -4
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +6 -6
- package/dist/esm/zonos-card_5.entry.js +14 -14
- package/dist/esm/zonos-cart-items_12.entry.js +25 -23
- package/dist/esm/zonos-checkbox_2.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +218 -68
- package/dist/esm/zonos-collapse.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +9 -9
- package/dist/esm/zonos-collect-finish_6.entry.js +27 -25
- package/dist/esm/zonos-collect.entry.js +9 -9
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +15 -13
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +13 -11
- package/dist/esm/zonos-hello.entry.js +46 -14
- package/dist/esm/zonos-input.entry.js +6 -6
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +11 -11
- package/dist/esm/zonos-invoice-finish_5.entry.js +22 -20
- package/dist/esm/zonos-invoice.entry.js +9 -9
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
- package/dist/esm/zonos-store-credit.entry.js +6 -6
- package/dist/esm/zonos-stripe-input.entry.js +7 -7
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +3 -3
- package/dist/esm/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -0
- package/dist/esm-es5/{cart-c490d252.js → cart-41f41429.js} +1 -1
- package/dist/esm-es5/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
- package/dist/esm-es5/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-3ea5715b.js → invoice-e6721745.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-d02bb448.js} +1 -1
- package/dist/esm-es5/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
- package/dist/esm-es5/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-542dbe20.js → localization-ee06df70.js} +1 -1
- package/dist/esm-es5/{paypal-d8804da5.js → paypal-ac74241f.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-d7001709.js → placeTestOrder-0416d327.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-99da51f5.js} +1 -1
- package/dist/esm-es5/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
- package/dist/esm-es5/{throttle-5a66b4fd.js → throttle-882b1f47.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.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-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -1
- package/dist/scripts/index.d.ts +31 -15
- 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 +9 -0
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -1
- package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +22 -11
- package/dist/types/components/utils/checkout/getBigCommerceCustomerAddresses.d.ts +26 -0
- package/dist/types/components/utils/hello/getHelloWidgetSize.d.ts +15 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +8 -7
- package/dist/types/types/generated/graphql.internal.types.d.ts +100 -20
- package/dist/types/types/generated/graphql.internal.types.ts +118 -20
- package/dist/types/types/hello/HelloConfig.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-53fe581b.system.js → p-0207c91e.system.js} +1 -1
- package/dist/zonos-elements/{p-9262a57c.system.entry.js → p-0529a06b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7a9be55.system.js → p-076ca381.system.js} +1 -1
- package/dist/zonos-elements/{p-5a79e1f4.entry.js → p-07cdff18.entry.js} +1 -1
- package/dist/zonos-elements/{p-5db00bfa.system.entry.js → p-0914b8a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-155b4425.entry.js → p-0b4ba025.entry.js} +1 -1
- package/dist/zonos-elements/{p-17476a30.system.entry.js → p-0f9a04fe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-72adb40d.js → p-14ce8e3a.js} +1 -1
- package/dist/zonos-elements/{p-7df3e44b.system.entry.js → p-15f70aae.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1c76c38.system.entry.js → p-16948eea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-43a6e469.system.js → p-1bf9a1b9.system.js} +1 -1
- package/dist/zonos-elements/{p-e749fb81.entry.js → p-1cc651e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3020bc9.entry.js → p-1ed2827f.entry.js} +1 -1
- package/dist/zonos-elements/p-20e0c24e.entry.js +1 -0
- package/dist/zonos-elements/{p-248bdea2.system.js → p-24aae506.system.js} +1 -1
- package/dist/zonos-elements/{p-f7d24382.system.entry.js → p-2555ba6b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3deb91cb.entry.js → p-258c0551.entry.js} +1 -1
- package/dist/zonos-elements/{p-f00a56be.system.entry.js → p-274a7c0e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb87172c.entry.js → p-283ffaad.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-aa74b61a.system.entry.js → p-2c027b67.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2fc253b3.js +1 -0
- package/dist/zonos-elements/{p-00bd7e5d.entry.js → p-32ecece3.entry.js} +1 -1
- package/dist/zonos-elements/p-349bdc03.system.entry.js +1 -0
- package/dist/zonos-elements/{p-80e7cab5.entry.js → p-34dc7755.entry.js} +1 -1
- package/dist/zonos-elements/p-367a72bc.js +1 -0
- package/dist/zonos-elements/{p-15ef7644.system.js → p-3689821f.system.js} +1 -1
- package/dist/zonos-elements/{p-a75b8ad7.js → p-37f47658.js} +1 -1
- package/dist/zonos-elements/{p-4a227683.system.entry.js → p-3a23ec5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3bc1adb7.entry.js +1 -0
- package/dist/zonos-elements/p-41f2e301.entry.js +1 -0
- package/dist/zonos-elements/{p-b5223840.js → p-4220556e.js} +1 -1
- package/dist/zonos-elements/{p-072c5e07.system.entry.js → p-42518502.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4980facb.js +1 -0
- package/dist/zonos-elements/{p-5dd78b4b.js → p-4c89d04a.js} +1 -1
- package/dist/zonos-elements/{p-27f01d76.entry.js → p-52077d7c.entry.js} +1 -1
- package/dist/zonos-elements/p-551dd2e0.js +1 -0
- package/dist/zonos-elements/{p-b2cd18b4.system.entry.js → p-5678c044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ed827ca3.entry.js → p-59aa5785.entry.js} +1 -1
- package/dist/zonos-elements/{p-e25e0b4b.system.js → p-5e6f85f0.system.js} +1 -1
- package/dist/zonos-elements/{p-cdbb50cf.entry.js → p-665bfd4f.entry.js} +1 -1
- package/dist/zonos-elements/{p-4cee62fb.entry.js → p-66edcaa4.entry.js} +1 -1
- package/dist/zonos-elements/{p-cab6bd98.system.js → p-6a195559.system.js} +1 -1
- package/dist/zonos-elements/p-6b9ad020.entry.js +1 -0
- package/dist/zonos-elements/p-6d81901a.js +1 -0
- package/dist/zonos-elements/{p-3ff736f7.system.entry.js → p-7003d093.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-196423ad.system.js → p-721069c3.system.js} +1 -1
- package/dist/zonos-elements/{p-14f156c6.system.entry.js → p-72833da8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f2909fb8.entry.js → p-7564d199.entry.js} +1 -1
- package/dist/zonos-elements/{p-e76dc266.system.entry.js → p-79f3c227.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84c7cae6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e55bc187.entry.js → p-8571f3ce.entry.js} +1 -1
- package/dist/zonos-elements/p-86ed51fd.entry.js +1 -0
- package/dist/zonos-elements/{p-d50fef06.system.entry.js → p-88596f27.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8a01157e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9e761130.entry.js → p-8a21ed2d.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf4d2299.system.entry.js → p-90a19f4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-947f5092.js → p-90d19cb6.js} +1 -1
- package/dist/zonos-elements/{p-06ef4d79.entry.js → p-9288878f.entry.js} +1 -1
- package/dist/zonos-elements/{p-ef12af4b.entry.js → p-92a14180.entry.js} +1 -1
- package/dist/zonos-elements/{p-dee6adff.system.js → p-98c53c77.system.js} +1 -1
- package/dist/zonos-elements/{p-8d0bca3a.system.entry.js → p-9da832b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8bb461c.js → p-9eff0691.js} +1 -1
- package/dist/zonos-elements/{p-66934a78.system.entry.js → p-9f18348f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7e7148.system.js +1 -0
- package/dist/zonos-elements/{p-e36e724b.system.entry.js → p-a2e9b2aa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a661dd45.system.entry.js → p-a5f5993f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a901d002.js +1 -0
- package/dist/zonos-elements/{p-2f924331.js → p-ab0b23f2.js} +1 -1
- package/dist/zonos-elements/{p-e673a4d9.entry.js → p-ab73cbed.entry.js} +1 -1
- package/dist/zonos-elements/p-b0526805.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f0046c48.entry.js → p-b13d56b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b7beb44.system.js → p-b32cd0c5.system.js} +1 -1
- package/dist/zonos-elements/{p-ade15fd2.entry.js → p-b4b23475.entry.js} +1 -1
- package/dist/zonos-elements/{p-0699931c.system.js → p-b65bca4b.system.js} +1 -1
- package/dist/zonos-elements/p-ba7cf5e8.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7ecef98.system.entry.js → p-ba9e2612.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9de27162.system.entry.js → p-c0fffa75.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c52bc5ad.system.entry.js +1 -0
- package/dist/zonos-elements/p-c9a1f774.js +1 -0
- package/dist/zonos-elements/{p-a1142a95.entry.js → p-cc481c69.entry.js} +1 -1
- package/dist/zonos-elements/p-ccc4f69b.entry.js +1 -0
- package/dist/zonos-elements/{p-20263609.system.js → p-ce855245.system.js} +1 -1
- package/dist/zonos-elements/{p-4d776228.entry.js → p-d1ff24f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6922df5.js → p-d28be518.js} +1 -1
- package/dist/zonos-elements/p-d6b49830.entry.js +1 -0
- package/dist/zonos-elements/{p-5beab541.js → p-db3b101a.js} +1 -1
- package/dist/zonos-elements/{p-0ec4e307.system.js → p-db607fc3.system.js} +1 -1
- package/dist/zonos-elements/{p-a98b8b68.system.js → p-dea75665.system.js} +2 -2
- package/dist/zonos-elements/p-e3292be8.system.js +1 -0
- package/dist/zonos-elements/{p-b47fcd8c.system.entry.js → p-e3bc3917.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d983d472.entry.js → p-e5582c35.entry.js} +1 -1
- package/dist/zonos-elements/p-e5dfccd8.system.js +1 -0
- package/dist/zonos-elements/{p-7dbac3ae.system.entry.js → p-e6cc5a25.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-313b87f3.system.entry.js → p-e98e4c0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-61be7d98.system.js → p-eb99a625.system.js} +1 -1
- package/dist/zonos-elements/{p-ed9385f4.js → p-f3cfd8fa.js} +1 -1
- package/dist/zonos-elements/{p-c263f95f.entry.js → p-f546bd7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-55742c52.entry.js → p-f9c715ad.entry.js} +1 -1
- package/dist/zonos-elements/{p-50a15e3d.system.entry.js → p-fb684748.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-022ddd4a.system.entry.js +0 -1
- package/dist/zonos-elements/p-09307a03.js +0 -1
- package/dist/zonos-elements/p-1916c2b0.entry.js +0 -1
- package/dist/zonos-elements/p-34fc45e5.entry.js +0 -1
- package/dist/zonos-elements/p-56c11359.system.entry.js +0 -1
- package/dist/zonos-elements/p-7158a18b.js +0 -1
- package/dist/zonos-elements/p-721fadd5.js +0 -1
- package/dist/zonos-elements/p-7237f43b.system.entry.js +0 -1
- package/dist/zonos-elements/p-72a181b5.entry.js +0 -1
- package/dist/zonos-elements/p-75a27c68.entry.js +0 -1
- package/dist/zonos-elements/p-7c5c5318.js +0 -1
- package/dist/zonos-elements/p-7d9bbdc8.js +0 -1
- package/dist/zonos-elements/p-838e335c.entry.js +0 -1
- package/dist/zonos-elements/p-8bce79f4.system.js +0 -1
- package/dist/zonos-elements/p-944bf0e7.js +0 -1
- package/dist/zonos-elements/p-a2b3c1ef.system.entry.js +0 -1
- package/dist/zonos-elements/p-b21cf539.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca411d97.entry.js +0 -1
- package/dist/zonos-elements/p-cd563d65.system.js +0 -1
- package/dist/zonos-elements/p-cdf99051.entry.js +0 -1
- package/dist/zonos-elements/p-dc4e867e.system.entry.js +0 -1
- package/dist/zonos-elements/p-e6726a50.system.js +0 -1
- package/dist/zonos-elements/p-f68ce554.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,c)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(o){return a([e,o])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=o.call(e,t)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,r=o.length,i;n<r;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-721069c3.system.js","./p-dea75665.system.js","./p-24aae506.system.js","./p-3689821f.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-0207c91e.system.js","./p-d938f42f.system.js","./p-40a4c8a2.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-e5dfccd8.system.js","./p-eb99a625.system.js","./p-1aa93d1e.system.js","./p-2770ba48.system.js","./p-1bf9a1b9.system.js","./p-6a195559.system.js","./p-5e6f85f0.system.js"],(function(e){"use strict";var o,t,n,r,i,s,c,a,u,d,l,h,f,v,m,g,p,w,z,k,y,b,_,C,x,S,T,I,A,O,E,U,L,B,P,N,j,D,R,F,M,H,Z,G,K,V,Q,W,Y,q,J,X,$,ee,oe,te,ne,re,ie,se,ce,ae,ue,de,le,he,fe,ve,me,ge,pe,we,ze,ke,ye,be,_e;return{setters:[function(e){o=e.r;t=e.h;n=e.F;r=e.a},function(e){i=e.s;s=e.a;c=e.b;a=e.i;u=e.c;d=e.d;l=e.e;h=e.f;f=e.g;v=e.h;m=e.j;g=e.k;p=e.l;w=e.t;z=e.m;k=e.n;y=e.o;b=e.p;_=e.q;C=e.r;x=e.u;S=e.v;T=e.w;I=e.x;A=e.y;O=e.z;E=e.A;U=e.B;L=e.C;B=e.D;P=e.E;N=e.F},function(e){j=e.p;D=e.s;R=e.a;F=e.b},function(e){M=e.f;H=e.l;Z=e.a;G=e.g;K=e.s;V=e.V;Q=e.b;W=e.t;Y=e.c;q=e.d},function(e){J=e.z;X=e.g;$=e.m},function(e){ee=e.b},function(e){oe=e.h;te=e.l;ne=e.g;re=e.j;ie=e.b;se=e.s;ce=e.a;ae=e.i},function(e){ue=e.u},function(e){de=e.l;le=e.g;he=e.b},function(e){fe=e._;ve=e.c;me=e.a;ge=e.d;pe=e.g},function(e){we=e.c},function(e){ze=e.c},function(e){ke=e.g},function(e){ye=e.i},function(e){be=e.s},function(e){_e=e.R},function(){},function(){},function(){}],execute:function(){var Ce=this;var xe=function(){return __awaiter(Ce,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,oe("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=n.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var Se=function(e){return __awaiter(Ce,[e],void 0,(function(e){var o,t,n,r;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(i.length===0){return[2,null]}return[4,oe("/api/zonos-elements/select-variance-test",{body:{testKeys:i},method:"POST"})];case 1:o=e.sent(),t=o.errors,n=o.json;if(t.length||!n){return[2,null]}r=M(n);return[2,r]}}))}))};var Te=function(e){var o=e.cartId,t=e.checkoutSessionId,n=e.customerAddress1,r=e.customerAddress2,i=e.customerCity,s=e.customerCountry,c=e.customerEmail,a=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,v=e.isTestMode,m=e.isVariantTest;var g=new URLSearchParams;g.set("tempCartUUID",o);if(a){g.set("customerFirstName",a)}if(u){g.set("customerLastName",u)}if(c){g.set("customerEmail",c)}if(d){g.set("customerPhone",d)}if(h){g.set("customerZip",h)}if(i){g.set("customerCity",i)}if(l){g.set("customerState",l)}if(s){g.set("zCountry",s)}if(n){g.set("customerAddress1",n)}if(r){g.set("customerAddress2",r)}if(v){g.set("zonosTestMode","1")}if(t){g.set("zonosCheckoutSessionId",t)}if(m){g.set("zonosVariantTest","1")}return"".concat(f,"?").concat(g.toString())};var Ie=function(){return __awaiter(Ce,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);return[4,fetch("/api/storefront/cart",{credentials:"same-origin",headers:{Accept:"application/json"}})];case 1:t=i.sent();if(!t.ok){de("Failed to fetch BigCommerce cart: ".concat(String(t.status)),"error");return[2,null]}return[4,t.json()];case 2:n=i.sent();return[2,(o=(e=n===null||n===void 0?void 0:n[0])===null||e===void 0?void 0:e.id)!==null&&o!==void 0?o:null];case 3:r=i.sent();te("Error fetching BigCommerce cart data",r);return[2,null];case 4:return[2]}}))}))};var Ae=function(e){return __awaiter(Ce,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,fetch("/api/storefront/checkouts/".concat(e,"?include=customer.customerGroup,customer.addresses"),{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}})];case 1:o=n.sent();if(!o.ok){de("Failed to fetch BigCommerce checkout: ".concat(String(o.status)),"error");return[2,null]}return[4,o.json()];case 2:return[2,n.sent()];case 3:t=n.sent();te("Error fetching BigCommerce checkout data",t);return[2,null];case 4:return[2]}}))}))};var Oe=function(e){var o;return!!((o=e===null||e===void 0?void 0:e.customer)===null||o===void 0?void 0:o.id)};var Ee="isInternationalCheckout";var Ue=function(){var e=new URLSearchParams;e.set(Ee,"true");var o=new URLSearchParams(window.location.search);var t=o.get("zonosQaUrl");if(t){e.set("zonosQaUrl",t)}var n=o.get("zonosQaUrlApi");if(n){e.set("zonosQaUrlApi",n)}if(ne()){e.set("zonosTestMode","1")}return"cart.php?".concat(e.toString())};var Le=function(e){var o=e===void 0?{}:e,t=o.action;var n=new URL("/login.php",window.location.origin);if(t){n.searchParams.set("action",t)}var r=new URLSearchParams(window.location.search);var i=r.get("zonosQaUrl");if(i){n.searchParams.set("zonosQaUrl",i)}var s=r.get("zonosQaUrlApi");if(s){n.searchParams.set("zonosQaUrlApi",s)}if(ne()){n.searchParams.set("zonosTestMode","1")}n.searchParams.set("from",Ue());return n.toString()};var Be=function(e){var o=new URL(e,window.location.origin);var t=new URLSearchParams(window.location.search).get("zonosQaUrl");if(t){o.searchParams.set("zonosQaUrl",t)}if(ne()){o.searchParams.set("zonosTestMode","1")}return o.toString()};var Pe={customerGroupId:null,shouldBypass:false};var Ne=function(e){return __awaiter(Ce,void 0,void 0,(function(){var o,t,n,r,i,s,c,a,u,d,l,h;return __generator(this,(function(f){switch(f.label){case 0:if(!window.Zonos.isBigCommerce){return[2,{conclusive:true,result:Pe}]}i=(o=J.genericSettings)===null||o===void 0?void 0:o.bigcommerceBypassCustomerGroupIds;if(!(i===null||i===void 0?void 0:i.length)){if(J.loadedConfig){return[2,{conclusive:true,result:Pe}]}return[2,{conclusive:false,result:Pe}]}if(!e)return[3,1];c=e.checkoutId;return[3,3];case 1:return[4,Ie()];case 2:c=f.sent();f.label=3;case 3:s=c;if(!s){de("BigCommerce bypass check: no active cart yet, will retry on next call","info");return[2,{conclusive:false,result:Pe}]}if(!e)return[3,4];u=e.checkout;return[3,6];case 4:return[4,Ae(s)];case 5:u=f.sent();f.label=6;case 6:a=u;if(!a){de("BigCommerce bypass check: failed to fetch checkout data, will retry","info");return[2,{conclusive:false,result:Pe}]}d=(r=(n=(t=a.customer)===null||t===void 0?void 0:t.customerGroup)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:null;if(d===null){de("BigCommerce bypass check: no customer group found (guest user)","info");return[2,{conclusive:true,result:Pe}]}l=i.includes(d);h={customerGroupId:d,shouldBypass:l};if(l){de("BigCommerce bypass check: customer group ".concat(String(d)," is in bypass list; caller should keep the user on BC native checkout"),"info")}else{de("BigCommerce bypass check: customer group ".concat(String(d)," is not in bypass list"),"info")}return[2,{conclusive:true,result:h}]}}))}))};var je=null;var De=function(e){var o=Ne(e);var t=o.then((function(e){var o=e.conclusive,n=e.result;if(!o&&je===t){je=null}return n}));je=t;return t};var Re=function(){var e;if(!window.Zonos.isBigCommerce){return}var o=(e=J.genericSettings)===null||e===void 0?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(o===null||o===void 0?void 0:o.length)){return}void De()};var Fe=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Ce,__spreadArray([],e,true),void 0,(function(e){if(e===void 0){e={}}return __generator(this,(function(o){if(e.forceRefresh||!je){return[2,De(e.preFetched)]}return[2,je]}))}))};var Me={guestCheckoutType:null};var He=60*60*1e3;var Ze="zonos--bc-checkout-settings";var Ge=function(e){try{var o=window.localStorage.getItem(Ze);if(!o){return null}var t=re(o);if(!t){return null}if(t.storeHash!==e){return null}if(t.expiresAt<Date.now()){return null}return{guestCheckoutType:t.guestCheckoutType}}catch(e){return null}};var Ke=function(e,o){try{var t={expiresAt:Date.now()+He,guestCheckoutType:o.guestCheckoutType,storeHash:e};window.localStorage.setItem(Ze,JSON.stringify(t))}catch(e){}};var Ve=function(){return __awaiter(Ce,void 0,void 0,(function(){var e,o,t,n,r,i,s;return __generator(this,(function(c){switch(c.label){case 0:if(!window.Zonos.isBigCommerce){return[2,Me]}o=(e=J.checkoutSettings.bigCommerceConfig)===null||e===void 0?void 0:e.storeHash;if(!o){de("BigCommerce checkout settings: no storeHash provided — skipping fetch","info");return[2,Me]}t=Ge(o);if(t){return[2,t]}return[4,oe("/api/bigcommerce/checkout-settings",{body:{storeHash:o},method:"POST"})];case 1:n=c.sent(),r=n.errors,i=n.json;if(r.length||!i){de("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info");return[2,Me]}s={guestCheckoutType:i.guestCheckoutType};Ke(o,s);return[2,s]}}))}))};var Qe={redirectUrl:null,shouldForceLogin:false};var We=null;var Ye=function(){if(!We){var e=Ve().then((function(o){var t=o.guestCheckoutType;if(!t){if(We===e){We=null}return false}return t==="no_guest_checkout"})).catch((function(){if(We===e){We=null}return false}));We=e}return We};var qe=function(){if(!window.Zonos.isBigCommerce){return}void Ye()};var Je=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Ce,__spreadArray([],e,true),void 0,(function(e){var o,t,n,r,i;var s=e===void 0?{}:e,c=s.preFetched;return __generator(this,(function(e){switch(e.label){case 0:if(!window.Zonos.isBigCommerce){return[2,Qe]}return[4,Ye()];case 1:o=e.sent();if(!o){return[2,Qe]}if(!c)return[3,2];n=c.checkoutId;return[3,4];case 2:return[4,Ie()];case 3:n=e.sent();e.label=4;case 4:t=n;if(!t){return[2,Qe]}if(!c)return[3,5];i=c.checkout;return[3,7];case 5:return[4,Ae(t)];case 6:i=e.sent();e.label=7;case 7:r=i;if(!r){de("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info");return[2,Qe]}if(Oe(r)){return[2,Qe]}de("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info");return[2,{redirectUrl:Le(),shouldForceLogin:true}]}}))}))};var Xe="data-zonos-login-from-rewritten";var $e='a[href*="login.php?action=create_account"]:not(['+Xe+"])";var eo=function(){var e=document.querySelectorAll($e);if(!e.length){return}var o=Le({action:"create_account"});e.forEach((function(e){e.setAttribute("href",o);e.setAttribute(Xe,"true")}))};var oo=function(){if(!window.Zonos.isBigCommerce){return}if(!window.location.pathname.includes("/login.php")){return}eo();var e=new MutationObserver((function(){eo()}));e.observe(document.body,{childList:true,subtree:true});setTimeout((function(){return e.disconnect()}),1e4)};var to=function(e,o){if(!e.address1||!e.countryCode){return null}var t=[e.firstName,e.lastName].filter(Boolean).join(" ").trim();return{address:{city:e.city||"",country:e.countryCode,line1:e.address1,line2:e.address2||"",postal_code:e.postalCode||"",state:e.stateOrProvinceCode||e.stateOrProvince||""},email:o,name:t,phone:e.phone||""}};var no=function(e){return[e.address.line1,e.address.line2||"",e.address.postal_code,e.address.country].join("|").toLowerCase()};var ro=function(e,o){var t,n,r,i;if(!((t=e===null||e===void 0?void 0:e.customer)===null||t===void 0?void 0:t.id)){return[]}var s=o.isShippable,c=o.selectedCountryCode;var a=e.customer.email||"";var u=(r=(n=e.consignments)===null||n===void 0?void 0:n.flatMap((function(e){return e.shippingAddress?[e.shippingAddress]:[]})))!==null&&r!==void 0?r:[];var d=(i=e.customer.addresses)!==null&&i!==void 0?i:[];var l=new Set;var h=[];for(var f=0,v=__spreadArray(__spreadArray([],d,true),u,true);f<v.length;f++){var m=v[f];var g=to(m,a);if(!g){continue}if(!s(g.address.country)){continue}var p=no(g);if(l.has(p)){continue}l.add(p);h.push(g)}if(!c){return h}return h.map((function(e,o){return{index:o,option:e}})).sort((function(e,o){var t=e.option.address.country===c;var n=o.option.address.country===c;if(t===n){return e.index-o.index}return t?-1:1})).map((function(e){return e.option}))};var io=function(e){if(e===void 0){e=true}if(!H.localizationLoaded){return true}if(H.isDisabledCountry){if(e){de("Checkout: disabled country")}return true}return false};var so=function(e,o){if(e===void 0){e=true}var t;if(!H.localizationLoaded){return false}if(o){var n=!!((t=H.shippingZoneCountries)===null||t===void 0?void 0:t[o])&&!J.disabledCountries.includes(o);if(e&&!n){de("Checkout: ".concat(o," is not a shippable country: ").concat(n))}return n}if(!H.isShippableCountry){if(e){de("Checkout: not shippable country")}return false}return true};var co='select[name="shippingAddress.countryCode"]';var ao=function(e){return __awaiter(Ce,[e],void 0,(function(e){var o,t,n,r,i,c,a,u,d,l,h,f,v,m,g,p,w,z;var k=e.onInternationalCheckoutSelected,y=e.onLoggedInInternationalAddressDetected;return __generator(this,(function(e){switch(e.label){case 0:return[4,Ie()];case 1:h=e.sent();if(!h){return[2,"noAction"]}return[4,Ae(h)];case 2:f=e.sent();v={checkout:f,checkoutId:h};return[4,Fe({preFetched:v})];case 3:m=e.sent().shouldBypass;if(m){return[2,"noAction"]}g=(t=(o=f===null||f===void 0?void 0:f.consignments)===null||o===void 0?void 0:o[0])===null||t===void 0?void 0:t.shippingAddress;if(!(g===null||g===void 0?void 0:g.countryCode)){return[2,"noAction"]}p=g.countryCode;if(!so(false,p)){return[2,"noAction"]}de(y?"Logged-in user has international shipping address: ".concat(p,", prompting user to choose checkout"):"Logged-in user has international shipping address: ".concat(p,", redirecting automatically (legacy behavior)"),"info");if(!y)return[3,5];return[4,y()];case 4:w=e.sent();if(w==="stay"){de("User opted to stay on BigCommerce native checkout despite international default address","info");return[2,"optedOut"]}e.label=5;case 5:return[4,Je({preFetched:v})];case 6:z=e.sent();if(z.shouldForceLogin&&z.redirectUrl){window.location.href=z.redirectUrl;return[2,"redirected"]}if(!k)return[3,8];return[4,k()];case 7:e.sent();e.label=8;case 8:Z({isInitializing:false,newSelectedCountryCode:p});s({address1:(n=g.address1)!==null&&n!==void 0?n:"",address2:(r=g.address2)!==null&&r!==void 0?r:"",city:(i=g.city)!==null&&i!==void 0?i:"",countryCode:p,firstName:(c=g.firstName)!==null&&c!==void 0?c:"",lastName:(a=g.lastName)!==null&&a!==void 0?a:"",phone:(u=g.phone)!==null&&u!==void 0?u:"",postalCode:(d=g.postalCode)!==null&&d!==void 0?d:"",state:(l=g.stateOrProvince)!==null&&l!==void 0?l:""});window.location.href=Be("/");return[2,"redirected"]}}))}))};var uo=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onInternationalCheckoutSelected,n=e.onLoggedInInternationalAddressDetected,r=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var c=function(e){return __awaiter(Ce,void 0,void 0,(function(){var o,n,r,i,c,a,u,d,l,h;return __generator(this,(function(f){switch(f.label){case 0:n=document.querySelector(((o=J.genericSettings)===null||o===void 0?void 0:o.bigcommerceDomesticCheckoutCountrySelector)||co);r=(n===null||n===void 0?void 0:n.value)||e;if(!r){return[2,false]}if(!so(false,r)){return[2,false]}return[4,Ie()];case 1:i=f.sent();if(!i)return[3,3];return[4,Ae(i)];case 2:a=f.sent();return[3,4];case 3:a=null;f.label=4;case 4:c=a;u={checkout:c,checkoutId:i};return[4,Fe({forceRefresh:true,preFetched:u})];case 5:d=f.sent().shouldBypass;if(d){de("Bypass customer group detected on BC checkout, stopping interval","info");return[2,true]}return[4,Je({preFetched:u})];case 6:l=f.sent();if(l.shouldForceLogin&&l.redirectUrl){window.location.href=l.redirectUrl;return[2,true]}if(!t)return[3,8];return[4,t()];case 7:f.sent();f.label=8;case 8:Z({isInitializing:false,newSelectedCountryCode:r});h={address1:"",address2:"",city:"",countryCode:r,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};s({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});window.location.href=Be("/");return[2,true]}}))}))};var a=false;var u=false;var d=false;var l=false;var h=false;var f=new MutationObserver((function(){return __awaiter(Ce,void 0,void 0,(function(){var e,s,v,m,g,p,w,z,k,y;var b=this;return __generator(this,(function(_){switch(_.label){case 0:s=document.querySelector(o);v=i();if(!s&&v){m=document.createElement("button");m.style.display="none";m.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(m);r===null||r===void 0?void 0:r(v);f.disconnect();return[2]}g=window.location.pathname.includes("/checkout")&&window.Zonos.isBigCommerce;if(!g){f.disconnect();return[2]}if(!(!l&&!d))return[3,5];d=true;h=true;_.label=1;case 1:_.trys.push([1,3,4,5]);return[4,ao({onInternationalCheckoutSelected:t,onLoggedInInternationalAddressDetected:n})];case 2:p=_.sent();if(p==="redirected"){f.disconnect();return[2]}if(p==="optedOut"){l=true}return[3,5];case 3:w=_.sent();te("Error checking logged-in user shipping address",w);return[3,5];case 4:d=false;h=false;return[7];case 5:z=document.querySelector(((e=J.genericSettings)===null||e===void 0?void 0:e.bigcommerceDomesticCheckoutCountrySelector)||co);if(!z){return[2]}de("Domestic checkout found - Listening for shipping country change","info",{value:z.value});if(u){return[2]}u=true;f.disconnect();k=setInterval((function(){return __awaiter(b,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){switch(t.label){case 0:if(a||h){return[2]}a=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,c()];case 2:e=t.sent();if(e){clearInterval(k);return[2]}a=false;return[3,4];case 3:o=t.sent();a=false;return[3,4];case 4:return[2]}}))}))}),1e3);y=setInterval((function(){var e;if(!window.bcStripeElements){clearInterval(y);return}var o=(e=window.bcStripeElements)===null||e===void 0?void 0:e.getElement("address");if(!o){return}clearInterval(y);o.on("change",(function(e){var o=e.value.address.country;if(o&&!h){void c(o)}}))}),500);return[2]}}))}))}));f.observe(document.body,{childList:true,subtree:true})};var lo=function(){var e=new URLSearchParams(window.location.search);de("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=G(e)||H.selectedCountryCode||"US";var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:l,customerLastName:h,customerName:c,customerPhone:a,customerState:d,customerZip:u}};var ho=0;var fo=function(){return __awaiter(Ce,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}de("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,oe("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=n.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);ho++;if(ho>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var vo=function(){return __awaiter(Ce,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=le().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:he},ie()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};void oe("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var mo=function(e){return __awaiter(Ce,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:he},ie()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};void oe("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var go=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var po=function(e){var o;var t=(o=K.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var wo=function(e){return J.enabledVariantTestKeys.includes(e)};var zo=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var n=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(n===null||n===void 0?void 0:n.expiresAt)||Date.now()+V,selectedVariantKey:(n===null||n===void 0?void 0:n.selectedVariantKey)||null,testKey:o}}))};var ko=function(e){return __awaiter(Ce,[e],void 0,(function(e){var o,t,n,r,i;var s=e.cartId,c=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=ne();return[4,oe("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];de("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,ko({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var yo=function(e){return __awaiter(Ce,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=fe(e),t=o.isDgsCartId,n=o.isLegacyCartId;if(!n&&!t){te("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,ko({cartId:e,retries:5})];case 1:r=i.sent();de("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){te("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var bo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var _o=".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{z-index:2147483647;position:fixed}.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;position:relative}.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}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.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}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";var Co=_o;var xo=90*60*1e3;var So=6*60*60*1e3;var To=e("zonos_checkout",function(){function e(e){var t=this;o(this,e);this.storeUnsubscribeList=[];this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.shouldShowFedexShippingConsentDialog=false;this.detectedDomesticCheckoutDialogOpen=false;this.redirectToDomesticCheckoutDialogOpen=false;this.loggedInIntlAddressConfirmDialogOpen=false;this.loggedInIntlAddressResolver=null;this.clientSecret=c.clientSecret;this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||J.appearance.theme;return[4,a({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:j()})];case 1:i.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(t,[e],void 0,(function(e){var o,t,n,r,i,s,a,d,l;var h=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=h===null||h===void 0?void 0:h.matches("#".concat(ve));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!o){de("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}de("Payment intent exist, checking stripe payment intent status");if(!r){de("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,u({clientSecret:r})];case 1:s=e.sent(),a=s.error,d=s.status;l=new URLSearchParams(window.location.search).get("redirect_status");if(l){if(!a){de("Payment intent is succeeded or in a good state to move forward, show success screen")}else{de("Payment intent failed, show status from error")}this.open=true;K.checkoutSessionId=i;c.clientSecret=r;void this.setToFinishStep(d);return[2,{shouldAllowOrder:false}]}if(!t){de("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}de("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){K.enabledVariantTestKeys=go(K.enabledVariantTestKeys||[]);var e=J.enabledVariantTestKeys.map((function(e){var o;var t=(o=K.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+V,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));Q(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof J.checkoutSettings.createCartId!=="function"){return false}var e=J.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}de("[TEST] - Registering hosted vs native test");o=po("hosted_vs_native");if(o){de("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,Se({testKeys:["hosted_vs_native"]})];case 1:t=r.sent();if(!t){de("[TEST] - Failed to get selection for hosted vs native test");return[2]}n=zo({baseTestObj:K.enabledVariantTestKeys||[],mergeTestObj:t});Q(n);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;return __generator(this,(function(a){switch(a.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=po("hosted_vs_native");de("[TEST] - hosted_vs_native: ".concat(t));if(typeof J.checkoutSettings.createCartId!=="function"){de("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){de("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=J.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){de("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}de('"createCartId" is provided, start building cart');return[4,J.checkoutSettings.createCartId()];case 1:n=a.sent();i=null;if(typeof n==="object"){r=n.cartId;i=n.shippingData||null}else{r=n}s=lo();c=Te(Object.assign(Object.assign({cartId:r,checkoutSessionId:K.checkoutSessionId||undefined,hostedCheckoutUrl:J.genericSettings.hostedCheckoutUrl,isTestMode:ne(),isVariantTest:true},s),i));de("[TEST] - Redirecting to: ".concat(c));window.open(c,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(d.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=function(){var e=d.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.prefillBigCommerceCustomerAddresses=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isBigCommerce){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}e=Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&typeof this.defaultAddress==="object"&&this.defaultAddress!==null;if(e){return[2]}return[4,Ie()];case 1:o=r.sent();if(!o){return[2]}return[4,Ae(o)];case 2:t=r.sent();if(!Oe(t)){return[2]}n=ro(t,{isShippable:function(e){return so(false,e)},selectedCountryCode:H.selectedCountryCode||undefined});if(!n.length){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}this.defaultCustomerProfileAddress=n;de("Prefilled ".concat(String(n.length)," BigCommerce customer address(es) for logged-in shopper"),"info");return[2]}}))}))};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=J.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var n=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!n){return}switch(e.data.type){case"zonos-checkout-session-update":K.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){K.checkoutSessionId=t}var n=K.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var r=po("hosted_vs_native");if(!r){n.push({expiresAt:Date.now()+V,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});Q(n)}else{Q(n.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void l({adjustments:d.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;D({event:"zonos-checkout-close",metadata:{checkoutSessionId:K.checkoutSessionId}});this.open=this.forceDialogOpen||false;if(!this.preview&&d.step==="finish"){h()}d.step="customer-info";f();v();(t=(o=J.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c,i,s,s,a,u,i,h,f,v,p;return __generator(this,(function(w){switch(w.label){case 0:if(!(typeof J.checkoutSettings.createCartId==="function"))return[3,4];de('"createCartId" is provided, start building cart');return[4,J.checkoutSettings.createCartId()];case 1:e=w.sent();o=void 0;if(typeof e==="object"){de("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);d.customerAuthenticationToken=e.customerAuthenticationToken||null}else{o=e}window.Zonos.cartId=o;return[4,yo(o)];case 2:t=w.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){te("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=ee(n),i=r.adjustments,s=r.cartItems;return[4,l({adjustments:i,cartItems:s})];case 3:w.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];de("tempCartUUID is provided, start building cart");c=ee(window.Zonos.cartData),i=c.adjustments,s=c.cartItems;return[4,l({adjustments:i,cartItems:s})];case 5:w.sent();return[3,9];case 6:if(!(J.checkoutSettings.buildCartDetail&&H.selectedCountryCode))return[3,9];de("build cart detail");return[4,J.checkoutSettings.buildCartDetail({countryCode:H.selectedCountryCode,currencyCode:H.targetCurrency})];case 7:s=w.sent();a=s.filter((function(e){return e.amount>=0}));u=s.filter((function(e){return e.amount<0}));de("cartItems","info",{cartItems:s});i=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,l({adjustments:i,cartItems:a})];case 8:w.sent();w.label=9;case 9:if(!!K.checkoutSessionId)return[3,11];return[4,m()];case 10:h=w.sent();de("stripeStoreInitCheckoutSession: ".concat(h));if(!h){return[2,false]}w.label=11;case 11:if(!d.isStagingMode){void g()}return[4,this.applyStripeTheme()];case 12:w.sent();f=J.checkoutSettings,v=f.successBehavior,p=f.successRedirectUrl;this.isRedirectAfterOrder=v==="REDIRECT_TO_SUCCESS_PAGE"||v==="CLOSE_MODAL"&&!!p||!!d.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=re(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;de("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||So;if(o>t){de("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;de("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!K.checkoutSessionId){return}void ue({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:K.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!K.checkoutSessionId){return}void ue({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:K.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!K.checkoutSessionId){return}void ue({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:K.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||J.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=J.checkoutSettings.placeOrderButtonSelector;var t=J.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;var n=!!document.querySelector("#".concat(ve));de("attach checkout ".concat(o));de("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData&&!n){return}var r=[o,t,"#".concat(ge),"#".concat(ve),"#".concat(me)].filter(Boolean);var i=document.querySelectorAll(r.join(","));i.forEach((function(n){var r=n.getAttribute("data-zonos-checkout-attached");if(r){return}de("attached event to button ".concat(o),"info",{button:n});n.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,r,i,s,a,u,l,h,f,v,m,g,y,b,_,C,x,S;return __generator(this,(function(T){switch(T.label){case 0:i=performance.now();s=t&&n.matches(t);a=n.matches("#".concat(me));u=n.matches("#".concat(ge))||n.matches("#".concat(ve));if(!window.Zonos.isLegacyCheckout&&(!so()||io())&&!s&&!a&&!u){return[2]}o.preventDefault();o.stopPropagation();de("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:l=T.sent().shouldAllowOrder;if(!l){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void fo()}),2e3)}if(!wo("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:T.sent();return[4,this.handleHostedVsNative()];case 3:h=T.sent().redirected;this.isOverlayLoading=false;if(h){return[2]}T.label=4;case 4:if(!window.Zonos.isBigCommerce)return[3,7];return[4,Fe()];case 5:f=T.sent().shouldBypass;if(f){de("Bypass customer group detected, redirecting to BigCommerce native checkout","info");window.location.href=Be("/checkout");return[2]}return[4,Je()];case 6:v=T.sent();if(v.shouldForceLogin&&v.redirectUrl){window.location.href=v.redirectUrl;return[2]}T.label=7;case 7:c.isFetchingSession=true;this.open=true;T.label=8;case 8:T.trys.push([8,11,,12]);return[4,this.buildCartAndInit()];case 9:m=T.sent();if(!m){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:K.checkoutSessionId,type:"zonos-checkout-session-update"},"*");p({isPreview:this.preview,sessionTimeout:xo});D({event:"zonos-checkout-start",metadata:{checkoutSessionId:K.checkoutSessionId}});g=K.checkoutSessionId;void w({checkoutSessionId:g,eventName:"checkout_open"});return[4,xe()];case 10:y=T.sent().enabled;d.shouldHideDiscountInput=!y;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void vo()}else{b=performance.now();_=b-i;void mo({loadTime:_})}this.recordCheckoutInfo();C=!!pe();if(C){this.markTheSessionAsAbandonedCart()}return[3,12];case 11:x=T.sent();if(x instanceof Error){S=x.message;if(S==="Cart is expired."){this.isCartExpired=true}}c.isFetchingSession=false;te(x);if(this.isCartExpired){c.isFetchingSession=true;return[2]}void se({endpoint:"Error creating Checkout",errors:[x instanceof Error?x.toString():"Unknown error"],metadata:{allLogs:he,cartId:window.Zonos.cartId,checkoutSessionBody:z(),href:window.location.href,storeBaseUrl:((r=window.Zonos.cartData)===null||r===void 0?void 0:r.storeBaseUrl)||J.onlineStoreSettings.url}});k({messages:[W("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:W("Error creating Checkout")});return[3,12];case 12:return[2]}}))}))}),{capture:true,passive:false});if(!J.checkoutSettings.disablePlaceOrderButtonActivation){n.removeAttribute("disabled")}n.setAttribute("data-zonos-checkout-attached","true");if(n.matches("#".concat(ge))){n.dispatchEvent(ze("click"));y();n.remove()}if(n.matches("#".concat(ve))){n.dispatchEvent(ze("click"));n.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}de("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,n=e.customerCity,r=e.customerCountry,i=e.customerEmail,s=e.customerFirstName,c=e.customerLastName,a=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=r||G(h)||H.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:n,customerCountry:f,customerEmail:i,customerFirstName:s,customerLastName:c,customerName:a,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);de("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=G(e)||H.selectedCountryCode;var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:a,customerLastName:u,customerName:c,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var n=e.customerAddress2||"";var r=e.customerCity||"";var i=e.customerEmail||"";var s=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var c=e.customerPhone||"";var a=e.customerZip||"";var u=e.customerState||"";if(!o||!s||!c||!t){de("Missing required query params so it can not be prefilled","info",[!o&&"line1",!s&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&H.shippingZoneCountries&&!(t in H.shippingZoneCountries)){de('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:o,line2:n,postal_code:a,state:u},email:i,name:s,phone:c}];de("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){d.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){c.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;d.isStagingMode=ce();if(typeof this.overrideStagingMode!=="undefined"){d.isStagingMode=this.overrideStagingMode}Re();qe();oo();this.handleBigcommerceInternationalResumeFlag();void this.prefillBigCommerceCustomerAddresses();uo({domesticRedirectedBtnSelector:ge,onInternationalCheckoutSelected:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.detectedDomesticCheckoutDialogOpen=true;return[4,new Promise((function(e){return setTimeout(e,2e3)}))];case 1:e.sent();return[2]}}))}))},onLoggedInInternationalAddressDetected:function(){return new Promise((function(e){o.loggedInIntlAddressResolver=e;o.loggedInIntlAddressConfirmDialogOpen=true}))},onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){c.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){de("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}de("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.handleBigcommerceInternationalResumeFlag=function(){if(!window.Zonos.isBigCommerce){return}var e=new URL(window.location.href);if(e.searchParams.get(Ee)!=="true"){return}e.searchParams.delete(Ee);window.history.replaceState({},"",e.toString());var o=Date.now();var t=setInterval((function(){if(!H.localizationLoaded||!H.selectedCountryCode){if(Date.now()-o>15e3){clearInterval(t);de("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")}return}var e=document.querySelector("#".concat(me));if(e){clearInterval(t);e.dispatchEvent(ze("click"));return}if(Date.now()-o>15e3){clearInterval(t);de("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info")}}),200)};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){d.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){b(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(me));if(e){e.dispatchEvent(ze("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a;var u=this;return __generator(this,(function(l){switch(l.label){case 0:D({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:K.checkoutSessionId}});r=K.checkoutSessionId;void w({checkoutSessionId:r,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,_()];case 1:i=l.sent().isRequestNotReady;if(i&&d.addressFormRenderType==="stripe"){void se({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=c.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(n=(t=c.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||n===void 0?void 0:n.address,cartId:window.Zonos.cartId}})}s=function(e){if(d.step!=="customer-info"){clearInterval(e);return}if(!c.isFetchingLandedCost){if(d.landedCostData){void F({currency:d.currency});C()}u.submitLoading=false;if(e){clearInterval(e)}}};s();a=setInterval((function(){s(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){C();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){d.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a,u,l;return __generator(this,(function(h){switch(h.label){case 0:e=c.checkoutSettlementCurrency==="USD";if(e&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;R.paypalErrorMessage=null;c.hasPaymentError=false;this.submitLoading=true;d.inventoryCheckErrorMessage=null;return[4,x()];case 1:o=h.sent();if(!o){c.hasPaymentError=true;c.customErrorMessage=W("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:c.checkoutSettlementCurrency});this.submitLoading=false;return[2]}h.label=2;case 2:h.trys.push([2,4,,5]);t=d;return[4,S()];case 3:t.inventoryCheckErrorMessage=h.sent();return[3,5];case 4:n=h.sent();d.inventoryCheckErrorMessage=W("Unable to check inventory. Please try again.");return[3,5];case 5:if(d.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}r=N();if(!(r>0))return[3,7];return[4,T()];case 6:i=h.sent();if(!i.success){c.hasPaymentError=true;c.customErrorMessage=i.error||W("Unable to apply store credit. Please try again.");this.submitLoading=false;return[2]}h.label=7;case 7:if(!I())return[3,13];h.label=8;case 8:h.trys.push([8,11,,12]);return[4,A()];case 9:s=h.sent();if(!s.valid){c.hasPaymentError=true;c.customErrorMessage=s.errorMessage;this.submitLoading=false;return[2]}return[4,O()];case 10:a=h.sent();if(!a.success){c.hasPaymentError=true;c.customErrorMessage=a.error||W("Unable to place order with store credit. Please try again.");this.submitLoading=false;return[2]}C();v();return[3,12];case 11:u=h.sent();te(u);D({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:K.checkoutSessionId}});c.hasPaymentError=true;return[3,12];case 12:this.submitLoading=false;return[2];case 13:h.trys.push([13,15,,16]);return[4,E()];case 14:h.sent();C();v();return[3,16];case 15:l=h.sent();te(l);D({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:K.checkoutSessionId}});c.hasPaymentError=true;if(c.shouldInventoryRefund){void U();c.shouldInventoryRefund=false}return[3,16];case 16:this.submitLoading=false;return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:L();if(!this.preview)return[3,2];d.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:h();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||J.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=ae(this.mobile);void this.applyStripeTheme();de("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=ae(this.mobile);void this.applyStripeTheme();de("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=X(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){L()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){de("No customer profile","info");this.defaultCustomerProfileAddress=[];return}de("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=c.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=c.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){de("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=o.getAttribute(e);var r=t.getAttribute(e);if(n){o.removeAttribute(e);o.style.overflow=n}else{o.style.removeProperty("overflow")}if(r){t.removeAttribute(e);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=ae(this.mobile);this.isIframed=window.self!==window.top;de("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.storeUnsubscribeList=[Y("selectedLocale",(function(){void e.applyStripeTheme()})),B("selectedShippingOption",(function(){var o,t,n,r;var i=d.selectedShippingOption;if(((o=J.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((n=(t=i===null||i===void 0?void 0:i.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||n===void 0?void 0:n.toLowerCase().startsWith("fedex."))&&((r=c.stripeAddressEventData)===null||r===void 0?void 0:r.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}})),P("stripeAddressEventData",(function(o){var t;if(!window.Zonos.isBigCommerce||!o||e.redirectToDomesticCheckoutDialogOpen||!((t=J.genericSettings)===null||t===void 0?void 0:t.isBigcommerceDomesticCheckoutRedirectEnabled)||J.sourceCurrency!=="USD"){return}if(!e.open){return}if(window.location.pathname.includes("/checkout")){return}var n=o.value.address.country;if(n&&J.disabledCountries.includes(n)){e.redirectToDomesticCheckoutDialogOpen=true;de("Domestic country ".concat(n," selected in international checkout, redirecting to BigCommerce domestic checkout"),"info");setTimeout((function(){window.location.href=Be("/checkout")}),2e3)}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);de("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){L();h();this.storeUnsubscribeList.forEach((function(e){return e()}));window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,i,s,a;this.customerProfile=c.customerProfile;this.clientSecret=c.clientSecret;if(c.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret}var u=d.step!=="finish"&&d.step!=="error"&&!c.stripeElements||c.isFetchingSession;var l=$(J.appearance,this.appearanceSettingsOverride||null),h=l.colorPrimary,f=l.colorSecondary,v=l.logoUrl,m=l.style;var g=J.appearance.zonosAttribution==="ENABLED";var p=J.appearance.theme;var w=h&&ye(h)?"DARK":"LIGHT";var z=this.isMobile?p:w;var k=!this.isMobile?f:undefined;var y=H.customMessages;var b=(o=y.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var _=this.getCurrentLocalePageEnum();var C=y.filter((function(e){return e.pageName===_}));var x=this.getBaseCurrencySettlementInfo();var S=function(){var o=e.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(J.organizationName," logo"),src:o}))};var T=ne();var I=function(){var o=new URLSearchParams(window.location.search);var n=o.get("zonosQaUrl");var r=o.get("zonosDebug");var i=o.get("zonosE2ETest");var s=e.overrideStagingMode||ce();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},S(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},W("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},W("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),C.map((function(e){return t("zonos-custom-message",{icon:bo,message:e.message})})))};var A=function(){if(d.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:W("Your checkout session has expired. Please reload the page to continue."),restStateTitle:W("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},W("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":ke({overrideBorderStyle:m})}},d.step!=="finish"&&d.step!=="error"&&t(n,null,t("div",{class:"zonos--left","data-theme":z,style:be({"--zonos--primary-color":!e.isMobile?h:undefined})},!e.isMobile&&I(),d.step==="customer-info"&&t("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:k}),d.step==="shipping"&&t("zonos-shipping",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:k}),d.step==="payment"&&t("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:k})),t("div",{class:"zonos--right","data-theme":p},e.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!e.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:_e}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),t("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},t("zonos-cart-items",null),e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:k}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:bo,message:b})))),t("zonos-cart-restricted-items",null),!e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:bo,message:b}))))),(d.step==="finish"||d.step==="error")&&t("div",{class:"zonos--done","data-theme":p},t("div",{class:"zonos--header"},S(),!e.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:_e}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:p})),t("zonos-checkout-finish",{borderRadius:m,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:d.step==="error"&&!!d.error?Object.assign(Object.assign({},d.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":p,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return t(r,{class:we(["zonos--checkout zonos--elements",d.step==="payment"&&"zonos--processing-payment",g&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():t("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":p,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},A()),t("zonos-dialog",{isLoading:true,loadingText:W("You will be redirected to international checkout shortly."),loadingTitle:W("We detected that you are shipping to an international address."),noClickOutside:true,noCloseButton:true,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-dialog",{isLoading:true,loadingText:W("You will be redirected to domestic checkout shortly."),loadingTitle:W("We detected that you are shipping to a domestic address."),noClickOutside:true,noCloseButton:true,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:W("Stay on this page"),dialogConfirmBtnText:W("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:W("Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:W("International shipping address detected"),dialogWidth:480,onCancelClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"stay");e.loggedInIntlAddressResolver=null},onConfirmClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"redirect");e.loggedInIntlAddressResolver=null}}),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:W("Don't close"),dialogConfirmBtnText:W("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:W("Would you like to close checkout and return to the site?"),dialogTitle:W("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:W("Return to merchant site"),dialogConfirmBtnText:W("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((i=this.placedOrderInfo)===null||i===void 0?void 0:i.zonosOrderNumber)?W("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)}):W("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(((s=this.placedOrderInfo)===null||s===void 0?void 0:s.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:W("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:W("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:t(n,null,W("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),t("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},W("View GAA Form."))),dialogTitle:W("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:W("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:W("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),x&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:W("Cancel"),dialogConfirmBtnText:W("Pay [orderTotal]",{orderTotal:q({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:W("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:W("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:W("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:W("You are being sent back to the shop to re-add items to your cart."),dialogTitle:W("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}());To.style=Co}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o,t as r}from"./p-d28be518.js";import{i as f}from"./p-6d81901a.js";const n=({backgroundColor:n,color:a})=>{if(n===a)return o(a)?r(a).lighten(40).toHexString():r(a).darken(40).toHexString();if(f({backgroundColor1:n,backgroundColor2:a}))return a;if(o(a))return"#ffffff";const t=r(a).darken(25).toHexString(),u=r(a).lighten(25).toHexString();return f({backgroundColor1:n,backgroundColor2:t})?t:u};export{n as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,d as t,h as e,a as s,g as n}from"./p-ce75b047.js";import{f as a}from"./p-
|
|
1
|
+
import{r as o,d as t,h as e,a as s,g as n}from"./p-ce75b047.js";import{f as a}from"./p-f3cfd8fa.js";import{c as l}from"./p-b4b7f705.js";import{g as i}from"./p-db3b101a.js";import"./p-0a377722.js";const r=class{constructor(e){o(this,e),this.inputChange=t(this,"inputChange",7),this.inputValue="",this.inputSize="md",this.isDisabled=!1,this.isError=!1,this.inputPlaceholder="",this.value=this.inputValue}onInputValueChange(o){this.value=o,this.inputChange.emit(o)}render(){return e(s,{key:"3c4fd9d72bc124d6e915661038e6b64bee692a98",class:l(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":i(),"--zonos--font-family":a()}},e("div",{key:"80906b54a0cc8e031b0752c4f7c7b8b3ffdd6b3f",class:l(["zonos--label-wrapper",this.isDisabled&&"disabled"])},e("input",{key:"413602bca1b288330631c043610161501c86e59c",class:l(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:o=>{this.inputChange.emit(o.target.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),e("label",{key:"183e2196be5a6d2acb202af9183b0624baf242df",class:"zonos--floated-label","data-label":this.inputLabel})))}get el(){return n(this)}static get watchers(){return{inputValue:["onInputValueChange"]}}};r.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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';export{r as zonos_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,d as e,h as t,F as s,a as n,g as l}from"./p-ce75b047.js";import{b as a,c as i,t as c,L as r,C as d,M as h,d as p,r as m,D as f}from"./p-9eff0691.js";import{s as b,c as z,a as u,b as g}from"./p-90d19cb6.js";import{t as y,s as x,l as v,p as w}from"./p-37f47658.js";import{z as k}from"./p-f3cfd8fa.js";import{h as C,s as L,g as S,i as I,a as H}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as M}from"./p-db3b101a.js";import{l as _,b as Z}from"./p-0a377722.js";import{i as P,a as D,e as W}from"./p-4220556e.js";import{c as B}from"./p-b4b7f705.js";import{l as F}from"./p-97aceb11.js";import{r as U}from"./p-2fc253b3.js";import{p as V}from"./p-551dd2e0.js";import{r as T}from"./p-1b8771bb.js";import"./p-d28be518.js";import"./p-6d81901a.js";import"./p-4c89d04a.js";const $=class{constructor(t){o(this,t),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const t=x.checkoutSessionId,s=new URLSearchParams;s.set("checkoutSessionId",t||"");const{baseUrl:n,errors:l,json:a}=await C(`/api/zonos-elements/get-order?${s.toString()}`);return l.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=k.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,t;0===o&&_("=== Start to poll for order info","info");const{baseUrl:s,order:n}=await this.pullOrder(),l=!!(null===(t=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),a=x.checkoutSessionId,i=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;_(`=== Polling order (${o} attemps)`,"info"),n?(_("=== CollectOrder info found","info"),o>10&&L({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Collect order found after ${o} attempts`],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",orderId:n.id,storeId:k.storeId}}),this.order=n):n&&l||!(o<i)?L({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Collect order not found after ${i} attempts`],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",storeId:k.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:t,status:s}=await i({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===s||e;this.notificationType=n?"error":"success",this.notificationMessages=t||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),_("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:t,status:s});const l=new URL(window.location.href);if(l.searchParams.delete("payment_intent_client_secret"),l.searchParams.delete("payment_intent"),l.searchParams.delete("redirect_status"),l.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",l.toString()),e&&(null==t?void 0:t.length))b({event:"zonos-checkout-payment-fail"}),L({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${s} - checkout session: ${x.checkoutSessionId}`],metadata:{allLogs:Z,credentialToken:window.Zonos.zonosApiKey}});else{b({event:"zonos-checkout-success"}),c({checkoutSessionId:x.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,r(),d(),x.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),r(),d(),z(),x.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(b({event:"zonos-checkout-success"}),c({checkoutSessionId:x.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),r(),d(),z(),x.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),S()&&e.searchParams.set("zonosTestMode","1");const t=new URLSearchParams(window.location.search).get("zonosQaUrl");return t&&e.searchParams.set("zonosQaUrl",t),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return t(n,{key:"ebc550d41d82330609ce842578fb9414397f11d2",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"e63176b8eb34a1c9bac491cc653c1108e085e77e",class:"zonos--finish-details"},t("div",{key:"abad1b8c765417e3d1cb4eb5f97c2713bc780517",class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),t("zonos-text",{key:"00924614cb5e3553bd572008a7e13ecd7c516272",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"e39986d7d0f739a7ea221546f3f06aa5327ef824",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"b4894f5156a213413e58484fe465905e1c5e48d4",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(s,null,o,t("br",null))))),this.order&&o&&t("div",{key:"8770f7a408b8b9862a2ef5ac4fa02a6caae6183a",class:"zonos--button-container"},t("zonos-button",{key:"3bebe519d938bccb40c65c668fa58088cfeff47f",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};$.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const R=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=D(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=D(this.tablet)}render(){var o;const e=null===(o=F.find((o=>o.code===v.selectedLocale)))||void 0===o?void 0:o.label,s="gray-1000";return t(n,{key:"2650da0d6942ec1389d65316d4f387b205eb3d23",class:B(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"711017e883a7c88de6a8c4d2761d969045fa7511",class:"zonos--collect-footer"},t("div",{key:"3eb3e89a254e3dba1cbd0a4dca0e257f0f7a64f7",class:"zonos--collect-locale-wrapper"},t("zonos-button",{key:"2615195358247954888d47aa01b873c2e1ff738d",buttonColor:s,class:"zonos--collect-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:s}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},t("span",{key:"90d0c4ca757c3825865cf82b9991a13d2972254d",class:"zonos--collect-locale-label"},e,t("zonos-icon",{key:"6badf11c60712883ee1ed037a8ddb955a7675d53","aria-hidden":"true",class:"zonos--collect-locale-chevron",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:s,size:18}))),t("div",{key:"e8b45be9f457a57482da8ed95193ca2c36525525",class:B(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{key:"a0a9bc9fca4df158e615ae387a5be2598a7b9f36",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"8e4743edc609ac041cb283a2a4864efcbda0a86e",class:"zonos--collect-footer-icon-wrapper"},t("div",{key:"d1119f22e17b80d015198c2803657c0280939ec7",class:"zonos--collect-footer-logo"},t("zonos-text",{key:"4faac90e9cb3469ffeb743155345232de8e3730a",textColor:s},"Powered by"),t("a",{key:"63b6ad613f96d8bd6f88b931c0c3833d08744479",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"09d6e961e27583a37b319be89fd0f80dbb9e96bd",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),t("div",{key:"b78088f8ab0cdc6b8dba6f1e0012e4c96407dd92",class:"dot"}),t("a",{key:"5ada46bc9f2fa3b52e235b3ec0231423e15fb5f5",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"b22d50bd1aaf5fddf8e1795f68b85c0e4f0125e8",textColor:s},"Privacy policy")))))}get el(){return l(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};R.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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-locale-wrapper .zonos--collect-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";const O=class{constructor(t){o(this,t),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}renderShippingAddress(){if(W.isFetchingShippingInfo)return t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},t("zonos-skeleton",{skeletonWidth:"99px"})),t("div",{class:"zonos--collect-order-shipping-info"},t("zonos-skeleton",{skeletonWidth:"152px"}),t("zonos-h-stack",{spacing:8},t("zonos-skeleton",{skeletonWidth:"75px"}),t("zonos-skeleton",{skeletonWidth:"75px"})),t("zonos-skeleton",{skeletonWidth:"50px"})));const o=W.shippingAddress;return o?t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Shipping address")),t("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((o=>t("zonos-text",null,o))))):null}render(){return t(n,{class:B(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},t("zonos-text",{type:"semiBoldLabel"},y("Order details")),(()=>t("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--collect-order-details-content"},t("zonos-collect-cart-items",null),t("div",{class:"zonos--collect-order-info"},t("div",{class:"zonos--collect-order-details-row"},null!==W.amountTotalPaid&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Total paid")),t("zonos-text",null,U({amount:W.amountTotalPaid||0,isForeign:!0}))),W.originCompanyName&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Ordered from")),t("zonos-text",null,W.originCompanyName||""))),this.renderShippingAddress()))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};O.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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(t){o(this,t),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,t;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(t=a.stripeElements)||void 0===t||t.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,b({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await V();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{g({currency:p.currency})}))],g({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=S(),l=p.isStagingMode||H(),i="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(l){const o=k.appearance.theme;return t(s,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||W.isFetchingShippingInfo?null:t(s,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!i&&t(s,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):_("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:i?"block":"none"}})),e&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},y("Test cards")),t("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return l(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";const E=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=D(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return t(n,{key:"9b00168e63cbd687c01583577eefe9f5e9958996",class:B(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"5d29409d7c09ce620b32d6f4512bbd280817cfa8",class:"zonos--title"},t("zonos-text",{key:"b06ea84a112b06f1aba656060c85680cada09808",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:k.organizationName}))),t("div",{key:"7d96f27c70d54f69862816be87bf1c084a91ecb9",class:"zonos--total-pay"},T({content:t("zonos-text",{type:"secondaryPageHeader"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};E.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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';const Y=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.subtotals={},this.initSubtotalData=()=>{var o;const e=null===(o=p.checkoutSession)||void 0===o?void 0:o.subtotals;if(!e)return;const t=y("Duties"),s=y("Taxes"),n=y("Fees"),l={[t]:0,[n]:0,[s]:0},a=e.duties,i=e.taxes,c=e.fees;void 0!==a&&(l[t]||(l[t]=0),l[t]+=a),void 0!==i&&(l[s]||(l[s]=0),l[s]+=i),void 0!==c&&(l[n]||(l[n]=0),l[n]+=c),this.subtotals=l}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[f("checkoutSession",this.initSubtotalData),w("translatedChunks",this.initSubtotalData)]}render(){return this.initSubtotalData(),t(n,{key:"dbdf16aeb070857018db4456e06b8c74cc135d78",class:"zonos--collect-subtotal zonos--elements"},t("table",{key:"90e8278e1f518f5531813c3cf0b032707fe42eb8",class:"zonos--collect-table"},!!this.subtotals[y("Duties")]&&t("tr",{key:"3c63319c6be8719069eb7d80eda2546dcc76f273",class:"zonos--row zonos--collect-duty"},t("td",{key:"942aa283152bbf69439e7a864156c2f4a71f66dd",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"db7ee74968f1b452e93a9e1d46de833e2513f582",type:"semiBoldLabel"},y("Duties"))),t("td",{key:"dfae6f70ace82c38bdce41de0b4f900c790fa9ae",class:"zonos--column"}),t("td",{key:"943c6781ad1909d6c5c315f705fcb08547a92660",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Duties")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Taxes")]&&t("tr",{key:"e87cf556d84fa66789f2410b77e049229eb54732",class:"zonos--row zonos--collect-tax"},t("td",{key:"5941322ab31a1227a6944a05b25b27f387e184e7",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"729fd97147df76283b5d97a30015e2af84a4fbb6",type:"semiBoldLabel"},y("Taxes"))),t("td",{key:"a51514811435edae33c37f6062b0323ef2acfd05",class:"zonos--column"}),t("td",{key:"a091d24821800034b1629813e05b40854951908d",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Taxes")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Fees")]&&t("tr",{key:"1ee4eae6bc0ea9be2d3b98733a3d51034db3b2c3",class:"zonos--row zonos--collect-fee"},t("td",{key:"6548ee27908c32e7c39f4f16a7c6f202df256e28",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"b911ffc5f29252efba3989e494eca1c5ec0fbd54",type:"semiBoldLabel"},y("Fees"))),t("td",{key:"f01086495ba4e1864f63de5fdd212de922e335c6",class:"zonos--column"}),t("td",{key:"f2e628f5fb0087cebc5b135194325127357828e2",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Fees")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"1b3c7371aa2b395c310e1bbfbda5071fc76bc523",class:"zonos--row zonos--collect-spacing"},t("td",{key:"ffcab1bd04d14fbc8c57d6731f2243945d889b9f",class:"zonos--column",colSpan:3})),t("tr",{key:"c674e6737e1888c3ef4dfa9a2cc06ec595ddc74f",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},t("td",{key:"c79170263853ebba9168b566ed0985af9e7f7bec",class:"zonos--column"}),t("td",{key:"05bff80d6dd83b047ec4f40dedbb42dcef822a34",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"61e4f56cd4da5187bb64c746920b04655ed4624a",type:"label"},y("Subtotal"))),t("td",{key:"a1701fa2c16e87cdba274349b7c5f9f0b90093ea",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"83b981afc2f2ddfa5a21ee28fea2e00ec3aef4e8",class:"zonos--row zonos--collect-total"},t("td",{key:"041fdf582712439e15521ab290f6475106d890cc",class:"zonos--column"}),t("td",{key:"82734ce4831e6255d8d6fe6aa73e8c132ba65d1d",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"d7b1771c43d5176226d1e503ec9308da5806fa52",type:"semiBoldLabel"},y("Customs fees total"))),t("td",{key:"5bebbeaaa0ed0c112e73e4e6283d1364b9ae4f64",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"semiBoldLabel"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};Y.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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";export{$ as zonos_collect_finish,R as zonos_collect_footer,O as zonos_collect_order_details,N as zonos_collect_payment,E as zonos_collect_review,Y as zonos_collect_subtotal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,t,i){function r(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,o){function a(n){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,e,t,i){function r(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,o){function a(n){try{d(i.next(n))}catch(n){o(n)}}function u(n){try{d(i["throw"](n))}catch(n){o(n)}}function d(n){n.done?t(n.value):r(n.value).then(a,u)}d((i=i.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(e){return d([n,e])}}function d(u){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(t=0)),t)try{if(i=1,r&&(o=u[0]&2?r["return"]:u[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;if(r=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;r=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1];o=u;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(u);break}if(o[2])t.ops.pop();t.trys.pop();continue}u=e.call(n,t)}catch(n){u=[6,n];r=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-3689821f.system.js","./p-721069c3.system.js","./p-24aae506.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(n){"use strict";var e,t,i,r,o,a,u,d,l,s,c;return{setters:[function(n){e=n.c;t=n.z},function(n){i=n.b;r=n.G;o=n.d;a=n.H},function(n){u=n.s},function(n){d=n.h;l=n.s;s=n.l},function(n){c=n.b}],execute:function(){var f=this;var v=e((function(){return{amountDutyTaxFeeTotal:null,amountTotalPaid:null,isFetchingShippingInfo:true,landedCostShortId:null,originCompanyName:null,partyBillingId:null,shippingAddress:null}})),p=v.reset,h=v.state;n("e",h);var w=n("b",(function(n){return __awaiter(f,[n],void 0,(function(n){var e,i,r,a,u,s,c,f,v,p,_,m,y;var C=n.landedCostId,I=n.retries,g=I===void 0?5:I;return __generator(this,(function(n){switch(n.label){case 0:h.isFetchingShippingInfo=true;return[4,d("/api/zonos-elements/collect/get-shipping-info-by-lc-id",{body:{landedCostId:C},method:"POST"})];case 1:p=n.sent();if(!p.errors.length)return[3,4];if(!(g>0))return[3,3];return[4,new Promise((function(n){return setTimeout(n,1e3)}))];case 2:n.sent();return[2,w({landedCostId:C,retries:g-1})];case 3:return[2,null];case 4:h.landedCostShortId=((e=p.json)===null||e===void 0?void 0:e.landedCostShortId)||null;h.isFetchingShippingInfo=false;h.shippingAddress=((i=p.json)===null||i===void 0?void 0:i.shipping)||null;_=(r=o.checkoutSession)===null||r===void 0?void 0:r.landedCost;m=(a=o.checkoutSession)===null||a===void 0?void 0:a.subtotals;y=(((u=_===null||_===void 0?void 0:_.amountSubtotals)===null||u===void 0?void 0:u.shipping)||0)+(((s=_===null||_===void 0?void 0:_.amountSubtotals)===null||s===void 0?void 0:s.items)||0);h.amountTotalPaid=y*(((c=m===null||m===void 0?void 0:m.exchangeRate)===null||c===void 0?void 0:c.rate)||1);h.amountDutyTaxFeeTotal=((m===null||m===void 0?void 0:m.duties)||0)+((m===null||m===void 0?void 0:m.taxes)||0)+((m===null||m===void 0?void 0:m.fees)||0);h.originCompanyName=((v=(f=p.json)===null||f===void 0?void 0:f.origin)===null||v===void 0?void 0:v.companyName)||null;if(h.amountTotalPaid===0){void l({endpoint:"COLLECT_NO_TOTAL_PAID",errors:[],metadata:{landedCostId:C,organizationId:t.organizationId}})}return[2]}}))}))}));var _=n("d",(function(){return __awaiter(f,void 0,void 0,(function(){var n,e,t,a,f,v,p,w,_,m;return __generator(this,(function(y){switch(y.label){case 0:if(!((n=i.stripeBillingAddressEventData)===null||n===void 0?void 0:n.complete)){return[2,{partiesCreated:false}]}f=(t=(e=o.checkoutSession)===null||e===void 0?void 0:e.landedCost)===null||t===void 0?void 0:t.rootId;if(!f){void l({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:c,cartId:window.Zonos.cartId,checkoutSessionId:u.checkoutSessionId}});return[2,{partiesCreated:false}]}if(!u.checkoutSessionId){void l({endpoint:"COLLECT_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:c,cartId:window.Zonos.cartId,landedCostRootId:f}});return[2,{partiesCreated:false}]}v=r({address:i.stripeBillingAddressEventData.value.address,firstName:i.stripeBillingAddressEventData.value.firstName,lastName:i.stripeBillingAddressEventData.value.lastName,name:i.stripeBillingAddressEventData.value.name,phone:i.stripeBillingAddressEventData.value.phone});p=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,d("/api/zonos-elements/create-billing-party",{body:{billingAddress:v,checkoutSessionId:u.checkoutSessionId,companyName:i.companyName,email:((a=i.stripeLinkEventData)===null||a===void 0?void 0:a.value.email)||"",isTest:p,rootId:f},method:"POST"})];case 1:w=y.sent(),_=w.errors,m=w.json;if(_.length||!m){s("Error occurs when creating billing party",JSON.stringify(_,null,2));void l({endpoint:"COLLECT_BILLING_PARTY_CREATE_FAILED",errors:["[COLLECT] Failed to create billing party"],metadata:{allLogs:c,cartId:window.Zonos.cartId,checkoutSessionId:u.checkoutSessionId,errors:_,json:m}});return[2,{partiesCreated:false}]}h.partyBillingId=m.billToPartyId;return[2,{partiesCreated:true}]}}))}))}));var m=n("c",(function(n){return __awaiter(f,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=n.landedCost;if(!e){return[2,false]}o.landedCostData=[Object.assign(Object.assign({},n),{landedCost:Object.assign({},e),landedCostId:e.id})];return[2,a({applySubtotalsOnly:true,landedCostId:e.id,selectedShippingOption:e.shipmentRating})]}))}))}));var y=1024;var C=768;var I=n("a",(function(n){return n||window.innerWidth<y&&window.innerWidth>=C}));var g=n("i",(function(n){return n||window.innerWidth<C}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,a as s}from"./p-ce75b047.js";const e=class{constructor(t){o(this,t),this.href=""}render(){return t(s,{key:"
|
|
1
|
+
import{r as o,h as t,a as s}from"./p-ce75b047.js";const e=class{constructor(t){o(this,t),this.href=""}render(){return t(s,{key:"87f948b23f9166f04a9ff478c3a10cac68acd749",class:"zonos--elements"},t("a",{key:"54ef1e907c92be92a395326808977e97b92b4121",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},t("slot",{key:"9a40d6624eb6e42d54efd40f5e6827713d51197c"})))}};e.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";export{e as zonos_link}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./p-ed9385f4.js";var e={exports:{}};e.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,r=/\s+$/;function a(n,i){if(i=i||{},(n=n||"")instanceof a)return n;if(!(this instanceof a))return new a(n,i);var f=function(a){var n={r:0,g:0,b:0},i=1,f=null,h=null,s=null,o=!1,u=!1;return"string"==typeof a&&(a=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var a,n=!1;if(y[t])t=y[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(a=$.rgb.exec(t))?{r:a[1],g:a[2],b:a[3]}:(a=$.rgba.exec(t))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=$.hsl.exec(t))?{h:a[1],s:a[2],l:a[3]}:(a=$.hsla.exec(t))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=$.hsv.exec(t))?{h:a[1],s:a[2],v:a[3]}:(a=$.hsva.exec(t))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=$.hex8.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:E(a[4]),format:n?"name":"hex8"}:(a=$.hex6.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"}:(a=$.hex4.exec(t))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:E(a[4]+""+a[4]),format:n?"name":"hex8"}:!!(a=$.hex3.exec(t))&&{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"}}(a)),"object"==t(a)&&(j(a.r)&&j(a.g)&&j(a.b)?(l=a.r,c=a.g,d=a.b,n={r:255*w(l,255),g:255*w(c,255),b:255*w(d,255)},o=!0,u="%"===String(a.r).substr(-1)?"prgb":"rgb"):j(a.h)&&j(a.s)&&j(a.v)?(f=R(a.s),h=R(a.v),n=function(t,e,r){t=6*w(t,360),e=w(e,100),r=w(r,100);var a=Math.floor(t),n=t-a,i=r*(1-e),f=r*(1-n*e),h=r*(1-(1-n)*e),s=a%6;return{r:255*[r,f,i,i,h,r][s],g:255*[h,r,r,f,i,i][s],b:255*[i,i,h,r,r,f][s]}}(a.h,f,h),o=!0,u="hsv"):j(a.h)&&j(a.s)&&j(a.l)&&(f=R(a.s),s=R(a.l),n=function(t,e,r){var a,n,i;function f(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=w(t,360),e=w(e,100),r=w(r,100),0===e)a=n=i=r;else{var h=r<.5?r*(1+e):r+e-r*e,s=2*r-h;a=f(s,h,t+1/3),n=f(s,h,t),i=f(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(a.h,f,s),o=!0,u="hsl"),a.hasOwnProperty("a")&&(i=a.a)),i=A(i),{ok:o,format:a.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,c,d}(n);this._originalInput=n,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||f.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}function n(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=(i+f)/2;if(i==f)a=n=0;else{var s=i-f;switch(n=h>.5?s/(2-i-f):s/(i+f),i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,l:h}}function i(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=i,s=i-f;if(n=0===i?0:s/i,i==f)a=0;else{switch(i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,v:h}}function f(t,e,r,a){var n=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function h(t,e,r,a){return[S(q(a)),S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))].join("")}function s(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s-=e/100,r.s=x(r.s),a(r)}function o(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s+=e/100,r.s=x(r.s),a(r)}function u(t){return a(t).desaturate(100)}function l(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l+=e/100,r.l=x(r.l),a(r)}function c(t,e){e=0===e?0:e||10;var r=a(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),a(r)}function d(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l-=e/100,r.l=x(r.l),a(r)}function g(t,e){var r=a(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,a(r)}function b(t){var e=a(t).toHsl();return e.h=(e.h+180)%360,a(e)}function m(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=a(t).toHsl(),n=[a(t)],i=360/e,f=1;f<e;f++)n.push(a({h:(r.h+f*i)%360,s:r.s,l:r.l}));return n}function v(t){var e=a(t).toHsl(),r=e.h;return[a(t),a({h:(r+72)%360,s:e.s,l:e.l}),a({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=a(t).toHsl(),i=360/r,f=[a(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,f.push(a(n));return f}function p(t,e){e=e||6;for(var r=a(t).toHsv(),n=r.h,i=r.s,f=r.v,h=[],s=1/e;e--;)h.push(a({h:n,s:i,v:f})),f=(f+s)%1;return h}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,a=this.toRgb();return e=a.g/255,r=a.b/255,.2126*((t=a.r/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,a,n){var i=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16)),S(q(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*w(this._r,255))+"%",g:Math.round(100*w(this._g,255))+"%",b:Math.round(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%)":"rgba("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=a(t);r="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1;return e||!(this._a<1&&this._a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(p,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},a.fromRatio=function(e,r){if("object"==t(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:R(e[i]));e=n}return a(e,r)},a.equals=function(t,e){return!(!t||!e)&&a(t).toRgbString()==a(e).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(t,e,r){r=0===r?0:r||50;var n=a(t).toRgb(),i=a(e).toRgb(),f=r/100;return a({r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a})},a.readability=function(t,e){var r=a(t),n=a(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},a.isReadable=function(t,e,r){var n,i,f,h,s,o=a.readability(t,e);switch(i=!1,(f=r,"AA"!==(h=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==h&&(h="AA"),"small"!==(s=(f.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:h,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},a.mostReadable=function(t,e,r){var n,i,f,h,s=null,o=0;i=(r=r||{}).includeFallbackColors,f=r.level,h=r.size;for(var u=0;u<e.length;u++)(n=a.readability(t,e[u]))>o&&(o=n,s=a(e[u]));return a.isReadable(t,s,{level:f,size:h})||!i?s:(r.includeFallbackColors=!1,a.mostReadable(t,["#fff","#000"],r))};var y=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function w(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function x(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function q(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return F(t)/255}var H,N,I,$=(N="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",I="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(t){return!!$.CSS_UNIT.exec(t)}return a}();const r=e.exports,a=t=>r(t).isDark();export{a as i,r as t}
|
|
1
|
+
import{a as t}from"./p-f3cfd8fa.js";var e={exports:{}};e.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,r=/\s+$/;function a(n,i){if(i=i||{},(n=n||"")instanceof a)return n;if(!(this instanceof a))return new a(n,i);var f=function(a){var n={r:0,g:0,b:0},i=1,f=null,h=null,s=null,o=!1,u=!1;return"string"==typeof a&&(a=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var a,n=!1;if(y[t])t=y[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(a=$.rgb.exec(t))?{r:a[1],g:a[2],b:a[3]}:(a=$.rgba.exec(t))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=$.hsl.exec(t))?{h:a[1],s:a[2],l:a[3]}:(a=$.hsla.exec(t))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=$.hsv.exec(t))?{h:a[1],s:a[2],v:a[3]}:(a=$.hsva.exec(t))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=$.hex8.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:E(a[4]),format:n?"name":"hex8"}:(a=$.hex6.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"}:(a=$.hex4.exec(t))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:E(a[4]+""+a[4]),format:n?"name":"hex8"}:!!(a=$.hex3.exec(t))&&{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"}}(a)),"object"==t(a)&&(j(a.r)&&j(a.g)&&j(a.b)?(l=a.r,c=a.g,d=a.b,n={r:255*w(l,255),g:255*w(c,255),b:255*w(d,255)},o=!0,u="%"===String(a.r).substr(-1)?"prgb":"rgb"):j(a.h)&&j(a.s)&&j(a.v)?(f=R(a.s),h=R(a.v),n=function(t,e,r){t=6*w(t,360),e=w(e,100),r=w(r,100);var a=Math.floor(t),n=t-a,i=r*(1-e),f=r*(1-n*e),h=r*(1-(1-n)*e),s=a%6;return{r:255*[r,f,i,i,h,r][s],g:255*[h,r,r,f,i,i][s],b:255*[i,i,h,r,r,f][s]}}(a.h,f,h),o=!0,u="hsv"):j(a.h)&&j(a.s)&&j(a.l)&&(f=R(a.s),s=R(a.l),n=function(t,e,r){var a,n,i;function f(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=w(t,360),e=w(e,100),r=w(r,100),0===e)a=n=i=r;else{var h=r<.5?r*(1+e):r+e-r*e,s=2*r-h;a=f(s,h,t+1/3),n=f(s,h,t),i=f(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(a.h,f,s),o=!0,u="hsl"),a.hasOwnProperty("a")&&(i=a.a)),i=A(i),{ok:o,format:a.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,c,d}(n);this._originalInput=n,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||f.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}function n(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=(i+f)/2;if(i==f)a=n=0;else{var s=i-f;switch(n=h>.5?s/(2-i-f):s/(i+f),i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,l:h}}function i(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=i,s=i-f;if(n=0===i?0:s/i,i==f)a=0;else{switch(i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,v:h}}function f(t,e,r,a){var n=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function h(t,e,r,a){return[S(q(a)),S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))].join("")}function s(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s-=e/100,r.s=x(r.s),a(r)}function o(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s+=e/100,r.s=x(r.s),a(r)}function u(t){return a(t).desaturate(100)}function l(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l+=e/100,r.l=x(r.l),a(r)}function c(t,e){e=0===e?0:e||10;var r=a(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),a(r)}function d(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l-=e/100,r.l=x(r.l),a(r)}function g(t,e){var r=a(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,a(r)}function b(t){var e=a(t).toHsl();return e.h=(e.h+180)%360,a(e)}function m(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=a(t).toHsl(),n=[a(t)],i=360/e,f=1;f<e;f++)n.push(a({h:(r.h+f*i)%360,s:r.s,l:r.l}));return n}function v(t){var e=a(t).toHsl(),r=e.h;return[a(t),a({h:(r+72)%360,s:e.s,l:e.l}),a({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=a(t).toHsl(),i=360/r,f=[a(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,f.push(a(n));return f}function p(t,e){e=e||6;for(var r=a(t).toHsv(),n=r.h,i=r.s,f=r.v,h=[],s=1/e;e--;)h.push(a({h:n,s:i,v:f})),f=(f+s)%1;return h}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,a=this.toRgb();return e=a.g/255,r=a.b/255,.2126*((t=a.r/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,a,n){var i=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16)),S(q(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*w(this._r,255))+"%",g:Math.round(100*w(this._g,255))+"%",b:Math.round(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%)":"rgba("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=a(t);r="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1;return e||!(this._a<1&&this._a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(p,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},a.fromRatio=function(e,r){if("object"==t(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:R(e[i]));e=n}return a(e,r)},a.equals=function(t,e){return!(!t||!e)&&a(t).toRgbString()==a(e).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(t,e,r){r=0===r?0:r||50;var n=a(t).toRgb(),i=a(e).toRgb(),f=r/100;return a({r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a})},a.readability=function(t,e){var r=a(t),n=a(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},a.isReadable=function(t,e,r){var n,i,f,h,s,o=a.readability(t,e);switch(i=!1,(f=r,"AA"!==(h=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==h&&(h="AA"),"small"!==(s=(f.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:h,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},a.mostReadable=function(t,e,r){var n,i,f,h,s=null,o=0;i=(r=r||{}).includeFallbackColors,f=r.level,h=r.size;for(var u=0;u<e.length;u++)(n=a.readability(t,e[u]))>o&&(o=n,s=a(e[u]));return a.isReadable(t,s,{level:f,size:h})||!i?s:(r.includeFallbackColors=!1,a.mostReadable(t,["#fff","#000"],r))};var y=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function w(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function x(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function q(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return F(t)/255}var H,N,I,$=(N="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",I="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(t){return!!$.CSS_UNIT.exec(t)}return a}();const r=e.exports,a=t=>r(t).isDark();export{a as i,r as t}
|