@zonos/elements 1.3.231 → 1.3.232
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-9b519566.js → cart-bc615014.js} +5 -5
- package/dist/cjs/{debounce-2c9f3f1e.js → debounce-815d1517.js} +1 -1
- package/dist/cjs/{getBorderRadius-c7d9f676.js → getBorderRadius-2ef1170d.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-12605be9.js → hasInclusivePrice-84145546.js} +1 -1
- package/dist/cjs/{index-1c710d00.js → index-69fa8852.js} +352 -4
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-994c38e4.js → isDarkColor-878e600e.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localization-38af974b.js → localization-39516612.js} +2 -2
- package/dist/cjs/{paypal-e8fa2302.js → paypal-1d6f1a71.js} +5 -5
- package/dist/cjs/{placeTestOrder-6388881f.js → placeTestOrder-a5469e40.js} +2 -2
- package/dist/cjs/{renderFallback-bb2c4bce.js → renderFallback-c2576fbe.js} +4 -4
- package/dist/cjs/{translationStore-f2d5eae9.js → translationStore-08d3ff9c.js} +182 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-a4899e90.js → updateCheckoutSessionAttributes-3a1db9de.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +14 -14
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +126 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-5d489c65.js → zonosStore-37a4b4f4.js} +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +115 -6
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/store/translationStore.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- 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-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/types/InputFieldLabel.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +488 -1
- package/dist/esm/{cart-bc0e1598.js → cart-14f305b3.js} +5 -5
- package/dist/esm/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
- package/dist/esm/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
- package/dist/esm/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
- package/dist/esm/{index-55a03023.js → index-0bbe9693.js} +352 -4
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localization-53f67640.js → localization-c5029ffc.js} +2 -2
- package/dist/esm/{paypal-3a6a048d.js → paypal-fded8844.js} +5 -5
- package/dist/esm/{placeTestOrder-917731cf.js → placeTestOrder-2250f719.js} +2 -2
- package/dist/esm/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +4 -4
- package/dist/esm/{translationStore-d241dcf7.js → translationStore-690c4e04.js} +182 -2
- package/dist/esm/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +14 -14
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner_2.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +126 -18
- package/dist/esm/zonos-checkout.entry.js +10 -10
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
- package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
- package/dist/esm/zonos-collect.entry.js +9 -9
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_4.entry.js +5 -5
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
- package/dist/esm-es5/{cart-bc0e1598.js → cart-14f305b3.js} +1 -1
- package/dist/esm-es5/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
- package/dist/esm-es5/index-0bbe9693.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-53f67640.js → localization-c5029ffc.js} +1 -1
- package/dist/esm-es5/{paypal-3a6a048d.js → paypal-fded8844.js} +1 -1
- package/dist/esm-es5/placeTestOrder-2250f719.js +1 -0
- package/dist/esm-es5/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +1 -1
- package/dist/esm-es5/translationStore-690c4e04.js +1 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-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-confirm-dialog_2.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
- package/dist/scripts/index.d.ts +31 -2
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +11 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/types/InputFieldLabel.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +503 -3
- package/dist/types/types/generated/graphql.internal.types.ts +520 -3
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-b91df44b.system.entry.js → p-00ac999f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4523b982.entry.js → p-00ec22b2.entry.js} +1 -1
- package/dist/zonos-elements/{p-0bc8e55c.system.entry.js → p-03ff7b01.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f7a9b69.system.entry.js → p-0a90dd80.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a444a82.system.entry.js → p-100f6a88.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d15cd138.entry.js → p-143d706b.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee8fcde6.js → p-14d7489d.js} +1 -1
- package/dist/zonos-elements/p-1d5aa016.system.js +1 -0
- package/dist/zonos-elements/{p-30981f80.entry.js → p-1eae4987.entry.js} +1 -1
- package/dist/zonos-elements/p-1f894984.js +1 -0
- package/dist/zonos-elements/{p-cb70de13.system.entry.js → p-23b45714.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-433d76b4.system.js → p-23d497e3.system.js} +1 -1
- package/dist/zonos-elements/{p-7c96a585.js → p-2557b96b.js} +1 -1
- package/dist/zonos-elements/{p-f912e9c3.entry.js → p-27874c22.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac26a931.entry.js → p-2ca8b037.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9486c57.entry.js → p-2dbcecf4.entry.js} +1 -1
- package/dist/zonos-elements/{p-db73c11a.entry.js → p-30e835a8.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff1722d0.system.entry.js → p-316f9052.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3eda5c2c.entry.js → p-3185968f.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa90adb8.entry.js → p-31975752.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bab9096.entry.js → p-31af91f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-38f42f10.system.entry.js → p-452fb638.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c998e4ed.entry.js → p-4592ae49.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff522088.system.entry.js → p-4e41143a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f548807d.system.entry.js → p-52b87408.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cb11d11b.system.entry.js → p-540cec7e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2f7ea09.entry.js → p-55e2e4ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-bb707dfd.system.js → p-561be3a2.system.js} +1 -1
- package/dist/zonos-elements/{p-a199bb13.js → p-5762e217.js} +1 -1
- package/dist/zonos-elements/{p-e688e493.js → p-57fa64d7.js} +1 -1
- package/dist/zonos-elements/{p-360d7101.system.entry.js → p-59ebb8c7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-abc0fb80.js → p-5c680f72.js} +1 -1
- package/dist/zonos-elements/{p-cbb01de9.entry.js → p-5f398c28.entry.js} +1 -1
- package/dist/zonos-elements/p-5f77d19e.js +1 -0
- package/dist/zonos-elements/{p-9bdad585.system.entry.js → p-60469388.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7730879e.system.js → p-652e80f0.system.js} +1 -1
- package/dist/zonos-elements/{p-4da7b6a8.system.entry.js → p-6adfb3af.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-91fa43ef.entry.js → p-74ca7739.entry.js} +1 -1
- package/dist/zonos-elements/{p-419c292c.system.js → p-767a31a8.system.js} +1 -1
- package/dist/zonos-elements/{p-2eaa5013.system.entry.js → p-770852bf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f688d7a4.system.js → p-7c705c76.system.js} +1 -1
- package/dist/zonos-elements/{p-22338b4a.system.entry.js → p-81ba2820.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2008df67.js → p-82739127.js} +2 -2
- package/dist/zonos-elements/p-88ea9f82.entry.js +1 -0
- package/dist/zonos-elements/p-8a23bbf5.js +1 -0
- package/dist/zonos-elements/{p-bc963b03.entry.js → p-905d2490.entry.js} +1 -1
- package/dist/zonos-elements/{p-24e26a2c.system.js → p-909e2bc3.system.js} +1 -1
- package/dist/zonos-elements/{p-b658c28a.entry.js → p-936b54c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-304bdbc2.system.entry.js → p-93f2e1ee.system.entry.js} +1 -1
- package/dist/zonos-elements/p-989d3af9.system.js +2 -0
- package/dist/zonos-elements/{p-d96545ae.entry.js → p-9b8750f3.entry.js} +1 -1
- package/dist/zonos-elements/{p-55c6ff14.system.entry.js → p-a0a4e43d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0047fecf.system.js → p-a25428eb.system.js} +1 -1
- package/dist/zonos-elements/{p-4697f061.system.entry.js → p-a2819807.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6d423364.entry.js → p-a6e74856.entry.js} +1 -1
- package/dist/zonos-elements/p-ab41bab5.js +2 -0
- package/dist/zonos-elements/p-ae940a99.js +1 -0
- package/dist/zonos-elements/{p-dc56b469.system.entry.js → p-b1fd1ec2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7af39c98.js → p-b2a0ab4a.js} +1 -1
- package/dist/zonos-elements/{p-3f35b8b1.system.entry.js → p-b7ea5f4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c81f6387.entry.js → p-bf9d889f.entry.js} +1 -1
- package/dist/zonos-elements/p-c1ecab92.entry.js +1 -0
- package/dist/zonos-elements/{p-81b357f7.system.js → p-c2442878.system.js} +1 -1
- package/dist/zonos-elements/{p-7e5bd9af.system.entry.js → p-c288c6da.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4bf2f03.entry.js → p-c50cc926.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6ef4a5e.system.entry.js → p-c5cb2364.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-57413c34.system.js → p-c6e3d747.system.js} +1 -1
- package/dist/zonos-elements/{p-2dc38ef3.entry.js → p-c7b658cb.entry.js} +1 -1
- package/dist/zonos-elements/p-cf765af3.system.js +1 -0
- package/dist/zonos-elements/{p-89c5164b.system.js → p-d45285aa.system.js} +1 -1
- package/dist/zonos-elements/{p-bccd49d7.system.entry.js → p-d556c6d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1a67ae71.system.entry.js → p-db628e49.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c28da00e.entry.js → p-e03e1a62.entry.js} +1 -1
- package/dist/zonos-elements/{p-d852d6da.system.entry.js → p-e7874318.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c20429ea.entry.js → p-e8949e7e.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a242dfc.system.js → p-ea0b5d10.system.js} +1 -1
- package/dist/zonos-elements/{p-c9be03e0.entry.js → p-eae3462c.entry.js} +1 -1
- package/dist/zonos-elements/{p-b669050d.system.entry.js → p-eea0eb57.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f892595d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-23c46dfa.system.js → p-f8d56ba9.system.js} +1 -1
- package/dist/zonos-elements/p-fc776473.js +1 -0
- package/dist/zonos-elements/{p-cec35a21.entry.js → p-fd3b46ee.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/index-55a03023.js +0 -2
- package/dist/esm-es5/placeTestOrder-917731cf.js +0 -1
- package/dist/esm-es5/translationStore-d241dcf7.js +0 -1
- package/dist/zonos-elements/p-0ffd710e.js +0 -1
- package/dist/zonos-elements/p-3f0ca5f9.js +0 -1
- package/dist/zonos-elements/p-4f5be8f0.entry.js +0 -1
- package/dist/zonos-elements/p-516a9666.system.js +0 -1
- package/dist/zonos-elements/p-5fc34563.system.js +0 -2
- package/dist/zonos-elements/p-6d563f33.system.entry.js +0 -1
- package/dist/zonos-elements/p-7920d79c.system.js +0 -1
- package/dist/zonos-elements/p-b30c2ad9.js +0 -2
- package/dist/zonos-elements/p-bdeb20cb.js +0 -1
- package/dist/zonos-elements/p-c0e080e3.js +0 -1
- package/dist/zonos-elements/p-e27a9450.js +0 -1
- package/dist/zonos-elements/p-ede9e968.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,t,r){function o(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?t(e.value):o(e.value).then(u,a)}s((r=r.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(n){return s([e,n])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(t=0)),t)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;o=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=n.call(e,t)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,i;r<o;r++){if(i||!(r in n)){if(!i)i=Array.prototype.slice.call(n,0,r);i[r]=n[r]}}return e.concat(i||Array.prototype.slice.call(n))};System.register(["./p-bf37ccc7.system.js","./p-4160bbc2.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-40a4c8a2.system.js","./p-2b8345d8.system.js"],(function(e){"use strict";var n,t,r,o,i,u,a,s,c,d,l,f;return{setters:[function(e){n=e.c},function(e){t=e.g;r=e.I},function(n){o=n.l;e("availableTestKeys",n.a)},function(e){i=e.g;u=e.a;a=e.h;s=e.l},function(n){c=n.g;d=n._;l=n.c;f=n.a;var t={};t.checkoutHiddenBtnSelector=n.c;t.checkoutHiddenInternationalBtnSelector=n.a;t.domesticRedirectedBtnSelector=n.d;e(t)},function(n){var t={};t.countryRequireTaxId=n.c;t.euCountryCodes=n.e;t.shipToTaxIdLabels=n.s;e(t)}],execute:function(){var v=this;var m=function(e){var n=e.loadScriptSrc;if(!n){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(n).origin;var i=t.some((function(e){return o.includes(e)}));var u=r.some((function(e){return o.includes(e)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var w=["jsdelivr","cdnjs","unpkg","vercel"];var p="jsdelivr";var h=function(e){var n=w.indexOf(e);var t=w[n+1];return t||null};var y=function(){return __awaiter(v,void 0,void 0,(function(){var e,n,t,r,c,d;return __generator(this,(function(l){switch(l.label){case 0:e=i();n=u();if(!e&&!n||!window.Zonos.zonosApiKey){return[2,null]}o("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){o("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,a("/api/get-test-public-credential")];case 1:t=l.sent(),r=t.errors,c=t.json;if(r.length||!c){s("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",r);return[2,null]}d=c.publicCredential;if(!d){s("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}o("[ZONOS - loadZonos] Retrieve new test public token ".concat(d),"info");return[2,d]}}))}))};var O=function(e){if(!e){return null}var n=new URL(e).searchParams;var t=n.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var g=function(){var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=O(window.location.href);var t="https://v1.3.231.js.zonos.com";if(!n&&(t.includes("test.")||t.includes("test-"))){return t}if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var r="preview.js.zonos.com";var i="https://".concat(n,".").concat(r);o("[ZONOS-WARNING] using '".concat(i,"' for loading elements script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");var n=window.location.pathname;var t="".concat(n,"?").concat(e.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return i};var S="https://js.stripe.com/v3";var _=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var b="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var z=function(){var e=document.querySelectorAll('script[src^="'.concat(S,'"]'));for(var n=0;n<e.length;n++){var t=e[n];if(!t){continue}if(!_.test(t.src)){continue}return t}return null};var j=null;var k=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(S).concat(n);var r=document.head||document.body;if(!r){s("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}r.appendChild(t);return t};var N=function(e){if(j!==null){return j}j=new Promise((function(n,t){if(typeof window==="undefined"||typeof document==="undefined"){n(null);return}if(window.Stripe&&e){console.warn(b)}if(window.Stripe){n(window.Stripe);return}try{var r=z();if(r&&e){console.warn(b)}else if(!r){r=k(e)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(e){t(e);return}}));return j};var A=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var I=function(e,n,t){if(e===null){return null}var r=e.apply(undefined,n);A(r,t);return r};var Z=Promise.resolve().then((function(){return N(null)}));var T=false;Z.catch((function(e){if(!T){console.warn(e)}}));var R=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return __awaiter(v,void 0,void 0,(function(){var n;return __generator(this,(function(t){T=true;n=Date.now();return[2,Z.then((function(t){return I(t,e,n)}))]}))}))};var E="tempCartUUID";var U=function(){var e=new URLSearchParams(window.location.search);var n=e.get(E);return n};var L=function(e){return __awaiter(v,[e],void 0,(function(e){var n,r,u,s,d,l,f,v,m;var w=e.cartId,p=e.retries;return __generator(this,(function(e){switch(e.label){case 0:n=i();r=t();u=c()||undefined;s=new URLSearchParams;if(r.overrideShouldEnabledCustomAddress){s.set("overrideShouldEnabledCustomAddress",r.overrideShouldEnabledCustomAddress)}return[4,a("/api/zonos-elements/get-cart?".concat(s.toString()),{body:{isTestMode:n,renewCartExpirationToken:u,tempCartUUID:w},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:d=e.sent(),l=d.errors,f=d.json,v=d.zonosMode;m=!f||l.length;if(!(m&&p))return[3,3];o("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:p});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,L({cartId:w,retries:p-1})];case 3:if(m){return[2,null]}return[2,Object.assign(Object.assign({},f),{zonosMode:v})]}}))}))};var P=function(e){return __awaiter(v,void 0,void 0,(function(){var n,t,r,i;return __generator(this,(function(u){switch(u.label){case 0:n=d(e),t=n.isDgsCartId,r=n.isLegacyCartId;if(!r&&!t){s("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,L({cartId:e,retries:5})];case 1:i=u.sent();o("[ZONOS - loadZonos] getting temp cart data","info",i);if(!i){s("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=i.cartData.storeId;window.Zonos.zonosApiKey=i.cartData.credentialToken;window.Zonos.zonosMode=i.zonosMode;return[2,{cartData:i.cartData,settings:i.settings,storeFavicon:i.storeFaviconUrl,storeId:i.cartData.storeId,storeLogo:i.storeLogoUrl,zonosApiKey:i.cartData.credentialToken}]}}))}))};var C;var F=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=m({loadScriptSrc:e===null||e===void 0?void 0:e.src}),t=n.currentLoadScriptUrl,r=n.isWhiteListed;if(r){return t}return null}();var D=Date.now();var M="https://v1.3.231.js.zonos.com";var x=F||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.231";var G="https://unpkg.com/@zonos/elements@1.3.231";var K="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.231";var B="https://fonts.googleapis.com";var V=/^https:\/\/fonts\.googleapis\.com/;var W=function(){function e(){}return e}();e("Zonos",W);C=W;W.doneInit=false;W.cartSettings=null;W.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);W.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);W._paypalMockResponse=null;W.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;W.isBigCommerce=false;W.releaseDate="1754944720824";W.isLegacyCheckout=false;W.startLoadTime=D;W.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";W.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");W.overrideUseCustomAddressForm=false;W.isCollect=false;W.isNpm=true;W.zonosQaUrl=null;W.zonosQaUrlApi=null;W.trackEventLogs=[];W.version="v".concat("1.3.231");W.modeAlerted=false;W.cartData=null;W.paypal=null;W.zonosMode=null;W.IframeService=r;W.getCurrentTimestamp=function(){return(new Date).getTime()};W.zonosController=null;W.loadTimeApiInfoList=[];W.logIntervalId=null;W.init=function(e){return __awaiter(v,void 0,void 0,(function(){var n,t,r,i,u,a,c,d,f,v,m,w,p,h,O;return __generator(this,(function(S){switch(S.label){case 0:n=e.appearance,t=e.checkoutSettings,r=e.currencyConverter,i=e.helloSettings,u=e.onCountryChange,a=e.overrideCurrencyFormat,c=e.storeId,d=e.zonosApiKey;C.cartId=U();if(C.doneInit){return[2]}o("====== ZONOS DEBUG MODE: on (".concat(C.version,") ======"));C.zonosApiKey=d;C.storeId=c;if(!C.isNpm)return[3,4];o("====== ZONOS LOADING FROM NPM ======");f=g();if(f&&!window.isZonosPreview){o('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(f," ======"),"info");v=document.createElement("script");v.src="".concat(f,"/dist/scripts/zonos.js");document.head.appendChild(v);v.addEventListener("load",(function(){window.Zonos.isNpm=C.isNpm;window.Zonos.isBigCommerce=C.isBigCommerce;window.Zonos.isLegacyCheckout=C.isLegacyCheckout;window.Zonos.zonosMode=C.zonosMode;void window.Zonos.init(e)}));v.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(f))}));window.isZonosPreview=true;return[2]}if(!d&&!C.cartId){s("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!C.cartData&&C.cartId))return[3,2];o("Initialize cart data");return[4,P(C.cartId)];case 1:m=S.sent();if(!m){s("Failed to get cart data");return[2]}C.cartData=m.cartData;C.zonosApiKey=m.zonosApiKey;C.cartSettings=m.settings;S.label=2;case 2:return[4,y()];case 3:w=S.sent();if(w){C.zonosApiKey=w}S.label=4;case 4:p=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");h=C.cartId&&C.cartData||!!p;if(h){o("Cart data or stripe client secret is available, inject hidden button and trigger checkout");O=document.createElement("button");O.style.display="none";O.id="".concat(l);document.body.appendChild(O)}o("init zonos");C.restoreNativeBrowserFunctions();C.injectCustomScriptForHostedCheckout();C.injectZonosCdn();C.injectZonosCss();C.injectFonts();C.injectCheckoutInternationalButton();C.injectController({config:{appearance:n,checkoutSettings:t,currencyConverter:r,helloSettings:i,onCountryChange:u,overrideCurrencyFormat:a}});C.doneInit=true;return[2]}}))}))};W.injectCheckoutInternationalButton=function(){if(!document.querySelector("#".concat(f))){var e=document.createElement("button");e.id=f;e.style.display="none";document.body.appendChild(e)}};W.injectCustomScriptForHostedCheckout=function(){var e=C.cartData;var n=(e===null||e===void 0?void 0:e.metadata)||[];var t=n.find((function(e){return e.key==="customHeaderScript"}));var r=n.find((function(e){return e.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!t&&!r){o("Skip injecting custom script for hosted checkout","info",{footerScript:r,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(t){o("Injecting custom header script");var i=document.createElement("script");i.textContent=t.value;document.head.appendChild(i)}if(r){o("Injecting custom footer script");var i=document.createElement("script");i.textContent=r.value;document.body.appendChild(i)}};W.displayCurrency=function(){var e=document.querySelector("zonos-hello");if(e){void e.displayCurrency()}};W.triggerCheckoutInternational=function(){return __awaiter(v,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.querySelector("#".concat(f));setTimeout((function(){if(e){e.dispatchEvent(n("click"))}}),10);return[2]}))}))};W.openHelloDialog=function(e){var n=document.querySelector("zonos-hello");if(n){void n.openHelloDialog(e!==null&&e!==void 0?e:true)}};W.showNotification=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.showNotification(e))};W.updateOrganizationName=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.updateOrganizationName(e))};W.disablePlaceOrderButtons=function(e){var n=e.autoEnable,t=n===void 0?true:n,r=e.config,o=e.disable,i=e.placeOrderButtonSelector;var u;if((u=r.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var a=document.querySelectorAll(i);var s=function(e){var n=e.target;if(n.getAttribute("disabled")){e.preventDefault();e.stopPropagation()}};a.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}if(o){e.setAttribute("disabled","true");e.addEventListener("click",s)}else{e.removeAttribute("disabled");e.removeEventListener("click",s)}}));if(t&&o){setTimeout((function(){a.forEach((function(e){e.removeAttribute("disabled");e.removeEventListener("click",s)}))}),5e3)}}};W.restoreNativeBrowserFunctions=function(){var e;var n=new URL(window.location.href).searchParams.get("useMerchantPolyfill")==="1";if(n){return}var t="zonos---native-browser";var r=document.querySelector("iframe#".concat(t));if(!r){r=document.createElement("iframe");r.id=t;r.style.display="none";r.style.opacity="0";r.style.position="absolute";r.style.top="-9999px";r.style.left="-9999px";r.style.width="1px";r.style.height="1px";r.style.border="none";r.style.overflow="hidden";r.style.visibility="hidden";document.body.appendChild(r)}var o=((e=r.contentWindow)===null||e===void 0?void 0:e.window.Array.from)||Array.from;Array.from=o;document.body.removeChild(r)};W.injectController=function(e){var n=e.config;var t,r;if(document.querySelector("zonos-controller")){return}if((t=n.checkoutSettings)===null||t===void 0?void 0:t.placeOrderButtonSelector){var i=n.checkoutSettings.placeOrderButtonSelector;C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:i});var u=new MutationObserver((function(){C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:i})}));u.observe(document.body,{childList:true,subtree:true})}if((r=n.checkoutSettings)===null||r===void 0?void 0:r.alwaysTriggerInternationalCheckoutSelector){var a=n.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a});var u=new MutationObserver((function(){C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a})}));u.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=n;c.zonosApiKey=C.zonosApiKey||"";c.addEventListener("stripeInitEvent",(function(e){return __awaiter(v,void 0,void 0,(function(){var n,t;return __generator(this,(function(r){switch(r.label){case 0:n=e.detail;o("loading Stripe");return[4,R(n.publishableKey)];case 1:t=r.sent();if(!t){s("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=t;if(window.Zonos.isCollect){void c.initCollectElement(t)}else{void c.initCheckoutElement(t)}return[2]}}))}))}));document.body.appendChild(c);C.zonosController=c;o("Zonos controller injected!")};W.injectScript=function(e){var n=e.cdnType,t=e.isModule,r=e.theRestUrl;var i=C.getZonosUrl(n);var u="".concat(i,"/").concat(r);var a=function(){var e=document.querySelector('script[src="'.concat(u,'"]'));return!!e};if(a()){o('Zonos script "'.concat(u,'" already exists in the document'),"warn");return}var c=document.head||document.body;var d=document.createElement("script");if(!!t){d.type="module"}else{d.noModule=true}d.src=u;d.crossOrigin="anonymous";d.onerror=function(){s("Failed to load ".concat(d.src));var e=h(n);if(!e){return}C.injectScript({cdnType:e,isModule:t,theRestUrl:r})};c.appendChild(d)};W.getZonosUrl=function(e){var n=function(){switch(e){case"jsdelivr":return x;case"unpkg":return G;case"cdnjs":return K;case"vercel":return M}};if(C.isNpm){var t=g();return t||n()}return n()};W.injectZonosCdn=function(){C.injectScript({cdnType:p,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});C.injectScript({cdnType:p,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});o("Zonos cdn script injected!")};W.injectStylesheet=function(e){var n=e.cdnType,t=e.theRestUrl;var r=C.getZonosUrl(n);var o=document.head||document.body;var i=document.createElement("link");i.rel="preconnect";i.href="".concat(M,"/");o.appendChild(i);var u=document.createElement("link");u.rel="stylesheet";u.href="".concat(r,"/").concat(t);u.onerror=function(){s("Failed to load ".concat(u.href));var e=h(n);if(!e){return}C.injectStylesheet({cdnType:e,theRestUrl:t})};o.appendChild(u)};W.injectZonosCss=function(){var e=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(e()){o("Zonos style links already injected","warn");return}C.injectStylesheet({cdnType:p,theRestUrl:"dist/zonos-elements/zonos-elements.css"});o("Zonos style css injected!")};W.injectFonts=function(){var e=function(){var e=document.fonts.check("1em Inter");if(e){o("Inter font already loaded","warn");return}var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(B,'"]'));for(var t=0;t<n.length;t++){var r=n[t];if(!r){continue}if(V.test(r.href)){continue}return r}return null};if(e()){o("Inter font already injected","warn");return}var n=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=B;n.appendChild(t);var r=document.createElement("link");r.rel="stylesheet";r.href="".concat(B,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");n.appendChild(r);o("Zonos font injected!")};W.setupGoogleFont=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.setupGoogleFont(e))};W.injectSupportGoogleFont=function(e){var n;o("[FONT] injecting ".concat(e));var t=(n=e.match(/family=(.*?):/))===null||n===void 0?void 0:n[1];var r=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(B,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=B;r.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(e,'"]'))){o("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=e;r.appendChild(u);o("[FONT] ".concat(t," font injected!"))};var q=e("checkoutSessionMutableAttributeKeys",["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"]);var H=e("checkoutSessionImmutableAttributeKeys",["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"]);var Q=e("checkoutSessionAttributeKeys",__spreadArray(__spreadArray([],q,true),H,true))}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,r){function o(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?t(e.value):o(e.value).then(u,a)}s((r=r.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(n){return s([e,n])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(t=0)),t)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;o=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=n.call(e,t)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,i;r<o;r++){if(i||!(r in n)){if(!i)i=Array.prototype.slice.call(n,0,r);i[r]=n[r]}}return e.concat(i||Array.prototype.slice.call(n))};System.register(["./p-bf37ccc7.system.js","./p-4160bbc2.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-40a4c8a2.system.js","./p-2b8345d8.system.js"],(function(e){"use strict";var n,t,r,o,i,u,a,s,c,d,l,f;return{setters:[function(e){n=e.c},function(e){t=e.g;r=e.I},function(n){o=n.l;e("availableTestKeys",n.a)},function(e){i=e.g;u=e.a;a=e.h;s=e.l},function(n){c=n.g;d=n._;l=n.c;f=n.a;var t={};t.checkoutHiddenBtnSelector=n.c;t.checkoutHiddenInternationalBtnSelector=n.a;t.domesticRedirectedBtnSelector=n.d;e(t)},function(n){var t={};t.countryRequireTaxId=n.c;t.euCountryCodes=n.e;t.shipToTaxIdLabels=n.s;e(t)}],execute:function(){var v=this;var m=function(e){var n=e.loadScriptSrc;if(!n){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(n).origin;var i=t.some((function(e){return o.includes(e)}));var u=r.some((function(e){return o.includes(e)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var w=["jsdelivr","cdnjs","unpkg","vercel"];var p="jsdelivr";var h=function(e){var n=w.indexOf(e);var t=w[n+1];return t||null};var y=function(){return __awaiter(v,void 0,void 0,(function(){var e,n,t,r,c,d;return __generator(this,(function(l){switch(l.label){case 0:e=i();n=u();if(!e&&!n||!window.Zonos.zonosApiKey){return[2,null]}o("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){o("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,a("/api/get-test-public-credential")];case 1:t=l.sent(),r=t.errors,c=t.json;if(r.length||!c){s("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",r);return[2,null]}d=c.publicCredential;if(!d){s("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}o("[ZONOS - loadZonos] Retrieve new test public token ".concat(d),"info");return[2,d]}}))}))};var O=function(e){if(!e){return null}var n=new URL(e).searchParams;var t=n.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var g=function(){var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=O(window.location.href);var t="https://v1.3.232.js.zonos.com";if(!n&&(t.includes("test.")||t.includes("test-"))){return t}if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var r="preview.js.zonos.com";var i="https://".concat(n,".").concat(r);o("[ZONOS-WARNING] using '".concat(i,"' for loading elements script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");var n=window.location.pathname;var t="".concat(n,"?").concat(e.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return i};var S="https://js.stripe.com/v3";var _=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var b="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var z=function(){var e=document.querySelectorAll('script[src^="'.concat(S,'"]'));for(var n=0;n<e.length;n++){var t=e[n];if(!t){continue}if(!_.test(t.src)){continue}return t}return null};var j=null;var k=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(S).concat(n);var r=document.head||document.body;if(!r){s("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}r.appendChild(t);return t};var N=function(e){if(j!==null){return j}j=new Promise((function(n,t){if(typeof window==="undefined"||typeof document==="undefined"){n(null);return}if(window.Stripe&&e){console.warn(b)}if(window.Stripe){n(window.Stripe);return}try{var r=z();if(r&&e){console.warn(b)}else if(!r){r=k(e)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(e){t(e);return}}));return j};var A=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var I=function(e,n,t){if(e===null){return null}var r=e.apply(undefined,n);A(r,t);return r};var Z=Promise.resolve().then((function(){return N(null)}));var T=false;Z.catch((function(e){if(!T){console.warn(e)}}));var R=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return __awaiter(v,void 0,void 0,(function(){var n;return __generator(this,(function(t){T=true;n=Date.now();return[2,Z.then((function(t){return I(t,e,n)}))]}))}))};var E="tempCartUUID";var U=function(){var e=new URLSearchParams(window.location.search);var n=e.get(E);return n};var L=function(e){return __awaiter(v,[e],void 0,(function(e){var n,r,u,s,d,l,f,v,m;var w=e.cartId,p=e.retries;return __generator(this,(function(e){switch(e.label){case 0:n=i();r=t();u=c()||undefined;s=new URLSearchParams;if(r.overrideShouldEnabledCustomAddress){s.set("overrideShouldEnabledCustomAddress",r.overrideShouldEnabledCustomAddress)}return[4,a("/api/zonos-elements/get-cart?".concat(s.toString()),{body:{isTestMode:n,renewCartExpirationToken:u,tempCartUUID:w},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:d=e.sent(),l=d.errors,f=d.json,v=d.zonosMode;m=!f||l.length;if(!(m&&p))return[3,3];o("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:p});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,L({cartId:w,retries:p-1})];case 3:if(m){return[2,null]}return[2,Object.assign(Object.assign({},f),{zonosMode:v})]}}))}))};var P=function(e){return __awaiter(v,void 0,void 0,(function(){var n,t,r,i;return __generator(this,(function(u){switch(u.label){case 0:n=d(e),t=n.isDgsCartId,r=n.isLegacyCartId;if(!r&&!t){s("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,L({cartId:e,retries:5})];case 1:i=u.sent();o("[ZONOS - loadZonos] getting temp cart data","info",i);if(!i){s("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=i.cartData.storeId;window.Zonos.zonosApiKey=i.cartData.credentialToken;window.Zonos.zonosMode=i.zonosMode;return[2,{cartData:i.cartData,settings:i.settings,storeFavicon:i.storeFaviconUrl,storeId:i.cartData.storeId,storeLogo:i.storeLogoUrl,zonosApiKey:i.cartData.credentialToken}]}}))}))};var C;var F=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=m({loadScriptSrc:e===null||e===void 0?void 0:e.src}),t=n.currentLoadScriptUrl,r=n.isWhiteListed;if(r){return t}return null}();var D=Date.now();var M="https://v1.3.232.js.zonos.com";var x=F||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.232";var G="https://unpkg.com/@zonos/elements@1.3.232";var K="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.232";var B="https://fonts.googleapis.com";var V=/^https:\/\/fonts\.googleapis\.com/;var W=function(){function e(){}return e}();e("Zonos",W);C=W;W.doneInit=false;W.cartSettings=null;W.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);W.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);W._paypalMockResponse=null;W.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;W.isBigCommerce=false;W.releaseDate="1755722224035";W.isLegacyCheckout=false;W.startLoadTime=D;W.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";W.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");W.overrideUseCustomAddressForm=false;W.isCollect=false;W.isNpm=true;W.zonosQaUrl=null;W.zonosQaUrlApi=null;W.trackEventLogs=[];W.version="v".concat("1.3.232");W.modeAlerted=false;W.cartData=null;W.paypal=null;W.zonosMode=null;W.IframeService=r;W.getCurrentTimestamp=function(){return(new Date).getTime()};W.zonosController=null;W.loadTimeApiInfoList=[];W.logIntervalId=null;W.init=function(e){return __awaiter(v,void 0,void 0,(function(){var n,t,r,i,u,a,c,d,f,v,m,w,p,h,O;return __generator(this,(function(S){switch(S.label){case 0:n=e.appearance,t=e.checkoutSettings,r=e.currencyConverter,i=e.helloSettings,u=e.onCountryChange,a=e.overrideCurrencyFormat,c=e.storeId,d=e.zonosApiKey;C.cartId=U();if(C.doneInit){return[2]}o("====== ZONOS DEBUG MODE: on (".concat(C.version,") ======"));C.zonosApiKey=d;C.storeId=c;if(!C.isNpm)return[3,4];o("====== ZONOS LOADING FROM NPM ======");f=g();if(f&&!window.isZonosPreview){o('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(f," ======"),"info");v=document.createElement("script");v.src="".concat(f,"/dist/scripts/zonos.js");document.head.appendChild(v);v.addEventListener("load",(function(){window.Zonos.isNpm=C.isNpm;window.Zonos.isBigCommerce=C.isBigCommerce;window.Zonos.isLegacyCheckout=C.isLegacyCheckout;window.Zonos.zonosMode=C.zonosMode;void window.Zonos.init(e)}));v.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(f))}));window.isZonosPreview=true;return[2]}if(!d&&!C.cartId){s("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!C.cartData&&C.cartId))return[3,2];o("Initialize cart data");return[4,P(C.cartId)];case 1:m=S.sent();if(!m){s("Failed to get cart data");return[2]}C.cartData=m.cartData;C.zonosApiKey=m.zonosApiKey;C.cartSettings=m.settings;S.label=2;case 2:return[4,y()];case 3:w=S.sent();if(w){C.zonosApiKey=w}S.label=4;case 4:p=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");h=C.cartId&&C.cartData||!!p;if(h){o("Cart data or stripe client secret is available, inject hidden button and trigger checkout");O=document.createElement("button");O.style.display="none";O.id="".concat(l);document.body.appendChild(O)}o("init zonos");C.restoreNativeBrowserFunctions();C.injectCustomScriptForHostedCheckout();C.injectZonosCdn();C.injectZonosCss();C.injectFonts();C.injectCheckoutInternationalButton();C.injectController({config:{appearance:n,checkoutSettings:t,currencyConverter:r,helloSettings:i,onCountryChange:u,overrideCurrencyFormat:a}});C.doneInit=true;return[2]}}))}))};W.injectCheckoutInternationalButton=function(){if(!document.querySelector("#".concat(f))){var e=document.createElement("button");e.id=f;e.style.display="none";document.body.appendChild(e)}};W.injectCustomScriptForHostedCheckout=function(){var e=C.cartData;var n=(e===null||e===void 0?void 0:e.metadata)||[];var t=n.find((function(e){return e.key==="customHeaderScript"}));var r=n.find((function(e){return e.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!t&&!r){o("Skip injecting custom script for hosted checkout","info",{footerScript:r,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(t){o("Injecting custom header script");var i=document.createElement("script");i.textContent=t.value;document.head.appendChild(i)}if(r){o("Injecting custom footer script");var i=document.createElement("script");i.textContent=r.value;document.body.appendChild(i)}};W.displayCurrency=function(){var e=document.querySelector("zonos-hello");if(e){void e.displayCurrency()}};W.triggerCheckoutInternational=function(){return __awaiter(v,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.querySelector("#".concat(f));setTimeout((function(){if(e){e.dispatchEvent(n("click"))}}),10);return[2]}))}))};W.openHelloDialog=function(e){var n=document.querySelector("zonos-hello");if(n){void n.openHelloDialog(e!==null&&e!==void 0?e:true)}};W.showNotification=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.showNotification(e))};W.updateOrganizationName=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.updateOrganizationName(e))};W.disablePlaceOrderButtons=function(e){var n=e.autoEnable,t=n===void 0?true:n,r=e.config,o=e.disable,i=e.placeOrderButtonSelector;var u;if((u=r.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var a=document.querySelectorAll(i);var s=function(e){var n=e.target;if(n.getAttribute("disabled")){e.preventDefault();e.stopPropagation()}};a.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}if(o){e.setAttribute("disabled","true");e.addEventListener("click",s)}else{e.removeAttribute("disabled");e.removeEventListener("click",s)}}));if(t&&o){setTimeout((function(){a.forEach((function(e){e.removeAttribute("disabled");e.removeEventListener("click",s)}))}),5e3)}}};W.restoreNativeBrowserFunctions=function(){var e;var n=new URL(window.location.href).searchParams.get("useMerchantPolyfill")==="1";if(n){return}var t="zonos---native-browser";var r=document.querySelector("iframe#".concat(t));if(!r){r=document.createElement("iframe");r.id=t;r.style.display="none";r.style.opacity="0";r.style.position="absolute";r.style.top="-9999px";r.style.left="-9999px";r.style.width="1px";r.style.height="1px";r.style.border="none";r.style.overflow="hidden";r.style.visibility="hidden";document.body.appendChild(r)}var o=((e=r.contentWindow)===null||e===void 0?void 0:e.window.Array.from)||Array.from;Array.from=o;document.body.removeChild(r)};W.injectController=function(e){var n=e.config;var t,r;if(document.querySelector("zonos-controller")){return}if((t=n.checkoutSettings)===null||t===void 0?void 0:t.placeOrderButtonSelector){var i=n.checkoutSettings.placeOrderButtonSelector;C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:i});var u=new MutationObserver((function(){C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:i})}));u.observe(document.body,{childList:true,subtree:true})}if((r=n.checkoutSettings)===null||r===void 0?void 0:r.alwaysTriggerInternationalCheckoutSelector){var a=n.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a});var u=new MutationObserver((function(){C.disablePlaceOrderButtons({config:n,disable:true,placeOrderButtonSelector:a})}));u.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=n;c.zonosApiKey=C.zonosApiKey||"";c.addEventListener("stripeInitEvent",(function(e){return __awaiter(v,void 0,void 0,(function(){var n,t;return __generator(this,(function(r){switch(r.label){case 0:n=e.detail;o("loading Stripe");return[4,R(n.publishableKey)];case 1:t=r.sent();if(!t){s("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=t;if(window.Zonos.isCollect){void c.initCollectElement(t)}else{void c.initCheckoutElement(t)}return[2]}}))}))}));document.body.appendChild(c);C.zonosController=c;o("Zonos controller injected!")};W.injectScript=function(e){var n=e.cdnType,t=e.isModule,r=e.theRestUrl;var i=C.getZonosUrl(n);var u="".concat(i,"/").concat(r);var a=function(){var e=document.querySelector('script[src="'.concat(u,'"]'));return!!e};if(a()){o('Zonos script "'.concat(u,'" already exists in the document'),"warn");return}var c=document.head||document.body;var d=document.createElement("script");if(!!t){d.type="module"}else{d.noModule=true}d.src=u;d.crossOrigin="anonymous";d.onerror=function(){s("Failed to load ".concat(d.src));var e=h(n);if(!e){return}C.injectScript({cdnType:e,isModule:t,theRestUrl:r})};c.appendChild(d)};W.getZonosUrl=function(e){var n=function(){switch(e){case"jsdelivr":return x;case"unpkg":return G;case"cdnjs":return K;case"vercel":return M}};if(C.isNpm){var t=g();return t||n()}return n()};W.injectZonosCdn=function(){C.injectScript({cdnType:p,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});C.injectScript({cdnType:p,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});o("Zonos cdn script injected!")};W.injectStylesheet=function(e){var n=e.cdnType,t=e.theRestUrl;var r=C.getZonosUrl(n);var o=document.head||document.body;var i=document.createElement("link");i.rel="preconnect";i.href="".concat(M,"/");o.appendChild(i);var u=document.createElement("link");u.rel="stylesheet";u.href="".concat(r,"/").concat(t);u.onerror=function(){s("Failed to load ".concat(u.href));var e=h(n);if(!e){return}C.injectStylesheet({cdnType:e,theRestUrl:t})};o.appendChild(u)};W.injectZonosCss=function(){var e=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(e()){o("Zonos style links already injected","warn");return}C.injectStylesheet({cdnType:p,theRestUrl:"dist/zonos-elements/zonos-elements.css"});o("Zonos style css injected!")};W.injectFonts=function(){var e=function(){var e=document.fonts.check("1em Inter");if(e){o("Inter font already loaded","warn");return}var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(B,'"]'));for(var t=0;t<n.length;t++){var r=n[t];if(!r){continue}if(V.test(r.href)){continue}return r}return null};if(e()){o("Inter font already injected","warn");return}var n=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=B;n.appendChild(t);var r=document.createElement("link");r.rel="stylesheet";r.href="".concat(B,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");n.appendChild(r);o("Zonos font injected!")};W.setupGoogleFont=function(e){var n;void((n=C.zonosController)===null||n===void 0?void 0:n.setupGoogleFont(e))};W.injectSupportGoogleFont=function(e){var n;o("[FONT] injecting ".concat(e));var t=(n=e.match(/family=(.*?):/))===null||n===void 0?void 0:n[1];var r=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(B,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=B;r.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(e,'"]'))){o("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=e;r.appendChild(u);o("[FONT] ".concat(t," font injected!"))};var q=e("checkoutSessionMutableAttributeKeys",["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"]);var H=e("checkoutSessionImmutableAttributeKeys",["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"]);var Q=e("checkoutSessionAttributeKeys",__spreadArray(__spreadArray([],q,true),H,true))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-989d3af9.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-c5d1217f.system.js","./p-1aa93d1e.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var t,s,o,n,i,a,l,h;return{setters:[function(e){t=e.r;s=e.h;o=e.H},function(e){n=e.f;i=e.z},function(e){a=e.c},function(e){l=e.i},function(e){h=e.s},function(){}],execute:function(){var z={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}};var r=":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{color:var(--zonos--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos--font-size-3xl, var(--zonos-elements-font-size-3xl))}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos--font-size-2xl, var(--zonos-elements-font-size-2xl));line-height:32px}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos--font-size-xl, var(--zonos-elements-font-size-xl))}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos--font-size-l, var(--zonos-elements-font-size-l))}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos--font-size-base, var(--zonos-elements-font-size-base))}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos--font-size-s, var(--zonos-elements-font-size-s))}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos--font-size-xs, var(--zonos-elements-font-size-xs))}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";var x=r;var f=e("zonos_text",function(){function e(e){t(this,e);this.textColor="gray-1000";this.type="body";this.ready=false}e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){e.ready=true}),100)};e.prototype.render=function(){var e=z.body,t=e.size,r=e.tag,x=e.weight;var f=z[this.type],g=f.size,d=f.tag,u=f.weight;var m=this.size||g||t;var p=this.weight||u||x;var b=d||r;var c=l(this.textColor)?"var(--zonos-elements-".concat(this.textColor,")"):this.textColor;var w=function(){switch(b){case"h2":return s("h2",null,s("slot",null));case"h3":return s("h3",null,s("slot",null));case"h4":return s("h4",null,s("slot",null));case"h5":return s("h5",null,s("slot",null));case"span":default:return s("span",null,s("slot",null))}};return s(o,{class:a(["zonos--elements","zonos--text-size-".concat(m),"zonos--text-weight-".concat(p)]),style:h({"--zonos--color":c,"--zonos--font-family":n(),"--zonos--font-size-2xl":i.appearance.fontSize2XL?"".concat(i.appearance.fontSize2XL,"px"):undefined,"--zonos--font-size-3xl":i.appearance.fontSize3XL?"".concat(i.appearance.fontSize3XL,"px"):undefined,"--zonos--font-size-base":i.appearance.fontSizeBase?"".concat(i.appearance.fontSizeBase,"px"):undefined,"--zonos--font-size-l":i.appearance.fontSizeL?"".concat(i.appearance.fontSizeL,"px"):undefined,"--zonos--font-size-s":i.appearance.fontSizeS?"".concat(i.appearance.fontSizeS,"px"):undefined,"--zonos--font-size-xl":i.appearance.fontSizeXL?"".concat(i.appearance.fontSizeXL,"px"):undefined,"--zonos--font-size-xs":i.appearance.fontSizeXS?"".concat(i.appearance.fontSizeXS,"px"):undefined})},w())};return e}());f.style=x}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as s,H as t,a as i}from"./p-
|
|
1
|
+
import{r as o,h as s,H as t,a as i}from"./p-ab41bab5.js";import{l as a}from"./p-2557b96b.js";import{f as n}from"./p-b2a0ab4a.js";import{c as e}from"./p-b4b7f705.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-5f77d19e.js";const h=class{constructor(s){o(this,s),this.countryCode=a.selectedCountryCode}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const o=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=n();return s(t,{class:"zonos--elements",style:this.size?{"--zonos--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--zonos--font-family":i}},s("div",{class:e(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${o})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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-
|
|
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-d45285aa.system.js","./p-7c705c76.system.js","./p-561be3a2.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-989d3af9.system.js"],(function(n){"use strict";var e,t,i,r,o,a,u,d,s,l,c,f;return{setters:[function(n){e=n.c;t=n.z},function(n){i=n.c;r=n.C;o=n.e;a=n.D},function(n){u=n.s},function(n){d=n.h;s=n.s;l=n.l},function(n){c=n.b},function(n){f=n.h}],execute:function(){var v=this;var p=e((function(){return{amountDutyTaxFeeTotal:null,amountTotalPaid:null,isFetchingShippingInfo:true,landedCostShortId:null,originCompanyName:null,partyBillingId:null,shippingAddress:null}})),h=p.reset,w=p.state;n("e",w);var m=n("b",(function(n){return __awaiter(v,[n],void 0,(function(n){var e,i,r,a,u,l,c,f,v,p,h,_,y;var C=n.landedCostId,g=n.retries,I=g===void 0?5:g;return __generator(this,(function(n){switch(n.label){case 0:w.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(!(I>0))return[3,3];return[4,new Promise((function(n){return setTimeout(n,1e3)}))];case 2:n.sent();return[2,m({landedCostId:C,retries:I-1})];case 3:return[2,null];case 4:w.landedCostShortId=((e=p.json)===null||e===void 0?void 0:e.landedCostShortId)||null;w.isFetchingShippingInfo=false;w.shippingAddress=((i=p.json)===null||i===void 0?void 0:i.shipping)||null;h=(r=o.checkoutSession)===null||r===void 0?void 0:r.landedCost;_=(a=o.checkoutSession)===null||a===void 0?void 0:a.subtotals;y=(((u=h===null||h===void 0?void 0:h.amountSubtotals)===null||u===void 0?void 0:u.shipping)||0)+(((l=h===null||h===void 0?void 0:h.amountSubtotals)===null||l===void 0?void 0:l.items)||0);w.amountTotalPaid=y*(((c=_===null||_===void 0?void 0:_.exchangeRate)===null||c===void 0?void 0:c.rate)||1);w.amountDutyTaxFeeTotal=((_===null||_===void 0?void 0:_.duties)||0)+((_===null||_===void 0?void 0:_.taxes)||0)+((_===null||_===void 0?void 0:_.fees)||0);w.originCompanyName=((v=(f=p.json)===null||f===void 0?void 0:f.origin)===null||v===void 0?void 0:v.companyName)||null;if(w.amountTotalPaid===0){void s({endpoint:"COLLECT_NO_TOTAL_PAID",errors:[],metadata:{landedCostId:C,organizationId:t.organizationId}})}return[2]}}))}))}));var _=n("d",(function(){return __awaiter(v,void 0,void 0,(function(){var n,e,t,a,f,v,p,h,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 s({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 s({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:h=y.sent(),m=h.errors,_=h.json;if(m.length||!_){l("Error occurs when creating billing party",JSON.stringify(m,null,2));void s({endpoint:"COLLECT_BILLING_PARTY_CREATE_FAILED",errors:["[COLLECT] Failed to create billing party"],metadata:{allLogs:c,cartId:window.Zonos.cartId,checkoutSessionId:u.checkoutSessionId,errors:m,json:_}});return[2,{partiesCreated:false}]}w.partyBillingId=_.billToPartyId;return[2,{partiesCreated:true}]}}))}))}));var y=n("c",(function(n){return __awaiter(v,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 C=1024;var g=768;var I=n("a",(function(n){return n||window.innerWidth<C&&window.innerWidth>=g}));var b=n("i",(function(n){return n||window.innerWidth<g}));var T=n("r",(function(n){var e=n.content,t=n.isLoading,i=n.skeletonHeight,r=n.skeletonWidth;if(t){return f("zonos-skeleton",{skeletonHeight:i,skeletonWidth:r})}return e}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,c){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function l(o){try{r(c.next(o))}catch(o){n(o)}}function i(o){try{r(c["throw"](o))}catch(o){n(o)}}function r(o){o.done?t(o.value):s(o.value).then(l,i)}r((c=c.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},c,s,n,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(c)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(c=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{c=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-5fc34563.system.js","./p-f688d7a4.system.js","./p-419c292c.system.js","./p-0047fecf.system.js","./p-bb707dfd.system.js","./p-7920d79c.system.js","./p-89c5164b.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-c9e433c0.system.js","./p-24e26a2c.system.js","./p-433d76b4.system.js"],(function(o){"use strict";var e,t,c,s,n,l,i,r,a,z,d,h,u,f,m,p,g,b,v,w,x,y,k,_,C,S,I,j,O,T,L,E,U,P,N,A,D,B,R,F;return{setters:[function(o){e=o.r;t=o.h;c=o.H;s=o.F},function(o){n=o.c;l=o.i;i=o.d;r=o.e;a=o.o;z=o.f;d=o.k;h=o.l;u=o.u;f=o.w;m=o.B;p=o.y;g=o.g},function(o){b=o.i;v=o.a;w=o.c;x=o.b;y=o.d;k=o.e;_=o.r},function(o){C=o.p;S=o.a},function(o){I=o.s;j=o.c;O=o.d;T=o.l},function(o){L=o.t},function(o){E=o.z},function(o){U=o.b},function(o){P=o.h;N=o.s;A=o.l;D=o.g},function(o){B=o.c},function(o){R=o.l},function(o){F=o.l},function(){},function(){}],execute:function(){var H='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var K=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var V=K;var W=o("zonos_collect",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReview=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=n.clientSecret;this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=r.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=E.appearance.theme;return[4,l({overrideTheme:this.isMobile?o:undefined,paypalEnabled:C()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,P("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,c,s,l,r,a,z,d;return __generator(this,(function(h){switch(h.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;c=t.get("payment_intent_client_secret");s=t.get("zonosCheckoutSessionId");R("Payment intent exist, checking stripe payment intent status");if(!c){R("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,i({clientSecret:c})];case 1:l=h.sent(),r=l.error,a=l.status;z=new URLSearchParams(window.location.search).get("redirect_status");if(!(z&&s))return[3,3];if(!r){R("Payment intent is succeeded or in a good state to move forward, show success screen")}else{R("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(s)];case 2:d=h.sent();this.confirmationId=((o=d===null||d===void 0?void 0:d.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;I.checkoutSessionId=s;n.clientSecret=c;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}];case 3:if(!e){R("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}R("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=b(this.mobile);this.isTablet=v(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){n.stripe=window.Zonos.stripe;r.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,c,s,n,l,u,f,m,p,g,b,v,y,k,_,C,S,j,O,T,P;return __generator(this,(function(D){switch(D.label){case 0:if(!window.Zonos.cartData){return[2]}g=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(g){r.currency=g}b=(c=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||c===void 0?void 0:c.checkoutSessionId;v=(n=(s=window.Zonos.cartData)===null||s===void 0?void 0:s.references)===null||n===void 0?void 0:n.landedCostId;if(!v){a({messages:[L("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:L("Invalid session")});return[2]}if(b){R("Setting checkout session id from cart reference","info",b);I.checkoutSessionId=b}else{R("Clear checkout session id from storage so we start from a fresh session for the collect cart");I.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:y=D.sent().shouldAllowOrder;if(!y){return[2]}D.label=2;case 2:D.trys.push([2,11,,12]);k=U(window.Zonos.cartData),_=k.adjustments,C=k.cartItems;return[4,z({adjustments:_,cartItems:C,landedCostId:v,shouldInitSessionOnFailure:false})];case 3:D.sent();if(!(!I.checkoutSessionId&&!b))return[3,5];return[4,d()];case 4:S=D.sent();R("stripeStoreInitCheckoutSession: ".concat(S));if(!S){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}D.label=5;case 5:if(!((!r.checkoutSession||((l=r.checkoutSession)===null||l===void 0?void 0:l.completedAt))&&b))return[3,9];return[4,this.fetchCheckoutSession(b)];case 6:j=D.sent();this.confirmationId=((u=j===null||j===void 0?void 0:j.checkoutSession.landedCost)===null||u===void 0?void 0:u.shortId)||null;if(!!(j===null||j===void 0?void 0:j.checkoutSession.completedAt)){void this.setToFinishStep("succeeded");return[2]}if(!(j===null||j===void 0?void 0:j.checkoutSession.clientSecret))return[3,8];return[4,i({clientSecret:j.checkoutSession.clientSecret})];case 7:O=D.sent().status;if(O==="processing"||O==="succeeded"){void this.setToFinishStep(O);return[2]}D.label=8;case 8:void N({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:b,cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:v}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!r.checkoutSession){void N({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:b||"N/A",cartId:(m=window.Zonos.cartData)===null||m===void 0?void 0:m.id,cartLandedCostId:v||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}void h();T=(p=r.checkoutSession)===null||p===void 0?void 0:p.landedCost;if(!T){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,w(Object.assign(Object.assign({},r.checkoutSession),{id:I.checkoutSessionId||""}))];case 10:D.sent();void x({landedCostId:T.id});void this.applyStripeTheme();return[3,12];case 11:P=D.sent();A(P);a({messages:[L("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:L("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,c,s,l,i,a,z;return __generator(this,(function(d){switch(d.label){case 0:void((o=n.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=n.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){s=document.querySelector("zonos-link-authentication");s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth"});return[2]}if(!((t=n.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)){l=document.querySelector(".zonos--billing-address");l===null||l===void 0?void 0:l.scrollIntoView({behavior:"smooth"});return[2]}i=n.checkoutSettlementCurrency==="USD";if(i&&n.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;S.paypalErrorMessage=null;n.hasPaymentError=false;this.submitLoading=true;r.inventoryCheckErrorMessage=null;return[4,u()];case 1:a=d.sent();if(!a){n.hasPaymentError=true;n.customErrorMessage=L("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:n.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,y()];case 2:d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4,f({noLandedCostCheck:true})];case 4:d.sent();r.step="finish";this.confirmationId=k.landedCostShortId||((c=r.selectedLandedCost)===null||c===void 0?void 0:c.landedCostId)||null;return[2];case 5:z=d.sent();A(z);n.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;n.stripe=window.Zonos.stripe;r.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[m("clientSecret",(function(){void o.applyStripeTheme()})),j("selectedLocale",(function(){void o.applyStripeTheme()}))];R("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){p();g();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=n.clientSecret;if(n.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var l=E.appearance,i=l.logoUrl,a=l.theme;var z=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(E.organizationName," logo"),src:o}))};var d=D();var h=function(){var e;var c=new URLSearchParams(window.location.search);var n=c.get("zonosQaUrl");var l=c.get("zonosDebug");var i=(e=F.find((function(o){return o.code===T.selectedLocale})))===null||e===void 0?void 0:e.label;return t(s,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},z(),d&&t("zonos-badge",{badgeColor:"orange",size:"small"},L("Test mode")),l==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},i,t("zonos-icon",{"aria-label":"Language select",content:H,iconColor:"gray-1200"})),t("div",{class:B(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),_({content:t("zonos-text",{class:"zonos--header-title",type:"header"},k.originCompanyName?L("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:k.originCompanyName}):L("Customs charges from your recent purchase are available for payment")),isLoading:k.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};var u=function(){if(o.isOverlayLoading||n.isFetchingSession){return null}return t("div",{class:"zonos--content"},r.step!=="finish"&&r.step!=="error"&&t(s,null,(o.isMobile||o.isTablet)&&h(),t("div",{class:"zonos--left","data-theme":a},!o.isMobile&&!o.isTablet&&h(),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"})),t("zonos-collect-payment",{class:B(["zonos--collect-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),t("div",{class:"zonos--right","data-theme":a},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet})))),(r.step==="finish"||r.step==="error")&&t("div",{class:"zonos--done","data-theme":a},t("div",{class:"zonos--header"},z()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:r.step==="error"&&!!r.error?Object.assign(Object.assign({},r.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||r.step==="finish"||r.step==="error")&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet}))};return t(c,{class:B(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":a},u(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:L("Cancel"),dialogConfirmBtnText:L("Pay [orderTotal]",{orderTotal:O({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:L("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:L("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=V}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,s){function c(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function l(o){try{r(s.next(o))}catch(o){n(o)}}function i(o){try{r(s["throw"](o))}catch(o){n(o)}}function r(o){o.done?t(o.value):c(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,c,n,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,c&&(n=i[0]&2?c["return"]:i[0]?c["throw"]||((n=c["return"])&&n.call(c),0):c.next)&&!(n=n.call(c,i[1])).done)return n;if(c=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;c=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];c=0}finally{s=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-989d3af9.system.js","./p-7c705c76.system.js","./p-767a31a8.system.js","./p-a25428eb.system.js","./p-561be3a2.system.js","./p-1d5aa016.system.js","./p-d45285aa.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-c9e433c0.system.js","./p-909e2bc3.system.js","./p-23d497e3.system.js"],(function(o){"use strict";var e,t,s,c,n,l,i,r,a,z,d,h,u,f,m,p,g,b,v,w,x,y,k,_,C,S,I,j,O,T,L,E,U,P,N,A,D,B,R,F;return{setters:[function(o){e=o.r;t=o.h;s=o.H;c=o.F},function(o){n=o.c;l=o.i;i=o.d;r=o.e;a=o.o;z=o.f;d=o.k;h=o.l;u=o.u;f=o.w;m=o.B;p=o.y;g=o.g},function(o){b=o.i;v=o.a;w=o.c;x=o.b;y=o.d;k=o.e;_=o.r},function(o){C=o.p;S=o.a},function(o){I=o.s;j=o.c;O=o.d;T=o.l},function(o){L=o.t},function(o){E=o.z},function(o){U=o.b},function(o){P=o.h;N=o.s;A=o.l;D=o.g},function(o){B=o.c},function(o){R=o.l},function(o){F=o.l},function(){},function(){}],execute:function(){var H='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var K=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var V=K;var W=o("zonos_collect",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReview=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=n.clientSecret;this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=r.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=E.appearance.theme;return[4,l({overrideTheme:this.isMobile?o:undefined,paypalEnabled:C()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,P("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,c,l,r,a,z,d;return __generator(this,(function(h){switch(h.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");c=t.get("zonosCheckoutSessionId");R("Payment intent exist, checking stripe payment intent status");if(!s){R("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,i({clientSecret:s})];case 1:l=h.sent(),r=l.error,a=l.status;z=new URLSearchParams(window.location.search).get("redirect_status");if(!(z&&c))return[3,3];if(!r){R("Payment intent is succeeded or in a good state to move forward, show success screen")}else{R("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(c)];case 2:d=h.sent();this.confirmationId=((o=d===null||d===void 0?void 0:d.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;I.checkoutSessionId=c;n.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}];case 3:if(!e){R("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}R("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=b(this.mobile);this.isTablet=v(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){n.stripe=window.Zonos.stripe;r.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,n,l,u,f,m,p,g,b,v,y,k,_,C,S,j,O,T,P;return __generator(this,(function(D){switch(D.label){case 0:if(!window.Zonos.cartData){return[2]}g=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(g){r.currency=g}b=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;v=(n=(c=window.Zonos.cartData)===null||c===void 0?void 0:c.references)===null||n===void 0?void 0:n.landedCostId;if(!v){a({messages:[L("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:L("Invalid session")});return[2]}if(b){R("Setting checkout session id from cart reference","info",b);I.checkoutSessionId=b}else{R("Clear checkout session id from storage so we start from a fresh session for the collect cart");I.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:y=D.sent().shouldAllowOrder;if(!y){return[2]}D.label=2;case 2:D.trys.push([2,11,,12]);k=U(window.Zonos.cartData),_=k.adjustments,C=k.cartItems;return[4,z({adjustments:_,cartItems:C,landedCostId:v,shouldInitSessionOnFailure:false})];case 3:D.sent();if(!(!I.checkoutSessionId&&!b))return[3,5];return[4,d()];case 4:S=D.sent();R("stripeStoreInitCheckoutSession: ".concat(S));if(!S){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}D.label=5;case 5:if(!((!r.checkoutSession||((l=r.checkoutSession)===null||l===void 0?void 0:l.completedAt))&&b))return[3,9];return[4,this.fetchCheckoutSession(b)];case 6:j=D.sent();this.confirmationId=((u=j===null||j===void 0?void 0:j.checkoutSession.landedCost)===null||u===void 0?void 0:u.shortId)||null;if(!!(j===null||j===void 0?void 0:j.checkoutSession.completedAt)){void this.setToFinishStep("succeeded");return[2]}if(!(j===null||j===void 0?void 0:j.checkoutSession.clientSecret))return[3,8];return[4,i({clientSecret:j.checkoutSession.clientSecret})];case 7:O=D.sent().status;if(O==="processing"||O==="succeeded"){void this.setToFinishStep(O);return[2]}D.label=8;case 8:void N({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:b,cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:v}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!r.checkoutSession){void N({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:b||"N/A",cartId:(m=window.Zonos.cartData)===null||m===void 0?void 0:m.id,cartLandedCostId:v||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}void h();T=(p=r.checkoutSession)===null||p===void 0?void 0:p.landedCost;if(!T){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,w(Object.assign(Object.assign({},r.checkoutSession),{id:I.checkoutSessionId||""}))];case 10:D.sent();void x({landedCostId:T.id});void this.applyStripeTheme();return[3,12];case 11:P=D.sent();A(P);a({messages:[L("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:L("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,l,i,a,z;return __generator(this,(function(d){switch(d.label){case 0:void((o=n.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=n.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){c=document.querySelector("zonos-link-authentication");c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});return[2]}if(!((t=n.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)){l=document.querySelector(".zonos--billing-address");l===null||l===void 0?void 0:l.scrollIntoView({behavior:"smooth"});return[2]}i=n.checkoutSettlementCurrency==="USD";if(i&&n.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;S.paypalErrorMessage=null;n.hasPaymentError=false;this.submitLoading=true;r.inventoryCheckErrorMessage=null;return[4,u()];case 1:a=d.sent();if(!a){n.hasPaymentError=true;n.customErrorMessage=L("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:n.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,y()];case 2:d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4,f({noLandedCostCheck:true})];case 4:d.sent();r.step="finish";this.confirmationId=k.landedCostShortId||((s=r.selectedLandedCost)===null||s===void 0?void 0:s.landedCostId)||null;return[2];case 5:z=d.sent();A(z);n.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;n.stripe=window.Zonos.stripe;r.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[m("clientSecret",(function(){void o.applyStripeTheme()})),j("selectedLocale",(function(){void o.applyStripeTheme()}))];R("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){p();g();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=n.clientSecret;if(n.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var l=E.appearance,i=l.logoUrl,a=l.theme;var z=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(E.organizationName," logo"),src:o}))};var d=D();var h=function(){var e;var s=new URLSearchParams(window.location.search);var n=s.get("zonosQaUrl");var l=s.get("zonosDebug");var i=(e=F.find((function(o){return o.code===T.selectedLocale})))===null||e===void 0?void 0:e.label;return t(c,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},z(),d&&t("zonos-badge",{badgeColor:"orange",size:"small"},L("Test mode")),l==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},i,t("zonos-icon",{"aria-label":"Language select",content:H,iconColor:"gray-1200"})),t("div",{class:B(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),_({content:t("zonos-text",{class:"zonos--header-title",type:"header"},k.originCompanyName?L("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:k.originCompanyName}):L("Customs charges from your recent purchase are available for payment")),isLoading:k.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};var u=function(){if(o.isOverlayLoading||n.isFetchingSession){return null}return t("div",{class:"zonos--content"},r.step!=="finish"&&r.step!=="error"&&t(c,null,(o.isMobile||o.isTablet)&&h(),t("div",{class:"zonos--left","data-theme":a},!o.isMobile&&!o.isTablet&&h(),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"})),t("zonos-collect-payment",{class:B(["zonos--collect-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),t("div",{class:"zonos--right","data-theme":a},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet})))),(r.step==="finish"||r.step==="error")&&t("div",{class:"zonos--done","data-theme":a},t("div",{class:"zonos--header"},z()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:r.step==="error"&&!!r.error?Object.assign(Object.assign({},r.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||r.step==="finish"||r.step==="error")&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet}))};return t(s,{class:B(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":a},u(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:L("Cancel"),dialogConfirmBtnText:L("Pay [orderTotal]",{orderTotal:O({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:L("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:L("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=V}}}));
|