@zonos/elements 1.3.223 → 1.3.225
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/VarianceTest-bec00ea8.js +91 -0
- package/dist/cjs/{cart-3a2a062c.js → cart-af017ac3.js} +41 -40
- package/dist/cjs/{debounce-465a4328.js → debounce-2c9f3f1e.js} +1 -1
- package/dist/cjs/{getBorderRadius-1b5e33cf.js → getBorderRadius-c7d9f676.js} +1 -1
- package/dist/cjs/{handleFetch-45f35cac.js → handleFetch-954f30e1.js} +5 -82
- package/dist/cjs/index.cjs.js +40 -37
- package/dist/cjs/{isDarkColor-428965f4.js → isDarkColor-994c38e4.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-12e7e934.js → localization-21030292.js} +82 -24
- package/dist/cjs/{paypal-a1377508.js → paypal-2b22f0f5.js} +17 -16
- package/dist/cjs/{placeTestOrder-6fcce33e.js → placeTestOrder-9cde1ca4.js} +3 -3
- package/dist/cjs/{renderFallback-39ba034b.js → renderFallback-9300dbaf.js} +8 -7
- package/dist/cjs/{translationStore-951ed4b4.js → translationStore-ce2c700d.js} +1 -1
- package/dist/cjs/{updateCheckoutSessionAttributes-c0853fdd.js → updateCheckoutSessionAttributes-a4899e90.js} +2 -2
- package/dist/cjs/zonos-address_11.cjs.entry.js +54 -33
- 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_12.cjs.entry.js +25 -25
- package/dist/cjs/zonos-checkout.cjs.entry.js +68 -67
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +8 -8
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -19
- package/dist/cjs/zonos-collect.cjs.entry.js +20 -20
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +40 -39
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +14 -14
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +12 -12
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-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 +5 -5
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-f8ee56aa.js → zonosStore-5d489c65.js} +8 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +1 -0
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/hello/localization.js +12 -9
- package/dist/collection/components/store/zonosStore.js +8 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +41 -18
- package/dist/collection/components/utils/api/getZonosSettings.js +2 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +2 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +5 -0
- package/dist/collection/components/utils/logging/sendLoadCheckoutFacadeLog.js +1 -1
- package/dist/collection/components/utils/logging/sendLoadNativeCheckoutLog.js +1 -1
- package/dist/collection/scripts/_zonosBase.js +3 -0
- package/dist/collection/types/generated/graphql.internal.types.js +3 -0
- package/dist/collection/utils/performBlurCurrency.js +50 -0
- package/dist/esm/VarianceTest-572cecf5.js +86 -0
- package/dist/esm/{cart-7f06662c.js → cart-11b87221.js} +7 -6
- package/dist/esm/{debounce-c34d1270.js → debounce-f081e4d8.js} +1 -1
- package/dist/esm/{getBorderRadius-87593ff4.js → getBorderRadius-6281d902.js} +1 -1
- package/dist/esm/{handleFetch-99218189.js → handleFetch-a844cac1.js} +2 -76
- package/dist/esm/index.js +13 -9
- package/dist/esm/{isDarkColor-1f58b6be.js → isDarkColor-83e0c27e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-192886e4.js → localization-9320a65d.js} +71 -13
- package/dist/esm/{paypal-53f1b4a1.js → paypal-338a4350.js} +7 -6
- package/dist/esm/{placeTestOrder-95cbb623.js → placeTestOrder-d28f33c2.js} +3 -3
- package/dist/esm/{renderFallback-6352363c.js → renderFallback-28ef3364.js} +5 -4
- package/dist/esm/{translationStore-fb98a08d.js → translationStore-7eebaa41.js} +1 -1
- package/dist/esm/{updateCheckoutSessionAttributes-92f42882.js → updateCheckoutSessionAttributes-160720f6.js} +2 -2
- package/dist/esm/zonos-address_11.entry.js +47 -26
- 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_12.entry.js +12 -12
- package/dist/esm/zonos-checkout.entry.js +15 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +8 -8
- package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
- package/dist/esm/zonos-collect.entry.js +10 -10
- package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +10 -9
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_4.entry.js +6 -6
- package/dist/esm/zonos-elements.js +1 -1
- 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 +6 -6
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- 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 +5 -5
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-c456b933.js → zonosStore-e3d0493a.js} +8 -2
- package/dist/esm-es5/VarianceTest-572cecf5.js +1 -0
- package/dist/esm-es5/cart-11b87221.js +1 -0
- package/dist/esm-es5/{debounce-c34d1270.js → debounce-f081e4d8.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-87593ff4.js → getBorderRadius-6281d902.js} +1 -1
- package/dist/esm-es5/handleFetch-a844cac1.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-1f58b6be.js → isDarkColor-83e0c27e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-9320a65d.js +1 -0
- package/dist/esm-es5/{paypal-53f1b4a1.js → paypal-338a4350.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-95cbb623.js → placeTestOrder-d28f33c2.js} +1 -1
- package/dist/esm-es5/renderFallback-28ef3364.js +1 -0
- package/dist/esm-es5/{translationStore-fb98a08d.js → translationStore-7eebaa41.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-92f42882.js → updateCheckoutSessionAttributes-160720f6.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_12.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-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-v-stack.entry.js +1 -1
- package/dist/esm-es5/zonosStore-e3d0493a.js +1 -0
- package/dist/scripts/blurCurrencyOnInit.js +1 -0
- package/dist/scripts/index.d.ts +38 -6
- 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/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +1 -0
- package/dist/types/scripts/_zonosBase.d.ts +8 -3
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -3
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -2
- package/dist/types/types/generated/graphql.internal.types.d.ts +13 -2
- package/dist/types/types/generated/graphql.internal.types.ts +13 -2
- package/dist/types/types/global.d.ts +8 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +8 -2
- package/dist/types/utils/performBlurCurrency.d.ts +2 -0
- package/dist/zonos-elements/base.css +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-01174496.system.js +1 -0
- package/dist/zonos-elements/p-0260fd13.js +1 -0
- package/dist/zonos-elements/{p-e970f2aa.system.entry.js → p-04c1dc63.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0a377722.js +1 -0
- package/dist/zonos-elements/p-0a92e3fd.entry.js +1 -0
- package/dist/zonos-elements/{p-8350937d.system.entry.js → p-0b6a3a09.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0d82e1fd.entry.js +1 -0
- package/dist/zonos-elements/{p-a7485913.system.js → p-0ec82d78.system.js} +2 -2
- package/dist/zonos-elements/{p-2b9c124d.js → p-0ffd710e.js} +1 -1
- package/dist/zonos-elements/p-112c6453.system.js +1 -0
- package/dist/zonos-elements/{p-62fa680d.system.js → p-182da73f.system.js} +1 -1
- package/dist/zonos-elements/p-1868a283.entry.js +1 -0
- package/dist/zonos-elements/{p-ba18c5f5.system.entry.js → p-1a67ae71.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-520bd291.system.entry.js → p-1b9cc0e2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1c5ba523.js +1 -0
- package/dist/zonos-elements/p-1ef793d0.entry.js +1 -0
- package/dist/zonos-elements/{p-0ed63ce0.system.js → p-23c46dfa.system.js} +1 -1
- package/dist/zonos-elements/{p-e7f8595f.system.js → p-24e26a2c.system.js} +1 -1
- package/dist/zonos-elements/p-252fa1da.entry.js +1 -0
- package/dist/zonos-elements/{p-53b46925.entry.js → p-2616ba72.entry.js} +1 -1
- package/dist/zonos-elements/p-2657f099.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7d2d2c94.entry.js → p-2dc38ef3.entry.js} +1 -1
- package/dist/zonos-elements/{p-12ce9746.system.entry.js → p-360d7101.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19f25feb.system.entry.js → p-375994d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee6f8c02.system.entry.js → p-38f42f10.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4637f365.system.entry.js → p-4004c838.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41dd1cb8.js +1 -0
- package/dist/zonos-elements/{p-e63b8b24.system.js → p-433d76b4.system.js} +1 -1
- package/dist/zonos-elements/{p-a77ed1b9.entry.js → p-4523b982.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc27467b.entry.js → p-4ce3489a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a61a9b65.system.entry.js → p-4da7b6a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b56e345.js → p-4dfe97ad.js} +2 -2
- package/dist/zonos-elements/{p-cd1ebef9.system.js → p-57413c34.system.js} +1 -1
- package/dist/zonos-elements/p-5c43ecdf.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9fdd3264.system.entry.js → p-5f7a9b69.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6092af05.entry.js +1 -0
- package/dist/zonos-elements/{p-9b062dfb.entry.js → p-67787bd4.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c4e7651.entry.js → p-6bab9096.entry.js} +1 -1
- package/dist/zonos-elements/p-6d423364.entry.js +1 -0
- package/dist/zonos-elements/p-725605f6.system.js +1 -0
- package/dist/zonos-elements/p-7af39c98.js +1 -0
- package/dist/zonos-elements/{p-7f7abdf2.system.entry.js → p-7cee0e68.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7eb8e2d4.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-820ad058.js +1 -0
- package/dist/zonos-elements/{p-5e3d2bd2.system.entry.js → p-873b6185.system.entry.js} +1 -1
- package/dist/zonos-elements/p-89c5164b.system.js +1 -0
- package/dist/zonos-elements/p-9a09dad4.entry.js +1 -0
- package/dist/zonos-elements/{p-245f6ad4.system.entry.js → p-9e03a145.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0ae53ff0.js → p-a199bb13.js} +1 -1
- package/dist/zonos-elements/p-ae3e4f2b.entry.js +1 -0
- package/dist/zonos-elements/{p-567f7de7.entry.js → p-b4bf2f03.entry.js} +1 -1
- package/dist/zonos-elements/p-b5b3f908.system.js +1 -0
- package/dist/zonos-elements/{p-a5b0a636.entry.js → p-b658c28a.entry.js} +1 -1
- package/dist/zonos-elements/{p-de626806.system.entry.js → p-b6ef4a5e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4f8563ad.system.entry.js → p-b91df44b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8accbef.system.entry.js → p-ba334962.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bccd49d7.system.entry.js +1 -0
- package/dist/zonos-elements/p-bdeb20cb.js +1 -0
- package/dist/zonos-elements/{p-a95d2034.system.entry.js → p-bfc0fc85.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4b3c878.entry.js → p-c81f6387.entry.js} +1 -1
- package/dist/zonos-elements/{p-efa6203f.entry.js → p-c998e4ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-9396059b.entry.js → p-cb0e6468.entry.js} +1 -1
- package/dist/zonos-elements/{p-421dfb66.system.entry.js → p-cb11d11b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cc599cd9.entry.js +1 -0
- package/dist/zonos-elements/{p-14f9bc8c.entry.js → p-d2f7ea09.entry.js} +1 -1
- package/dist/zonos-elements/{p-0c0fda23.js → p-d42b5113.js} +1 -1
- package/dist/zonos-elements/{p-00423fa0.system.js → p-d531b524.system.js} +1 -1
- package/dist/zonos-elements/p-d938f42f.system.js +1 -0
- package/dist/zonos-elements/{p-f4fa8720.entry.js → p-d96545ae.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb6a35ce.system.entry.js → p-dc56b469.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dde6f7fd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-45d288d0.system.entry.js → p-e00e5d64.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8194fcd8.entry.js → p-e60b988c.entry.js} +1 -1
- package/dist/zonos-elements/{p-56e0ed65.js → p-e688e493.js} +1 -1
- package/dist/zonos-elements/p-e9ecb07e.system.js +1 -0
- package/dist/zonos-elements/{p-295d9c07.system.entry.js → p-f548807d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7b05da2.entry.js → p-f912e9c3.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/VarianceTest-0cb1e118.js +0 -12
- package/dist/esm/VarianceTest-fef2d958.js +0 -10
- package/dist/esm-es5/VarianceTest-fef2d958.js +0 -1
- package/dist/esm-es5/cart-7f06662c.js +0 -1
- package/dist/esm-es5/handleFetch-99218189.js +0 -1
- package/dist/esm-es5/localization-192886e4.js +0 -1
- package/dist/esm-es5/renderFallback-6352363c.js +0 -1
- package/dist/esm-es5/zonosStore-c456b933.js +0 -1
- package/dist/zonos-elements/p-04a01cb1.js +0 -1
- package/dist/zonos-elements/p-062430f9.system.js +0 -1
- package/dist/zonos-elements/p-0e28207a.js +0 -1
- package/dist/zonos-elements/p-1cd1da90.system.js +0 -1
- package/dist/zonos-elements/p-2131fa8b.entry.js +0 -1
- package/dist/zonos-elements/p-30432622.system.entry.js +0 -1
- package/dist/zonos-elements/p-366ea017.entry.js +0 -1
- package/dist/zonos-elements/p-3f3c92db.system.entry.js +0 -1
- package/dist/zonos-elements/p-4a3abbf2.js +0 -1
- package/dist/zonos-elements/p-4d9ad3b1.system.entry.js +0 -1
- package/dist/zonos-elements/p-4dcbbd60.js +0 -1
- package/dist/zonos-elements/p-5a2dd041.system.js +0 -1
- package/dist/zonos-elements/p-640a6898.system.js +0 -1
- package/dist/zonos-elements/p-6afbbe66.entry.js +0 -1
- package/dist/zonos-elements/p-6cfe66fe.entry.js +0 -1
- package/dist/zonos-elements/p-6f6573a5.system.js +0 -1
- package/dist/zonos-elements/p-7ce093aa.js +0 -1
- package/dist/zonos-elements/p-9d863a3b.system.js +0 -1
- package/dist/zonos-elements/p-a435931e.system.entry.js +0 -1
- package/dist/zonos-elements/p-a8a312b2.js +0 -1
- package/dist/zonos-elements/p-a9b3cfe1.entry.js +0 -1
- package/dist/zonos-elements/p-abcefd25.entry.js +0 -1
- package/dist/zonos-elements/p-b76db2ac.js +0 -1
- package/dist/zonos-elements/p-bbf48b31.entry.js +0 -1
- package/dist/zonos-elements/p-bdf183a3.entry.js +0 -1
- package/dist/zonos-elements/p-d1b415cd.entry.js +0 -1
- package/dist/zonos-elements/p-d2098bef.entry.js +0 -1
- package/dist/zonos-elements/p-da200c19.system.js +0 -1
- package/dist/zonos-elements/p-df0cbde4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function s(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,a){function i(t){try{c(e.next(t))}catch(t){a(t)}}function r(t){try{c(e["throw"](t))}catch(t){a(t)}}function c(t){t.done?o(t.value):s(t.value).then(i,r)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},e,s,a,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(n){return c([t,n])}}function c(r){if(e)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(o=0)),o)try{if(e=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(r[0]===6&&o.label<a[1]){o.label=a[1];a=r;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(r);break}if(a[2])o.ops.pop();o.trys.pop();continue}r=n.call(t,o)}catch(t){r=[6,t];s=0}finally{e=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,o){if(o||arguments.length===2)for(var e=0,s=n.length,a;e<s;e++){if(a||!(e in n)){if(!a)a=Array.prototype.slice.call(n,0,e);a[e]=n[e]}}return t.concat(a||Array.prototype.slice.call(n))};System.register(["./p-5fc34563.system.js","./p-9d863a3b.system.js","./p-23e7c655.system.js","./p-e63b8b24.system.js","./p-6f6573a5.system.js","./p-640a6898.system.js","./p-062430f9.system.js","./p-a7485913.system.js","./p-5a2dd041.system.js","./p-62fa680d.system.js","./p-e7f8595f.system.js"],(function(t){"use strict";var n,o,e,s,a,i,r,c,h,l,p,f,y,m,u;return{setters:[function(t){n=t.r;o=t.h;e=t.H;s=t.a;a=t.c},function(t){i=t.f},function(t){r=t.c},function(t){c=t.g},function(t){h=t.c;l=t.t},function(t){p=t.s},function(t){f=t.b;y=t.l},function(t){m=t.d;u=t.e},function(){},function(){},function(){}],execute:function(){var d='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var z='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var g=":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;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";var x=g;var b=t("zonos_empty_state_payment",function(){function t(t){n(this,t);this.theme="LIGHT"}t.prototype.render=function(){if(!this.el.shadowRoot){return null}if(this.theme==="DARK"){this.el.shadowRoot.innerHTML=d}else{this.el.shadowRoot.innerHTML=z}return o(e,{class:"zonos--elements",style:{"--zonos--font-family":i(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());b.style=x;var w=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var k=w;var v=t("zonos_notification",function(){function t(t){n(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o;var e=this;return __generator(this,(function(s){n="id-".concat(Math.random().toString(36).substring(2,9));o=Object.assign(Object.assign({},t),{id:n,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[o],false);setTimeout((function(){e.updateTransitionClass({id:n,transitionClass:"show"})}),50);setTimeout((function(){e.removeNotification(n)}),o.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var n=t.id,o=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===n){return Object.assign(Object.assign({},t),{transitionClass:o})}return t}))};t.prototype.removeNotification=function(t){var n=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){n.notificationArray=n.notificationArray.filter((function(n){return n.id!==t}))}),300)};t.prototype.render=function(){var t=this;return o(e,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:r(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":c(),"--zonos--font-family":i()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(n){return o("div",{"aria-hidden":"true",class:r(["zonos--notification-item",n.type,n.transitionClass]),key:n.id,onClick:function(){t.removeNotification(n.id)}},o("zonos-text",{textColor:"gray-0"},n.message))}))))};return t}());v.style=k;var _=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var I=_;var j=t("zonos_payment",function(){function t(t){n(this,t);this.stripe=h.stripe;this.stripeElements=h.stripeElements;this.isPaymentInfoFilled=false;this.trackingSent=false}t.prototype.watchIsPaymentInfoFilled=function(){var t;if(this.isPaymentInfoFilled&&!this.trackingSent){var n=p.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:(t=h.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.trackingSent=true}};t.prototype.watchInitStripe=function(){var t=this;var n;if(!this.stripeElements){return}var o=h.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:(n=h.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country}}},layout:"tabs"});var e=this.el.querySelector(".zonos--payment-component");if(!e){f("Cannot find container element for paymentElement");return}o.mount(e);o.on("change",(function(n){if(n.complete){t.isPaymentInfoFilled=true}h.stripePaymentEventData=n}));h.stripePaymentElement=o};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return o(e,{key:"c0b27f25785a9f6de2705e16d97f1bf5f7bcb0a4",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"1cfdb16f94a5219882da9da013a6e2de6a6b3c3f",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"bb5ac07b4c32f2469f4825426160542d9729d332",class:"zonos--payment-component"}),o("div",{key:"34f805b56fa151e8a3102361df9fb8b3e636dc75",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());j.style=I;var S=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var O=S;var C=t("zonos_paypal_payment",function(){function t(t){n(this,t);this.paypalSessionDone=a(this,"paypalSessionDone",7);this.paypalSessionFail=a(this,"paypalSessionFail",7);this.storeUnsubscribeList=[]}t.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var o=this;return __generator(this,(function(e){if(!window.Zonos.paypal){y("Paypal is not available");return[2]}t=m({onPaypalFail:function(){y("onPaypalFail");o.paypalSessionFail.emit()},onPaypalSessionDone:function(t){var n=t.orderId;y("onPaypalSessionDone","info",{orderId:n});o.paypalSessionDone.emit({orderId:n})}});if(!(t===null||t===void 0?void 0:t.length)){y("There are no paypal buttons available");return[2]}n=this.el.querySelector(".zonos--payment-paypal-container");if(!n){y("Cannot find container element for paypal buttons");return[2]}t.forEach((function(t){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,t.render(n)];case 1:o.sent();return[2]}}))}))}));return[2]}))}))};t.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[u("paypal",this.loadPaypal.bind(this))]};t.prototype.componentDidLoad=function(){void this.loadPaypal()};t.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(t){return t()}))};t.prototype.render=function(){return o(e,{key:"bcf11ef0ceab1d847c237ec26ec604440983c16f",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"ce5033f39b2e9644e30fc1e0e35f64e5d9b9730d",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());C.style=O}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function s(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,a){function i(t){try{c(e.next(t))}catch(t){a(t)}}function r(t){try{c(e["throw"](t))}catch(t){a(t)}}function c(t){t.done?o(t.value):s(t.value).then(i,r)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},e,s,a,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(n){return c([t,n])}}function c(r){if(e)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(o=0)),o)try{if(e=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(r[0]===6&&o.label<a[1]){o.label=a[1];a=r;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(r);break}if(a[2])o.ops.pop();o.trys.pop();continue}r=n.call(t,o)}catch(t){r=[6,t];s=0}finally{e=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,o){if(o||arguments.length===2)for(var e=0,s=n.length,a;e<s;e++){if(a||!(e in n)){if(!a)a=Array.prototype.slice.call(n,0,e);a[e]=n[e]}}return t.concat(a||Array.prototype.slice.call(n))};System.register(["./p-5fc34563.system.js","./p-89c5164b.system.js","./p-23e7c655.system.js","./p-433d76b4.system.js","./p-725605f6.system.js","./p-b5b3f908.system.js","./p-01174496.system.js","./p-0ec82d78.system.js","./p-d938f42f.system.js","./p-182da73f.system.js","./p-24e26a2c.system.js"],(function(t){"use strict";var n,o,e,s,a,i,r,c,h,l,p,f,y,m,u;return{setters:[function(t){n=t.r;o=t.h;e=t.H;s=t.a;a=t.c},function(t){i=t.f},function(t){r=t.c},function(t){c=t.g},function(t){h=t.c;l=t.t},function(t){p=t.s},function(t){f=t.l},function(t){y=t.d;m=t.e},function(t){u=t.l},function(){},function(){}],execute:function(){var d='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var z='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var g=":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;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";var b=g;var x=t("zonos_empty_state_payment",function(){function t(t){n(this,t);this.theme="LIGHT"}t.prototype.render=function(){if(!this.el.shadowRoot){return null}if(this.theme==="DARK"){this.el.shadowRoot.innerHTML=d}else{this.el.shadowRoot.innerHTML=z}return o(e,{class:"zonos--elements",style:{"--zonos--font-family":i(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());x.style=b;var w=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var k=w;var v=t("zonos_notification",function(){function t(t){n(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o;var e=this;return __generator(this,(function(s){n="id-".concat(Math.random().toString(36).substring(2,9));o=Object.assign(Object.assign({},t),{id:n,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[o],false);setTimeout((function(){e.updateTransitionClass({id:n,transitionClass:"show"})}),50);setTimeout((function(){e.removeNotification(n)}),o.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var n=t.id,o=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===n){return Object.assign(Object.assign({},t),{transitionClass:o})}return t}))};t.prototype.removeNotification=function(t){var n=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){n.notificationArray=n.notificationArray.filter((function(n){return n.id!==t}))}),300)};t.prototype.render=function(){var t=this;return o(e,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:r(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":c(),"--zonos--font-family":i()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(n){return o("div",{"aria-hidden":"true",class:r(["zonos--notification-item",n.type,n.transitionClass]),key:n.id,onClick:function(){t.removeNotification(n.id)}},o("zonos-text",{textColor:"gray-0"},n.message))}))))};return t}());v.style=k;var _=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var I=_;var j=t("zonos_payment",function(){function t(t){n(this,t);this.stripe=h.stripe;this.stripeElements=h.stripeElements;this.isPaymentInfoFilled=false;this.trackingSent=false}t.prototype.watchIsPaymentInfoFilled=function(){var t;if(this.isPaymentInfoFilled&&!this.trackingSent){var n=p.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:(t=h.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.trackingSent=true}};t.prototype.watchInitStripe=function(){var t=this;var n;if(!this.stripeElements){return}var o=h.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:(n=h.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country}}},layout:"tabs"});var e=this.el.querySelector(".zonos--payment-component");if(!e){f("Cannot find container element for paymentElement");return}o.mount(e);o.on("change",(function(n){if(n.complete){t.isPaymentInfoFilled=true}h.stripePaymentEventData=n}));h.stripePaymentElement=o};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return o(e,{key:"c0b27f25785a9f6de2705e16d97f1bf5f7bcb0a4",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"1cfdb16f94a5219882da9da013a6e2de6a6b3c3f",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"bb5ac07b4c32f2469f4825426160542d9729d332",class:"zonos--payment-component"}),o("div",{key:"34f805b56fa151e8a3102361df9fb8b3e636dc75",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());j.style=I;var S=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var O=S;var C=t("zonos_paypal_payment",function(){function t(t){n(this,t);this.paypalSessionDone=a(this,"paypalSessionDone",7);this.paypalSessionFail=a(this,"paypalSessionFail",7);this.storeUnsubscribeList=[]}t.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var o=this;return __generator(this,(function(e){if(!window.Zonos.paypal){u("Paypal is not available");return[2]}t=y({onPaypalFail:function(){u("onPaypalFail");o.paypalSessionFail.emit()},onPaypalSessionDone:function(t){var n=t.orderId;u("onPaypalSessionDone","info",{orderId:n});o.paypalSessionDone.emit({orderId:n})}});if(!(t===null||t===void 0?void 0:t.length)){u("There are no paypal buttons available");return[2]}n=this.el.querySelector(".zonos--payment-paypal-container");if(!n){u("Cannot find container element for paypal buttons");return[2]}t.forEach((function(t){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,t.render(n)];case 1:o.sent();return[2]}}))}))}));return[2]}))}))};t.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("paypal",this.loadPaypal.bind(this))]};t.prototype.componentDidLoad=function(){void this.loadPaypal()};t.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(t){return t()}))};t.prototype.render=function(){return o(e,{key:"bcf11ef0ceab1d847c237ec26ec604440983c16f",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"ce5033f39b2e9644e30fc1e0e35f64e5d9b9730d",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());C.style=O}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o}from"./p-0a377722.js";const e=(e,...n)=>{o(e,"error",...n)},n=()=>window.location.search.includes("zonosStagingMode=1"),t=()=>{var o;return(null===(o=window.Zonos.zonosApiKey)||void 0===o?void 0:o.includes("test"))||window.location.search.includes("zonosTestMode=1")},r=["cloudflare","vercel"],s=r[0],a={cloudflare:"https://route.elements.zonos.com",vercel:"https://route.js.zonos.com"},i=a[s],l=(o=s)=>{const e=r.indexOf(o);return r[e+1]||null},d=o=>{if("string"==typeof o)try{return JSON.parse(o)}catch(o){return null}return null},c=o=>o||window.innerWidth<890,w=()=>{const o="userAgentData"in window.navigator?window.navigator.userAgentData:null,e=(()=>{const o="connection"in window.navigator?window.navigator.connection:null,e="mozConnection"in window.navigator?window.navigator.mozConnection:null,n="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return o||e||n})();return{connectionDownlink:null==e?void 0:e.downlink,connectionEffectiveType:null==e?void 0:e.effectiveType,connectionRtt:null==e?void 0:e.rtt,connectionSaveData:null==e?void 0:e.saveData,isHostedCheckout:window.Zonos.isLegacyCheckout,screenHeight:window.screen.height,screenWidth:window.innerWidth,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}},u=["/api/zonos-elements/log-script-load","/api/zonos-elements/log-bulk-load-data"],p=async({endpoint:e,errors:n,metadata:t,shouldPostReleaseErrorReporting:r})=>{if(o("sendErrorLog","warn",e,t,n),r){const o=Number(window.Zonos.releaseDate);if((new Date).getTime()-o>36e5)return}const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,d={endpoint:e,errors:n,href:window.location.href,metadata:Object.assign({appVersion:window.Zonos.version,domain:window.Zonos.domain,publicCredential:window.Zonos.zonosApiKey,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},t)};try{fetch(`${i}/api/zonos-elements/log-error`,{body:JSON.stringify(d),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(o){const e=l();if(!e)return;fetch(`${a[e]}/api/zonos-elements/log-error`,{body:JSON.stringify(d),method:"POST"})}};var h=function(o,e){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&e.indexOf(t)<0&&(n[t]=o[t]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(o);r<t.length;r++)e.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(o,t[r])&&(n[t[r]]=o[t[r]])}return n};const m=async({response:o,shouldLog:e=!0,shouldThrow:n=!1})=>{try{const e=await o.text(),n=d(e);if(!n)throw new Error(`Failed to parse content: ${e}`);return n}catch(o){if(n)throw o;return e&&console.error(o),null}},b=async({basePathType:e,options:n,path:t})=>{var r,i;const f=t.startsWith("/api/bigcommerce")?"vercel":e,y=performance.now(),g=await(async({basePathType:o,options:e,path:n})=>{let t;const r=window.Zonos.zonosQaUrlApi||a[o]||s,i=new URL(r+n),l=window.Zonos.cartId?`${window.location.hostname}-${window.Zonos.cartId}`:window.location.hostname;i.searchParams.set("zToken",(o=>{try{return btoa(o).replace(/=/g,"")}catch(e){return o.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(l));try{t=await fetch(i.toString(),e)}catch(o){return o instanceof Error?{baseUrl:r,errors:[{message:o.message,type:"unknown"}],json:null,response:null,zonosMode:null}:{baseUrl:r,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const d=t.headers.get("Zonos-Mode"),c=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&d&&c&&(window.Zonos.modeAlerted=!0),t.ok)return{baseUrl:r,errors:[],json:await m({response:t}),response:t,zonosMode:d};const w=t.status.toString();try{const o=await m({response:t,shouldThrow:!0});return o&&"errors"in o&&Array.isArray(o.errors)?{baseUrl:r,errors:o.errors.map((o=>"string"==typeof o?{message:o,type:w}:o)),json:null,response:t,zonosMode:d}:{baseUrl:r,errors:[{message:JSON.stringify(o),type:w}],json:null,response:t,zonosMode:d}}catch(o){return{baseUrl:r,errors:[{message:`${w}: Unknown error`,type:w}],json:null,response:null,zonosMode:d}}})({basePathType:f,options:n,path:t}),{errors:v,response:T}=g,j=h(g,["errors","response"]),z=performance.now()-y;o(`${t} (${z.toFixed(2)}ms)`,"info");const O=null==T?void 0:T.headers.get("Zonos-Duration");200===(null==T?void 0:T.status)&&(({apiPath:o,apiType:e,loadTimeInternal:n,loadTimeTotal:t})=>{if(u.includes(o))return;const r=t-n;if(r<0)return;const s=o.split("?")[0]||o,a=w(),i={apiType:e,connectionType:a.connectionEffectiveType,href:s,isHostedCheckout:window.Zonos.isLegacyCheckout,isMobile:c("object"==typeof a.userAgent&&a.userAgent.mobile),loadTimeBrowserApi:r,loadTimeInternal:n,loadTimeTotal:t,metadata:Object.assign({},a),screenHeight:a.screenHeight,screenWidth:a.screenWidth,userAgent:"string"==typeof a.userAgent?a.userAgent:a.userAgent.brands.map((o=>o.brand)).filter((o=>!/Not.*A.*Brand.*/.test(o))).join(",")};window.Zonos.loadTimeApiInfoList.push(i)})({apiPath:t,apiType:f,loadTimeInternal:O?Number(O):0,loadTimeTotal:z});const k=l(f),P=v.find((({type:o})=>"unknown"===o)),A=v.find((({message:o})=>"string"==typeof o&&(o.includes("signal is aborted")||o.includes("The operation was aborted")||o.includes("Fetch is aborted")))),M=!!P||404===(null==T?void 0:T.status)||500===(null==T?void 0:T.status),S=k&&M;return M&&!A&&p({endpoint:a[f]+t,errors:v.map((({message:o})=>`API: ${o}`)),metadata:{currentBasePath:f,nextFallbackApiType:k,requestHeaders:null==n?void 0:n.headers,requestPayload:d(null===(r=null==n?void 0:n.body)||void 0===r?void 0:r.toString())||(null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.toString()),shouldCallFallback:S,status:null==T?void 0:T.status,statusText:null==T?void 0:T.statusText},shouldPostReleaseErrorReporting:!0}),S?(o(`=== "${t}" failed to fetch, trying next fallback ${k}`),b({basePathType:k,options:n,path:t})):Object.assign({errors:v,response:T},j)},f=async(o,e)=>{const r=h(e||{},[]),a=r.body?JSON.stringify(r.body):void 0,i=r.method||"GET",l=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Staging-Mode":n()?"1":void 0,"Zonos-Test-Mode":t()?"1":void 0,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},r.headers);Object.keys(l).forEach((o=>void 0===l[o]&&delete l[o]));const d=Object.assign(Object.assign({},r),{body:"GET"===i?void 0:a,headers:l,method:i}),c=new URLSearchParams(window.location.search).get("useFallbackApi");return b({basePathType:c||s,options:d,path:o})};export{n as a,w as b,a as f,t as g,f as h,c as i,d as j,e as l,p as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-89c5164b.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.z}],execute:function(){var r=t("g",(function(t){var r=(t===null||t===void 0?void 0:t.customRoundRadius)||"10px";var e=t===null||t===void 0?void 0:t.overrideBorderStyle;if(e){return e==="SHARP"?"0px":r}return n.appearance.style==="SHARP"?"0px":r}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,H as e,a as s}from"./p-b30c2ad9.js";import{z as n,f as r}from"./p-7ce093aa.js";import{i as a,a as i}from"./p-eef5b0cc.js";import{c as d}from"./p-b4b7f705.js";import{g as l}from"./p-2b9c124d.js";import{i as h}from"./p-ae393255.js";import{i as c}from"./p-56e0ed65.js";import{s as b}from"./p-96d77739.js";import"./p-04a01cb1.js";const u=class{constructor(t){o(this,t),this.inheritedAttributes={},this.isDisabled=!1,this.icon=null,this.iconRight=!1,this.size="sm",this.variant="standard",this.noBackground=!1,this.withBoxShadow=!1,this.noPaddingLeft=!1,this.noPaddingRight=!1,this.loading=!1,this.justifyContent="center",this.bold=!1,this.hasIcon=!!this.icon,this.hasContent=!1,this.handleSlotChange=()=>{this.hasContent=!0},this.getColorVarProperty=o=>o.replace("var(","").replace(")",""),this.getButtonStyle=()=>{const o=this.variant||"standard",t=this.buttonColor&&h(this.buttonColor)?`var(--zonos-elements-${this.buttonColor})`:this.buttonColor,e=window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(t||""))||t||"",s=!c(window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-gray-0")),r=!c(e),a=s&&!r||!s&&r;if("subtle"===o)return{color:t,useDarkHoverSubtle:a};{const o=(this.backgroundColor&&h(this.backgroundColor)?`var(--zonos-elements-${this.backgroundColor})`:this.backgroundColor)||n.appearance.colorSecondary,e=o&&h(this.getColorVarProperty(o))?window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(o)):o;return{backgroundColor:o,color:"subtle"!==this.variant&&e&&c(e)?"white":t,spinnerColor:e&&c(e)?"white":"black",useDarkHoverSubtle:a}}}}iconChangeHandler(){this.hasIcon=!!this.icon}clickHandler(o){(this.loading||this.isDisabled)&&(o.preventDefault(),o.stopPropagation())}componentWillLoad(){this.iconChangeHandler(),this.inheritedAttributes=Object.assign(Object.assign({},a(this.ele)),i(this.ele,["tabindex","title","data-form-type","dir"]))}render(){const{backgroundColor:o,color:s,spinnerColor:a,useDarkHoverSubtle:i}=this.getButtonStyle(),u=this.loading||this.isDisabled,g=this.variant||"standard",m="standard"===g?(o=>{const t=o||n.appearance.colorSecondary,e=t&&h(t)?`var(--zonos-elements-${t})`:t;return e&&c(e)?"DARK":"LIGHT"})(o):void 0,v=l({overrideBorderStyle:this.borderStyle});return t(e,{key:"d44e5db9b123906c2435285d23d0d05b6c15d8b3",class:d(["zonos--elements"]),"data-theme":this.theme||m,disabled:u,style:b({"--zonos--background-color":o,"--zonos--border-radius":v,"--zonos--color":s,"--zonos--font-family":r(),"--zonos--font-weight":this.bold?"bold":"normal"})},t("button",Object.assign({key:"a937efb3d014fd8f5501fcde7c3c2f0cb33439aa"},this.inheritedAttributes,{class:d([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",this.withBoxShadow&&"with-box-shadow",i&&"dark-hover-subtle",g,this.size,o&&"standard"===g&&"override-background"]),disabled:u,style:{justifyContent:this.justifyContent}}),this.loading&&t("div",{key:"09292867f621fd3e04313494809e59254a353403",class:"zonos--spinner-wrapper"},t("zonos-spinner",{key:"250912ac9cc2ba4d9d5db8fdc67fa6009d5ea7ac",size:16,spinnerColor:a})),!this.loading&&!this.iconRight&&this.icon,t("slot",{key:"0695250725aff37526e6ea4f94456a368b873c59",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))}static get delegatesFocus(){return!0}get ele(){return s(this)}static get watchers(){return{icon:["iconChangeHandler"]}}};u.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;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--zonos-elements-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--zonos-elements-surface-color);border:none;outline:1px solid var(--zonos-elements-surface-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-weight:var(--zonos--font-weight, 500);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--zonos--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--zonos--color, var(--zonos-elements-gray-1000));margin:1px;}:host button:not([disabled]):hover{background-image:var(--zonos-elements-button-standard-hover)}:host button:not([disabled]):active{background:var(--zonos-elements-gray-700)}:host button:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button.with-box-shadow{-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard)}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--zonos-elements-size-sm);line-height:var(--zonos-elements-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--zonos-elements-size-md);line-height:var(--zonos-elements-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--zonos-elements-size-lg);line-height:var(--zonos-elements-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--zonos-elements-font-size-s)}}:host button.override-background{background-color:var(--zonos--background-color, var(--zonos-elements-gray-0));color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:1px solid var(--zonos--background-color, var(--zonos-elements-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--zonos-elements-blue-600);outline:1px solid var(--zonos-elements-blue-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--zonos-elements-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--zonos-elements-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-600)}:host button:not(.override-background).success{background:var(--zonos-elements-green-600);outline:1px solid var(--zonos-elements-green-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--zonos-elements-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--zonos-elements-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--zonos-elements-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-green-400)}:host button:not(.override-background).danger{background:var(--zonos-elements-red-600);outline:1px solid var(--zonos-elements-red-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--zonos-elements-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--zonos-elements-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--zonos-elements-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-red-400)}:host button:not(.override-background).warning{background:var(--zonos-elements-orange-600);outline:1px solid var(--zonos-elements-orange-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--zonos-elements-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--zonos-elements-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--zonos-elements-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:rgba(0, 0, 0, 0.1)}:host button:not(.override-background).subtle:not([disabled]):active{background:rgba(0, 0, 0, 0.2)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--zonos-elements-button-focus-ring);box-shadow:var(--zonos-elements-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--zonos-elements-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--zonos-elements-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--zonos-elements-radius-4);width:24px}";const g=class{constructor(t){o(this,t),this.autoHeight=!1,this.iconColor="gray-1000",this.size=24}render(){if(!this.content||!this.el.shadowRoot)return null;const o=h(this.iconColor)?`var(--zonos-elements-${this.iconColor})`:this.iconColor;return this.el.shadowRoot.innerHTML=this.content,t(e,{class:"zonos--elements",style:{"--zonos--color":o,"--zonos--font-family":r(),"--zonos--height":this.autoHeight?"auto":`${this.size}px`,"--zonos--width":`${this.size}px`}})}get el(){return s(this)}};g.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--width);height:var(--zonos--height);fill:var(--zonos--color);color:var(--zonos--color)}";const m=class{constructor(t){o(this,t),this.size=32}render(){return this.el.shadowRoot?t(e,{class:d(["zonos--elements",this.spinnerColor]),style:{"--zonos--size":`${this.size}px`}},t("svg",{viewBox:"0 0 50 50"},t("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),t("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}))):null}get el(){return s(this)}};m.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--zonos--size);height:var(--zonos--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--size);height:var(--zonos--size);stroke:var(--zonos-elements-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--zonos-elements-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--zonos-elements-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--zonos-elements-spinner-track-black)}:host(.white) circle{stroke:var(--zonos-elements-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--zonos-elements-spinner-track-white)}:host(.info) circle{stroke:var(--zonos-elements-blue-600)}:host(.info) circle.track{stroke:var(--zonos-elements-blue-100)}:host(.success) circle{stroke:var(--zonos-elements-green-600)}:host(.success) circle.track{stroke:var(--zonos-elements-green-100)}:host(.danger) circle{stroke:var(--zonos-elements-red-600)}:host(.danger) circle.track{stroke:var(--zonos-elements-red-100)}:host(.warning) circle{stroke:var(--zonos-elements-orange-600)}:host(.warning) circle.track{stroke:var(--zonos-elements-orange-100)}";export{u as zonos_button,g as zonos_icon,m as zonos_spinner}
|
|
1
|
+
import{r as o,h as t,H as e,a as s}from"./p-b30c2ad9.js";import{z as n,f as r}from"./p-7af39c98.js";import{i as a,a as i}from"./p-eef5b0cc.js";import{c as d}from"./p-b4b7f705.js";import{g as l}from"./p-0ffd710e.js";import{i as h}from"./p-ae393255.js";import{i as c}from"./p-e688e493.js";import{s as b}from"./p-96d77739.js";import"./p-0a377722.js";const u=class{constructor(t){o(this,t),this.inheritedAttributes={},this.isDisabled=!1,this.icon=null,this.iconRight=!1,this.size="sm",this.variant="standard",this.noBackground=!1,this.withBoxShadow=!1,this.noPaddingLeft=!1,this.noPaddingRight=!1,this.loading=!1,this.justifyContent="center",this.bold=!1,this.hasIcon=!!this.icon,this.hasContent=!1,this.handleSlotChange=()=>{this.hasContent=!0},this.getColorVarProperty=o=>o.replace("var(","").replace(")",""),this.getButtonStyle=()=>{const o=this.variant||"standard",t=this.buttonColor&&h(this.buttonColor)?`var(--zonos-elements-${this.buttonColor})`:this.buttonColor,e=window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(t||""))||t||"",s=!c(window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-gray-0")),r=!c(e),a=s&&!r||!s&&r;if("subtle"===o)return{color:t,useDarkHoverSubtle:a};{const o=(this.backgroundColor&&h(this.backgroundColor)?`var(--zonos-elements-${this.backgroundColor})`:this.backgroundColor)||n.appearance.colorSecondary,e=o&&h(this.getColorVarProperty(o))?window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(o)):o;return{backgroundColor:o,color:"subtle"!==this.variant&&e&&c(e)?"white":t,spinnerColor:e&&c(e)?"white":"black",useDarkHoverSubtle:a}}}}iconChangeHandler(){this.hasIcon=!!this.icon}clickHandler(o){(this.loading||this.isDisabled)&&(o.preventDefault(),o.stopPropagation())}componentWillLoad(){this.iconChangeHandler(),this.inheritedAttributes=Object.assign(Object.assign({},a(this.ele)),i(this.ele,["tabindex","title","data-form-type","dir"]))}render(){const{backgroundColor:o,color:s,spinnerColor:a,useDarkHoverSubtle:i}=this.getButtonStyle(),u=this.loading||this.isDisabled,g=this.variant||"standard",m="standard"===g?(o=>{const t=o||n.appearance.colorSecondary,e=t&&h(t)?`var(--zonos-elements-${t})`:t;return e&&c(e)?"DARK":"LIGHT"})(o):void 0,v=l({overrideBorderStyle:this.borderStyle});return t(e,{key:"d44e5db9b123906c2435285d23d0d05b6c15d8b3",class:d(["zonos--elements"]),"data-theme":this.theme||m,disabled:u,style:b({"--zonos--background-color":o,"--zonos--border-radius":v,"--zonos--color":s,"--zonos--font-family":r(),"--zonos--font-weight":this.bold?"bold":"normal"})},t("button",Object.assign({key:"a937efb3d014fd8f5501fcde7c3c2f0cb33439aa"},this.inheritedAttributes,{class:d([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",this.withBoxShadow&&"with-box-shadow",i&&"dark-hover-subtle",g,this.size,o&&"standard"===g&&"override-background"]),disabled:u,style:{justifyContent:this.justifyContent}}),this.loading&&t("div",{key:"09292867f621fd3e04313494809e59254a353403",class:"zonos--spinner-wrapper"},t("zonos-spinner",{key:"250912ac9cc2ba4d9d5db8fdc67fa6009d5ea7ac",size:16,spinnerColor:a})),!this.loading&&!this.iconRight&&this.icon,t("slot",{key:"0695250725aff37526e6ea4f94456a368b873c59",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))}static get delegatesFocus(){return!0}get ele(){return s(this)}static get watchers(){return{icon:["iconChangeHandler"]}}};u.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;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--zonos-elements-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--zonos-elements-surface-color);border:none;outline:1px solid var(--zonos-elements-surface-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-weight:var(--zonos--font-weight, 500);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--zonos--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--zonos--color, var(--zonos-elements-gray-1000));margin:1px;}:host button:not([disabled]):hover{background-image:var(--zonos-elements-button-standard-hover)}:host button:not([disabled]):active{background:var(--zonos-elements-gray-700)}:host button:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button.with-box-shadow{-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard)}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--zonos-elements-size-sm);line-height:var(--zonos-elements-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--zonos-elements-size-md);line-height:var(--zonos-elements-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--zonos-elements-size-lg);line-height:var(--zonos-elements-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--zonos-elements-font-size-s)}}:host button.override-background{background-color:var(--zonos--background-color, var(--zonos-elements-gray-0));color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:1px solid var(--zonos--background-color, var(--zonos-elements-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--zonos-elements-blue-600);outline:1px solid var(--zonos-elements-blue-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--zonos-elements-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--zonos-elements-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-600)}:host button:not(.override-background).success{background:var(--zonos-elements-green-600);outline:1px solid var(--zonos-elements-green-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--zonos-elements-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--zonos-elements-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--zonos-elements-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-green-400)}:host button:not(.override-background).danger{background:var(--zonos-elements-red-600);outline:1px solid var(--zonos-elements-red-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--zonos-elements-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--zonos-elements-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--zonos-elements-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-red-400)}:host button:not(.override-background).warning{background:var(--zonos-elements-orange-600);outline:1px solid var(--zonos-elements-orange-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--zonos-elements-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--zonos-elements-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--zonos-elements-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:rgba(0, 0, 0, 0.1)}:host button:not(.override-background).subtle:not([disabled]):active{background:rgba(0, 0, 0, 0.2)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--zonos-elements-button-focus-ring);box-shadow:var(--zonos-elements-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--zonos-elements-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--zonos-elements-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--zonos-elements-radius-4);width:24px}";const g=class{constructor(t){o(this,t),this.autoHeight=!1,this.iconColor="gray-1000",this.size=24}render(){if(!this.content||!this.el.shadowRoot)return null;const o=h(this.iconColor)?`var(--zonos-elements-${this.iconColor})`:this.iconColor;return this.el.shadowRoot.innerHTML=this.content,t(e,{class:"zonos--elements",style:{"--zonos--color":o,"--zonos--font-family":r(),"--zonos--height":this.autoHeight?"auto":`${this.size}px`,"--zonos--width":`${this.size}px`}})}get el(){return s(this)}};g.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--width);height:var(--zonos--height);fill:var(--zonos--color);color:var(--zonos--color)}";const m=class{constructor(t){o(this,t),this.size=32}render(){return this.el.shadowRoot?t(e,{class:d(["zonos--elements",this.spinnerColor]),style:{"--zonos--size":`${this.size}px`}},t("svg",{viewBox:"0 0 50 50"},t("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),t("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}))):null}get el(){return s(this)}};m.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--zonos--size);height:var(--zonos--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--size);height:var(--zonos--size);stroke:var(--zonos-elements-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--zonos-elements-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--zonos-elements-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--zonos-elements-spinner-track-black)}:host(.white) circle{stroke:var(--zonos-elements-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--zonos-elements-spinner-track-white)}:host(.info) circle{stroke:var(--zonos-elements-blue-600)}:host(.info) circle.track{stroke:var(--zonos-elements-blue-100)}:host(.success) circle{stroke:var(--zonos-elements-green-600)}:host(.success) circle.track{stroke:var(--zonos-elements-green-100)}:host(.danger) circle{stroke:var(--zonos-elements-red-600)}:host(.danger) circle.track{stroke:var(--zonos-elements-red-100)}:host(.warning) circle{stroke:var(--zonos-elements-orange-600)}:host(.warning) circle.track{stroke:var(--zonos-elements-orange-100)}";export{u as zonos_button,g as zonos_icon,m as zonos_spinner}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as e,h as s,H as t,a as i}from"./p-b30c2ad9.js";import{t as n}from"./p-
|
|
1
|
+
import{r as o,c as e,h as s,H as t,a as i}from"./p-b30c2ad9.js";import{t as n}from"./p-d42b5113.js";import{g as a,f as r,z as l}from"./p-7af39c98.js";import{c}from"./p-b4b7f705.js";import{g as d}from"./p-0ffd710e.js";import"./p-0a377722.js";const h=class{constructor(s){o(this,s),this.confirmClicked=e(this,"confirmClicked",7),this.cancelClicked=e(this,"cancelClicked",7),this.dialogTitle=n("Are you sure?"),this.dialogIntent="info",this.dialogSubtitle=null,this.dialogWidth=350,this.dialogType="confirm",this.isMobile=!1,this.noClickOutside=!1,this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialogHandler()}}handleKeyDown(o){"Escape"===o.key&&this.closeDialogHandler()}focusDialog(){this.dialogOpen&&setTimeout((()=>{var o,e;null===(e=null===(o=this.el.shadowRoot)||void 0===o?void 0:o.querySelector(".zonos--backdrop"))||void 0===e||e.focus()}),100)}confirmDialogHandler(){this.dialogOpen&&this.confirmClicked.emit()}closeDialogHandler(){this.dialogOpen&&this.cancelClicked.emit()}renderIcon(){switch(this.dialogIntent){case"info":return s("zonos-icon",{content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>',iconColor:"blue-800"});case"danger":return s("zonos-icon",{content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"red-800"});case"warn":return s("zonos-icon",{content:'<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"orange-800"})}}getButtonConfirmVariant(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}}render(){this.focusDialog();const o=d(),e=a(l.appearance.theme);return s(t,{key:"c9eabf497f7e23ae201e6310e5ecb9f0d7068294",class:c([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":e,style:{"--zonos--border-radius":o,"--zonos--dialog-width":`${this.dialogWidth}px`,"--zonos--font-family":r()}},s("div",{key:"a9a525bfe764bf93e8725d9a00c069455de72ed6",class:"zonos--backdrop",tabIndex:-1}),s("div",{key:"072ab68e501618b640ffce6c6e8e96096966e09d",class:c(["zonos--confirm-layout",this.dialogIntent]),onClick:o=>this.clickOutsideDialogHandler(o)},s("div",{key:"3ab415f1cbc2bc36af01d67b279e732480de8685",class:"zonos--confirm-dialog",onBlur:()=>{this.focusDialog()}},s("div",{key:"a1d99558318371c0e5ee95a9578a6de31a6fc27a",class:"wrapper"},s("div",{key:"3fd7fbc90c430a3e1496e5b0347947c1929aa6ed",class:"icon-wrapper"},this.renderIcon()),s("div",{key:"5584080e0f0a5a756b0cc2ac761e0e18c864afcd",class:"content"},s("div",{key:"4a2070c137636193d05ded090fea26f05aada887",class:"title"},s("zonos-text",{key:"ab4c773f4af1271f5615a28f6a6193460330f16b",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&s("div",{key:"05a445dc37e754c99ea6727ae2bf861d42d5c2c4",class:"subtitle"},s("zonos-text",{key:"a7563f9fd3b405653487542e1b7a1f6aeab01893",textColor:"gray-800"},this.dialogSubtitle))),s("div",{key:"812e9e43fdb6d10ed62da8138e344b0243ca5c34",class:"footer"},"confirm"===this.dialogType&&s("zonos-button",{key:"07d7dc9d1a4bca9cb1ee420a4fed82e9fc513bd9",backgroundColor:"gray-0",class:"cancel-button",onClick:()=>this.closeDialogHandler(),size:"lg",withBoxShadow:!0},this.dialogCancelBtnText||n("Cancel")),s("zonos-button",{key:"b607a5244dc39869b6d40cd361d9dee4686858a7",class:"confirm-button",onClick:()=>this.confirmDialogHandler(),size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))}static get assetsDirs(){return["assets"]}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 .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";const f=class{constructor(e){o(this,e),this.open=!1,this.size=40}render(){return s(t,{key:"1eb7313add29219032d8301abaf55ace726a3309",class:c(["zonos--elements",this.open&&"zonos--open"])},s("div",{key:"df9960e78817a9a98006fed7e87c5441f220f496",class:"zonos--loading-overlay"},s("zonos-spinner",{key:"32795fe2c626add5d2f53032ea9b5b8d528bef38",size:this.size,spinnerColor:this.spinnerColor})))}};f.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";export{h as zonos_confirm_dialog,f as zonos_loading_overlay}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-5fc34563.system.js","./p-
|
|
1
|
+
System.register(["./p-5fc34563.system.js","./p-89c5164b.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,4 +1,4 @@
|
|
|
1
|
-
import{z as o,c as e}from"./p-
|
|
1
|
+
import{z as o,c as e}from"./p-7af39c98.js";import{t as n,z as r,c as t,e as a,v as i,r as s,j as l}from"./p-1c5ba523.js";import{s as c}from"./p-7eb8e2d4.js";import{t as u}from"./p-d42b5113.js";import{h as d,l as p,j as v}from"./p-41dd1cb8.js";import{t as y}from"./p-e688e493.js";import{l as f}from"./p-0a377722.js";
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -14,4 +14,4 @@ import{z as o,c as e}from"./p-7ce093aa.js";import{t as n,z as r,c as t,e as a,v
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/function w(o,e){void 0===e&&(e={});var n=document.createElement("script");return n.src=o,Object.keys(e).forEach((function(o){n.setAttribute(o,e[o]),"data-csp-nonce"===o&&n.setAttribute("nonce",e["data-csp-nonce"])})),n}function b(o){return window[o]}function h(o,e){if("object"!=typeof o||null===o)throw new Error("Expected an options object.");var n=o.environment;if(n&&"production"!==n&&"sandbox"!==n)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}const m=({backgroundColor1:o,backgroundColor2:e})=>
|
|
17
|
+
*/function w(o,e){void 0===e&&(e={});var n=document.createElement("script");return n.src=o,Object.keys(e).forEach((function(o){n.setAttribute(o,e[o]),"data-csp-nonce"===o&&n.setAttribute("nonce",e["data-csp-nonce"])})),n}function b(o){return window[o]}function h(o,e){if("object"!=typeof o||null===o)throw new Error("Expected an options object.");var n=o.environment;if(n&&"production"!==n&&"sandbox"!==n)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}const m=({backgroundColor1:o,backgroundColor2:e})=>y.readability(o,e)>2.5,P=e=>{const n=o.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(f("Zonos submits gtag event","log",e),window.gtag("event",e,{}))},{onChange:j,reset:k,state:g}=e((()=>({intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),I=({checkoutSessionId:e,onPaypalFail:c,onPaypalSessionDone:y,overrideBorderRaidus:f,overridePrimaryColor:w})=>({createOrder:async()=>{n({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});const o=await r();if(!o.valid)return g.paypalErrorMessage=o.errorMessage,t.hasPaymentError=!1,t.customErrorMessage=null,null==c||c(),"";try{g.paypalErrorMessage=null,a.inventoryCheckErrorMessage=null;try{a.inventoryCheckErrorMessage=await i()}catch(o){a.inventoryCheckErrorMessage=u("Unable to check inventory. Please try again.")}return a.inventoryCheckErrorMessage?"":await(async({checkoutSessionId:o})=>{var e,n;const r=g.intent.toUpperCase(),{errors:t,json:a}=await(async({checkoutSessionId:o,intent:e})=>{const{errors:n,json:r}=await d("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:e},method:"POST"});return{errors:n,json:r}})({checkoutSessionId:o,intent:r}),i=null===(e=null==a?void 0:a.paypalOrderCreate)||void 0===e?void 0:e.paypalOrderId;if(t.length||!i)throw new Error((null===(n=t.find(Boolean))||void 0===n?void 0:n.message)||"An unexpected error occurred when creating paypal order.");return i})({checkoutSessionId:e})}catch(o){return p("Failed to create paypal order",o),g.paypalErrorMessage=u("Failed to create PayPal order. Please try again, or consider using an alternative method."),t.hasPaymentError=!1,t.customErrorMessage=null,null==c||c(),""}},onApprove:async()=>{try{g.paypalErrorMessage=null,P("zonos-checkout-payment-info");const o=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{var n,r;const{errors:t,json:a}=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{const{errors:n,json:r}=await d("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:e},method:"POST"});return{errors:n,json:r}})({checkoutSessionId:o,paypalMockResponse:e}),i=null===(n=null==a?void 0:a.paypalOrderCapture.order)||void 0===n?void 0:n.id;if(t.length||!i)throw new Error((null===(r=t.find(Boolean))||void 0===r?void 0:r.message)||u("An unexpected error occurred when processing PayPal order."));return i})({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse});g.orderIdCreated=o,null==y||y({orderId:o}),s(),l()}catch(o){if(p("==== Failed to capture paypal order",o),o instanceof Error)return(({error:o})=>{var e;const n=v(o.message),r=null===(e=null==n?void 0:n.errors.find(Boolean))||void 0===e?void 0:e.message,t=(null==r?void 0:r.match(/\[(.*?)\] (.*)/i))||[];t||(g.paypalErrorMessage=u("An unexpected error occurred when processing PayPal order."));const a=t[2]||u("An unexpected error occurred when processing PayPal order.");g.paypalErrorMessage=a})({error:o});null==c||c()}},style:{borderRadius:"SHARP"===f?0:10,color:m({backgroundColor1:"#ffc33a",backgroundColor2:w||o.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),E=async({currency:e})=>{var n;if(!(null===(n=o.checkoutSettings.externalPaymentMethods)||void 0===n?void 0:n.find((o=>"PAYPAL"===o.type&&"ENABLED"===o.status))))return void f("=== Paypal is disabled for this store","warn");const r=o.checkoutSettings.externalServiceTokens.find((o=>"PAYPAL_CLIENT_ID"===o.type));if(!r)return void f("Failed to load paypal -- missing paypal publishable key","warn");const t=o.zonosMode&&"production"!==o.zonosMode||"LIVE"!==o.checkoutSettings.mode?"sandbox":"production";g.intent=o.checkoutSettings.captureDelay&&o.checkoutSettings.captureDelay>0?"authorize":"capture",f("==== Paypal order intent","info",g.intent),window.Zonos.paypal=await function(o,e){if(void 0===e&&(e=Promise),h(o,e),"undefined"==typeof document)return e.resolve(null);var n=function(o){var e="sandbox"===o.environment?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete o.environment,o.sdkBaseUrl&&(e=o.sdkBaseUrl,delete o.sdkBaseUrl);var n,r,t=o,a=Object.keys(t).filter((function(o){return null!=t[o]&&""!==t[o]})).reduce((function(o,e){var n=t[e].toString();return"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(o,e){return(e?"-":"")+o.toLowerCase()}))).substring(0,4)||"crossorigin"===e?o.attributes[e]=n:o.queryParams[e]=n,o}),{queryParams:{},attributes:{}}),i=a.queryParams,s=a.attributes;return i["merchant-id"]&&-1!==i["merchant-id"].indexOf(",")&&(s["data-merchant-id"]=i["merchant-id"],i["merchant-id"]="*"),{url:"".concat(e,"?").concat((n=i,r="",Object.keys(n).forEach((function(o){0!==r.length&&(r+="&"),r+=o+"="+n[o]})),r)),attributes:s}}(o),r=n.url,t=n.attributes,a=t["data-namespace"]||"paypal",i=b(a);return t["data-js-sdk-library"]||(t["data-js-sdk-library"]="paypal-js"),function(o,e){var n=document.querySelector('script[src="'.concat(o,'"]'));if(null===n)return null;var r=w(o,e),t=n.cloneNode();if(delete t.dataset.uidAuto,Object.keys(t.dataset).length!==Object.keys(r.dataset).length)return null;var a=!0;return Object.keys(t.dataset).forEach((function(o){t.dataset[o]!==r.dataset[o]&&(a=!1)})),a?n:null}(r,t)&&i?e.resolve(i):function(o,e){void 0===e&&(e=Promise),h(o,e);var n=o.url,r=o.attributes;if("string"!=typeof n||0===n.length)throw new Error("Invalid url.");if(void 0!==r&&"object"!=typeof r)throw new Error("Expected attributes to be an object.");return new e((function(o,e){if("undefined"==typeof document)return o();!function(o){var e=o.onSuccess,n=o.onError,r=w(o.url,o.attributes);r.onerror=n,r.onload=e,document.head.insertBefore(r,document.head.firstElementChild)}({url:n,attributes:r,onSuccess:function(){return o()},onError:function(){var o=new Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(o)}})}))}({url:r,attributes:t},e).then((function(){var o=b(a);if(o)return o;throw new Error("The window.".concat(a," global variable is not available."))}))}({clientId:r.token,currency:e,environment:t,intent:g.intent}),g.paypal=window.Zonos.paypal,f("==== Paypal script loaded")},S=o=>{var e;const n=window.Zonos.paypal;if(!n)return f("Paypal is not available"),null;const r=c.checkoutSessionId;if(!r)return f("Paypal is not available due to checkoutSessionId is not available"),null;f("==== Loading Paypal buttons"),g.paypalButtons.length&&(g.paypalButtons.forEach((async o=>{await o.close()})),g.paypalButtons=[]);const t=[null===(e=n.FUNDING)||void 0===e?void 0:e.PAYPAL].filter(Boolean);return g.paypalButtons=t.map((e=>{var t;let a=null;try{a=(null===(t=n.Buttons)||void 0===t?void 0:t.call(n,Object.assign(Object.assign({},I(Object.assign({checkoutSessionId:r,fundingSource:e},o))),{fundingSource:e})))||null}catch(o){f(`===== Failed to load paypal's "${e}" button`,"warn",o)}return(null==a?void 0:a.isEligible())?(f(`==== Paypal button ${e} loaded`),a):null})).filter(Boolean),g.paypalButtons},A=()=>{var e,n;return"ENABLED"===(null===(n=null===(e=o.checkoutSettings.externalPaymentMethods)||void 0===e?void 0:e.find((o=>"PAYPAL"===o.type)))||void 0===n?void 0:n.status)||!!g.paypalButtons.length};export{g as a,E as b,k as c,S as d,j as e,m as i,A as p,P as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-89c5164b.system.js"],(function(n){"use strict";var r,e,t,i;return{setters:[function(n){r=n._;e=n.b;t=n.i;i=n.d}],execute:function(){var u=r;var f=function(){return u.Date.now()};var a=f;var o=/\s/;function v(n){var r=n.length;while(r--&&o.test(n.charAt(r))){}return r}var c=v;var d=c;var s=/^\s+/;function m(n){return n?n.slice(0,d(n)+1).replace(s,""):n}var y=m;var p=e,l=t;var T="[object Symbol]";function b(n){return typeof n=="symbol"||l(n)&&p(n)==T}var h=b;var x=y,w=i,$=h;var g=0/0;var j=/^[-+]0x[0-9a-f]+$/i;var E=/^0b[01]+$/i;var M=/^0o[0-7]+$/i;var S=parseInt;function I(n){if(typeof n=="number"){return n}if($(n)){return g}if(w(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=w(r)?r+"":r}if(typeof n!="string"){return n===0?n:+n}n=x(n);var e=E.test(n);return e||M.test(n)?S(n.slice(2),e?2:8):j.test(n)?g:+n}var W=I;var k=i,q=a,z=W;var A="Expected a function";var B=Math.max,C=Math.min;function D(n,r,e){var t,i,u,f,a,o,v=0,c=false,d=false,s=true;if(typeof n!="function"){throw new TypeError(A)}r=z(r)||0;if(k(e)){c=!!e.leading;d="maxWait"in e;u=d?B(z(e.maxWait)||0,r):u;s="trailing"in e?!!e.trailing:s}function m(r){var e=t,u=i;t=i=undefined;v=r;f=n.apply(u,e);return f}function y(n){v=n;a=setTimeout(T,r);return c?m(n):f}function p(n){var e=n-o,t=n-v,i=r-e;return d?C(i,u-t):i}function l(n){var e=n-o,t=n-v;return o===undefined||e>=r||e<0||d&&t>=u}function T(){var n=q();if(l(n)){return b(n)}a=setTimeout(T,p(n))}function b(n){a=undefined;if(s&&t){return m(n)}t=i=undefined;return f}function h(){if(a!==undefined){clearTimeout(a)}v=0;t=o=i=a=undefined}function x(){return a===undefined?f:b(q())}function w(){var n=q(),e=l(n);t=arguments;i=this;o=n;if(e){if(a===undefined){return y(o)}if(d){clearTimeout(a);a=setTimeout(T,r);return m(o)}}if(a===undefined){a=setTimeout(T,r)}return f}w.cancel=h;w.flush=x;return w}var F=n("d",D)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,c)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(o){return a([e,o])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=o.call(e,t)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,r=o.length,i;n<r;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};System.register(["./p-5fc34563.system.js","./p-725605f6.system.js","./p-0ec82d78.system.js","./p-b5b3f908.system.js","./p-182da73f.system.js","./p-89c5164b.system.js","./p-69451a50.system.js","./p-01174496.system.js","./p-23c46dfa.system.js","./p-40a4c8a2.system.js","./p-d938f42f.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-433d76b4.system.js","./p-24e26a2c.system.js","./p-1aa93d1e.system.js","./p-2770ba48.system.js","./p-57413c34.system.js"],(function(e){"use strict";var o,t,n,r,i,s,c,a,u,d,l,h,f,v,m,p,z,g,w,k,b,y,_,C,x,S,T,O,A,I,E,N,j,P,L,D,U,R,B,Z,F,H,M,K,V,G,W,Y,q,J,Q,X,$,ee,oe,te,ne,re,ie,se,ce,ae,ue,de,le,he,fe,ve,me,pe;return{setters:[function(e){o=e.r;t=e.h;n=e.H;r=e.F},function(e){i=e.s;s=e.a;c=e.b;a=e.c;u=e.i;d=e.d;l=e.e;h=e.f;f=e.g;v=e.h;m=e.j;p=e.k;z=e.l;g=e.m;w=e.t;k=e.n;b=e.o;y=e.p;_=e.q;C=e.r;x=e.u;S=e.v;T=e.w;O=e.x;A=e.y},function(e){I=e.p;E=e.s;N=e.a;j=e.b},function(e){P=e.f;L=e.l;D=e.a;U=e.g;R=e.s;B=e.V;Z=e.b;F=e.c;H=e.d},function(e){M=e.t},function(e){K=e.z;V=e.g;G=e.m},function(e){W=e.b},function(e){Y=e.h;q=e.l;J=e.s;Q=e.b;X=e.g;$=e.j;ee=e.a;oe=e.i},function(e){te=e.u},function(e){ne=e._;re=e.c;ie=e.a;se=e.d;ce=e.g},function(e){ae=e.l;ue=e.g;de=e.b},function(e){le=e.c},function(e){he=e.c},function(e){fe=e.g},function(e){ve=e.i},function(e){me=e.s},function(e){pe=e.R},function(){}],execute:function(){var ze=this;var ge=function(){return __awaiter(ze,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,Y("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=n.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var we=function(e){return __awaiter(ze,[e],void 0,(function(e){var o,t,n,r;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(i.length===0){return[2,null]}return[4,Y("/api/zonos-elements/select-variance-test",{body:{testKeys:i},method:"POST"})];case 1:o=e.sent(),t=o.errors,n=o.json;if(t.length||!n){return[2,null]}r=P(n);return[2,r]}}))}))};var ke=function(e){var o=e.cartId,t=e.checkoutSessionId,n=e.customerAddress1,r=e.customerAddress2,i=e.customerCity,s=e.customerCountry,c=e.customerEmail,a=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,v=e.isTestMode,m=e.isVariantTest;var p=new URLSearchParams;p.set("tempCartUUID",o);if(a){p.set("customerFirstName",a)}if(u){p.set("customerLastName",u)}if(c){p.set("customerEmail",c)}if(d){p.set("customerPhone",d)}if(h){p.set("customerZip",h)}if(i){p.set("customerCity",i)}if(l){p.set("customerState",l)}if(s){p.set("zCountry",s)}if(n){p.set("customerAddress1",n)}if(r){p.set("customerAddress2",r)}if(v){p.set("zonosTestMode","1")}if(t){p.set("zonosCheckoutSessionId",t)}if(m){p.set("zonosVariantTest","1")}return"".concat(f,"?").concat(p.toString())};var be=function(e){if(e===void 0){e=true}if(!L.localizationLoaded){return true}if(L.isDisabledCountry){if(e){ae("Checkout: disabled country")}return true}return false};var ye=function(e){if(e===void 0){e=true}if(!L.localizationLoaded){return false}if(!L.isShippableCountry){if(e){ae("Checkout: not shippable country")}return false}return true};var _e=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(ze,void 0,void 0,(function(){var e,r,a,u,d;var l=this;return __generator(this,(function(h){e=document.querySelector(o);r=i();if(!e&&r){a=document.createElement("button");a.style.display="none";a.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(a);t===null||t===void 0?void 0:t(r);n.disconnect();return[2]}u=document.querySelector('select[name="shippingAddress.countryCode"]');d=document.querySelector("#checkout-shipping-continue");if(!u||!d){return[2]}n.disconnect();d.addEventListener("click",(function(e){return __awaiter(l,void 0,void 0,(function(){var o,t,n,r,i,a,d;return __generator(this,(function(l){n=u.value;if(!n){return[2]}D(n);if(!ye(false)){s();return[2]}r=document.querySelector("form");if(!r){return[2]}i=new FormData(r);a=document.querySelector("input#addressLine1Input");d={address1:(o=i.get("shippingAddress.address1"))!==null&&o!==void 0?o:a&&a.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(d).some((function(e){return e===undefined||e===null}))){q("One or more shipping address field is missing",Object.entries(d));void J({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(d))],metadata:{storeId:K.storeId}});return[2]}c({address1:d.address1,address2:d.address2,city:d.city,countryCode:d.countryCode,firstName:d.firstName,lastName:d.lastName,phone:d.phone,postalCode:d.postalCode,state:d.stateOrProvince});e.preventDefault();e.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var Ce=function(){var e=new URLSearchParams(window.location.search);ae("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=U(e)||L.selectedCountryCode||"US";var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:l,customerLastName:h,customerName:c,customerPhone:a,customerState:d,customerZip:u}};var xe=0;var Se=function(){return __awaiter(ze,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}ae("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,Y("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=n.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);xe++;if(xe>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var Te=function(){return __awaiter(ze,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=ue().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:de},Q()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};void Y("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var Oe=function(e){return __awaiter(ze,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:de},Q()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};void Y("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var Ae=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var Ie=function(e){var o;var t=(o=R.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var Ee=function(e){return K.enabledVariantTestKeys.includes(e)};var Ne=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var n=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(n===null||n===void 0?void 0:n.expiresAt)||Date.now()+B,selectedVariantKey:(n===null||n===void 0?void 0:n.selectedVariantKey)||null,testKey:o}}))};var je=function(e){return __awaiter(ze,[e],void 0,(function(e){var o,t,n,r,i;var s=e.cartId,c=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=X();return[4,Y("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];ae("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,je({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var Pe=function(e){return __awaiter(ze,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=ne(e),t=o.isDgsCartId,n=o.isLegacyCartId;if(!n&&!t){q("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,je({cartId:e,retries:5})];case 1:r=i.sent();ae("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){q("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var Le='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var De=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";var Ue=De;var Re=90*60*1e3;var Be=6*60*60*1e3;var Ze=e("zonos_checkout",function(){function e(e){var t=this;o(this,e);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=a.clientSecret;this.stripeCustomerSessionClientSecret=a.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||K.appearance.theme;return[4,u({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:I()})];case 1:i.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(t,[e],void 0,(function(e){var o,t,n,r,i,s,c,u,l;var h=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=h===null||h===void 0?void 0:h.matches("#".concat(re));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!o){ae("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}ae("Payment intent exist, checking stripe payment intent status");if(!r){ae("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,d({clientSecret:r})];case 1:s=e.sent(),c=s.error,u=s.status;l=new URLSearchParams(window.location.search).get("redirect_status");if(l){if(!c){ae("Payment intent is succeeded or in a good state to move forward, show success screen")}else{ae("Payment intent failed, show status from error")}this.open=true;R.checkoutSessionId=i;a.clientSecret=r;void this.setToFinishStep(u);return[2,{shouldAllowOrder:false}]}if(!t){ae("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}ae("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){R.enabledVariantTestKeys=Ae(R.enabledVariantTestKeys||[]);var e=K.enabledVariantTestKeys.map((function(e){var o;var t=(o=R.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+B,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));Z(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof K.checkoutSettings.createCartId!=="function"){return false}var e=K.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}ae("[TEST] - Registering hosted vs native test");o=Ie("hosted_vs_native");if(o){ae("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,we({testKeys:["hosted_vs_native"]})];case 1:t=r.sent();if(!t){ae("[TEST] - Failed to get selection for hosted vs native test");return[2]}n=Ne({baseTestObj:R.enabledVariantTestKeys||[],mergeTestObj:t});Z(n);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;return __generator(this,(function(a){switch(a.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=Ie("hosted_vs_native");ae("[TEST] - hosted_vs_native: ".concat(t));if(typeof K.checkoutSettings.createCartId!=="function"){ae("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){ae("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=K.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){ae("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}ae('"createCartId" is provided, start building cart');return[4,K.checkoutSettings.createCartId()];case 1:n=a.sent();i=null;if(typeof n==="object"){r=n.cartId;i=n.shippingData||null}else{r=n}s=Ce();c=ke(Object.assign(Object.assign({cartId:r,checkoutSessionId:R.checkoutSessionId||undefined,hostedCheckoutUrl:K.genericSettings.hostedCheckoutUrl,isTestMode:X(),isVariantTest:true},s),i));ae("[TEST] - Redirecting to: ".concat(c));window.open(c,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=l.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=K.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var n=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!n){return}switch(e.data.type){case"zonos-checkout-session-update":R.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){R.checkoutSessionId=t}var n=R.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var r=Ie("hosted_vs_native");if(!r){n.push({expiresAt:Date.now()+B,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});Z(n)}else{Z(n.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void h({adjustments:l.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;E("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&l.step==="finish"){f()}l.step="customer-info";v();m();(t=(o=K.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c,i,s,s,a,u,i,d;return __generator(this,(function(f){switch(f.label){case 0:if(!(typeof K.checkoutSettings.createCartId==="function"))return[3,4];ae('"createCartId" is provided, start building cart');return[4,K.checkoutSettings.createCartId()];case 1:e=f.sent();o=void 0;if(typeof e==="object"){ae("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);l.customerAuthenticationToken=e.customerAuthenticationToken||null}else{o=e}window.Zonos.cartId=o;return[4,Pe(o)];case 2:t=f.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){q("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=W(n),i=r.adjustments,s=r.cartItems;return[4,h({adjustments:i,cartItems:s})];case 3:f.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];ae("tempCartUUID is provided, start building cart");c=W(window.Zonos.cartData),i=c.adjustments,s=c.cartItems;return[4,h({adjustments:i,cartItems:s})];case 5:f.sent();return[3,9];case 6:if(!(K.checkoutSettings.buildCartDetail&&L.selectedCountryCode))return[3,9];ae("build cart detail");return[4,K.checkoutSettings.buildCartDetail({countryCode:L.selectedCountryCode,currencyCode:L.targetCurrency})];case 7:s=f.sent();a=s.filter((function(e){return e.amount>=0}));u=s.filter((function(e){return e.amount<0}));ae("cartItems","info",{cartItems:s});i=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,h({adjustments:i,cartItems:a})];case 8:f.sent();f.label=9;case 9:if(!!R.checkoutSessionId)return[3,11];return[4,p()];case 10:d=f.sent();ae("stripeStoreInitCheckoutSession: ".concat(d));if(!d){return[2,false]}f.label=11;case 11:if(!l.isStagingMode){void z()}return[4,this.applyStripeTheme()];case 12:f.sent();this.isRedirectAfterOrder=K.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!l.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=$(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;ae("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||Be;if(o>t){ae("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;ae("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!R.checkoutSessionId){return}void te({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!R.checkoutSessionId){return}void te({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!R.checkoutSessionId){return}void te({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||K.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=K.checkoutSettings.placeOrderButtonSelector;var t=K.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;ae("attach checkout ".concat(o));ae("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData){return}var n=[o,t,"#".concat(se),"#".concat(re),"#".concat(ie)].filter(Boolean);var r=document.querySelectorAll(n.join(","));r.forEach((function(n){var r=n.getAttribute("data-zonos-checkout-attached");if(r){return}ae("attached event to button ".concat(o),"info",{button:n});n.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,r,i,s,c,u,d,h,f,v,m,p,z,y,_,C;return __generator(this,(function(x){switch(x.label){case 0:i=performance.now();s=t&&n.matches(t);c=n.matches("#".concat(ie));u=n.matches("#".concat(se))||n.matches("#".concat(re));if(!window.Zonos.isLegacyCheckout&&(!ye()||be())&&!s&&!c&&!u){return[2]}o.preventDefault();o.stopPropagation();ae("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:d=x.sent().shouldAllowOrder;if(!d){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void Se()}),2e3)}if(!Ee("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:x.sent();return[4,this.handleHostedVsNative()];case 3:h=x.sent().redirected;this.isOverlayLoading=false;if(h){return[2]}x.label=4;case 4:a.isFetchingSession=true;this.open=true;x.label=5;case 5:x.trys.push([5,8,,9]);return[4,this.buildCartAndInit()];case 6:f=x.sent();if(!f){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:R.checkoutSessionId,type:"zonos-checkout-session-update"},"*");g({isPreview:this.preview,sessionTimeout:Re});E("zonos-checkout-start");v=R.checkoutSessionId;void w({checkoutSessionId:v,eventName:"checkout_open"});return[4,ge()];case 7:m=x.sent().enabled;l.shouldHideDiscountInput=!m;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void Te()}else{p=performance.now();z=p-i;void Oe({loadTime:z})}this.recordCheckoutInfo();y=!!ce();if(y){this.markTheSessionAsAbandonedCart()}return[3,9];case 8:_=x.sent();if(_ instanceof Error){C=_.message;if(C==="Cart is expired."){this.isCartExpired=true}}a.isFetchingSession=false;q(_);if(this.isCartExpired){a.isFetchingSession=true;return[2]}void J({endpoint:"Error creating Checkout",errors:[_ instanceof Error?_.toString():"Unknown error"],metadata:{allLogs:de,cartId:window.Zonos.cartId,checkoutSessionBody:k(),href:window.location.href,storeBaseUrl:((r=window.Zonos.cartData)===null||r===void 0?void 0:r.storeBaseUrl)||K.onlineStoreSettings.url}});b({messages:[M("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:M("Error creating Checkout")});return[3,9];case 9:return[2]}}))}))}),{capture:true,passive:false});if(!K.checkoutSettings.disablePlaceOrderButtonActivation){n.removeAttribute("disabled")}n.setAttribute("data-zonos-checkout-attached","true");if(n.matches("#".concat(se))){n.dispatchEvent(he("click"));s();n.remove()}if(n.matches("#".concat(re))){n.dispatchEvent(he("click"));n.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}ae("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,n=e.customerCity,r=e.customerCountry,i=e.customerEmail,s=e.customerFirstName,c=e.customerLastName,a=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=r||U(h)||L.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:n,customerCountry:f,customerEmail:i,customerFirstName:s,customerLastName:c,customerName:a,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);ae("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=U(e)||L.selectedCountryCode;var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:a,customerLastName:u,customerName:c,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var n=e.customerAddress2||"";var r=e.customerCity||"";var i=e.customerEmail||"";var s=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var c=e.customerPhone||"";var a=e.customerZip||"";var u=e.customerState||"";if(!o||!s||!c||!t){ae("Missing required query params so it can not be prefilled","info",[!o&&"line1",!s&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&L.shippingZoneCountries&&!(t in L.shippingZoneCountries)){ae('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:o,line2:n,postal_code:a,state:u},email:i,name:s,phone:c}];ae("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){l.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){a.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;l.isStagingMode=ee();if(typeof this.overrideStagingMode!=="undefined"){l.isStagingMode=this.overrideStagingMode}_e({domesticRedirectedBtnSelector:se,onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){a.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){ae("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}ae("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){l.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){y(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(ie));if(e){e.dispatchEvent(he("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;var u=this;return __generator(this,(function(d){switch(d.label){case 0:E("zonos-checkout-customer-info");r=R.checkoutSessionId;void w({checkoutSessionId:r,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,_()];case 1:i=d.sent().isRequestNotReady;if(i&&l.addressFormRenderType==="stripe"){void J({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=a.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(n=(t=a.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||n===void 0?void 0:n.address,cartId:window.Zonos.cartId}})}s=function(e){if(l.step!=="customer-info"){clearInterval(e);return}if(!a.isFetchingLandedCost){if(l.landedCostData){void j({currency:l.currency});C()}u.submitLoading=false;if(e){clearInterval(e)}}};s();c=setInterval((function(){s(c)}),20);setTimeout((function(){clearInterval(c)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){C();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){l.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:e=a.checkoutSettlementCurrency==="USD";if(e&&a.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;N.paypalErrorMessage=null;a.hasPaymentError=false;this.submitLoading=true;l.inventoryCheckErrorMessage=null;return[4,x()];case 1:o=i.sent();if(!o){a.hasPaymentError=true;a.customErrorMessage=M("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:a.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=l;return[4,S()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();l.inventoryCheckErrorMessage=M("Unable to check inventory. Please try again.");return[3,5];case 5:if(l.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,T()];case 7:i.sent();C();m();return[3,9];case 8:r=i.sent();q(r);E("zonos-checkout-payment-fail");a.hasPaymentError=true;if(a.shouldInventoryRefund){void O();a.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:A();if(!this.preview)return[3,2];l.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:f();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||K.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=oe(this.mobile);void this.applyStripeTheme();ae("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=oe(this.mobile);void this.applyStripeTheme();ae("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=V(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){A()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){ae("No customer profile","info");this.defaultCustomerProfileAddress=[];return}ae("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=a.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=a.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){ae("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=o.getAttribute(e);var r=t.getAttribute(e);if(n){o.removeAttribute(e);o.style.overflow=n}else{o.style.removeProperty("overflow")}if(r){t.removeAttribute(e);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=oe(this.mobile);this.isIframed=window.self!==window.top;ae("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=F("selectedLocale",(function(){void e.applyStripeTheme()}));this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);ae("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){A();f();this.onChangeLocaleListener();window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,i,s,c;this.customerProfile=a.customerProfile;this.clientSecret=a.clientSecret;if(a.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=a.stripeCustomerSessionClientSecret}var u=l.step!=="finish"&&l.step!=="error"&&!a.stripeElements||a.isFetchingSession;var d=G(K.appearance,this.appearanceSettingsOverride||null),h=d.colorPrimary,f=d.colorSecondary,v=d.logoUrl,m=d.style;var p=K.appearance.zonosAttribution==="ENABLED";var z=K.appearance.theme;var g=h&&ve(h)?"DARK":"LIGHT";var w=this.isMobile?z:g;var k=!this.isMobile?f:undefined;var b=L.customMessages;var y=(o=b.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var _=this.getCurrentLocalePageEnum();var C=b.filter((function(e){return e.pageName===_}));var x=this.getBaseCurrencySettlementInfo();var S=function(){var o=e.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(K.organizationName," logo"),src:o}))};var T=X();var O=function(){var o=new URLSearchParams(window.location.search);var n=o.get("zonosQaUrl");var r=o.get("zonosDebug");var i=o.get("zonosE2ETest");var s=e.overrideStagingMode||ee();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},S(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},M("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},M("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),C.map((function(e){return t("zonos-custom-message",{icon:Le,message:e.message})})))};var A=function(){if(l.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:M("Your checkout session has expired. Please reload the page to continue."),restStateTitle:M("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},M("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":fe({overrideBorderStyle:m})}},l.step!=="finish"&&l.step!=="error"&&t(r,null,t("div",{class:"zonos--left","data-theme":w,style:me({"--zonos--primary-color":!e.isMobile?h:undefined})},!e.isMobile&&O(),l.step==="customer-info"&&t("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:k}),l.step==="shipping"&&t("zonos-shipping",{continueLoading:e.submitLoading,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:k}),l.step==="payment"&&t("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:k})),t("div",{class:"zonos--right","data-theme":z},e.isMobile&&O(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!e.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:pe}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),t("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},t("zonos-cart-items",null),e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:k}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Le,message:y})))),t("zonos-cart-restricted-items",null),!e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Le,message:y}))))),(l.step==="finish"||l.step==="error")&&t("div",{class:"zonos--done","data-theme":z},t("div",{class:"zonos--header"},S(),!e.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:pe}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:z})),t("zonos-checkout-finish",{borderRadius:m,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:l.step==="error"&&!!l.error?Object.assign(Object.assign({},l.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":z,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return t(n,{class:le(["zonos--checkout zonos--elements",l.step==="payment"&&"zonos--processing-payment",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():t("zonos-dialog",{borderStyle:m,"data-theme":z,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},A()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:M("Don't close"),dialogConfirmBtnText:M("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:M("Would you like to close checkout and return to the site?"),dialogTitle:M("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:M("Return to merchant site"),dialogConfirmBtnText:M("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((i=this.placedOrderInfo)===null||i===void 0?void 0:i.zonosOrderNumber)?M("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):M("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((s=this.placedOrderInfo)===null||s===void 0?void 0:s.time)||null),time:this.formatTime(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null)}),dialogTitle:M("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:M("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:M("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),x&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:M("Cancel"),dialogConfirmBtnText:M("Pay [orderTotal]",{orderTotal:H({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:M("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:M("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:M("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:M("You are being sent back to the shop to re-add items to your cart."),dialogTitle:M("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}());Ze.style=Ue}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-5fc34563.system.js","./p-
|
|
1
|
+
System.register(["./p-5fc34563.system.js","./p-89c5164b.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js"],(function(t){"use strict";var s,o,n,f,a;return{setters:[function(t){s=t.r;o=t.h;n=t.H},function(t){f=t.f},function(t){a=t.c},function(){}],execute:function(){var e=":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var i=e;var r=t("zonos_v_stack",function(){function t(t){s(this,t);this.spacing=24}t.prototype.render=function(){return o(n,{key:"d65f235ba8ffaefff1ec5e5bbd8bba1313e97a83",style:{"--zonos--font-family":f()}},o("div",{key:"31806036975f9640fdccafcc11053596dd17f4ef",class:a(["vstack"]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},o("slot",{key:"a3c5a3f592f86cfd9ebb810c72e2e22011ec4758"})))};return t}());r.style=i}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as o,H as i}from"./p-b30c2ad9.js";import{c as n}from"./p-1c5ba523.js";import{i as s,e as r,s as c,a as l}from"./p-7eb8e2d4.js";import{z as a,e as d,f as h}from"./p-7af39c98.js";import{g as u,i as p,a as f}from"./p-e7b0c156.js";import{h as m,l as g}from"./p-41dd1cb8.js";import{l as v}from"./p-0a377722.js";import"./p-d42b5113.js";import"./p-e688e493.js";import"./p-0ffd710e.js";const w=t=>{const e=document.querySelector(t);if(!document.querySelector("zonos-hello")&&e){const t=document.createElement("zonos-hello");return e.appendChild(t),!0}return!1},y=t=>{switch(t){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},S=({position:t="bottom-right"})=>{const e=".zonos--hello-mobile-wrapper";if(document.querySelector(e))return e;const o=document.createElement("div");return o.className="zonos--hello-mobile-wrapper",o.style.position="fixed","top-right"===t&&(o.style.top="72px",o.style.right="24px"),"top-left"===t&&(o.style.top="72px",o.style.left="24px"),"bottom-right"===t&&(o.style.bottom="72px",o.style.right="24px"),"bottom-left"===t&&(o.style.bottom="72px",o.style.left="24px"),o.style.zIndex="2147483647",document.body.appendChild(o),e},b=async t=>{if(window.Zonos.isLegacyCheckout)return void v("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:e}=t;let o=e;if(!t.anchorElementSelector&&t.desktopLocation){const t=S({position:"bottom-right"});o=t}if(o&&s(o)){if(v("Hello init complete"),!w(o)){const e=new MutationObserver((()=>{w(o)&&e.disconnect()}));e.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{w(o)}),1e3),setTimeout((()=>{if(t.notFoundElementFallback){v(`Hello anchor selector ${t.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${t.notFoundElementFallback}`,"info");const e=S({position:y(t.notFoundElementFallback)});w(e)}}),3e3)}}else g(`Selector anchorElementSelector "${t.anchorElementSelector}" is not a valid selector.`)};class z{constructor(t,e){this.targetId=t,this.allowedEvents=e,this.listeners=new Map,this.handleMessage=t=>{var e,o,i;const n=t.data,s=(null===(e=this.iframe)||void 0===e?void 0:e.contentWindow)||(null===(i=null===(o=this.iframe)||void 0===o?void 0:o.contentDocument)||void 0===i?void 0:i.defaultView);if(t.source!==s)return;if(!this.isValidMessage(n))return;const r=this.listeners.get(n.type);null==r||r.forEach((t=>{try{t(n.payload)}catch(t){g("Error in event listener:",t)}}))},this.initializeEventListeners(),this.iframe=document.getElementById(this.targetId)}initializeEventListeners(){window.addEventListener("message",this.handleMessage)}isValidMessage(t){if(!t||"object"!=typeof t)return!1;const e=t;return e.id===this.targetId&&"string"==typeof e.type&&this.allowedEvents.includes(e.type)&&void 0!==e.payload}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),v(`[CheckoutAddressService] listening to ${t}`,"info");const o=e,i=this.listeners.get(t);return i&&i.add(o),()=>{const e=this.listeners.get(t);e&&e.delete(o)}}destroy(){window.removeEventListener("message",this.handleMessage),this.listeners.clear()}}class j extends z{constructor(){v("=== [Google Places Service] Initializing","info"),super(p.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])}sendMessage(t,e){var o;if(!(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow))return;const i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:e,type:t};v(`GooglePlacesService] parent --\x3e ${t}`,"info",e),this.iframe.contentWindow.postMessage(i,"*")}initialize(){this.sendMessage("initializeGooglePlacesService",{})}fetchSuggestions({country:t,query:e,type:o}){t&&this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[t],input:e},type:o})}selectPlace({placeId:t,type:e}){this.sendMessage("placeSelected",{placeId:t,type:e})}}class O{constructor(){this.googlePlaceInitialized=!1,v("=== [CheckoutAddressService] Initializing","info"),this.googlePlaces=new j,this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{v("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info"),this.googlePlaceInitialized=!0})),this.initialize()}initialize(){this.googlePlaces.initialize()}onInitializeGooglePlacesService(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{v("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService"),t()}))}isGooglePlaceInitialized(){return this.googlePlaceInitialized}onAddressSuggestions(t){return this.suggestionsCallback=t,this.googlePlaces.on("onFetchAutocompleteSuggestions",((...e)=>{v(`[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ${e[0].type}`,"info",...e),t(...e)}))}onAddressSelected(t){return this.placeSelectedCallback=t,this.googlePlaces.on("onPlaceSelected",((...e)=>{v(`[CheckoutAddressService] parent <-- onPlaceSelected ${e[0].type}`,"info",...e),t(...e)}))}getAddressSuggestions({country:t,query:e,type:o}){this.googlePlaceInitialized&&this.googlePlaces.fetchSuggestions({country:t,query:e,type:o})}selectAddress({placeId:t,type:e}){this.googlePlaces.selectPlace({placeId:t,type:e})}destroy(){this.googlePlaces.destroy(),this.suggestionsCallback&&(this.suggestionsCallback=void 0),this.placeSelectedCallback&&(this.placeSelectedCallback=void 0)}}const I=class{constructor(o){t(this,o),this.paypalInitEvent=e(this,"paypalInitEvent",7),this.stripeInitEvent=e(this,"stripeInitEvent",7)}async initCheckoutElement(t){var e;t?(n.stripe=t,((e=a.checkoutSettings).placeOrderButtonSelector||e.alwaysTriggerInternationalCheckoutSelector||window.Zonos.cartData)&&(!e.placeOrderButtonSelector||s(e.placeOrderButtonSelector)?!e.alwaysTriggerInternationalCheckoutSelector||s(e.alwaysTriggerInternationalCheckoutSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const t=document.createElement("zonos-checkout");document.body.appendChild(t)}})():g(`Selector alwaysTriggerInternationalCheckoutSelector "${e.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`):g(`Selector checkoutButtonAnchor "${e.placeOrderButtonSelector}" is not a valid selector`)),v("init checkout element")):v("Stripe is not loaded yet - cannot init checkout element","warn")}async initCollectElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-collect")){const t=document.createElement("zonos-collect");document.body.appendChild(t)}})(),v("init Collect element")):v("Stripe is not loaded yet - cannot init Collect element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const t=document.createElement("zonos-notification");document.body.appendChild(t)}async setupGoogleFont(t){var e,o;const i=t||h();if("Inter"===i){if(!t)return;v("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:t})}const n=new URLSearchParams;n.set("family",i);const{errors:s,json:r}=await m(`/api/zonos-elements/get-font-detail?${n.toString()}`);if(s.length>0)return v(`Failed to load font ${i}`,"warn"),void(a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:"Inter"}));const c=null==r?void 0:r.fontUrl;c&&(null===(o=(e=window.Zonos).injectSupportGoogleFont)||void 0===o||o.call(e,c)),t&&(v(`[FONT] ${t} font override applied`),a.appearance=Object.assign(Object.assign({},a.appearance),{fontFamily:t}))}handleLocationChange(){b(a.helloSettings)}initHistoryListener(){const t=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)};const e=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),e.apply(this,arguments)}}injectCustomHTML(t){if(!t)return;if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect)return void v("=== Skip injecting custom HTML for hosted checkout","info");v("=== Injecting custom HTML for hosted checkout");const e=document.createElement("template");e.innerHTML=t,e.content.querySelectorAll("script").forEach((t=>{const e=document.createElement("script");t.src?(e.src=t.src,e.async=t.async):e.textContent=t.innerHTML,document.body.appendChild(e)}))}async initGooglePlacesService(t){const e=null==t?void 0:t.genericSettings;if(!e)return;const o=e.signedTokenGooglePlaces;o&&f({id:p.GOOGLE_PLACES,onload:()=>{a.checkoutAddressService=new O},src:`https://route.elements.zonos.com/iframe/google-maps?signedToken=${o}`})}buildBaseConfig(t){var e,o;const i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0});if(window.Zonos.isCollect)return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})});if(!this.config.checkoutSettings)return Object.assign(Object.assign({},this.config),{checkoutSettings:void 0});const n=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(e=this.config.checkoutSettings)||void 0===e?void 0:e.successBehavior);return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:n?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:n?(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||(null==t?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})}async componentWillLoad(){this.initHistoryListener(),a.zonosApiKey=this.zonosApiKey,(async()=>{var t,e,o,i;const{errors:n,json:s,zonosMode:c}=await(async()=>{if(window.Zonos.cartSettings)return v("Reusing cached zonos settings"),{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const t=u(),e=new URLSearchParams;t.overrideShouldEnabledCustomAddress&&e.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress);const{errors:o,json:i,zonosMode:n}=await m(`/api/zonos-elements/zonos-settings?${e.toString()}`);return o.length?(g("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null,zonosMode:n}):{errors:[],json:i,zonosMode:n}})();if("403"===(null===(e=null===(t=n[0])||void 0===t?void 0:t.type)||void 0===e?void 0:e.toString()))return void v("Failed to load zonos settings. This domain may not have access","warn");const l=(null===(o=null==s?void 0:s.checkoutSettings)||void 0===o?void 0:o.customHTML)||"";this.injectCustomHTML(l),this.initZonosNotification();const h=this.buildBaseConfig(s),p=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var t,e,o;return window.Zonos.isLegacyCheckout?(null===(t=null==s?void 0:s.appearanceSettings)||void 0===t?void 0:t.logoUrl)||(null===(e=this.config.appearance)||void 0===e?void 0:e.logoUrl):null===(o=this.config.appearance)||void 0===o?void 0:o.logoUrl})()})}),h);d({overrideSettings:p,zonosSettings:s}),a.zonosMode=c,this.setupGoogleFont(),"DISABLED"===a.helloSettings.visibilityStatus&&v("=== Hello is disabled by store owner ===","warn"),a.helloSettings&&"ENABLED"===a.helloSettings.visibilityStatus&&(v("Initializing hello"),b(a.helloSettings)),await r();const f=(null===(i=null==s?void 0:s.checkoutSettings)||void 0===i?void 0:i.externalServiceTokens.find((t=>"STRIPE_PUBLISHABLE_TOKEN"===t.type)))||null;if(f&&this.stripeInitEvent){if(window.Zonos.isCollect)return this.stripeInitEvent.emit({publishableKey:f.token}),void this.initGooglePlacesService(s);if("INACTIVE"===a.checkoutSettings.subscriptionStatus)return v('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void v("zonos controller loaded");if("DISABLED"===a.checkoutSettings.visibilityStatus)return v("=== Checkout is disabled by store owner ===","warn"),void v("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:f.token}),this.initGooglePlacesService(s)}else v("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(t){const e=document.querySelector("zonos-notification");e?e.showNotification(t):v("Failed to show notification - zonos-notification not found","warn")}async reset(){c.checkoutSessionId=null,n.clientSecret=""}async overrideConfig(t){d({overrideSettings:t,zonosSettings:null})}async overrideCountry(t){v(`Override country code to ${t}`),l(t)}async getAppearanceSetting(){return a.appearance}async updateOrganizationName(t){a.organizationName=t}render(){return o(i,{key:"9554e2f66703eea438104c61265d0e6571d07741",class:"zonos--elements"})}};I.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{I as zonos_controller}
|