@zonos/elements 1.3.4-alpha.1 → 1.3.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-cfa5d5fd.js → cart-f31374d4.js} +4 -4
- package/dist/cjs/{getBorderRadius-c3c63ee6.js → getBorderRadius-cd7ef574.js} +1 -1
- package/dist/cjs/{index-0dcccc22.js → index-3ead02fe.js} +56 -22
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{isDarkColor-fc8c294a.js → isDarkColor-5eda1323.js} +7 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-4746acf7.js → localization-d43e1540.js} +1 -1
- package/dist/cjs/{submitGtag-ca175427.js → submitGtag-42f29b3a.js} +2 -2
- package/dist/cjs/zonos-address_2.cjs.entry.js +12 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +7 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +4 -3
- package/dist/cjs/zonos-button_2.cjs.entry.js +11 -9
- package/dist/cjs/zonos-card_2.cjs.entry.js +10 -8
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +36 -26
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -8
- package/dist/cjs/zonos-component.cjs.entry.js +4 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +9 -8
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +19 -15
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +44 -27
- package/dist/cjs/zonos-icon.cjs.entry.js +4 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +6 -5
- package/dist/cjs/zonos-payment.cjs.entry.js +9 -8
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +6 -5
- package/dist/cjs/zonos-text.cjs.entry.js +4 -3
- package/dist/cjs/{zonosStore-10d1d6ff.js → zonosStore-b88b5671.js} +571 -332
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +2 -2
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/components/isDarkColor.js +7 -3
- package/dist/components/zonos-address2.js +3 -2
- package/dist/components/zonos-badge2.js +6 -5
- package/dist/components/zonos-banner2.js +3 -2
- package/dist/components/zonos-button2.js +6 -5
- package/dist/components/zonos-card2.js +5 -4
- package/dist/components/zonos-cart-items2.js +3 -2
- package/dist/components/zonos-cart-subtotal2.js +2 -1
- package/dist/components/zonos-checkout-finish2.js +3 -2
- package/dist/components/zonos-checkout-payment2.js +2 -1
- package/dist/components/zonos-checkout.js +2 -1
- package/dist/components/zonos-collapse2.js +5 -4
- package/dist/components/zonos-component.js +3 -2
- package/dist/components/zonos-controller.js +4 -3
- package/dist/components/zonos-country-flag2.js +3 -2
- package/dist/components/zonos-country-select2.js +6 -5
- package/dist/components/zonos-custom-message2.js +5 -4
- package/dist/components/zonos-customer-info2.js +2 -1
- package/dist/components/zonos-dialog2.js +6 -5
- package/dist/components/zonos-hello-dialog-footer2.js +4 -3
- package/dist/components/zonos-hello-dialog2.js +4 -3
- package/dist/components/zonos-hello.js +42 -25
- package/dist/components/zonos-icon2.js +3 -2
- package/dist/components/zonos-link-authentication2.js +3 -2
- package/dist/components/zonos-logo2.js +5 -4
- package/dist/components/zonos-notification2.js +5 -4
- package/dist/components/zonos-payment2.js +3 -2
- package/dist/components/zonos-review2.js +2 -1
- package/dist/components/zonos-shipping-rich-radio2.js +4 -3
- package/dist/components/zonos-shipping2.js +2 -1
- package/dist/components/zonos-spinner2.js +2 -1
- package/dist/components/zonos-text2.js +3 -2
- package/dist/components/zonos-v-stack2.js +5 -4
- package/dist/components/zonosStore.js +571 -331
- package/dist/esm/{cart-d81b92ea.js → cart-c9124cc3.js} +4 -4
- package/dist/esm/{getBorderRadius-77e97943.js → getBorderRadius-9e4cb3b1.js} +1 -1
- package/dist/esm/{index-36ff6342.js → index-81a199ef.js} +56 -22
- package/dist/esm/index.js +6 -6
- package/dist/esm/{isDarkColor-69090b29.js → isDarkColor-8696cb70.js} +7 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{localization-0c5b29fd.js → localization-5d83fde2.js} +1 -1
- package/dist/esm/{submitGtag-8a0fbd41.js → submitGtag-a7d07aec.js} +2 -2
- package/dist/esm/zonos-address_2.entry.js +12 -10
- package/dist/esm/zonos-badge.entry.js +7 -6
- package/dist/esm/zonos-banner.entry.js +4 -3
- package/dist/esm/zonos-button_2.entry.js +11 -9
- package/dist/esm/zonos-card_2.entry.js +10 -8
- package/dist/esm/zonos-cart-items_10.entry.js +36 -26
- package/dist/esm/zonos-checkout.entry.js +9 -8
- package/dist/esm/zonos-component.entry.js +4 -3
- package/dist/esm/zonos-controller.entry.js +9 -8
- package/dist/esm/zonos-country-flag_4.entry.js +19 -15
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +7 -6
- package/dist/esm/zonos-hello.entry.js +44 -27
- package/dist/esm/zonos-icon.entry.js +4 -3
- package/dist/esm/zonos-notification.entry.js +6 -5
- package/dist/esm/zonos-payment.entry.js +9 -8
- package/dist/esm/zonos-shipping-rich-radio.entry.js +6 -5
- package/dist/esm/zonos-text.entry.js +4 -3
- package/dist/esm/{zonosStore-34f07ee8.js → zonosStore-e59617f8.js} +572 -332
- package/dist/esm-es5/{cart-d81b92ea.js → cart-c9124cc3.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-77e97943.js → getBorderRadius-9e4cb3b1.js} +1 -1
- package/dist/esm-es5/index-81a199ef.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isDarkColor-8696cb70.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-0c5b29fd.js → localization-5d83fde2.js} +1 -1
- package/dist/esm-es5/{submitGtag-8a0fbd41.js → submitGtag-a7d07aec.js} +1 -1
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-icon.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonosStore-e59617f8.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0024f8c2.js +1 -0
- package/dist/zonos-elements/p-027abb50.entry.js +1 -0
- package/dist/zonos-elements/{p-a54d8db3.system.js → p-12ecf765.system.js} +1 -1
- package/dist/zonos-elements/p-139fc767.entry.js +1 -0
- package/dist/zonos-elements/p-1c00ffea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c1e298d5.system.entry.js → p-21793192.entry.js} +1 -1
- package/dist/zonos-elements/p-26edde4d.system.entry.js +1 -0
- package/dist/zonos-elements/p-28d7b75d.entry.js +1 -0
- package/dist/zonos-elements/p-2ac66cea.system.entry.js +1 -0
- package/dist/zonos-elements/p-39d12bf0.entry.js +1 -0
- package/dist/zonos-elements/p-3d965e88.entry.js +1 -0
- package/dist/zonos-elements/p-410045c5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c0494ed6.entry.js → p-43220d68.entry.js} +1 -1
- package/dist/zonos-elements/p-4d39efb6.system.js +2 -0
- package/dist/zonos-elements/p-4d8545e1.js +2 -0
- package/dist/zonos-elements/{p-ed074fbf.system.js → p-51a40ddf.system.js} +1 -1
- package/dist/zonos-elements/{p-5bada106.system.entry.js → p-5a0264e8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5d91e45c.entry.js +1 -0
- package/dist/zonos-elements/p-62851827.system.entry.js +1 -0
- package/dist/zonos-elements/p-73174d0c.system.entry.js +1 -0
- package/dist/zonos-elements/p-741a1402.system.entry.js +1 -0
- package/dist/zonos-elements/p-7748735d.entry.js +1 -0
- package/dist/zonos-elements/p-7cae86a0.system.entry.js +1 -0
- package/dist/zonos-elements/p-7f68c103.system.js +1 -0
- package/dist/zonos-elements/p-83bb8727.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a244579e.js → p-8ebc0b64.js} +1 -1
- package/dist/zonos-elements/p-97e659b7.entry.js +1 -0
- package/dist/zonos-elements/p-9f3cad08.entry.js +1 -0
- package/dist/zonos-elements/{p-ab179c88.system.js → p-a6f2e282.system.js} +1 -1
- package/dist/zonos-elements/p-afed9236.entry.js +1 -0
- package/dist/zonos-elements/{p-24fbe845.system.js → p-b035f9e5.system.js} +1 -1
- package/dist/zonos-elements/{p-3509ffaa.entry.js → p-b1ffb37b.entry.js} +1 -1
- package/dist/zonos-elements/{p-17ef815f.entry.js → p-b494d540.entry.js} +1 -1
- package/dist/zonos-elements/{p-06a332cd.js → p-b87fa3a1.js} +1 -1
- package/dist/zonos-elements/{p-ab00288a.entry.js → p-bd02a65c.entry.js} +1 -1
- package/dist/zonos-elements/p-be23cc91.system.entry.js +1 -0
- package/dist/zonos-elements/p-bea31a7b.system.entry.js +1 -0
- package/dist/zonos-elements/p-c134eecd.system.js +1 -0
- package/dist/zonos-elements/p-d170748c.system.entry.js +1 -0
- package/dist/zonos-elements/p-dc09ca69.system.js +1 -0
- package/dist/zonos-elements/{p-2b41549a.js → p-e59b6648.js} +1 -1
- package/dist/zonos-elements/p-e8da4463.js +1 -0
- package/dist/zonos-elements/{p-ccd1794a.system.entry.js → p-eb96f893.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5066955b.system.js → p-ee8b44c0.system.js} +1 -1
- package/dist/zonos-elements/{p-935fa685.system.entry.js → p-efd1544b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f2733cc7.js +1 -0
- package/dist/zonos-elements/{p-e6556b0d.entry.js → p-f342e7c7.entry.js} +1 -1
- package/dist/zonos-elements/p-f7b1dfd0.system.entry.js +1 -0
- package/dist/zonos-elements/p-f82e000f.system.entry.js +1 -0
- package/dist/zonos-elements/p-ffc91e42.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +29 -29
- package/dist/esm-es5/index-36ff6342.js +0 -2
- package/dist/esm-es5/isDarkColor-69090b29.js +0 -1
- package/dist/esm-es5/zonosStore-34f07ee8.js +0 -1
- package/dist/zonos-elements/p-02175f85.entry.js +0 -1
- package/dist/zonos-elements/p-124857ae.entry.js +0 -1
- package/dist/zonos-elements/p-18904b7c.system.js +0 -2
- package/dist/zonos-elements/p-1f494581.system.entry.js +0 -1
- package/dist/zonos-elements/p-2e1e9074.js +0 -1
- package/dist/zonos-elements/p-3c8763a7.entry.js +0 -1
- package/dist/zonos-elements/p-3e7444c6.entry.js +0 -1
- package/dist/zonos-elements/p-4b3baf99.js +0 -1
- package/dist/zonos-elements/p-53ea93c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-67154df2.system.entry.js +0 -1
- package/dist/zonos-elements/p-684ed483.entry.js +0 -1
- package/dist/zonos-elements/p-72cfaee2.system.entry.js +0 -1
- package/dist/zonos-elements/p-7730250d.system.js +0 -1
- package/dist/zonos-elements/p-80748529.system.entry.js +0 -1
- package/dist/zonos-elements/p-86f22026.js +0 -1
- package/dist/zonos-elements/p-88600956.entry.js +0 -1
- package/dist/zonos-elements/p-8b1cb8a4.entry.js +0 -1
- package/dist/zonos-elements/p-8bd04aaa.entry.js +0 -1
- package/dist/zonos-elements/p-956efa27.js +0 -2
- package/dist/zonos-elements/p-9c1f19b6.entry.js +0 -1
- package/dist/zonos-elements/p-a063c4b7.entry.js +0 -1
- package/dist/zonos-elements/p-a174d834.system.js +0 -1
- package/dist/zonos-elements/p-b3a71ae4.system.entry.js +0 -1
- package/dist/zonos-elements/p-b3e034bb.system.entry.js +0 -1
- package/dist/zonos-elements/p-bb7de2c4.system.entry.js +0 -1
- package/dist/zonos-elements/p-c1665c4f.system.js +0 -1
- package/dist/zonos-elements/p-c520d819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca875e60.system.entry.js +0 -1
- package/dist/zonos-elements/p-e2c7adaa.system.entry.js +0 -1
- package/dist/zonos-elements/p-e3bca405.entry.js +0 -1
- package/dist/zonos-elements/p-e58cc024.entry.js +0 -1
- package/dist/zonos-elements/p-f1e9b431.system.entry.js +0 -1
- package/dist/zonos-elements/p-fbc09dae.system.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as t,h as e,H as s}from"./p-4d8545e1.js";import{k as i,a as n,t as a}from"./p-8ebc0b64.js";import{z as l}from"./p-e8da4463.js";import{c as r}from"./p-b4b7f705.js";import{g as h}from"./p-5883217a.js";const d=class{constructor(e){o(this,e),this.closeDialog=t(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||this.setShowCountrySelect(!1)}render(){var o;const{countryLandedCost:t,selectedCountryCode:d}=n,c=(null==t?void 0:t.dutyDeminimus)?i(t.dutyDeminimus):null,m="CA"===n.selectedCountryCode?i(40):c,g=m?`${a("Spend")} ${m} ${a("duty free")}`:a("Duties will apply to all orders"),f=(null==t?void 0:t.vatTaxDeminimus)?i(t.vatTaxDeminimus):null,u="CA"===n.selectedCountryCode?i(150):f,b=u?`${a("Spend")} ${u} ${a("tax free")}`:a("Taxes will apply to all orders"),p=this.animateFromLeftOverride||this.dialogRef&&h(this.dialogRef),w=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:z}=n,v=`${a("Welcome to")} ${l.organizationName}!`,C=(null===(o=z.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),x=this.getCurrentPageEnum(),k=z.filter((o=>o.pageName===x));return e(s,{key:"09c2e005a701cf41134f1613c1bbf7214782b24c",class:"zonos--elements"},e("div",{key:"ad9675ef097ea4b21bbdb99b5f30d64c45c744e5","aria-hidden":"true",class:r(["zonos--hello-dialog",p&&"zonos--hello-dialog-animate-from-left",w&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},e("div",{key:"54f5da38c7ff31b3d848a83ca87b4514cf51de20",class:"zonos--hello-dialog-content"},e("zonos-button",{key:"31b30feb4e314c23932aa433f6a3d9564f28a56d",class:"zonos--close-button",icon:e("zonos-icon",{content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),e("div",null,this.showCountrySelect?e("zonos-country-select",{closeCountrySelect:()=>this.setShowCountrySelect(!1)}):e("zonos-v-stack",{spacing:24},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:d}),e("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},e("zonos-text",{type:"boldSubheader"},v),e("zonos-text",{color:"gray-800"},C)),e("zonos-v-stack",{spacing:8},this.restrictedItems.map((o=>{var t;return o&&e("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(t=o.itemRestrictions)||void 0===t?void 0:t.map((o=>e("zonos-text",{color:"red-800"},null==o?void 0:o.note))))})),e("zonos-card",{spacing:"12px"},e("zonos-v-stack",{spacing:12},e("div",{class:"zonos--flex-message"},e("zonos-icon",{content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,g)),e("div",{class:"zonos--flex-message"},e("zonos-icon",{content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,b)))),k.map((o=>e("zonos-custom-message",{icon:'<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',message:o.message}))))))),!this.showCountrySelect&&e("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o)})))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};d.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{d as zonos_hello_dialog}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-4d39efb6.system.js"],(function(e,o){"use strict";var t,i;return{setters:[function(o){t=o.p;i=o.b;e("setNonce",o.s)}],execute:function(){var e=function(){var e=o.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return t(i)};e().then((function(e){return i([["p-5a0264e8.system",[[1,"zonos-text",{class:[1],color:[1],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-741a1402.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-f82e000f.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64]},[[9,"resize","handleResize"]]]]],["p-62851827.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-7cae86a0.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-83bb8727.system",[[1,"zonos-country-select",{closeCountrySelect:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[1,"zonos-country-flag",{class:[1],countryCode:[1,"country-code"],size:[2]}]]],["p-eb96f893.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-73174d0c.system",[[1,"zonos-notification",{class:[1],notificationArray:[32],showNotification:[64]}]]],["p-bea31a7b.system",[[1,"zonos-badge",{bold:[4],color:[1],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4],class:[1]}]]],["p-f7b1dfd0.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-be23cc91.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-2ac66cea.system",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32]},null,{stripe:["watchInitStripe"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}]]],["p-1c00ffea.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],class:[1],hasContent:[32]}]]],["p-26edde4d.system",[[1,"zonos-card",{actions:[16],class:[1],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}],[1,"zonos-v-stack",{spacing:[2],class:[1]}]]],["p-410045c5.system",[[1,"zonos-icon",{autoHeight:[4,"auto-height"],color:[1],content:[1],size:[2]}]]],["p-efd1544b.system",[[1,"zonos-button",{class:[1],color:[1],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],color:[1]}]]],["p-d170748c.system",[[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32]}],[1,"zonos-logo",{theme:[1],width:[1],class:[1]}]]]],e)}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s,d as o,H as h}from"./p-
|
|
1
|
+
import{r as t,h as s,d as o,H as h}from"./p-4d8545e1.js";import{d as i}from"./p-e8da4463.js";const r=class{constructor(s){t(this,s),this.autoHeight=!1,this.color="gray-1200",this.content=void 0,this.size=24}render(){return this.content&&this.el.shadowRoot?(this.el.shadowRoot.innerHTML=this.content,s(h,{class:"zonos--elements",style:{"--color":`var(--amino-${this.color})`,"--font-family":i(),"--height":this.autoHeight?"auto":`${this.size}px`,"--width":`${this.size}px`}})):null}get el(){return o(this)}};r.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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(--width);height:var(--height);fill:var(--color);color:var(--color)}";export{r as zonos_icon}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as s,F as t,H as c}from"./p-956efa27.js";import{k as e,c as n,h as i,g as a,s as h,l as r,j as l,m as u,d,n as z,o as m,e as k}from"./p-2b41549a.js";import{a as p,l as g,t as f}from"./p-a244579e.js";import{z as v,m as b}from"./p-86f22026.js";import{s as w,i as y}from"./p-06a332cd.js";import{c as x}from"./p-b4b7f705.js";import{g as C}from"./p-2e1e9074.js";import{i as B}from"./p-4b3baf99.js";const j='<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',I='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',L=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,t;const c=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||v.appearance.theme;await e({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideTheme:this.isMobile?c:void 0})},this.isShippableCountry=(o=!0)=>!(!p.localizationLoaded||!p.isShippableCountry&&(o&&g("Checkout: not shippable country"),1)),this.getCurrentLocalePageEnum=()=>{switch(n.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0}async initCartInfoHandler(o){i(o.detail)}async closeDialogHandler(){w("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==n.step||a(),n.step="customer-info"}async buildCartAndInit(){if(v.checkoutSettings.buildCartDetail){g("build cart detail");const o=await v.checkoutSettings.buildCartDetail();await i(o)}if(!h.clientSecret){const o=await r();if(g(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=v.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(o).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(this.isShippableCountry()){o.preventDefault(),o.stopPropagation(),g("zonos checkout button clicked"),h.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");w("zonos-checkout-start")}catch(o){h.isFetchingSession=!1,l({messages:[f("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:f("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe;const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const t=this.isShippableCountry(!1),c=document.querySelectorAll(s);t?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,t=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=t||"initial"}))}),100),s=setInterval((()=>{h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(g("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):g("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){n.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await u();const o=setInterval((()=>{!n.landedCostData&&h.isFetchingLandedCost||(n.landedCostData&&d(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{d(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await z(),d()}catch(o){console.error(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(m(),this.preview)return n.step="customer-info",void await this.init();a();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==n.step?k():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=y(this.mobile),this.applyStripeTheme(),g(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=y(this.mobile),this.applyStripeTheme(),g(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=y(this.mobile),g(`mobile: ${this.isMobile}`)}disconnectedCallback(){m(),a()}render(){var o;const e="finish"!==n.step&&"error"!==n.step&&!h.stripeElements||h.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:l}=b(v.appearance,this.appearanceSettingsOverride),u="ENABLED"===v.appearance.zonosAttribution,d=v.appearance.theme,z=i&&B(i)?"DARK":"LIGHT",m=this.isMobile?d:z,k=this.isMobile?void 0:a,{customMessages:g}=p,w=(null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message)||"Know about duties and taxes before you buy. Shop with confidence!",y=this.getCurrentLocalePageEnum(),L=g.filter((o=>o.pageName===y)),H=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${v.organizationName} logo`,src:r,width:100})),S=()=>s("zonos-v-stack",null,H(),L.map((o=>s("zonos-custom-message",{icon:j,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{content:'<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},f("Back")))),M=()=>u&&s("div",{class:"zonos--footer","data-theme":d},s("zonos-text",{type:"hintText"},f("Powered by")),s("zonos-logo",{theme:d,width:"100px"})),T=()=>{var o;const c=this.isMobile?"primary":void 0,e=null===(o=this.zonosReviewRef)||void 0===o?void 0:o.scrollHeight;return s("div",{class:"zonos--content",style:{"--border-radius":C(l)}},"finish"!==n.step&&"error"!==n.step&&s(t,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&S(),"customer-info"===n.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k,submitBtnType:c}),"shipping"===n.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k,submitBtnType:c}),"payment"===n.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:k,submitBtnType:c})),s("div",{class:"zonos--right","data-theme":d},this.isMobile&&S(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:I}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-collapse",{collapseSize:e,collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)},ref:o=>this.zonosReviewRef=o}),s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:j,message:w}))),!this.isMobile&&M()),this.isMobile&&M()),("finish"===n.step||"error"===n.step)&&s("div",{class:"zonos--done","data-theme":d},s("div",{class:"zonos--header"},H(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:I}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:d})),s("zonos-checkout-finish",{borderRadius:l,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===n.step&&n.error?Object.assign(Object.assign({},n.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})))};return s(c,{class:x(["zonos--checkout zonos--elements",u&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?T():s("zonos-dialog",{borderStyle:l,"data-theme":d,height:"980px",isLoading:e,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};L.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-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(--border-radius, var(--amino-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:var(--amino-space-48) var(--amino-space-56)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0);padding-bottom:var(--amino-space-80)}.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(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);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--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.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}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;position:absolute;bottom:var(--amino-space-32);right:var(--amino-space-56);gap:var(--amino-space-8)}.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.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.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:var(--amino-space-12)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.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;gap:var(--amino-space-16);margin-top:var(--amino-space-24);border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.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}.mobile.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{bottom:0;left:0;padding:var(--amino-space-12);position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-gray-0)}";export{L as zonos_checkout}
|
|
1
|
+
import{r as o,h as s,F as t,H as c}from"./p-4d8545e1.js";import{k as e,c as n,h as i,g as a,s as h,l as r,j as l,m as u,d,n as z,o as m,e as k}from"./p-e59b6648.js";import{a as p,l as g,t as f}from"./p-8ebc0b64.js";import{z as v,m as b}from"./p-e8da4463.js";import{s as w,i as y}from"./p-b87fa3a1.js";import{c as x}from"./p-b4b7f705.js";import{g as C}from"./p-f2733cc7.js";import{i as B}from"./p-0024f8c2.js";const j='<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',I='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',L=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,t;const c=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||v.appearance.theme;await e({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideTheme:this.isMobile?c:void 0})},this.isShippableCountry=(o=!0)=>!(!p.localizationLoaded||!p.isShippableCountry&&(o&&g("Checkout: not shippable country"),1)),this.getCurrentLocalePageEnum=()=>{switch(n.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0}async initCartInfoHandler(o){i(o.detail)}async closeDialogHandler(){w("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==n.step||a(),n.step="customer-info"}async buildCartAndInit(){if(v.checkoutSettings.buildCartDetail){g("build cart detail");const o=await v.checkoutSettings.buildCartDetail();await i(o)}if(!h.clientSecret){const o=await r();if(g(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=v.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(o).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(this.isShippableCountry()){o.preventDefault(),o.stopPropagation(),g("zonos checkout button clicked"),h.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");w("zonos-checkout-start")}catch(o){h.isFetchingSession=!1,l({messages:[f("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:f("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe;const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const t=this.isShippableCountry(!1),c=document.querySelectorAll(s);t?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,t=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=t||"initial"}))}),100),s=setInterval((()=>{h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(g("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):g("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){n.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await u();const o=setInterval((()=>{!n.landedCostData&&h.isFetchingLandedCost||(n.landedCostData&&d(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{d(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await z(),d()}catch(o){console.error(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(m(),this.preview)return n.step="customer-info",void await this.init();a();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==n.step?k():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=y(this.mobile),this.applyStripeTheme(),g(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=y(this.mobile),this.applyStripeTheme(),g(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=y(this.mobile),g(`mobile: ${this.isMobile}`)}disconnectedCallback(){m(),a()}render(){var o;const e="finish"!==n.step&&"error"!==n.step&&!h.stripeElements||h.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:l}=b(v.appearance,this.appearanceSettingsOverride),u="ENABLED"===v.appearance.zonosAttribution,d=v.appearance.theme,z=i&&B(i)?"DARK":"LIGHT",m=this.isMobile?d:z,k=this.isMobile?void 0:a,{customMessages:g}=p,w=(null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message)||"Know about duties and taxes before you buy. Shop with confidence!",y=this.getCurrentLocalePageEnum(),L=g.filter((o=>o.pageName===y)),H=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${v.organizationName} logo`,src:r,width:100})),S=()=>s("zonos-v-stack",null,H(),L.map((o=>s("zonos-custom-message",{icon:j,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{content:'<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},f("Back")))),M=()=>u&&s("div",{class:"zonos--footer","data-theme":d},s("zonos-text",{type:"hintText"},f("Powered by")),s("zonos-logo",{theme:d,width:"100px"})),T=()=>{var o;const c=this.isMobile?"primary":void 0,e=null===(o=this.zonosReviewRef)||void 0===o?void 0:o.scrollHeight;return s("div",{class:"zonos--content",style:{"--border-radius":C(l)}},"finish"!==n.step&&"error"!==n.step&&s(t,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&S(),"customer-info"===n.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k,submitBtnType:c}),"shipping"===n.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k,submitBtnType:c}),"payment"===n.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:k,submitBtnType:c})),s("div",{class:"zonos--right","data-theme":d},this.isMobile&&S(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:I}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-collapse",{collapseSize:e,collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)},ref:o=>this.zonosReviewRef=o}),s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:j,message:w}))),!this.isMobile&&M()),this.isMobile&&M()),("finish"===n.step||"error"===n.step)&&s("div",{class:"zonos--done","data-theme":d},s("div",{class:"zonos--header"},H(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:I}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:d})),s("zonos-checkout-finish",{borderRadius:l,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===n.step&&n.error?Object.assign(Object.assign({},n.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})))};return s(c,{class:x(["zonos--checkout zonos--elements",u&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?T():s("zonos-dialog",{borderStyle:l,"data-theme":d,height:"980px",isLoading:e,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};L.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-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(--border-radius, var(--amino-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:var(--amino-space-48) var(--amino-space-56)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0);padding-bottom:var(--amino-space-80)}.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(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);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--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.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}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;position:absolute;bottom:var(--amino-space-32);right:var(--amino-space-56);gap:var(--amino-space-8)}.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.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.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:var(--amino-space-12)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.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;gap:var(--amino-space-16);margin-top:var(--amino-space-24);border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.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}.mobile.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{bottom:0;left:0;padding:var(--amino-space-12);position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-gray-0)}";export{L as zonos_checkout}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"./p-
|
|
1
|
+
import{z as o}from"./p-e8da4463.js";import{l as s}from"./p-8ebc0b64.js";const n=o=>o||window.innerWidth<890,t=n=>{const t=o.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));t&&"DISABLED"!==(null==t?void 0:t.status)&&"function"==typeof window.gtag&&(s("Zonos submits gtag event","log",n),window.gtag("event",n,{}))};export{n as i,t as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as r,H as a}from"./p-
|
|
1
|
+
import{r as o,h as r,H as a}from"./p-4d8545e1.js";import{d as s}from"./p-e8da4463.js";import{c as e}from"./p-b4b7f705.js";const t=class{constructor(r){o(this,r),this.handleSlotChange=()=>{this.hasContent=!0},this.bannerTitle=void 0,this.intent=void 0,this.class="",this.hasContent=!1}render(){const o=({color:o})=>{const a=`var(--amino-${o}-800)`,s=`var(--amino-${o}-300)`,[t,n]=[this.bannerTitle,r("slot",{onSlotchange:this.handleSlotChange})].filter(Boolean),i="gray"===o?"gray-1200":`${o}-800`;return r("div",{class:e(["zonos--container"])},r("div",{class:"zonos--icon-wrapper"},r("svg",{color:a,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},r("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:s,"fill-rule":"evenodd"}),r("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),r("div",{class:"zonos--header-wrapper"},r("zonos-text",{color:i,type:"label",weight:600},t)),n&&r("div",{class:"zonos--content-wrapper"},r("zonos-text",{color:i},n)))},t=e(["zonos--elements zonos--banner",this.class,this.intent]),n=s();switch(this.intent){case"error":return r(a,{class:t,style:{"--font-family":n}},o({color:"red"}));case"info":return r(a,{class:t,style:{"--font-family":n}},o({color:"blue"}));case"success":return r(a,{class:t,style:{"--font-family":n}},o({color:"green"}));case"warning":return r(a,{class:t,style:{"--font-family":n}},o({color:"orange"}));default:return r(a,{class:t,style:{"--font-family":n}},o({color:"gray"}))}}};t.style=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}';export{t as zonos_banner}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-4d39efb6.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js","./p-12ecf765.system.js","./p-edbea8df.system.js"],(function(i){"use strict";var o,s,e,t,r,n,a,l,d;return{setters:[function(i){o=i.r;s=i.c;e=i.h;t=i.H},function(i){r=i.d;n=i.z},function(i){a=i.c},function(i){l=i.g},function(i){d=i.i}],execute:function(){var h=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var c=h;var p=i("zonos_shipping_rich_radio",function(){function i(i){var e=this;o(this,i);this.radioSelected=s(this,"radioSelected",7);this.handleRichRadioSelect=function(i){var o;e.selectedItem=i;(o=e.radioSelected)===null||o===void 0?void 0:o.emit(i)};this.getRadioItemStyleVariables=function(){var i=e.borderColor||n.appearance.colorSecondary;var o=d(i)?"var(--amino-".concat(i,")"):i;return{"--border-radius":l(e.borderStyle),"--selected-border-color":o||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.selectedItem=null}i.prototype.render=function(){var i=this;var o;return e(t,{key:"0dc36a16b2f51816755010c46b416b8b1f4b4744",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--font-family":r()})},(o=this.items)===null||o===void 0?void 0:o.map((function(o){var s;var t=((s=i.selectedItem)===null||s===void 0?void 0:s.value)===o.value;return e("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:function(){return i.handleRichRadioSelect(o)}},e("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),e("div",{class:"zonos--shipping-info"},e("div",{class:"zonos--shipping-detail"},e("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&e("div",{class:"zonos--sub-detail"},o.sublabel&&e("zonos-text",{color:"gray-800"},o.sublabel),o.caption&&e("zonos-text",{color:"gray-400"},o.caption))),e("zonos-text",{type:"semiBoldLabel"},o.price)))})))};return i}());p.style=c}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-4d39efb6.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js"],(function(o){"use strict";var a,r,n,e,t;return{setters:[function(o){a=o.r;r=o.h;n=o.H},function(o){e=o.d},function(o){t=o.c}],execute:function(){var s=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";var i=s;var l=o("zonos_badge",function(){function o(o){a(this,o);this.bold=false;this.color="gray";this.icon=undefined;this.iconRight=false;this.size="default";this.rounded=false;this.class=""}o.prototype.render=function(){return r(n,{key:"2d111e91f403ef5c03f742f5dabe9491623be91d",class:t(["zonos--elements zonos--badge",this.class]),style:{"--font-family":e()}},r("div",{key:"e6debe091b732b857f180cee19bec4be435ea524",class:t(["zonos--badge-content",this.color,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,r("zonos-text",{key:"e92c97d77fa5ce279059953f7d7fbc5a0030aa5d"},r("slot",{key:"c93852c3225ba57dd26c26300254f348e349f9ad"}))))};return o}());l.style=i}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-51a40ddf.system.js","./p-dc09ca69.system.js","./p-4d39efb6.system.js","./p-a6f2e282.system.js","./p-7f68c103.system.js","./p-12ecf765.system.js"],(function(s){"use strict";return{setters:[function(t){var e={};e.cartStore=t.c;e.cartStoreApplySubtotals=t.a;e.cartStoreGetShippingTransitInfo=t.b;e.cartStoreNextStep=t.d;e.cartStorePreviousStep=t.e;e.cartStoreReCalculateTotal=t.f;e.cartStoreReset=t.g;e.cartStoreUpdateItems=t.h;e.cartStoreUpdateSelectedShippingOption=t.i;e.cartStoreUpdateToErrorState=t.j;s(e)},function(){},function(){},function(){},function(){},function(){}],execute:function(){}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,s,t,n){function e(o){return o instanceof t?o:new t((function(s){s(o)}))}return new(t||(t=Promise))((function(t,i){function a(o){try{c(n.next(o))}catch(o){i(o)}}function r(o){try{c(n["throw"](o))}catch(o){i(o)}}function c(o){o.done?t(o.value):e(o.value).then(a,r)}c((n=n.apply(o,s||[])).next())}))};var __generator=this&&this.__generator||function(o,s){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,e,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(s){return c([o,s])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,e&&(i=r[0]&2?e["return"]:r[0]?e["throw"]||((i=e["return"])&&i.call(e),0):e.next)&&!(i=i.call(e,r[1])).done)return i;if(e=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;e=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){t.label=r[1];break}if(r[0]===6&&t.label<i[1]){t.label=i[1];i=r;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(r);break}if(i[2])t.ops.pop();t.trys.pop();continue}r=s.call(o,t)}catch(o){r=[6,o];e=0}finally{n=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,s,t){if(t||arguments.length===2)for(var n=0,e=s.length,i;n<e;n++){if(i||!(n in s)){if(!i)i=Array.prototype.slice.call(s,0,n);i[n]=s[n]}}return o.concat(i||Array.prototype.slice.call(s))};System.register(["./p-4d39efb6.system.js","./p-51a40ddf.system.js","./p-a6f2e282.system.js","./p-dc09ca69.system.js","./p-12ecf765.system.js","./p-ee8b44c0.system.js","./p-23e7c655.system.js","./p-7f68c103.system.js"],(function(o){"use strict";var s,t,n,e,i,a,r,c,l,h,u,d,f,p,m,z,g,b,v,y,x;return{setters:[function(o){s=o.r;t=o.a;n=o.h;e=o.H;i=o.F;a=o.c;r=o.d},function(o){c=o.c;l=o.s;h=o.p;u=o.o;d=o.i;f=o.b},function(o){p=o.t;m=o.h},function(o){z=o.z;g=o.d},function(o){b=o.g},function(o){v=o.s;y=o.i},function(o){x=o.c},function(){}],execute:function(){var w=function(o){var s=o.amount,t=o.currency,n=o.showCurrencyText;return n?"".concat(new Intl.NumberFormat("en-US",{currency:t,style:"currency"}).format(s)," ").concat(t):new Intl.NumberFormat("en-US",{currency:t,style:"currency"}).format(s)};var k=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";var C=k;var _=o("zonos_cart_items",function(){function o(o){s(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var s;var i=t("./assets/empty-item.jpeg");var a=((s=c.exchangeRate)===null||s===void 0?void 0:s.rate)||1;return n(e,{key:"945bd402bb5f8a73bc02dc8f30d187c43b78050e",class:"zonos--cart-items zonos--elements"},n("table",{key:"600b545e20eb81d7e744c2bf66a9cec2eb68c8e7",class:"zonos--cart-table"},n("tbody",{key:"cd12a4372e97b8018af37433e6b2daba5403e621"},c.items.map((function(s){var t=s.imageUrl;return n("tr",{class:"zonos--cart-item"},n("td",{class:"zonos--column zonos--cart-item-image"},t&&!o.errorImages.includes(t)?n("img",{alt:s.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[t],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):n("img",{alt:s.name,src:i,width:40})),n("td",{class:"zonos--column zonos--cart-item-name"},n("zonos-text",{type:"label"},s.name)),n("td",{class:"zonos--column zonos--cart-item-price"},n("zonos-text",{type:"semiBoldLabel"},w({amount:s.amount*s.quantity*a,currency:c.currency}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());_.style=C;var I='<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n';var j=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}";var S=j;var L=o("zonos_cart_subtotal",function(){function o(o){s(this,o)}o.prototype.render=function(){var o=c.total-c.dutiesTaxFees;var s=c.step==="payment"||c.step==="shipping";var t=function(){if(!c.selectedShippingOption){return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},p("Shipping")),n("zonos-text",{class:"zonos--caption",type:"caption"},p("No shipping method selected")))}return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},c.selectedShippingOption.displayName),c.selectedShippingOptionTransitTime&&n("zonos-text",{class:"zonos--caption",type:"caption"},c.selectedShippingOptionTransitTime," ",p("business days")))};return n(e,{class:"zonos--cart-subtotal zonos--elements"},n("table",{class:"zonos--cart-table"},n("tr",{class:"zonos--row zonos--cart-subtotal"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{type:"semiBoldLabel"},p("Cart subtotal"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("zonos-text",{type:"semiBoldLabel"},w({amount:c.subtotal,currency:c.currency})))),n("tr",{class:"zonos--row zonos--cart-shipping"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},t()),n("td",{class:"zonos--column zonos--cart-subtotal-price"},c.shipping?w({amount:c.shipping,currency:c.currency}):"-")),s&&n("tr",{class:"zonos--row zonos--cart-duties"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("div",{class:"zonos--title-with-icon"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},p("Duties, taxes, and fees")),n("zonos-icon",{content:I,size:16})),!!c.isSelectedShippingAboveDeminimis&&n("zonos-text",{color:"gray-800",type:"body"},p("Order is over the de minimis threshold for both duty and tax"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("div",{class:"zonos--cart-duty-tax-price"},c.dutiesTaxFees?w({amount:c.dutiesTaxFees,currency:c.currency}):"-",c.isSelectedShippingGuarantee&&n("zonos-badge",null,p("Guaranteed"))))),n("tr",{class:"zonos--row zonos--cart-pay-total"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},p("Order total"))),n("td",{class:"zonos--column"},n("zonos-text",{type:"semiBoldLabel"},w({amount:c.step==="shipping"?o:c.total,currency:c.currency}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());L.style=S;var B='<svg color="var(--amino-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var O='<svg color="var(--amino-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--amino-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var D=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";var A=D;var Z=o("zonos_checkout_finish",function(){function o(o){var t=this;s(this,o);this.closeClick=a(this,"closeClick",7);this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,s,t,n,e,i,a;return __generator(this,(function(r){switch(r.label){case 0:t="https://v1.route.js.zonos.com";n=c.checkoutSessionId;return[4,m("".concat(t,"/api/zonos-elements/get-order?checkoutSessionId=").concat(n))];case 1:e=r.sent(),i=e.errors,a=e.json;if(i.length||!(a===null||a===void 0?void 0:a.id)){return[2,null]}return[4,(s=(o=z.checkoutSettings).onOrderSuccess)===null||s===void 0?void 0:s.call(o,a)];case 2:r.sent();return[2,a]}}))}))};this.handleSuccessBehavior=function(o){var s=z.checkoutSettings.successBehavior;switch(s){case"REDIRECT_TO_SUCCESS_PAGE":var n=z.checkoutSettings.successRedirectUrl;if(n){window.location.href="".concat(n,"?zOrderNumber=").concat(o)}break;case"CLOSE_MODAL":t.closeClickHandler();break}};this.getPullOrder=function(o){if(o===void 0){o=0}return __awaiter(t,void 0,void 0,(function(){var s,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.pullOrder()];case 1:s=n.sent();if(!s)return[3,2];this.order=s;this.handleSuccessBehavior(s.id);this.isLoading=false;return[3,6];case 2:if(!(!s&&o<5))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:n.sent();return[4,this.getPullOrder(o+1)];case 4:n.sent();return[3,6];case 5:this.isLoading=false;t={endpoint:"".concat("https://v1.route.js.zonos.com","/api/zonos-elements/get-order"),errors:["Order not found after multiple attempts"],metadata:{checkoutSessionId:c.checkoutSessionId||"",domain:window.location.hostname,storeId:z.storeId}};void m("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:t,method:"POST"});n.label=6;case 6:return[2]}}))}))};this.checkPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,s,t,n,e;return __generator(this,(function(i){switch(i.label){case 0:this.isLoading=true;o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||l.clientSecret;if(!(o||this.storybookForceStatus))return[3,2];return[4,h({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:s=i.sent(),t=s.error,n=s.messages;this.notificationType=t?"error":"success";this.notificationMessages=n||[];this.notificationTitle=t?p("Payment failed"):p("You're all set!");if(t){v("zonos-checkout-payment-fail")}else{v("zonos-checkout-success");e=new CustomEvent("zonos-checkout-success",{detail:{message:"Zonos Checkout successfully processed order"}});document.dispatchEvent(e)}if(this.notificationType==="success"){this.isLoading=true;void this.getPullOrder()}i.label=2;case 2:u();this.isLoading=false;return[2]}}))}))};this.closeClickHandler=function(){t.closeClick.emit()};this.borderRadius="ROUNDED";this.storybookForceStatus=undefined;this.overrideNotification=undefined;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.order=null}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}void this.checkPaymentStatus()};o.prototype.render=function(){var o=this;return n(e,{key:"bdf824c48f7f01bcafd88b17ad758d05ab589ffd",class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":b(this.borderRadius)}},this.isLoading&&n("div",{class:"loading-wrapper"},n("zonos-spinner",null)),!this.isLoading&&n(i,null,n("div",{class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{color:"blue-800",content:O,size:50}):n("zonos-icon",{color:"red-800",content:B,size:50}),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),n("zonos-text",null,this.notificationMessages.map((function(o){return n(i,null,o,n("br",null))}))),n("zonos-button",{onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},p("Keep shopping")))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Z.style=A;var M=".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";var P=M;var E=o("zonos_checkout_payment",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.paymentError=false;this.submitBtnType=undefined;this.continueLoading=false;this.submitBtnColor=undefined;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-payment-info")}};o.prototype.render=function(){var o=this;var s;if(!l.stripeElements){return null}this.disabled=!((s=l.stripePaymentEventData)===null||s===void 0?void 0:s.complete);return n(e,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},p("Payment method")),this.paymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},p("We couldn't complete your payment. Please verify the payment details and try again.")),n("zonos-payment",null)),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},"Pay"," ",w({amount:c.total,currency:c.currency}))))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());E.style=P;var T=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var R=T;var G=o("zonos_collapse",function(){function o(o){s(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var s="".concat(this.collapseSize,"px");return this.collapsed?s:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var s,t,n;(n=(t=(s=this.el.shadowRoot)===null||s===void 0?void 0:s.querySelector("iframe"))===null||t===void 0?void 0:t.contentWindow)===null||n===void 0?void 0:n.addEventListener("resize",(function(){o.height=o.el.scrollHeight}))};o.prototype.render=function(){this.height=this.el.scrollHeight;return n(e,{key:"fb0d16e7e638d45b3469d7f7d26cd3f3ce9bf318",class:"zonos--elements zonos--collapse",style:{"--font-family":g(),height:this.getElementHeight()}},n("div",{key:"9da00237f8f14edd9c5bf4b68da545b8c7ab4786"},n("iframe",{key:"402e19d6e96d019a4eccd49af6afdac428c9fae9",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),n("slot",{key:"de6751ac4955c073cc34188ebe22fabed38f780d"})))};Object.defineProperty(o.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return o}());G.style=R;var U=".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:calc(100% - 10px)}";var F=U;var N=o("zonos_customer_info",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.defaultAddress=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-customer-info")}};o.prototype.render=function(){var o=this;var s,t;if(!l.stripeElements){return null}this.disabled=!((s=l.stripeAddressEventData)===null||s===void 0?void 0:s.complete)||!((t=l.stripeLinkEventData)===null||t===void 0?void 0:t.complete);return n(e,{class:"zonos--customer-info zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},p("Customer information")),n("zonos-link-authentication",{titleText:p("Contact")}),n("zonos-address",{defaultAddress:this.defaultAddress,titleText:p("Address"),type:"shipping"})),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},p("Continue to shipping"))))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());N.style=F;var V='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var H=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var K=H;var W=o("zonos_dialog",function(){function o(o){var t=this;s(this,o);this.closeDialog=a(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.footerRightAction=null;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=b(this.borderStyle);return n(e,{key:"5a331d58bfd2a0414e9577c4f515cfcd0c630ad5",class:x(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":g(),"--height":this.height||"initial","--width":this.width}},n("div",{key:"74e3ed8fcdf55e3ae11d6be9c1e18691f1115bb9",class:"zonos--backdrop"}),n("div",{key:"dae7aa8261feeb43d62550832b6b91437da07f9d","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},n("div",{key:"ea919a80d1c0589908af64d48845c5263d1b18f4",class:"zonos--dialog"},this.isLoading&&n("div",{class:"zonos--loading"},n("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&n("div",{class:"zonos--header"},this.headerText&&n("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{content:V}),noBackground:true,onClick:this.closeButtonHandler})),n("div",{key:"77de036f1fd7ea16936a5521a646df427115e99b",class:x(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},n("slot",{key:"9da41cdcfe580bb41b672f8185552e29b269e5dd"})),this.footerRightAction&&n("div",{class:"zonos--footer"},n("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=K;var Y=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var q=Y;var J=o("zonos_logo",function(){function o(o){s(this,o);this.theme="LIGHT";this.width="auto";this.class=""}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return n(e,{key:"7ddd949ab91ed0c61ee34ce6ee80da54b3ba3664",class:x(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--font-family":g(),"--width":this.width}},n("img",{key:"1a8d98f7d836f253a21654c84ab0251969362e2f",alt:"Zonos Logo",src:t("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());J.style=q;var Q='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var X='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var $=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";var oo=$;var so=o("zonos_review",function(){function o(o){s(this,o);this.mobile=false;this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=y(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=y(this.mobile)};o.prototype.render=function(){var o=this;var s=this.isMobile?"boldSubheader":"semiBoldLabel";var t=this.isMobile?"boldSubheader":"secondaryPageHeader";var i=this.isMobile?"gray-1200":"gray-800";var a=c.total-c.dutiesTaxFees;var r=function(){if(!o.isMobile){return null}if(!o.collapsed){return n("zonos-icon",{color:"gray-1200",content:Q})}return n("zonos-icon",{color:"gray-1200",content:X})};return n(e,{class:x(["zonos--review zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--title"},n("zonos-text",{color:i,type:s},p("Pay")," ",z.organizationName),r()),n("div",{class:"zonos--total-pay"},n("zonos-text",{type:t},w({amount:c.step==="shipping"?a:c.total,currency:c.currency}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());so.style=oo;var to=".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";var no=to;var eo=o("zonos_shipping",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.handleRadioSelected=function(o){return __awaiter(t,void 0,void 0,(function(){var s,t,n;var e=this;return __generator(this,(function(i){switch(i.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2]}t=((s=c.shippingData)===null||s===void 0?void 0:s.find((function(o){var s;return o.id===((s=e.selectedShippingMethod)===null||s===void 0?void 0:s.value)})))||null;if(!t){return[2]}return[4,d(t)];case 1:n=i.sent();if(!n){return[2]}this.disabled=false;return[2]}}))}))};this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnColor=undefined;this.submitBtnType=undefined;this.selectedShippingMethod=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-shipping-info")}};o.prototype.render=function(){var o=this;var s;var t=(s=c.shippingData)===null||s===void 0?void 0:s.flatMap((function(o){var s,t;var n=f(o),e=n.expectedDate,i=n.maxTransit,a=n.minTransit;var r=e?"".concat(p("Expected delivery")," ").concat(e):"";var l=a&&i?"(".concat(a,"-").concat(i," ").concat(p("business days"),")"):"";var h=((t=(s=c.landedCostData)===null||s===void 0?void 0:s.find((function(s){var t;return((t=s.landedCost)===null||t===void 0?void 0:t.shipmentRating.id)===o.id})))===null||t===void 0?void 0:t.subtotals.shipping)||0;return{caption:l,label:o.displayName,price:w({amount:h,currency:c.currency}),sublabel:r,value:o.id}}));return n(e,{class:"zonos--shipping zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},p("Shipping information")),n("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},p("Shipping method")),!(t===null||t===void 0?void 0:t.length)?n("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"}):n("zonos-shipping-rich-radio",{items:t||[],onRadioSelected:function(s){return o.handleRadioSelected(s)}})),n("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},p("Go to payment")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());eo.style=no}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(r,n,t){if(t||arguments.length===2)for(var e=0,a=n.length,i;e<a;e++){if(i||!(e in n)){if(!i)i=Array.prototype.slice.call(n,0,e);i[e]=n[e]}}return r.concat(i||Array.prototype.slice.call(n))};System.register(["./p-4d39efb6.system.js"],(function(r){"use strict";var n,t;return{setters:[function(r){n=r.g;t=r.f}],execute:function(){var e=function(r,n,t){var e=r.get(n);if(!e){r.set(n,[t])}else if(!e.includes(t)){e.push(t)}};var a=function(r,n){var t;return function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}if(t){clearTimeout(t)}t=setTimeout((function(){t=0;r.apply(void 0,e)}),n)}};var i=function(r){return!("isConnected"in r)||r.isConnected};var u=a((function(r){for(var n=0,t=r.keys();n<t.length;n++){var e=t[n];r.set(e,r.get(e).filter(i))}}),2e3);var v=function(){if(typeof n!=="function"){return{}}var r=new Map;return{dispose:function(){return r.clear()},get:function(t){var a=n();if(a){e(r,t,a)}},set:function(n){var e=r.get(n);if(e){r.set(n,e.filter(t))}u(r)},reset:function(){r.forEach((function(r){return r.forEach(t)}));u(r)}}};var o=function(r){return typeof r==="function"?r():r};var f=function(r,n){if(n===void 0){n=function(r,n){return r!==n}}var t=o(r);var e=new Map(Object.entries(t!==null&&t!==void 0?t:{}));var a={dispose:[],get:[],set:[],reset:[]};var i=function(){var n;e=new Map(Object.entries((n=o(r))!==null&&n!==void 0?n:{}));a.reset.forEach((function(r){return r()}))};var u=function(){a.dispose.forEach((function(r){return r()}));i()};var v=function(r){a.get.forEach((function(n){return n(r)}));return e.get(r)};var f=function(r,t){var i=e.get(r);if(n(t,i,r)){e.set(r,t);a.set.forEach((function(n){return n(r,t,i)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(t,{get:function(r,n){return v(n)},ownKeys:function(r){return Array.from(e.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(r,n){return e.has(n)},set:function(r,n,t){f(n,t);return true}});var l=function(r,n){a[r].push(n);return function(){c(a[r],n)}};var d=function(n,t){var e=l("set",(function(r,e){if(r===n){t(e)}}));var a=l("reset",(function(){return t(o(r)[n])}));return function(){e();a()}};var b=function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var t=r.reduce((function(r,n){if(n.set){r.push(l("set",n.set))}if(n.get){r.push(l("get",n.get))}if(n.reset){r.push(l("reset",n.reset))}if(n.dispose){r.push(l("dispose",n.dispose))}return r}),[]);return function(){return t.forEach((function(r){return r()}))}};var h=function(r){var n=e.get(r);a.set.forEach((function(t){return t(r,n,n)}))};return{state:s,get:v,set:f,on:l,onChange:d,use:b,dispose:u,reset:i,forceUpdate:h}};var c=function(r,n){var t=r.indexOf(n);if(t>=0){r[t]=r[r.length-1];r.length--}};var s=r("c",(function(r,n){var t=f(r,n);t.use(v());return t}));var l=r("a",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function d(){this.__data__=[];this.size=0}var b=d;function h(r,n){return r===n||r!==r&&n!==n}var y=h;var p=y;function j(r,n){var t=r.length;while(t--){if(p(r[t][0],n)){return t}}return-1}var A=j;var g=A;var w=Array.prototype;var m=w.splice;function O(r){var n=this.__data__,t=g(n,r);if(t<0){return false}var e=n.length-1;if(t==e){n.pop()}else{m.call(n,t,1)}--this.size;return true}var _=O;var E=A;function S(r){var n=this.__data__,t=E(n,r);return t<0?undefined:n[t][1]}var D=S;var B=A;function C(r){return B(this.__data__,r)>-1}var I=C;var T=A;function P(r,n){var t=this.__data__,e=T(t,r);if(e<0){++this.size;t.push([r,n])}else{t[e][1]=n}return this}var U=P;var L=b,x=_,F=D,M=I,N=U;function R(r){var n=-1,t=r==null?0:r.length;this.clear();while(++n<t){var e=r[n];this.set(e[0],e[1])}}R.prototype.clear=L;R.prototype["delete"]=x;R.prototype.get=F;R.prototype.has=M;R.prototype.set=N;var $=R;var z=$;function k(){this.__data__=new z;this.size=0}var G=k;function H(r){var n=this.__data__,t=n["delete"](r);this.size=n.size;return t}var K=H;function V(r){return this.__data__.get(r)}var W=V;function q(r){return this.__data__.has(r)}var J=q;var Q=typeof l=="object"&&l&&l.Object===Object&&l;var X=Q;var Y=X;var Z=typeof self=="object"&&self&&self.Object===Object&&self;var rr=Y||Z||Function("return this")();var nr=r("_",rr);var tr=nr;var er=tr.Symbol;var ar=er;var ir=ar;var ur=Object.prototype;var vr=ur.hasOwnProperty;var or=ur.toString;var fr=ir?ir.toStringTag:undefined;function cr(r){var n=vr.call(r,fr),t=r[fr];try{r[fr]=undefined;var e=true}catch(r){}var a=or.call(r);if(e){if(n){r[fr]=t}else{delete r[fr]}}return a}var sr=cr;var lr=Object.prototype;var dr=lr.toString;function br(r){return dr.call(r)}var hr=br;var yr=ar,pr=sr,jr=hr;var Ar="[object Null]",gr="[object Undefined]";var wr=yr?yr.toStringTag:undefined;function mr(r){if(r==null){return r===undefined?gr:Ar}return wr&&wr in Object(r)?pr(r):jr(r)}var Or=r("e",mr);function _r(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var Er=r("f",_r);var Sr=Or,Dr=Er;var Br="[object AsyncFunction]",Cr="[object Function]",Ir="[object GeneratorFunction]",Tr="[object Proxy]";function Pr(r){if(!Dr(r)){return false}var n=Sr(r);return n==Cr||n==Ir||n==Br||n==Tr}var Ur=Pr;var Lr=nr;var xr=Lr["__core-js_shared__"];var Fr=xr;var Mr=Fr;var Nr=function(){var r=/[^.]+$/.exec(Mr&&Mr.keys&&Mr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Rr(r){return!!Nr&&Nr in r}var $r=Rr;var zr=Function.prototype;var kr=zr.toString;function Gr(r){if(r!=null){try{return kr.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var Hr=Gr;var Kr=Ur,Vr=$r,Wr=Er,qr=Hr;var Jr=/[\\^$.*+?()[\]{}|]/g;var Qr=/^\[object .+?Constructor\]$/;var Xr=Function.prototype,Yr=Object.prototype;var Zr=Xr.toString;var rn=Yr.hasOwnProperty;var nn=RegExp("^"+Zr.call(rn).replace(Jr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tn(r){if(!Wr(r)||Vr(r)){return false}var n=Kr(r)?nn:Qr;return n.test(qr(r))}var en=tn;function an(r,n){return r==null?undefined:r[n]}var un=an;var vn=en,on=un;function fn(r,n){var t=on(r,n);return vn(t)?t:undefined}var cn=fn;var sn=cn,ln=nr;var dn=sn(ln,"Map");var bn=dn;var hn=cn;var yn=hn(Object,"create");var pn=yn;var jn=pn;function An(){this.__data__=jn?jn(null):{};this.size=0}var gn=An;function wn(r){var n=this.has(r)&&delete this.__data__[r];this.size-=n?1:0;return n}var mn=wn;var On=pn;var _n="__lodash_hash_undefined__";var En=Object.prototype;var Sn=En.hasOwnProperty;function Dn(r){var n=this.__data__;if(On){var t=n[r];return t===_n?undefined:t}return Sn.call(n,r)?n[r]:undefined}var Bn=Dn;var Cn=pn;var In=Object.prototype;var Tn=In.hasOwnProperty;function Pn(r){var n=this.__data__;return Cn?n[r]!==undefined:Tn.call(n,r)}var Un=Pn;var Ln=pn;var xn="__lodash_hash_undefined__";function Fn(r,n){var t=this.__data__;this.size+=this.has(r)?0:1;t[r]=Ln&&n===undefined?xn:n;return this}var Mn=Fn;var Nn=gn,Rn=mn,$n=Bn,zn=Un,kn=Mn;function Gn(r){var n=-1,t=r==null?0:r.length;this.clear();while(++n<t){var e=r[n];this.set(e[0],e[1])}}Gn.prototype.clear=Nn;Gn.prototype["delete"]=Rn;Gn.prototype.get=$n;Gn.prototype.has=zn;Gn.prototype.set=kn;var Hn=Gn;var Kn=Hn,Vn=$,Wn=bn;function qn(){this.size=0;this.__data__={hash:new Kn,map:new(Wn||Vn),string:new Kn}}var Jn=qn;function Qn(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}var Xn=Qn;var Yn=Xn;function Zn(r,n){var t=r.__data__;return Yn(n)?t[typeof n=="string"?"string":"hash"]:t.map}var rt=Zn;var nt=rt;function tt(r){var n=nt(this,r)["delete"](r);this.size-=n?1:0;return n}var et=tt;var at=rt;function it(r){return at(this,r).get(r)}var ut=it;var vt=rt;function ot(r){return vt(this,r).has(r)}var ft=ot;var ct=rt;function st(r,n){var t=ct(this,r),e=t.size;t.set(r,n);this.size+=t.size==e?0:1;return this}var lt=st;var dt=Jn,bt=et,ht=ut,yt=ft,pt=lt;function jt(r){var n=-1,t=r==null?0:r.length;this.clear();while(++n<t){var e=r[n];this.set(e[0],e[1])}}jt.prototype.clear=dt;jt.prototype["delete"]=bt;jt.prototype.get=ht;jt.prototype.has=yt;jt.prototype.set=pt;var At=jt;var gt=$,wt=bn,mt=At;var Ot=200;function _t(r,n){var t=this.__data__;if(t instanceof gt){var e=t.__data__;if(!wt||e.length<Ot-1){e.push([r,n]);this.size=++t.size;return this}t=this.__data__=new mt(e)}t.set(r,n);this.size=t.size;return this}var Et=_t;var St=$,Dt=G,Bt=K,Ct=W,It=J,Tt=Et;function Pt(r){var n=this.__data__=new St(r);this.size=n.size}Pt.prototype.clear=Dt;Pt.prototype["delete"]=Bt;Pt.prototype.get=Ct;Pt.prototype.has=It;Pt.prototype.set=Tt;var Ut=Pt;var Lt=cn;var xt=function(){try{var r=Lt(Object,"defineProperty");r({},"",{});return r}catch(r){}}();var Ft=xt;var Mt=Ft;function Nt(r,n,t){if(n=="__proto__"&&Mt){Mt(r,n,{configurable:true,enumerable:true,value:t,writable:true})}else{r[n]=t}}var Rt=Nt;var $t=Rt,zt=y;function kt(r,n,t){if(t!==undefined&&!zt(r[n],t)||t===undefined&&!(n in r)){$t(r,n,t)}}var Gt=kt;function Ht(r){return function(n,t,e){var a=-1,i=Object(n),u=e(n),v=u.length;while(v--){var o=u[r?v:++a];if(t(i[o],o,i)===false){break}}return n}}var Kt=Ht;var Vt=Kt;var Wt=Vt();var qt=Wt;var Jt={exports:{}};(function(r,n){var t=nr;var e=n&&!n.nodeType&&n;var a=e&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===e;var u=i?t.Buffer:undefined,v=u?u.allocUnsafe:undefined;function o(r,n){if(n){return r.slice()}var t=r.length,e=v?v(t):new r.constructor(t);r.copy(e);return e}r.exports=o})(Jt,Jt.exports);var Qt=nr;var Xt=Qt.Uint8Array;var Yt=Xt;var Zt=Yt;function re(r){var n=new r.constructor(r.byteLength);new Zt(n).set(new Zt(r));return n}var ne=re;var te=ne;function ee(r,n){var t=n?te(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ae=ee;function ie(r,n){var t=-1,e=r.length;n||(n=Array(e));while(++t<e){n[t]=r[t]}return n}var ue=ie;var ve=Er;var oe=Object.create;var fe=function(){function r(){}return function(n){if(!ve(n)){return{}}if(oe){return oe(n)}r.prototype=n;var t=new r;r.prototype=undefined;return t}}();var ce=fe;function se(r,n){return function(t){return r(n(t))}}var le=se;var de=le;var be=de(Object.getPrototypeOf,Object);var he=be;var ye=Object.prototype;function pe(r){var n=r&&r.constructor,t=typeof n=="function"&&n.prototype||ye;return r===t}var je=pe;var Ae=ce,ge=he,we=je;function me(r){return typeof r.constructor=="function"&&!we(r)?Ae(ge(r)):{}}var Oe=me;function _e(r){return r!=null&&typeof r=="object"}var Ee=r("i",_e);var Se=Or,De=Ee;var Be="[object Arguments]";function Ce(r){return De(r)&&Se(r)==Be}var Ie=Ce;var Te=Ie,Pe=Ee;var Ue=Object.prototype;var Le=Ue.hasOwnProperty;var xe=Ue.propertyIsEnumerable;var Fe=Te(function(){return arguments}())?Te:function(r){return Pe(r)&&Le.call(r,"callee")&&!xe.call(r,"callee")};var Me=Fe;var Ne=Array.isArray;var Re=Ne;var $e=9007199254740991;function ze(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=$e}var ke=ze;var Ge=Ur,He=ke;function Ke(r){return r!=null&&He(r.length)&&!Ge(r)}var Ve=Ke;var We=Ve,qe=Ee;function Je(r){return qe(r)&&We(r)}var Qe=Je;var Xe={exports:{}};function Ye(){return false}var Ze=Ye;(function(r,n){var t=nr,e=Ze;var a=n&&!n.nodeType&&n;var i=a&&"object"=="object"&&r&&!r.nodeType&&r;var u=i&&i.exports===a;var v=u?t.Buffer:undefined;var o=v?v.isBuffer:undefined;var f=o||e;r.exports=f})(Xe,Xe.exports);var ra=Or,na=he,ta=Ee;var ea="[object Object]";var aa=Function.prototype,ia=Object.prototype;var ua=aa.toString;var va=ia.hasOwnProperty;var oa=ua.call(Object);function fa(r){if(!ta(r)||ra(r)!=ea){return false}var n=na(r);if(n===null){return true}var t=va.call(n,"constructor")&&n.constructor;return typeof t=="function"&&t instanceof t&&ua.call(t)==oa}var ca=fa;var sa=Or,la=ke,da=Ee;var ba="[object Arguments]",ha="[object Array]",ya="[object Boolean]",pa="[object Date]",ja="[object Error]",Aa="[object Function]",ga="[object Map]",wa="[object Number]",ma="[object Object]",Oa="[object RegExp]",_a="[object Set]",Ea="[object String]",Sa="[object WeakMap]";var Da="[object ArrayBuffer]",Ba="[object DataView]",Ca="[object Float32Array]",Ia="[object Float64Array]",Ta="[object Int8Array]",Pa="[object Int16Array]",Ua="[object Int32Array]",La="[object Uint8Array]",xa="[object Uint8ClampedArray]",Fa="[object Uint16Array]",Ma="[object Uint32Array]";var Na={};Na[Ca]=Na[Ia]=Na[Ta]=Na[Pa]=Na[Ua]=Na[La]=Na[xa]=Na[Fa]=Na[Ma]=true;Na[ba]=Na[ha]=Na[Da]=Na[ya]=Na[Ba]=Na[pa]=Na[ja]=Na[Aa]=Na[ga]=Na[wa]=Na[ma]=Na[Oa]=Na[_a]=Na[Ea]=Na[Sa]=false;function Ra(r){return da(r)&&la(r.length)&&!!Na[sa(r)]}var $a=Ra;function za(r){return function(n){return r(n)}}var ka=za;var Ga={exports:{}};(function(r,n){var t=X;var e=n&&!n.nodeType&&n;var a=e&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===e;var u=i&&t.process;var v=function(){try{var r=a&&a.require&&a.require("util").types;if(r){return r}return u&&u.binding&&u.binding("util")}catch(r){}}();r.exports=v})(Ga,Ga.exports);var Ha=$a,Ka=ka,Va=Ga.exports;var Wa=Va&&Va.isTypedArray;var qa=Wa?Ka(Wa):Ha;var Ja=qa;function Qa(r,n){if(n==="constructor"&&typeof r[n]==="function"){return}if(n=="__proto__"){return}return r[n]}var Xa=Qa;var Ya=Rt,Za=y;var ri=Object.prototype;var ni=ri.hasOwnProperty;function ti(r,n,t){var e=r[n];if(!(ni.call(r,n)&&Za(e,t))||t===undefined&&!(n in r)){Ya(r,n,t)}}var ei=ti;var ai=ei,ii=Rt;function ui(r,n,t,e){var a=!t;t||(t={});var i=-1,u=n.length;while(++i<u){var v=n[i];var o=e?e(t[v],r[v],v,t,r):undefined;if(o===undefined){o=r[v]}if(a){ii(t,v,o)}else{ai(t,v,o)}}return t}var vi=ui;function oi(r,n){var t=-1,e=Array(r);while(++t<r){e[t]=n(t)}return e}var fi=oi;var ci=9007199254740991;var si=/^(?:0|[1-9]\d*)$/;function li(r,n){var t=typeof r;n=n==null?ci:n;return!!n&&(t=="number"||t!="symbol"&&si.test(r))&&(r>-1&&r%1==0&&r<n)}var di=li;var bi=fi,hi=Me,yi=Re,pi=Xe.exports,ji=di,Ai=Ja;var gi=Object.prototype;var wi=gi.hasOwnProperty;function mi(r,n){var t=yi(r),e=!t&&hi(r),a=!t&&!e&&pi(r),i=!t&&!e&&!a&&Ai(r),u=t||e||a||i,v=u?bi(r.length,String):[],o=v.length;for(var f in r){if((n||wi.call(r,f))&&!(u&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ji(f,o)))){v.push(f)}}return v}var Oi=mi;function _i(r){var n=[];if(r!=null){for(var t in Object(r)){n.push(t)}}return n}var Ei=_i;var Si=Er,Di=je,Bi=Ei;var Ci=Object.prototype;var Ii=Ci.hasOwnProperty;function Ti(r){if(!Si(r)){return Bi(r)}var n=Di(r),t=[];for(var e in r){if(!(e=="constructor"&&(n||!Ii.call(r,e)))){t.push(e)}}return t}var Pi=Ti;var Ui=Oi,Li=Pi,xi=Ve;function Fi(r){return xi(r)?Ui(r,true):Li(r)}var Mi=Fi;var Ni=vi,Ri=Mi;function $i(r){return Ni(r,Ri(r))}var zi=$i;var ki=Gt,Gi=Jt.exports,Hi=ae,Ki=ue,Vi=Oe,Wi=Me,qi=Re,Ji=Qe,Qi=Xe.exports,Xi=Ur,Yi=Er,Zi=ca,ru=Ja,nu=Xa,tu=zi;function eu(r,n,t,e,a,i,u){var v=nu(r,t),o=nu(n,t),f=u.get(o);if(f){ki(r,t,f);return}var c=i?i(v,o,t+"",r,n,u):undefined;var s=c===undefined;if(s){var l=qi(o),d=!l&&Qi(o),b=!l&&!d&&ru(o);c=o;if(l||d||b){if(qi(v)){c=v}else if(Ji(v)){c=Ki(v)}else if(d){s=false;c=Gi(o,true)}else if(b){s=false;c=Hi(o,true)}else{c=[]}}else if(Zi(o)||Wi(o)){c=v;if(Wi(v)){c=tu(v)}else if(!Yi(v)||Xi(v)){c=Vi(o)}}else{s=false}}if(s){u.set(o,c);a(c,o,e,i,u);u["delete"](o)}ki(r,t,c)}var au=eu;var iu=Ut,uu=Gt,vu=qt,ou=au,fu=Er,cu=Mi,su=Xa;function lu(r,n,t,e,a){if(r===n){return}vu(n,(function(i,u){a||(a=new iu);if(fu(i)){ou(r,n,u,t,lu,e,a)}else{var v=e?e(su(r,u),i,u+"",r,n,a):undefined;if(v===undefined){v=i}uu(r,u,v)}}),cu)}var du=lu;function bu(r){return r}var hu=bu;function yu(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var pu=yu;var ju=pu;var Au=Math.max;function gu(r,n,t){n=Au(n===undefined?r.length-1:n,0);return function(){var e=arguments,a=-1,i=Au(e.length-n,0),u=Array(i);while(++a<i){u[a]=e[n+a]}a=-1;var v=Array(n+1);while(++a<n){v[a]=e[a]}v[n]=t(u);return ju(r,this,v)}}var wu=gu;function mu(r){return function(){return r}}var Ou=mu;var _u=Ou,Eu=Ft,Su=hu;var Du=!Eu?Su:function(r,n){return Eu(r,"toString",{configurable:true,enumerable:false,value:_u(n),writable:true})};var Bu=Du;var Cu=800,Iu=16;var Tu=Date.now;function Pu(r){var n=0,t=0;return function(){var e=Tu(),a=Iu-(e-t);t=e;if(a>0){if(++n>=Cu){return arguments[0]}}else{n=0}return r.apply(undefined,arguments)}}var Uu=Pu;var Lu=Bu,xu=Uu;var Fu=xu(Lu);var Mu=Fu;var Nu=hu,Ru=wu,$u=Mu;function zu(r,n){return $u(Ru(r,n,Nu),r+"")}var ku=zu;var Gu=y,Hu=Ve,Ku=di,Vu=Er;function Wu(r,n,t){if(!Vu(t)){return false}var e=typeof n;if(e=="number"?Hu(t)&&Ku(n,t.length):e=="string"&&n in t){return Gu(t[n],r)}return false}var qu=Wu;var Ju=ku,Qu=qu;function Xu(r){return Ju((function(n,t){var e=-1,a=t.length,i=a>1?t[a-1]:undefined,u=a>2?t[2]:undefined;i=r.length>3&&typeof i=="function"?(a--,i):undefined;if(u&&Qu(t[0],t[1],u)){i=a<3?undefined:i;a=1}n=Object(n);while(++e<a){var v=t[e];if(v){r(n,v,e,i)}}return n}))}var Yu=Xu;var Zu=du,rv=Yu;var nv=rv((function(r,n,t){Zu(r,n,t)}));var tv=nv;var ev=r("m",(function(r,n){var t=[];for(var e=2;e<arguments.length;e++){t[e-2]=arguments[e]}var a=__spreadArray([r,n],t,true).filter(Boolean);return tv.apply(null,a)}));var av=s((function(){return{appearance:{colorPrimary:"purple",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{analyticsProviders:[],orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",currencyBehavior:"ENABLED",currencyElementSelector:".money",dutyTaxEstimationBehavior:"ENABLED",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productPriceElementSelector:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED"},loadedConfig:false,organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:""}})),iv=av.reset,uv=av.state;r("z",uv);var vv=null;var ov=r("b",(function(r){var n=r.overrideSettings,t=r.zonosSettings;var e,a,i;iv();if(t){vv=t}uv.appearance=ev(uv.appearance,(vv===null||vv===void 0?void 0:vv.appearanceSettings)||(t===null||t===void 0?void 0:t.appearanceSettings)||null,n.appearance);uv.checkoutSettings=ev(uv.checkoutSettings,(vv===null||vv===void 0?void 0:vv.checkoutSettings)||(t===null||t===void 0?void 0:t.checkoutSettings)||null,n.checkoutSettings);uv.helloSettings=ev(uv.helloSettings,(vv===null||vv===void 0?void 0:vv.helloSettings)||(t===null||t===void 0?void 0:t.helloSettings)||null,n.helloSettings);uv.loadedConfig=true;uv.organizationName=((e=t===null||t===void 0?void 0:t.organization)===null||e===void 0?void 0:e.name)||"";uv.storeId=((i=(a=t===null||t===void 0?void 0:t.organization)===null||a===void 0?void 0:a.references)===null||i===void 0?void 0:i.storeId)||null;uv.currencyConverter=n.currencyConverter}));var fv=r("d",(function(){var r=uv.appearance.fontFamily||"Inter";return r}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e,c as t}from"./p-86f22026.js";import{h as n,l as o,a as s,b as r,t as i}from"./p-a244579e.js";import{i as a}from"./p-4b3baf99.js";import{g as l}from"./p-2e1e9074.js";const d=()=>{const e=m.stripeLinkEventData,t=m.stripeAddressEventData;if(!t||!t.complete)throw new Error("Missing stripe address data");return{checkoutSessionId:E.checkoutSessionId||"",contact:{email:(null==e?void 0:e.value.email)||"",firstName:t.value.firstName||"",lastName:t.value.lastName||"",phone:t.value.phone||""},items:E.items.map((e=>e)),shippingAddress:{addressLine1:t.value.address.line1,addressLine2:t.value.address.line2||"",city:t.value.address.city,country:t.value.address.country,postalCode:t.value.address.postal_code,state:t.value.address.state}}},c=({borderStyle:e,theme:t})=>"DARK"===t?{borderRadius:l(e),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"}:{borderRadius:l(e)},{onChange:u,reset:p,state:m}=t((()=>({clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:!1,isFetchingSession:!1,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}))),h=async t=>{var n;const r=m.clientSecret;if(m.stripe){if(r){const i=(({clientSecret:t,overrideBorderRaidus:n,overridePrimaryColor:o,overrideTheme:r})=>{const i=o||e.appearance.colorPrimary,l=i&&a(i)?"night":"flat",d="DARK"===r?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}),theme:r?d:l,variables:Object.assign({},c({borderStyle:n,theme:"LIGHT"}))},clientSecret:t,locale:s.selectedLocale}})({clientSecret:r,overrideBorderRaidus:null==t?void 0:t.overrideBorderRaidus,overridePrimaryColor:null==t?void 0:t.overridePrimaryColor,overrideTheme:null==t?void 0:t.overrideTheme}),l=JSON.stringify(i)===JSON.stringify(m.stripeElementsOptions);if(!m.stripeElements)return m.stripeElements=null===(n=m.stripe)||void 0===n?void 0:n.elements(i),m.stripeElementsOptions=i,void o("Stripe elements initialized");l||(m.stripeElements.update(i),m.stripeElementsOptions=i),o("Stripe elements initialized")}}else o("Skip. Stripe is not initialized")},v=()=>{sessionStorage.removeItem("zonos--client-secret"),p(),m.stripe=window.Zonos.stripe},g=async()=>{var t,o,s,i;const a=!!(null===(t=m.stripeAddressEventData)||void 0===t?void 0:t.complete),l=!!(null===(o=m.stripeLinkEventData)||void 0===o?void 0:o.complete),c=(()=>{var e,t,n,o;if(!m.fetchingLandedCostAbordController)return!1;const s=JSON.stringify(null===(e=m.stripeLinkUsedWhenFetchingLC)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value),r=JSON.stringify(null===(n=m.stripeAddressUsedWhenFetchingLC)||void 0===n?void 0:n.value)!==JSON.stringify(null===(o=m.stripeAddressEventData)||void 0===o?void 0:o.value);return s||r})();if(c&&(null===(s=m.fetchingLandedCostAbordController)||void 0===s||s.abort(),m.fetchingLandedCostAbordController=null),a&&l&&(c||!m.isFetchingLandedCost)){m.isFetchingLandedCost=!0,m.stripeAddressEventData&&(m.stripeAddressUsedWhenFetchingLC=Object.assign({},m.stripeAddressEventData)),m.stripeLinkEventData&&(m.stripeLinkUsedWhenFetchingLC=Object.assign({},m.stripeLinkEventData));try{const t=new AbortController;m.fetchingLandedCostAbordController=t;const{checkoutSessionWorkflow:o,shipmentRatingCalculateWorkflow:s}=await(async t=>{const o=e.checkoutSettings.buildLandedCost;if(o){const e=await(async e=>{var t;const o=d(),s=await e(o.checkoutSessionId,o.contact,o.shippingAddress);if(!s)throw new Error("Failed to build landed cost");const{errors:r,json:i}=await n("https://v1.route.js.zonos.com/api/zonos-elements/validate-landed-cost",{body:s,headers:{"Content-Type":"application/json"},method:"POST"});if(!i||r.length)throw new Error(`Invalid landed cost object: ${(null===(t=r.find(Boolean))||void 0===t?void 0:t.message)||"Unknown error"}`);return s})(o);return e}const{errors:s,json:r}=await n("https://v1.route.js.zonos.com/api/zonos-elements/calculate-landed-cost",{body:d(),method:"POST",signal:null==t?void 0:t.signal});if(s.length||!r)throw new Error("Failed to calculate landed cost");return r})(t);m.fetchingLandedCostAbordController=null,E.landedCostData=(null==o?void 0:o.filter(Boolean))||null,E.shippingData=(null==s?void 0:s.filter(Boolean))||null;const r=null===(i=E.landedCostData)||void 0===i?void 0:i.find(Boolean),a=r?r.subtotals:null;a&&A({exchangeRate:a.exchangeRate,items:a.items,landedCostTotal:0,presentmentCurrencyCode:a.presentmentCurrencyCode,shipping:0,total:a.items})}catch(e){r(e)}m.isFetchingLandedCost=!1}},y=e=>{let t=[],n=!0;switch(e){case"succeeded":t=[i("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",i("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")],n=!1;break;case"requires_capture":case"processing":t=[i("Payment processing. We'll update you when payment is received.")],n=!1;break;case"requires_payment_method":t=[i("Payment failed. Please try another payment method.")];break;default:t=[i("Something went wrong.")]}return{isError:n,messages:t}},f=async({clientSecret:e,storybookForceStatus:t})=>{if(t){const{isError:e,messages:n}=y(t);return{error:e,messages:n}}const n=e||m.clientSecret;if(!m.stripe||!n)return r("Failed to retrieve payment intent. Stripe is not initialized"),{error:!0,message:[i("Something went wrong.")]};const{paymentIntent:o}=await m.stripe.retrievePaymentIntent(n),s=null==o?void 0:o.status,{isError:a,messages:l}=y(s);return{error:a,messages:l}},w=async()=>{var e,t,n;const o=!!(null===(e=m.stripePaymentEventData)||void 0===e?void 0:e.complete),s=m.stripeElements,r=m.stripe;if(r&&s&&o&&m.clientSecret){const{error:e}=await r.confirmPayment({confirmParams:{receipt_email:null===(n=null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value)||void 0===n?void 0:n.email,return_url:window.location.href},elements:s,redirect:"if_required"});if(e){if("card_error"===e.type||"validation_error"===e.type)throw new Error(e.message);if("invalid_request_error"===e.type&&"payment_intent_unexpected_state"===e.code)return;throw new Error("An unexpected error occurred.")}}},S=async()=>{var e;const t=E.items.reduce(((e,t)=>e+t.amount*t.quantity),0);if(!t||!s.targetCurrency)return r("Fail to create checkout session - invalid total or currency"),!1;m.isFetchingSession=!0;const{errors:i,json:a}=await n("https://v1.route.js.zonos.com/api/zonos-elements/create-checkout-session",{body:{currency:(null===(e=E.items.find(Boolean))||void 0===e?void 0:e.currencyCode)||"",itemsAmount:t,presentmentCountryCode:s.selectedCountryCode||null},method:"POST"});if(m.isFetchingSession=!1,i.length||!a)return r("Error occurs when creating checkout session",JSON.stringify(i,null,2)),!1;const l=a.checkoutSessionCreate;return m.clientSecret=l.clientSecret,E.checkoutSessionId=l.id,A(Object.assign(Object.assign({},l.subtotals),{landedCostTotal:0,shipping:0,total:l.subtotals.items})),o("Exchange rate updated for cart items (checkout session create)","info",E.exchangeRate),o("done-init-checkout-session"),!0};u("clientSecret",(e=>{e&&m.stripe&&sessionStorage.setItem("zonos--client-secret",e),e||sessionStorage.removeItem("zonos--client-secret")}));const C=e=>{const t=new Date,n=e.getTime()-t.getTime();return Math.floor(n/864e5)},{onChange:k,reset:b,state:E}=t((()=>({checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:!1,isSelectedShippingGuarantee:!1,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}))),O=e=>{const t=e.minTransitAt?C(new Date(e.minTransitAt)):"",n=e.maxTransitAt?C(new Date(e.maxTransitAt)):"";return{expectedDate:e.minTransitAt?(({date:e,formatOptions:t={day:"numeric",weekday:"long",year:"numeric"}})=>new Intl.DateTimeFormat("en-US",t).format(e))({date:new Date(e.minTransitAt)}):"",maxTransit:n,minTransit:t}},j=()=>{sessionStorage.removeItem("zonos--checkout-session-id"),b()},T=({messages:e,title:t})=>{E.step="error",E.error={messages:e,title:t}},A=e=>{E.exchangeRate=e.exchangeRate,E.dutiesTaxFees=e.landedCostTotal,E.subtotal=e.items,E.total=e.total,E.currency=e.presentmentCurrencyCode},x=async({currency:e,itemsAmount:t,landedCostId:a})=>{if(a&&E.selectedLandedCost&&(A(E.selectedLandedCost.subtotals),o("Exchange rate updated for cart items (landed cost subtotal)","info",E.exchangeRate)),!E.checkoutSessionId)return r("Could not update cart total without checkout session id"),!1;const{json:l}=await(async({currency:e,id:t,itemsAmount:o,landedCostId:s,presentmentCountryCode:i})=>{const{errors:a,json:l}=await n("https://v1.route.js.zonos.com/api/zonos-elements/update-checkout-session",{body:{currency:e,id:t,itemsAmount:o,landedCostId:s,presentmentCountryCode:i},method:"POST"});return a.length||!l?(r("Error occurs when updating checkout session",JSON.stringify(a,null,2)),{errors:a,json:l}):{errors:[],json:l}})({currency:e,id:E.checkoutSessionId,itemsAmount:t,landedCostId:a,presentmentCountryCode:s.selectedCountryCode});return l?(a||(A(l.checkoutSessionUpdate.subtotals),o("Exchange rate updated for cart items (checkout session update)","info",E.exchangeRate)),!0):(r("Error occurs when updating checkout session"),T({messages:[i("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error updating Checkout")}),!1)},z=async e=>{var t,n,o,s,r;E.selectedShippingOption=e;const{expectedDate:i,maxTransit:a,minTransit:l}=O(E.selectedShippingOption);E.selectedShippingOptionExpectedDate=i,E.selectedShippingOptionTransitTime=l&&a?`${l}-${a}`:`${l||a}`;const d=null===(t=E.landedCostData)||void 0===t?void 0:t.find((e=>{var t,n,o;return(null===(n=null===(t=e.landedCost)||void 0===t?void 0:t.shipmentRating)||void 0===n?void 0:n.id)===(null===(o=E.selectedShippingOption)||void 0===o?void 0:o.id)}));if(E.selectedLandedCost=d||null,!d)return!1;E.shipping=d.subtotals.shipping;const c="ZONOS"===(null===(n=null==d?void 0:d.landedCost)||void 0===n?void 0:n.landedCostGuaranteeCode),u=!!(null===(s=null===(o=null==d?void 0:d.landedCost)||void 0===o?void 0:o.deMinimis)||void 0===s?void 0:s.find((e=>["DUTY","TAX"].includes(e.type)&&"ABOVE"===e.threshold)));return E.isSelectedShippingAboveDeminimis=u,E.isSelectedShippingGuarantee=c,await x({landedCostId:null===(r=d.landedCost)||void 0===r?void 0:r.id})};k("checkoutSessionId",(()=>{E.checkoutSessionId?sessionStorage.setItem("zonos--checkout-session-id",E.checkoutSessionId):sessionStorage.removeItem("zonos--checkout-session-id")}));const D=async e=>{var t;E.items=e;const n=null===(t=e.find(Boolean))||void 0===t?void 0:t.currencyCode,o=e.reduce(((e,t)=>e+t.amount*t.quantity),0);n&&o&&(E.currency=n,m.isFetchingSession=!0,await x({currency:n,itemsAmount:o}),m.isFetchingSession=!1)},P=()=>{"customer-info"===E.step?E.step="shipping":"shipping"===E.step?E.step="payment":"payment"===E.step&&(E.step="finish")},B=()=>{"payment"===E.step?E.step="shipping":"shipping"===E.step&&(E.step="customer-info",E.selectedShippingOption=null,E.isSelectedShippingAboveDeminimis=!1,E.isSelectedShippingGuarantee=!1,E.selectedShippingOptionExpectedDate="",E.selectedShippingOptionTransitTime="",E.shipping=0)};export{A as a,O as b,E as c,P as d,B as e,x as f,j as g,D as h,z as i,T as j,h as k,S as l,g as m,w as n,v as o,f as p,m as s}
|
|
1
|
+
import{z as e,c as t}from"./p-e8da4463.js";import{h as n,l as o,a as s,b as r,t as i}from"./p-8ebc0b64.js";import{i as a}from"./p-0024f8c2.js";import{g as l}from"./p-f2733cc7.js";const d=()=>{const e=m.stripeLinkEventData,t=m.stripeAddressEventData;if(!t||!t.complete)throw new Error("Missing stripe address data");return{checkoutSessionId:E.checkoutSessionId||"",contact:{email:(null==e?void 0:e.value.email)||"",firstName:t.value.firstName||"",lastName:t.value.lastName||"",phone:t.value.phone||""},items:E.items.map((e=>e)),shippingAddress:{addressLine1:t.value.address.line1,addressLine2:t.value.address.line2||"",city:t.value.address.city,country:t.value.address.country,postalCode:t.value.address.postal_code,state:t.value.address.state}}},c=({borderStyle:e,theme:t})=>"DARK"===t?{borderRadius:l(e),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"}:{borderRadius:l(e)},{onChange:u,reset:p,state:m}=t((()=>({clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:!1,isFetchingSession:!1,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}))),h=async t=>{var n;const r=m.clientSecret;if(m.stripe){if(r){const i=(({clientSecret:t,overrideBorderRaidus:n,overridePrimaryColor:o,overrideTheme:r})=>{const i=o||e.appearance.colorPrimary,l=i&&a(i)?"night":"flat",d="DARK"===r?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}),theme:r?d:l,variables:Object.assign({},c({borderStyle:n,theme:"LIGHT"}))},clientSecret:t,locale:s.selectedLocale}})({clientSecret:r,overrideBorderRaidus:null==t?void 0:t.overrideBorderRaidus,overridePrimaryColor:null==t?void 0:t.overridePrimaryColor,overrideTheme:null==t?void 0:t.overrideTheme}),l=JSON.stringify(i)===JSON.stringify(m.stripeElementsOptions);if(!m.stripeElements)return m.stripeElements=null===(n=m.stripe)||void 0===n?void 0:n.elements(i),m.stripeElementsOptions=i,void o("Stripe elements initialized");l||(m.stripeElements.update(i),m.stripeElementsOptions=i),o("Stripe elements initialized")}}else o("Skip. Stripe is not initialized")},v=()=>{sessionStorage.removeItem("zonos--client-secret"),p(),m.stripe=window.Zonos.stripe},g=async()=>{var t,o,s,i;const a=!!(null===(t=m.stripeAddressEventData)||void 0===t?void 0:t.complete),l=!!(null===(o=m.stripeLinkEventData)||void 0===o?void 0:o.complete),c=(()=>{var e,t,n,o;if(!m.fetchingLandedCostAbordController)return!1;const s=JSON.stringify(null===(e=m.stripeLinkUsedWhenFetchingLC)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value),r=JSON.stringify(null===(n=m.stripeAddressUsedWhenFetchingLC)||void 0===n?void 0:n.value)!==JSON.stringify(null===(o=m.stripeAddressEventData)||void 0===o?void 0:o.value);return s||r})();if(c&&(null===(s=m.fetchingLandedCostAbordController)||void 0===s||s.abort(),m.fetchingLandedCostAbordController=null),a&&l&&(c||!m.isFetchingLandedCost)){m.isFetchingLandedCost=!0,m.stripeAddressEventData&&(m.stripeAddressUsedWhenFetchingLC=Object.assign({},m.stripeAddressEventData)),m.stripeLinkEventData&&(m.stripeLinkUsedWhenFetchingLC=Object.assign({},m.stripeLinkEventData));try{const t=new AbortController;m.fetchingLandedCostAbordController=t;const{checkoutSessionWorkflow:o,shipmentRatingCalculateWorkflow:s}=await(async t=>{const o=e.checkoutSettings.buildLandedCost;if(o){const e=await(async e=>{var t;const o=d(),s=await e(o.checkoutSessionId,o.contact,o.shippingAddress);if(!s)throw new Error("Failed to build landed cost");const{errors:r,json:i}=await n("https://v1.route.js.zonos.com/api/zonos-elements/validate-landed-cost",{body:s,headers:{"Content-Type":"application/json"},method:"POST"});if(!i||r.length)throw new Error(`Invalid landed cost object: ${(null===(t=r.find(Boolean))||void 0===t?void 0:t.message)||"Unknown error"}`);return s})(o);return e}const{errors:s,json:r}=await n("https://v1.route.js.zonos.com/api/zonos-elements/calculate-landed-cost",{body:d(),method:"POST",signal:null==t?void 0:t.signal});if(s.length||!r)throw new Error("Failed to calculate landed cost");return r})(t);m.fetchingLandedCostAbordController=null,E.landedCostData=(null==o?void 0:o.filter(Boolean))||null,E.shippingData=(null==s?void 0:s.filter(Boolean))||null;const r=null===(i=E.landedCostData)||void 0===i?void 0:i.find(Boolean),a=r?r.subtotals:null;a&&A({exchangeRate:a.exchangeRate,items:a.items,landedCostTotal:0,presentmentCurrencyCode:a.presentmentCurrencyCode,shipping:0,total:a.items})}catch(e){r(e)}m.isFetchingLandedCost=!1}},y=e=>{let t=[],n=!0;switch(e){case"succeeded":t=[i("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",i("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")],n=!1;break;case"requires_capture":case"processing":t=[i("Payment processing. We'll update you when payment is received.")],n=!1;break;case"requires_payment_method":t=[i("Payment failed. Please try another payment method.")];break;default:t=[i("Something went wrong.")]}return{isError:n,messages:t}},f=async({clientSecret:e,storybookForceStatus:t})=>{if(t){const{isError:e,messages:n}=y(t);return{error:e,messages:n}}const n=e||m.clientSecret;if(!m.stripe||!n)return r("Failed to retrieve payment intent. Stripe is not initialized"),{error:!0,message:[i("Something went wrong.")]};const{paymentIntent:o}=await m.stripe.retrievePaymentIntent(n),s=null==o?void 0:o.status,{isError:a,messages:l}=y(s);return{error:a,messages:l}},w=async()=>{var e,t,n;const o=!!(null===(e=m.stripePaymentEventData)||void 0===e?void 0:e.complete),s=m.stripeElements,r=m.stripe;if(r&&s&&o&&m.clientSecret){const{error:e}=await r.confirmPayment({confirmParams:{receipt_email:null===(n=null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value)||void 0===n?void 0:n.email,return_url:window.location.href},elements:s,redirect:"if_required"});if(e){if("card_error"===e.type||"validation_error"===e.type)throw new Error(e.message);if("invalid_request_error"===e.type&&"payment_intent_unexpected_state"===e.code)return;throw new Error("An unexpected error occurred.")}}},S=async()=>{var e;const t=E.items.reduce(((e,t)=>e+t.amount*t.quantity),0);if(!t||!s.targetCurrency)return r("Fail to create checkout session - invalid total or currency"),!1;m.isFetchingSession=!0;const{errors:i,json:a}=await n("https://v1.route.js.zonos.com/api/zonos-elements/create-checkout-session",{body:{currency:(null===(e=E.items.find(Boolean))||void 0===e?void 0:e.currencyCode)||"",itemsAmount:t,presentmentCountryCode:s.selectedCountryCode||null},method:"POST"});if(m.isFetchingSession=!1,i.length||!a)return r("Error occurs when creating checkout session",JSON.stringify(i,null,2)),!1;const l=a.checkoutSessionCreate;return m.clientSecret=l.clientSecret,E.checkoutSessionId=l.id,A(Object.assign(Object.assign({},l.subtotals),{landedCostTotal:0,shipping:0,total:l.subtotals.items})),o("Exchange rate updated for cart items (checkout session create)","info",E.exchangeRate),o("done-init-checkout-session"),!0};u("clientSecret",(e=>{e&&m.stripe&&sessionStorage.setItem("zonos--client-secret",e),e||sessionStorage.removeItem("zonos--client-secret")}));const C=e=>{const t=new Date,n=e.getTime()-t.getTime();return Math.floor(n/864e5)},{onChange:k,reset:b,state:E}=t((()=>({checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:!1,isSelectedShippingGuarantee:!1,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}))),O=e=>{const t=e.minTransitAt?C(new Date(e.minTransitAt)):"",n=e.maxTransitAt?C(new Date(e.maxTransitAt)):"";return{expectedDate:e.minTransitAt?(({date:e,formatOptions:t={day:"numeric",weekday:"long",year:"numeric"}})=>new Intl.DateTimeFormat("en-US",t).format(e))({date:new Date(e.minTransitAt)}):"",maxTransit:n,minTransit:t}},j=()=>{sessionStorage.removeItem("zonos--checkout-session-id"),b()},T=({messages:e,title:t})=>{E.step="error",E.error={messages:e,title:t}},A=e=>{E.exchangeRate=e.exchangeRate,E.dutiesTaxFees=e.landedCostTotal,E.subtotal=e.items,E.total=e.total,E.currency=e.presentmentCurrencyCode},x=async({currency:e,itemsAmount:t,landedCostId:a})=>{if(a&&E.selectedLandedCost&&(A(E.selectedLandedCost.subtotals),o("Exchange rate updated for cart items (landed cost subtotal)","info",E.exchangeRate)),!E.checkoutSessionId)return r("Could not update cart total without checkout session id"),!1;const{json:l}=await(async({currency:e,id:t,itemsAmount:o,landedCostId:s,presentmentCountryCode:i})=>{const{errors:a,json:l}=await n("https://v1.route.js.zonos.com/api/zonos-elements/update-checkout-session",{body:{currency:e,id:t,itemsAmount:o,landedCostId:s,presentmentCountryCode:i},method:"POST"});return a.length||!l?(r("Error occurs when updating checkout session",JSON.stringify(a,null,2)),{errors:a,json:l}):{errors:[],json:l}})({currency:e,id:E.checkoutSessionId,itemsAmount:t,landedCostId:a,presentmentCountryCode:s.selectedCountryCode});return l?(a||(A(l.checkoutSessionUpdate.subtotals),o("Exchange rate updated for cart items (checkout session update)","info",E.exchangeRate)),!0):(r("Error occurs when updating checkout session"),T({messages:[i("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error updating Checkout")}),!1)},z=async e=>{var t,n,o,s,r;E.selectedShippingOption=e;const{expectedDate:i,maxTransit:a,minTransit:l}=O(E.selectedShippingOption);E.selectedShippingOptionExpectedDate=i,E.selectedShippingOptionTransitTime=l&&a?`${l}-${a}`:`${l||a}`;const d=null===(t=E.landedCostData)||void 0===t?void 0:t.find((e=>{var t,n,o;return(null===(n=null===(t=e.landedCost)||void 0===t?void 0:t.shipmentRating)||void 0===n?void 0:n.id)===(null===(o=E.selectedShippingOption)||void 0===o?void 0:o.id)}));if(E.selectedLandedCost=d||null,!d)return!1;E.shipping=d.subtotals.shipping;const c="ZONOS"===(null===(n=null==d?void 0:d.landedCost)||void 0===n?void 0:n.landedCostGuaranteeCode),u=!!(null===(s=null===(o=null==d?void 0:d.landedCost)||void 0===o?void 0:o.deMinimis)||void 0===s?void 0:s.find((e=>["DUTY","TAX"].includes(e.type)&&"ABOVE"===e.threshold)));return E.isSelectedShippingAboveDeminimis=u,E.isSelectedShippingGuarantee=c,await x({landedCostId:null===(r=d.landedCost)||void 0===r?void 0:r.id})};k("checkoutSessionId",(()=>{E.checkoutSessionId?sessionStorage.setItem("zonos--checkout-session-id",E.checkoutSessionId):sessionStorage.removeItem("zonos--checkout-session-id")}));const D=async e=>{var t;E.items=e;const n=null===(t=e.find(Boolean))||void 0===t?void 0:t.currencyCode,o=e.reduce(((e,t)=>e+t.amount*t.quantity),0);n&&o&&(E.currency=n,m.isFetchingSession=!0,await x({currency:n,itemsAmount:o}),m.isFetchingSession=!1)},P=()=>{"customer-info"===E.step?E.step="shipping":"shipping"===E.step?E.step="payment":"payment"===E.step&&(E.step="finish")},B=()=>{"payment"===E.step?E.step="shipping":"shipping"===E.step&&(E.step="customer-info",E.selectedShippingOption=null,E.isSelectedShippingAboveDeminimis=!1,E.isSelectedShippingGuarantee=!1,E.selectedShippingOptionExpectedDate="",E.selectedShippingOptionTransitTime="",E.shipping=0)};export{A as a,O as b,E as c,P as d,B as e,x as f,j as g,D as h,z as i,T as j,h as k,S as l,g as m,w as n,v as o,f as p,m as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,f as n}from"./p-4d8545e1.js";const r=t=>!("isConnected"in t)||t.isConnected,e=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(r))})(...n)}),2e3)}})(),o=t=>"function"==typeof t?t():t,i=(r,i)=>{const u=((t,n=((t,n)=>t!==n))=>{const r=o(t);let e=new Map(Object.entries(null!=r?r:{}));const i={dispose:[],get:[],set:[],reset:[]},u=()=>{var n;e=new Map(Object.entries(null!==(n=o(t))&&void 0!==n?n:{})),i.reset.forEach((t=>t()))},c=t=>(i.get.forEach((n=>n(t))),e.get(t)),a=(t,r)=>{const o=e.get(t);n(r,o,t)&&(e.set(t,r),i.set.forEach((n=>n(t,r,o))))},s="undefined"==typeof Proxy?{}:new Proxy(r,{get:(t,n)=>c(n),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>e.has(n),set:(t,n,r)=>(a(n,r),!0)}),f=(t,n)=>(i[t].push(n),()=>{((t,n)=>{const r=t.indexOf(n);r>=0&&(t[r]=t[t.length-1],t.length--)})(i[t],n)});return{state:s,get:c,set:a,on:f,onChange:(n,r)=>{const e=f("set",((t,e)=>{t===n&&r(e)})),i=f("reset",(()=>r(o(t)[n])));return()=>{e(),i()}},use:(...t)=>{const n=t.reduce(((t,n)=>(n.set&&t.push(f("set",n.set)),n.get&&t.push(f("get",n.get)),n.reset&&t.push(f("reset",n.reset)),n.dispose&&t.push(f("dispose",n.dispose)),t)),[]);return()=>n.forEach((t=>t()))},dispose:()=>{i.dispose.forEach((t=>t())),u()},reset:u,forceUpdate:t=>{const n=e.get(t);i.set.forEach((r=>r(t,n,n)))}}})(r,i);return u.use((()=>{if("function"!=typeof t)return{};const r=new Map;return{dispose:()=>r.clear(),get:n=>{const e=t();e&&((t,n,r)=>{const e=t.get(n);e?e.includes(r)||e.push(r):t.set(n,[r])})(r,n,e)},set:t=>{const o=r.get(t);o&&r.set(t,o.filter(n)),e(r)},reset:()=>{r.forEach((t=>t.forEach(n))),e(r)}}})()),u};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c=function(t,n){return t===n||t!=t&&n!=n},a=c,s=function(t,n){for(var r=t.length;r--;)if(a(t[r][0],n))return r;return-1},f=s,l=Array.prototype.splice,v=s,d=s,h=s;function p(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}p.prototype.clear=function(){this.__data__=[],this.size=0},p.prototype.delete=function(t){var n=this.__data__,r=f(n,t);return!(r<0||(r==n.length-1?n.pop():l.call(n,r,1),--this.size,0))},p.prototype.get=function(t){var n=this.__data__,r=v(n,t);return r<0?void 0:n[r][1]},p.prototype.has=function(t){return d(this.__data__,t)>-1},p.prototype.set=function(t,n){var r=this.__data__,e=h(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this};var b,y=p,g=y,j="object"==typeof u&&u&&u.Object===Object&&u,O="object"==typeof self&&self&&self.Object===Object&&self,m=j||O||Function("return this")(),_=m.Symbol,E=Object.prototype,w=E.hasOwnProperty,S=E.toString,A=_?_.toStringTag:void 0,D=Object.prototype.toString,B=_?_.toStringTag:void 0,T=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?function(t){var n=w.call(t,A),r=t[A];try{t[A]=void 0;var e=!0}catch(t){}var o=S.call(t);return e&&(n?t[A]=r:delete t[A]),o}(t):function(t){return D.call(t)}(t)},C=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},P=T,I=C,L=function(t){if(!I(t))return!1;var n=P(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},U=m["__core-js_shared__"],x=(b=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",N=Function.prototype.toString,F=L,M=C,z=/^\[object .+?Constructor\]$/,$=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=function(t){return!(!M(t)||(n=t,x&&x in n))&&(F(t)?$:z).test(function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var n},k=function(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return R(r)?r:void 0},G=k(m,"Map"),H=k(Object,"create"),K=H,V=H,q=Object.prototype.hasOwnProperty,J=H,Q=Object.prototype.hasOwnProperty,W=H;function X(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}X.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},X.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},X.prototype.get=function(t){var n=this.__data__;if(V){var r=n[t];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(n,t)?n[t]:void 0},X.prototype.has=function(t){var n=this.__data__;return J?void 0!==n[t]:Q.call(n,t)},X.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=W&&void 0===n?"__lodash_hash_undefined__":n,this};var Y=X,Z=y,tt=G,nt=function(t,n){var r,e,o=t.__data__;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?o["string"==typeof n?"string":"hash"]:o.map},rt=nt,et=nt,ot=nt,it=nt;function ut(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}ut.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(tt||Z),string:new Y}},ut.prototype.delete=function(t){var n=rt(this,t).delete(t);return this.size-=n?1:0,n},ut.prototype.get=function(t){return et(this,t).get(t)},ut.prototype.has=function(t){return ot(this,t).has(t)},ut.prototype.set=function(t,n){var r=it(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this};var ct=y,at=G,st=ut,ft=y,lt=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},vt=function(t){return this.__data__.get(t)},dt=function(t){return this.__data__.has(t)};function ht(t){var n=this.__data__=new ft(t);this.size=n.size}ht.prototype.clear=function(){this.__data__=new g,this.size=0},ht.prototype.delete=lt,ht.prototype.get=vt,ht.prototype.has=dt,ht.prototype.set=function(t,n){var r=this.__data__;if(r instanceof ct){var e=r.__data__;if(!at||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new st(e)}return r.set(t,n),this.size=r.size,this};var pt,bt,yt,gt,jt,Ot=ht,mt=k,_t=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Et=_t,wt=function(t,n,r){"__proto__"==n&&Et?Et(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r},St=wt,At=c,Dt=function(t,n,r){(void 0!==r&&!At(t[n],r)||void 0===r&&!(n in t))&&St(t,n,r)},Bt=function(t,n,r){for(var e=-1,o=Object(t),i=r(t),u=i.length;u--;){var c=i[++e];if(!1===n(o[c],c,o))break}return t},Tt={exports:{}};jt=(gt=(yt=(bt=(pt=Tt.exports)&&!pt.nodeType&&pt)&&Tt&&!Tt.nodeType&&Tt)&&yt.exports===bt?m.Buffer:void 0)?gt.allocUnsafe:void 0,Tt.exports=function(t,n){if(n)return t.slice();var r=t.length,e=jt?jt(r):new t.constructor(r);return t.copy(e),e};var Ct,Pt,It=m.Uint8Array,Lt=C,Ut=Object.create,xt=function(){function t(){}return function(n){if(!Lt(n))return{};if(Ut)return Ut(n);t.prototype=n;var r=new t;return t.prototype=void 0,r}}(),Nt=(Ct=Object.getPrototypeOf,Pt=Object,function(t){return Ct(Pt(t))}),Ft=Object.prototype,Mt=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Ft)},zt=xt,$t=Nt,Rt=Mt,kt=function(t){return null!=t&&"object"==typeof t},Gt=T,Ht=kt,Kt=function(t){return Ht(t)&&"[object Arguments]"==Gt(t)},Vt=kt,qt=Object.prototype,Jt=qt.hasOwnProperty,Qt=qt.propertyIsEnumerable,Wt=Kt(function(){return arguments}())?Kt:function(t){return Vt(t)&&Jt.call(t,"callee")&&!Qt.call(t,"callee")},Xt=Array.isArray,Yt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Zt=L,tn=Yt,nn=function(t){return null!=t&&tn(t.length)&&!Zt(t)},rn=nn,en=kt,on={exports:{}},un=function(){return!1};!function(t,n){var r=n&&!n.nodeType&&n,e=r&&on&&!on.nodeType&&on,o=e&&e.exports===r?m.Buffer:void 0;on.exports=(o?o.isBuffer:void 0)||un}(0,on.exports);var cn=T,an=Nt,sn=kt,fn=Function.prototype.toString,ln=Object.prototype.hasOwnProperty,vn=fn.call(Object),dn=T,hn=Yt,pn=kt,bn={};bn["[object Float32Array]"]=bn["[object Float64Array]"]=bn["[object Int8Array]"]=bn["[object Int16Array]"]=bn["[object Int32Array]"]=bn["[object Uint8Array]"]=bn["[object Uint8ClampedArray]"]=bn["[object Uint16Array]"]=bn["[object Uint32Array]"]=!0,bn["[object Arguments]"]=bn["[object Array]"]=bn["[object ArrayBuffer]"]=bn["[object Boolean]"]=bn["[object DataView]"]=bn["[object Date]"]=bn["[object Error]"]=bn["[object Function]"]=bn["[object Map]"]=bn["[object Number]"]=bn["[object Object]"]=bn["[object RegExp]"]=bn["[object Set]"]=bn["[object String]"]=bn["[object WeakMap]"]=!1;var yn={exports:{}};!function(t,n){var r=n&&!n.nodeType&&n,e=r&&t&&!t.nodeType&&t,o=e&&e.exports===r&&j.process,i=function(){try{return e&&e.require&&e.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}(yn,yn.exports);var gn,jn=function(t){return pn(t)&&hn(t.length)&&!!bn[dn(t)]},On=yn.exports,mn=On&&On.isTypedArray,_n=mn?function(t){return function(n){return t(n)}}(mn):jn,En=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]},wn=wt,Sn=c,An=Object.prototype.hasOwnProperty,Dn=function(t,n,r){var e=t[n];An.call(t,n)&&Sn(e,r)&&(void 0!==r||n in t)||wn(t,n,r)},Bn=wt,Tn=/^(?:0|[1-9]\d*)$/,Cn=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&Tn.test(t))&&t>-1&&t%1==0&&t<n},Pn=Wt,In=Xt,Ln=on.exports,Un=Cn,xn=_n,Nn=Object.prototype.hasOwnProperty,Fn=C,Mn=Mt,zn=Object.prototype.hasOwnProperty,$n=function(t,n){var r=In(t),e=!r&&Pn(t),o=!r&&!e&&Ln(t),i=!r&&!e&&!o&&xn(t),u=r||e||o||i,c=u?function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}(t.length,String):[],a=c.length;for(var s in t)!n&&!Nn.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Un(s,a))||c.push(s);return c},Rn=function(t){if(!Fn(t))return function(t){var n=[];if(null!=t)for(var r in Object(t))n.push(r);return n}(t);var n=Mn(t),r=[];for(var e in t)("constructor"!=e||!n&&zn.call(t,e))&&r.push(e);return r},kn=nn,Gn=function(t){return kn(t)?$n(t,!0):Rn(t)},Hn=Gn,Kn=Dt,Vn=Tt.exports,qn=function(t,n){var r,e,o=n?(e=new(r=t.buffer).constructor(r.byteLength),new It(e).set(new It(r)),e):t.buffer;return new t.constructor(o,t.byteOffset,t.length)},Jn=function(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n},Qn=function(t){return"function"!=typeof t.constructor||Rt(t)?{}:zt($t(t))},Wn=Wt,Xn=Xt,Yn=function(t){return en(t)&&rn(t)},Zn=on.exports,tr=L,nr=C,rr=function(t){if(!sn(t)||"[object Object]"!=cn(t))return!1;var n=an(t);if(null===n)return!0;var r=ln.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&fn.call(r)==vn},er=_n,or=En,ir=function(t){return function(t,n,r,e){var o=!r;r||(r={});for(var i=-1,u=n.length;++i<u;){var c=n[i],a=e?e(r[c],t[c],c,r,t):void 0;void 0===a&&(a=t[c]),o?Bn(r,c,a):Dn(r,c,a)}return r}(t,Hn(t))},ur=Ot,cr=Dt,ar=Bt,sr=C,fr=Gn,lr=En,vr=function(t){return t},dr=Math.max,hr=_t,pr=Date.now,br=function(t){var n=0,r=0;return function(){var e=pr(),o=16-(e-r);if(r=e,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}(hr?function(t,n){return hr(t,"toString",{configurable:!0,enumerable:!1,value:(r=n,function(){return r}),writable:!0});var r}:vr),yr=vr,gr=function(t,n,r){return n=dr(void 0===n?t.length-1:n,0),function(){for(var e=arguments,o=-1,i=dr(e.length-n,0),u=Array(i);++o<i;)u[o]=e[n+o];o=-1;for(var c=Array(n+1);++o<n;)c[o]=e[o];return c[n]=r(u),function(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}(t,this,c)}},jr=br,Or=c,mr=nn,_r=Cn,Er=C,wr=function t(n,r,e,o,i){n!==r&&ar(r,(function(u,c){if(i||(i=new ur),sr(u))!function(t,n,r,e,o,i,u){var c=or(t,r),a=or(n,r),s=u.get(a);if(s)Kn(t,r,s);else{var f=i?i(c,a,r+"",t,n,u):void 0,l=void 0===f;if(l){var v=Xn(a),d=!v&&Zn(a),h=!v&&!d&&er(a);f=a,v||d||h?Xn(c)?f=c:Yn(c)?f=Jn(c):d?(l=!1,f=Vn(a,!0)):h?(l=!1,f=qn(a,!0)):f=[]:rr(a)||Wn(a)?(f=c,Wn(c)?f=ir(c):nr(c)&&!tr(c)||(f=Qn(a))):l=!1}l&&(u.set(a,f),o(f,a,e,i,u),u.delete(a)),Kn(t,r,f)}}(n,r,c,e,t,o,i);else{var a=o?o(lr(n,c),u,c+"",n,r,i):void 0;void 0===a&&(a=u),cr(n,c,a)}}),fr)},Sr=(gn=function(t,n,r){wr(t,n,r)},function(t,n){return jr(gr(t,n,yr),t+"")}((function(t,n){var r=-1,e=n.length,o=e>1?n[e-1]:void 0,i=e>2?n[2]:void 0;for(o=gn.length>3&&"function"==typeof o?(e--,o):void 0,i&&function(t,n,r){if(!Er(r))return!1;var e=typeof n;return!!("number"==e?mr(r)&&_r(n,r.length):"string"==e&&n in r)&&Or(r[n],t)}(n[0],n[1],i)&&(o=e<3?void 0:o,e=1),t=Object(t);++r<e;){var u=n[r];u&&gn(t,u,r)}return t})));const Ar=(t,n,...r)=>{const e=[t,n,...r].filter(Boolean);return Sr.apply(null,e)},{reset:Dr,state:Br}=i((()=>({appearance:{colorPrimary:"purple",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{analyticsProviders:[],orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",currencyBehavior:"ENABLED",currencyElementSelector:".money",dutyTaxEstimationBehavior:"ENABLED",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productPriceElementSelector:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED"},loadedConfig:!1,organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:""})));let Tr=null;const Cr=({overrideSettings:t,zonosSettings:n})=>{var r,e,o;Dr(),n&&(Tr=n),Br.appearance=Ar(Br.appearance,(null==Tr?void 0:Tr.appearanceSettings)||(null==n?void 0:n.appearanceSettings)||null,t.appearance),Br.checkoutSettings=Ar(Br.checkoutSettings,(null==Tr?void 0:Tr.checkoutSettings)||(null==n?void 0:n.checkoutSettings)||null,t.checkoutSettings),Br.helloSettings=Ar(Br.helloSettings,(null==Tr?void 0:Tr.helloSettings)||(null==n?void 0:n.helloSettings)||null,t.helloSettings),Br.loadedConfig=!0,Br.organizationName=(null===(r=null==n?void 0:n.organization)||void 0===r?void 0:r.name)||"",Br.storeId=(null===(o=null===(e=null==n?void 0:n.organization)||void 0===e?void 0:e.references)||void 0===o?void 0:o.storeId)||null,Br.currencyConverter=t.currencyConverter},Pr=()=>Br.appearance.fontFamily||"Inter";export{m as _,u as a,Cr as b,i as c,Pr as d,T as e,C as f,kt as i,Ar as m,Br as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function r(o){try{l(n.next(o))}catch(o){s(o)}}function a(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(r,a)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(t){return l([o,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(e=0)),e)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){e.label=a[1];break}if(a[0]===6&&e.label<s[1]){e.label=s[1];s=a;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(a);break}if(s[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-18904b7c.system.js","./p-ab179c88.system.js","./p-7730250d.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js"],(function(o){"use strict";var t,e,n,i,s,r,a,l,h,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.k;r=o.a;a=o.t},function(o){l=o.z},function(o){h=o.c},function(o){c=o.g}],execute:function(){var d=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var u='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var f='<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 g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var m='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var v=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var b=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false)}};o.prototype.render=function(){var o=this;var t;var e=r.countryLandedCost,v=r.selectedCountryCode;var b=(e===null||e===void 0?void 0:e.dutyDeminimus)?s(e.dutyDeminimus):null;var p=r.selectedCountryCode==="CA"?s(40):b;var w=p?"".concat(a("Spend")," ").concat(p," ").concat(a("duty free")):a("Duties will apply to all orders");var z=(e===null||e===void 0?void 0:e.vatTaxDeminimus)?s(e.vatTaxDeminimus):null;var x=r.selectedCountryCode==="CA"?s(150):z;var C=x?"".concat(a("Spend")," ").concat(x," ").concat(a("tax free")):a("Taxes will apply to all orders");var y=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var k=this.dialogRef&&d(this.dialogRef);var H=r.customMessages;var V="".concat(a("Welcome to")," ").concat(l.organizationName,"!");var _=((t=H.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var M=this.getCurrentPageEnum();var Z=H.filter((function(o){return o.pageName===M}));return n(i,{class:"zonos--elements"},n("div",{"aria-hidden":"true",class:h(["zonos--hello-dialog",y&&"zonos--hello-dialog-animate-from-left",k&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},n("div",{class:"zonos--hello-dialog-content"},n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{content:m}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),this.showCountrySelect?n("div",null,n("zonos-country-select",{closeCountrySelect:function(){return o.setShowCountrySelect(false)}})):n("div",null,n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:v}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},V),n("zonos-text",{color:"gray-800"},_)),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{color:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{content:u}),n("zonos-text",null,w)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{content:g}),n("zonos-text",null,C)))),Z.map((function(o){return n("zonos-custom-message",{icon:f,message:o.message})})))))),!this.showCountrySelect&&n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)}})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());b.style=v}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(a,r)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(t){return l([o,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;i=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(o,e)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-4d39efb6.system.js","./p-a6f2e282.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js"],(function(o){"use strict";var t,e,n,i,s,a,r,l,h,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.k;a=o.a;r=o.t},function(o){l=o.z},function(o){h=o.c},function(o){c=o.g}],execute:function(){var d=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var f='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var u='<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 g='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var m='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var b=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var v=b;var p=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false)}};o.prototype.render=function(){var o=this;var t;var e=a.countryLandedCost,b=a.selectedCountryCode;var v=(e===null||e===void 0?void 0:e.dutyDeminimus)?s(e.dutyDeminimus):null;var p=a.selectedCountryCode==="CA"?s(40):v;var w=p?"".concat(r("Spend")," ").concat(p," ").concat(r("duty free")):r("Duties will apply to all orders");var z=(e===null||e===void 0?void 0:e.vatTaxDeminimus)?s(e.vatTaxDeminimus):null;var x=a.selectedCountryCode==="CA"?s(150):z;var C=x?"".concat(r("Spend")," ").concat(x," ").concat(r("tax free")):r("Taxes will apply to all orders");var y=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var k=this.dialogRef&&d(this.dialogRef);var H=a.customMessages;var V="".concat(r("Welcome to")," ").concat(l.organizationName,"!");var _=((t=H.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var M=this.getCurrentPageEnum();var Z=H.filter((function(o){return o.pageName===M}));return n(i,{key:"09c2e005a701cf41134f1613c1bbf7214782b24c",class:"zonos--elements"},n("div",{key:"ad9675ef097ea4b21bbdb99b5f30d64c45c744e5","aria-hidden":"true",class:h(["zonos--hello-dialog",y&&"zonos--hello-dialog-animate-from-left",k&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},n("div",{key:"54f5da38c7ff31b3d848a83ca87b4514cf51de20",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"31b30feb4e314c23932aa433f6a3d9564f28a56d",class:"zonos--close-button",icon:n("zonos-icon",{content:m}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),this.showCountrySelect?n("div",null,n("zonos-country-select",{closeCountrySelect:function(){return o.setShowCountrySelect(false)}})):n("div",null,n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:b}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},V),n("zonos-text",{color:"gray-800"},_)),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{color:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{content:f}),n("zonos-text",null,w)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{content:g}),n("zonos-text",null,C)))),Z.map((function(o){return n("zonos-custom-message",{icon:u,message:o.message})})))))),!this.showCountrySelect&&n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)}})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());p.style=v}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-dc09ca69.system.js","./p-a6f2e282.system.js"],(function(n){"use strict";var t,e;return{setters:[function(n){t=n.z},function(n){e=n.l}],execute:function(){var i=890;var o=n("i",(function(n){return n||window.innerWidth<i}));var u=n("s",(function(n){var i=t.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!i||(i===null||i===void 0?void 0:i.status)==="DISABLED"){return}if(typeof window.gtag==="function"){e("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));
|