@zonos/elements 1.3.160 → 1.3.162

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.
Files changed (37) hide show
  1. package/dist/cjs/index.cjs.js +7 -7
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/zonos-address_8.cjs.entry.js +11 -2
  4. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  5. package/dist/cjs/zonos-elements.cjs.js +1 -1
  6. package/dist/collection/components/main/zonos-controller.js +7 -7
  7. package/dist/collection/components/stripe/zonos-address/zonos-address.js +12 -1
  8. package/dist/collection/types/generated/graphql.internal.types.js +7 -3
  9. package/dist/esm/index.js +7 -7
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/zonos-address_8.entry.js +11 -2
  12. package/dist/esm/zonos-controller.entry.js +7 -7
  13. package/dist/esm/zonos-elements.js +1 -1
  14. package/dist/esm-es5/index.js +1 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  17. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  18. package/dist/esm-es5/zonos-elements.js +1 -1
  19. package/dist/scripts/index.js +1 -1
  20. package/dist/scripts/loadZonos.js +1 -1
  21. package/dist/scripts/zonos.js +1 -1
  22. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -0
  23. package/dist/types/components/utils/api/placeTestOrder.d.ts +1 -1
  24. package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +10 -4
  25. package/dist/types/types/generated/graphql.internal.types.d.ts +14 -7
  26. package/dist/types/types/generated/graphql.internal.types.ts +24 -15
  27. package/dist/zonos-elements/index.esm.js +1 -1
  28. package/dist/zonos-elements/{p-c522ddf2.entry.js → p-28a062f3.entry.js} +1 -1
  29. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  30. package/dist/zonos-elements/p-52bfe2bc.system.entry.js +1 -0
  31. package/dist/zonos-elements/{p-95aa4518.system.entry.js → p-6bbdc759.system.entry.js} +1 -1
  32. package/dist/zonos-elements/{p-165dfe38.system.js → p-6e94f59c.system.js} +1 -1
  33. package/dist/zonos-elements/p-fb7b12af.entry.js +1 -0
  34. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/zonos-elements/p-4968aa73.entry.js +0 -1
  37. package/dist/zonos-elements/p-d8406c80.system.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as o,c as s,h as e,H as t,d as n}from"./p-ab68ad11.js";import{f as i,V as a,l,r as d,e as r}from"./p-a0efb02e.js";import{i as h}from"./p-81a54668.js";import{b as c,l as p}from"./p-f0c8150e.js";import{i as b,c as f}from"./p-0c64dbbb.js";import{z as u,d as z}from"./p-dd999b44.js";import{c as m}from"./p-b4b7f705.js";import{R as y}from"./p-08e7107d.js";import{g}from"./p-98e9c9cf.js";import{i as v}from"./p-672707ce.js";const x=class{constructor(e){o(this,e),this.invalidCharacters=s(this,"invalidCharacters",7),this.isAutoCompleteAdjusted=!1,this.type=void 0,this.titleText=void 0,this.defaultAddress=null,this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:i.stripeBillingAddressElement,stripeAddressEventData:i.stripeBillingAddressEventData,stripeElements:i.stripeElementsForBillingAddress}:{stripeAddressElement:i.stripeAddressElement,stripeAddressEventData:i.stripeAddressEventData,stripeElements:i.stripeElements}}updateAddressEventData({event:o,type:s}){"billing"===s?i.stripeBillingAddressEventData=o:i.stripeAddressEventData=o}updateAddressElement({stripeAddressElement:o,type:s}){"shipping"!==s?i.stripeBillingAddressElement=o:i.stripeAddressElement=o}async watchInitStripe(){var o,s;this.stripe=window.Zonos.stripe;const{stripeAddressEventData:e,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void c("Stripe is not initialized. Couldn't load stripe element.");(null===(o=this.defaultAddress)||void 0===o?void 0:o.phone)||null===(s=this.defaultAddress)||void 0===s||delete s.phone;const n=l.shippingZoneCountries,i=n?Object.values(n).map((o=>o.code)):[],d=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries"),r="shipping"===this.type?i:[],b=(null==e?void 0:e.value.address.country)||a(r);p(`Stripe country code: ${b}`,"info");const f=t.create("address",{allowedCountries:d?[]:r,contacts:this.defaultAddress&&!e?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},null==e?void 0:e.value.address),{country:b}),firstName:null==e?void 0:e.value.firstName,lastName:null==e?void 0:e.value.lastName,phone:null==e?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});f.mount(this.el.querySelector(".zonos--address-component")),f.on("change",(o=>{const s=o.value;!this.isDirtyAddress&&s.address.line1.length>=3&&(this.isDirtyAddress=!0,setTimeout((()=>{if(!this.isAutoCompleteAdjusted){const o=this.el.querySelector('iframe[src*="autocomplete-suggestions"]');o&&(o.style.zIndex="2"),this.isAutoCompleteAdjusted=!0}if(h())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const o="shipping"===this.type?100:600,s=this.el.closest(".zonos--group"),e=this.el.getBoundingClientRect().top+o;null==s||s.scrollTo({behavior:"smooth",top:e})}}),600)),this.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},s),{firstName:s.firstName||s.name.split(" ")[0],lastName:s.lastName||s.name.split(" ")[1]})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:f,type:this.type})}defaultAddressChanged(){p("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});const o=this.getStripeAddressInstance().stripeAddressElement;null==o||o.destroy(),this.watchInitStripe()}disconnectedCallback(){const o=this.getStripeAddressInstance().stripeAddressElement;null==o||o.destroy()}componentDidLoad(){const o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0,this.watchInitStripe()}render(){return e(t,{key:"6b60b7dcf989454403af0c916d039cdc6c5675a3",class:"zonos--address zonos--elements"},e("zonos-text",{key:"7a555cc624abac44b61f81f616305fb8e5a4fd66",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"55c305ccb4230c37b6f36087f9782a1545be242f",class:"zonos--address-component"}))}get el(){return n(this)}static get watchers(){return{stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}}};x.style=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const k=class{constructor(s){o(this,s),this.currentAddress=void 0,this.addressType=void 0}render(){var o;const{city:s,country:n,email:i,line1:a,line2:r,name:h,phone:c,postal_code:p,state:f}=this.currentAddress,u=null===(o=l.shippingZoneCountries)||void 0===o?void 0:o[n],z=({bold:o,content:s})=>{const t=b(s)?"red-600":"gray-1000";return e("zonos-text",{textColor:t,type:o?"boldLabel":"body"},s)};return e(t,{class:"zonos--address-form zonos--elements"},e("div",{class:"zonos--title"},e("zonos-text",{textColor:"gray-700",type:"smallHeader"},d("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{class:"zonos--address-group"},h&&e("div",{class:"zonos--address-line"},z({bold:!0,content:h})),i&&e("div",{class:"zonos--address-line"},z({content:i})),c&&e("div",{class:"zonos--address-line"},z({content:c})),a&&e("div",{class:"zonos--address-line"},z({content:a})),r&&e("div",{class:"zonos--address-line"},z({content:r})),e("div",{class:"zonos--address-line"},s&&z({content:s}),f&&z({content:f}),p&&z({content:p})),u&&e("div",{class:"zonos--address-line"},e("zonos-country-flag",{class:"zonos--country-flag",countryCode:u.code})," ",z({content:u.displayName}))))}};k.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';const w=class{constructor(e){o(this,e),this.addressChange=s(this,"addressChange",7),this.onInputChange=({key:o,value:s})=>{this.addressChange.emit(Object.assign(Object.assign({},this.localAddress),{[o]:s}))},this.currentAddress=void 0,this.translatedAddress=void 0,this.addressType=void 0,this.localAddress=this.currentAddress}watchCurrentAddress(){var o,s,e,t,n,i;const{city:a,line1:l,line2:d,name:r,postal_code:h,state:c}=this.currentAddress;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:(null===(o=this.translatedAddress.city)||void 0===o?void 0:o[a])||a,line1:(null===(s=this.translatedAddress.line1)||void 0===s?void 0:s[l])||l,line2:(null===(e=this.translatedAddress.line2)||void 0===e?void 0:e[d])||d,name:(null===(t=this.translatedAddress.name)||void 0===t?void 0:t[r])||r,postal_code:(null===(n=this.translatedAddress.postal_code)||void 0===n?void 0:n[h])||h,state:(null===(i=this.translatedAddress.state)||void 0===i?void 0:i[c])||c})}componentWillLoad(){this.watchCurrentAddress()}render(){const{city:o,country:s,line1:n,line2:i,name:a,phone:l,postal_code:r,state:h}=this.localAddress,c=a.split(" ")[0]||"",p=a.split(" ").slice(1).join(" ")||"";return e(t,{key:"8b578737e33203a23563be7e9be0778deec99bbf",class:"zonos--address-form zonos--elements"},e("div",{key:"793675a1348547bf3f781788956befe325191011",class:"zonos--title"},e("zonos-text",{key:"13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9",textColor:"gray-700",type:"smallHeader"},d("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{key:"2c5de5b5283fb99ee5f8b61d7a217177986fc2db",class:"zonos--address-group"},e("div",{key:"23bf3c893071000d5995a5f175867bab11929193",class:"zonos--contact"},e("zonos-text",{key:"7cdfe2a84ebad89ba5b16498d75def99cf392384",type:"label"},d("Contact")),e("zonos-input",{key:"1c39c38767fd306c5eb1164cdc989b8291209cf0",class:"zonos--form-email",inputLabel:d("Email"),inputValue:this.currentAddress.email,isDisabled:!0}),e("div",{key:"cbdf61217125e22b1a6cec9a340ef0aca2c75670",class:"zonos--name zonos--address-row"},e("zonos-input",{key:"360c99e7b2c6caa64580d5768b5bb53368927275",class:"zonos--form-first-name",inputLabel:d("First name"),inputValue:c,isError:b(c),onInputChange:o=>this.onInputChange({key:"name",value:`${o.detail} ${p}`})}),e("zonos-input",{key:"8ce5fa5c15c6f7928339ea10009ce0e68954a91f",class:"zonos--form-last-name",inputLabel:d("Last name"),inputValue:p,isError:b(p),onInputChange:o=>this.onInputChange({key:"name",value:`${c} ${o.detail}`})}))),e("div",{key:"7b4fa2d3baa6cb257e7688e5ba6777123898b3fd",class:"zonos--address"},e("zonos-text",{key:"9d5782331b2642755a755aeb7f98c9f4d87f9a20",type:"label"},d("Address")),e("zonos-input",{key:"a622025924ca86bdbf1d3c04b79e6dee172b4c42",class:"zonos--form-country",inputLabel:d("Country"),inputValue:s,isDisabled:!0}),e("zonos-input",{key:"f99b3a74db09ab5730878e80705b9aeac76bf800",class:"zonos--form-line1",inputLabel:d("Address line 1"),inputValue:n,isError:b(n),onInputChange:o=>this.onInputChange({key:"line1",value:o.detail})}),e("zonos-input",{key:"5d16aefa45a78045c87d166aaaec0255606e455e",class:"zonos--form-line2",inputLabel:d("Address line 2"),inputValue:i,isError:b(i),onInputChange:o=>this.onInputChange({key:"line2",value:o.detail})}),e("div",{key:"dc166be9381142835d72e731cb38a718522a068a",class:"zonos--address-row"},e("zonos-input",{key:"4f1a98f9d10ce0cff3ef18a3037a12382552b31d",class:"zonos--form-city",inputLabel:d("City"),inputValue:o,isError:b(o),onInputChange:o=>this.onInputChange({key:"city",value:o.detail})}),e("zonos-input",{key:"d4f97900b5fe2e1619950a52d1d1f716a8bc19ff",class:"zonos--form-state",inputLabel:d("State/Province"),inputValue:h,isError:b(h),onInputChange:o=>this.onInputChange({key:"state",value:o.detail})})),e("zonos-input",{key:"cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733",class:"zonos--form-postal-code",inputLabel:d("Postal code"),inputValue:r,isError:b(r),onInputChange:o=>this.onInputChange({key:"postal_code",value:o.detail})}),e("zonos-input",{key:"7421c82847eded6bdbcce49ef8196124d8e50c1d",class:"zonos--form-phone",inputLabel:d("Phone number"),inputValue:l,onInputChange:o=>this.onInputChange({key:"phone",value:o.detail})}))))}static get watchers(){return{translatedAddress:["watchCurrentAddress"]}}};w.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";const A=class{constructor(e){o(this,e),this.closeUpdateDialog=s(this,"closeUpdateDialog",7),this.continueClicked=s(this,"continueClicked",7),this.closeUpdateDialogHandler=()=>{this.closeUpdateDialog.emit()},this.getTranslatedAddress=({currentAddress:o,translatedAddress:s})=>{var e,t,n,i,a,l;const{city:d,line1:r,line2:h,name:c,postal_code:p,state:b}=o;return{city:(null===(e=s.city)||void 0===e?void 0:e[d])||d,line1:(null===(t=s.line1)||void 0===t?void 0:t[r])||r,line2:(null===(n=s.line2)||void 0===n?void 0:n[h])||h,name:(null===(i=s.name)||void 0===i?void 0:i[c])||c,postal_code:(null===(a=s.postal_code)||void 0===a?void 0:a[p])||p,state:(null===(l=s.state)||void 0===l?void 0:l[b])||b}},this.continueClickHandler=async()=>{var o,s,e;this.continueLoading=!0;const t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null,n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState}),i=f(Object.assign(Object.assign({},n),{country:this.shippingAddress.country})),a=t&&this.billingAddress&&f(Object.assign(Object.assign({},t),{country:this.billingAddress.country})),l=!!Object.keys(i).length,d=!!a&&!!Object.keys(a).length;if(l||d){const t=null===(o=this.el.shadowRoot)||void 0===o?void 0:o.querySelectorAll("zonos-address-form"),n=null==t?void 0:t[0],i=null==t?void 0:t[1],a=(null===(s=null==n?void 0:n.shadowRoot)||void 0===s?void 0:s.querySelector(".has-error"))||(null===(e=null==i?void 0:i.shadowRoot)||void 0===e?void 0:e.querySelector(".has-error"));return a&&a.scrollIntoView({behavior:"smooth",block:"center"}),void(this.continueLoading=!1)}this.continueClicked.emit({billingAddress:t,shippingAddress:n})},this.buildTranslateAddressState=({currentAddress:o,translatedAddress:s})=>{const{city:e,line1:t,line2:n,name:i,postal_code:a,state:l}=o;return{city:{[e]:s.city},line1:{[t]:s.line1},line2:{[n]:s.line2},name:{[i]:s.name},postal_code:{[a]:s.postal_code},state:{[l]:s.state}}},this.continueLoading=!1,this.dialogLoading=void 0,this.dialogOpen=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.isMobile=!1,this.shippingAddress=void 0,this.billingAddress=void 0,this.translatedShippingAddress=void 0,this.translatedBillingAddress=void 0,this.showErrorBanner=!1,this.translatedShippingAddressState={},this.translatedBillingAddressState={}}watchTranslatedShippingAddress(){this.translatedShippingAddressState=this.translatedShippingAddress}watchTranslatedBillingAddress(){this.translatedBillingAddressState=this.translatedBillingAddress}componentWillLoad(){this.watchTranslatedBillingAddress(),this.watchTranslatedShippingAddress()}render(){const o="#ffffff"===(this.submitBtnColor||u.appearance.colorSecondary)?"outline":this.submitBtnType||"standard",s=this.billingAddress,n=this.shippingAddress;return e(t,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:m(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},e("zonos-dialog",{key:"eab429bb78ce6f05ba463d8748d7edd5499402fa",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeUpdateDialog.emit(),open:this.dialogOpen,width:"568px"},e("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},e("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},e("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},e("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},d("Update your address")),e("zonos-button",{key:"66abf7b74045e68e84e631298504236d32ca9c4e",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:y}),noBackground:!0,onClick:()=>this.closeUpdateDialogHandler()})),e("zonos-text",{key:"ffb3d8f169867d5f6dff269e1becd99c98c5a7da"},d("To ensure delivery all address details must be in Latin characters."))),e("div",{key:"2cb61f06ce174e2317870decfdd337c67c5cf128",class:"zonos--group"},e("zonos-text",{key:"a616c540984120b468e52bccfb380ea3974ced22",class:"zonos--what-you-entered",type:"semiBoldLabel"},d("What you entered")),e("div",{key:"6ac8f9c14472370c501af1b0d50bd8f8746b7694",class:"zonos--address-display-group"},e("zonos-address-display",{key:"ea2c67a7bba51c99f80be968e448beeffcf1f863",addressType:"shipping",currentAddress:n}),s&&e("zonos-address-display",{key:"7ea1683dc04a292810e04ed6550d86086f25186f",addressType:"billing",currentAddress:s})),e("div",{key:"4d1cd9096943518b8b4e267608a5e1542befb6a9",class:"zonos--address-form-section"},e("zonos-text",{key:"e4184a2cc618d26d43979fa8cfe06070cf8b5af8",type:"semiBoldLabel"},d("Translated address")),e("zonos-address-form",{key:"c55d9d3c658565ceb7c7b879f444e3937b9f7ad6",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:n,onAddressChange:o=>{this.translatedShippingAddressState=this.buildTranslateAddressState({currentAddress:n,translatedAddress:o.detail})},translatedAddress:this.translatedShippingAddressState}),s&&e("zonos-address-form",{key:"c3facc295b1322bb00baa6081f343dcea4f10777",addressType:"billing",class:"zonos--billing-address-form",currentAddress:s,onAddressChange:o=>{this.translatedBillingAddressState=this.buildTranslateAddressState({currentAddress:s,translatedAddress:o.detail})},translatedAddress:this.translatedBillingAddressState}))),e("div",{key:"1c89c9604ba0dece40275fcfac97e7f93706b430",class:"zonos--group-btn"},e("div",{key:"e47d393940b094b4e123864e4070daa87f0616f0",class:"zonos--button-wrapper"},e("zonos-button",{key:"216b7afe268a4acd6bb8a76b7f5a32dc09bdd4f6",class:"zonos--cancel-btn",onClick:()=>this.closeUpdateDialogHandler(),variant:"subtle"},d("Cancel")),e("zonos-button",{key:"acbacb92cedb325b46843d8f3aff13f4e7c86ab5",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"sm",variant:o},d("Update address")))))))}get el(){return n(this)}static get watchers(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}}};A.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";const C=["blue","cyan","green","orange","purple","red","gray","glass"],I=class{constructor(e){o(this,e),this.checkboxSelected=s(this,"checkboxSelected",7),this.backgroundColor="blue",this.label=void 0,this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base",this.borderStyle=void 0}onClick(){this.isDisabled||this.checkboxSelected.emit(!this.isChecked)}render(){const o=C.includes(this.backgroundColor),s=o?`var(--zonos-elements-${this.backgroundColor}-600)`:this.backgroundColor,n=o?`var(--zonos-elements-${this.backgroundColor}-200)`:v(s)?"var(--zonos-elements-gray-0)":"var(--zonos-elements-gray-800)",i=g({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return e(t,{key:"7a2972128b04d5dffe09f60b5292d90f7201066a",class:m(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":i,"--zonos--font-family":z(),"--zonos--size":`${this.size}px`}},e("label",{key:"b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41",class:m([this.isDisabled&&"disabled"])},e("input",{key:"f3b86525ef7988d6df87f9147f5aa22b447c1303",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,onChange:o=>{this.checkboxSelected.emit(o.target.checked)},type:"checkbox"}),e("span",{key:"2007c2fbc4d8437f75b9a3d7a4e65d394922abf4",class:"checkmark-container"},e("svg",{key:"481b9272c99cf464d8d88ab24a8dba35de921abf",class:"checkmark",color:n,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"ab7690fba113135175248c8926907312dfe478d5","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{key:"99689099e7469f2ff928619daa2fcee0ce35a418",size:this.fontSize},this.label)))}};I.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const j=class{constructor(e){o(this,e),this.closeDialog=s(this,"closeDialog",3),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.open&&this.closeDialog.emit()},this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.minHeight=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}handleKeyDown(o){"Escape"===o.key&&this.closeButtonHandler()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){const o=g({overrideBorderStyle:this.borderStyle});return e(t,{key:"a9932187bccf8e7fa505c7e07175d03541d66852",class:m(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":z(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},e("div",{key:"0298cf365a50e3544656a6d27ae59e922b9e3aed",class:"zonos--backdrop"}),e("div",{key:"9fce580a07147d51f17c898a22204c3d9ce6ac7b",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},e("div",{key:"b168439cd985cc5c0166a653db206688504cf7dd",class:"zonos--dialog"},this.isLoading&&e("div",{key:"e0b6215f3c7bc939721669069bc294e08558d8b5",class:"zonos--loading"},e("zonos-spinner",{key:"687bcd6d2695933de828484c34aff1230bf71d49",size:30})),(this.headerText||!this.noCloseButton)&&e("div",{key:"04a57a4add896e3d96faca8b77321bba5f00b889",class:"zonos--header"},this.headerText&&e("h3",{key:"d084cb3aedcb7e5bb8fd82012b57f441d7dce4a2",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&e("zonos-button",{key:"7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close dialog",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.closeButtonHandler,variant:"subtle"})),e("div",{key:"7af04c281b6410b87bfe53913e74fa215f6de24b",class:m(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},e("slot",{key:"8c6ce4437d2bc98f9eccea0280cee31794883b77"})),e("slot",{key:"11f97e705b3cc1bad11c037ede940d2f392d67e7",name:"dialog-footer"}))))}static get assetsDirs(){return["assets"]}};j.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const L=o=>/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/.test(o),E=class{constructor(e){o(this,e),this.linkAuthenticationChange=s(this,"linkAuthenticationChange",7),this.setCustomEmailInputToLinkEvent=o=>{const s=L(o);i.stripeLinkEventData={complete:!!s,elementType:"linkAuthentication",empty:!o,value:{email:o}}},this.handleNormalEmailInput=o=>{var s;this.setCustomEmailInputToLinkEvent(o.detail),null===(s=this.linkAuthenticationChange)||void 0===s||s.emit()},this.titleText=void 0,this.defaultEmail=null,this.isEmailError=!1,this.stripe=i.stripe,this.isStagingMode=r.isStagingMode,this.clientSecret=i.clientSecret}watchIsStagingMode(){setTimeout((()=>{this.watchInitStripe()}),0)}watchInitStripe(){if(!this.stripe||!i.stripeElements)return;if(r.isStagingMode||!this.clientSecret)return;const o=i.stripeLinkElement||i.stripeElements.create("linkAuthentication",{defaultValues:(this.defaultEmail?{email:this.defaultEmail}:void 0)||void 0}),s=this.el.querySelector(".zonos--link-authentication-component");s?(o.mount(s),o.on("change",(o=>{var s;i.stripeLinkEventData=o,null===(s=this.linkAuthenticationChange)||void 0===s||s.emit()})),i.stripeLinkElement=o):c("Cannot find container element for linkAuthenticationElement")}watchDefaultEmail(){this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}componentDidLoad(){this.watchInitStripe(),this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}render(){return this.isStagingMode=r.isStagingMode,this.clientSecret=i.clientSecret,e(t,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":g()}},e("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),(()=>{var o;return r.isStagingMode?e("zonos-stripe-input",{inputLabel:d("Email"),inputValue:this.defaultEmail||(null===(o=i.stripeLinkEventData)||void 0===o?void 0:o.value.email)||"",isError:this.isEmailError,onBlur:()=>{var o;const s=(null===(o=i.stripeLinkEventData)||void 0===o?void 0:o.value.email)||"";if(!s)return;const e=L(s);this.isEmailError=!e},onInputChange:this.handleNormalEmailInput}):e("div",{class:`zonos--link-authentication-component ${this.isEmailError&&"zonos--input-invalid"}`})})(),this.isEmailError&&e("zonos-text",{textColor:"red-600"},d("Please enter a valid email address.")))}get el(){return n(this)}static get watchers(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}}};E.style=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";const _=class{constructor(e){o(this,e),this.inputChange=s(this,"inputChange",7),this.inputValue="",this.inputLabel=void 0,this.overridePrimaryColor=void 0,this.overrideSecondaryColor=void 0,this.isDisabled=!1,this.isError=!1,this.inputPlaceholder="",this.value="",this.internalValue=this.inputValue}onInputValueChange(o){this.internalValue=o,this.inputChange.emit(o),this.value=o}onValueChange(o){this.internalValue=o}render(){const o=this.overridePrimaryColor||u.appearance.colorPrimary,s=this.overrideSecondaryColor||u.appearance.colorSecondary,n=o&&v(o),i=u.appearance.fontSizeInputValue||16;return e(t,{key:"d78f2aee99ac4e6d95cf1628e058e6d3bb70e309",class:m(["zonos--input zonos--elements",n&&"dark",this.isError&&"has-error"]),"data-theme":n?"DARK":"LIGHT",style:{"--zonos--border-radius":g(),"--zonos--font-family":z(),"--zonos--font-size":`${i}px`,"--zonos--primary-color":s}},e("div",{key:"a3e7f765b0081a564c5955e387ff4b521a28d1a5",class:m(["zonos--label-wrapper",this.isDisabled&&"disabled"])},e("input",{key:"181c5230ddeb02e9cea646b7f0a8efa3a530796e",class:m(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,id:"zonos--input",onChange:o=>{const s=o.target;this.inputChange.emit(s.value),this.el.inputValue=s.value,this.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder,type:"text",value:this.internalValue}),e("div",{key:"ac6e97971905ba130c3533da6a409de60f99ed6d",class:"zonos--floated-label"},e("label",{key:"1643ab4ef5b9449332351c854f8e43db8d192164",htmlFor:"zonos--input"},this.inputLabel))))}get el(){return n(this)}static get watchers(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}}};_.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}:host(.dark){color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}:host{margin:1px;height:calc(var(--zonos-elements-size-xl) - 2px);}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size)}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:24px 4px 2px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix~.zonos--floated-label label{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none;border:var(--zonos--border)}:host .zonos--floated-input:focus~.zonos--floated-label::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content~.zonos--floated-label label,:host .zonos--floated-input:focus~.zonos--floated-label label{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label label{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.dark) .zonos--label-wrapper{background:#30313d}';export{x as zonos_address,k as zonos_address_display,w as zonos_address_form,A as zonos_address_update_dialog,I as zonos_checkbox,j as zonos_dialog,E as zonos_link_authentication,_ as zonos_stripe_input}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-ab68ad11.js";export{s as setNonce}from"./p-ab68ad11.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-1921fe51",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"clientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-2f6bbd3b",[[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],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-c522ddf2",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-69f84611",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-db3f381d",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-de221545",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-73e9a8f5",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-e300d1ed",[[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],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-acabfba5",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-fa15b9b5",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-15971b78",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-75a8e67d",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-7c028742",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-72319b4d",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-83645bb4",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-073bc210",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-983c8c5f",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-6549915d",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-f06559c1",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-77581c1c",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"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"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-22e190af",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-bbc11b58",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-4968aa73",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-stripe-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-7cb5e4b8",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"isTaxIdError":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
1
+ import{p as e,b as o}from"./p-ab68ad11.js";export{s as setNonce}from"./p-ab68ad11.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-1921fe51",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"clientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-2f6bbd3b",[[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],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-28a062f3",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-69f84611",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-db3f381d",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-de221545",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-73e9a8f5",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-e300d1ed",[[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],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-acabfba5",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-fa15b9b5",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-15971b78",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-75a8e67d",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-7c028742",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-72319b4d",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-83645bb4",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-073bc210",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-983c8c5f",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-6549915d",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-f06559c1",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-77581c1c",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"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"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-22e190af",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-bbc11b58",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-fb7b12af",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-stripe-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-7cb5e4b8",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"isTaxIdError":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.160",
3
+ "version": "1.3.162",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -1 +0,0 @@
1
- import{r as o,c as s,h as e,H as t,d as n}from"./p-ab68ad11.js";import{f as i,V as a,l,r as d,e as r}from"./p-a0efb02e.js";import{i as h}from"./p-81a54668.js";import{b as c,l as p}from"./p-f0c8150e.js";import{i as b,c as f}from"./p-0c64dbbb.js";import{z as u,d as z}from"./p-dd999b44.js";import{c as m}from"./p-b4b7f705.js";import{R as y}from"./p-08e7107d.js";import{g}from"./p-98e9c9cf.js";import{i as v}from"./p-672707ce.js";const x=class{constructor(e){o(this,e),this.invalidCharacters=s(this,"invalidCharacters",7),this.isAutoCompleteAdjusted=!1,this.type=void 0,this.titleText=void 0,this.defaultAddress=null,this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:i.stripeBillingAddressElement,stripeAddressEventData:i.stripeBillingAddressEventData,stripeElements:i.stripeElementsForBillingAddress}:{stripeAddressElement:i.stripeAddressElement,stripeAddressEventData:i.stripeAddressEventData,stripeElements:i.stripeElements}}updateAddressEventData({event:o,type:s}){"billing"===s?i.stripeBillingAddressEventData=o:i.stripeAddressEventData=o}updateAddressElement({stripeAddressElement:o,type:s}){"shipping"!==s?i.stripeBillingAddressElement=o:i.stripeAddressElement=o}async watchInitStripe(){var o,s;this.stripe=window.Zonos.stripe;const{stripeAddressEventData:e,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void c("Stripe is not initialized. Couldn't load stripe element.");(null===(o=this.defaultAddress)||void 0===o?void 0:o.phone)||null===(s=this.defaultAddress)||void 0===s||delete s.phone;const n=l.shippingZoneCountries,i=n?Object.values(n).map((o=>o.code)):[],d=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries"),r="shipping"===this.type?i:[],b=(null==e?void 0:e.value.address.country)||a(r);p(`Stripe country code: ${b}`,"info");const f=t.create("address",{allowedCountries:d?[]:r,contacts:this.defaultAddress&&!e?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},null==e?void 0:e.value.address),{country:b}),firstName:null==e?void 0:e.value.firstName,lastName:null==e?void 0:e.value.lastName,phone:null==e?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});f.mount(this.el.querySelector(".zonos--address-component")),f.on("change",(o=>{const s=o.value;!this.isDirtyAddress&&s.address.line1.length>=3&&(this.isDirtyAddress=!0,setTimeout((()=>{if(!this.isAutoCompleteAdjusted){const o=this.el.querySelector('iframe[src*="autocomplete-suggestions"]');o&&(o.style.zIndex="2"),this.isAutoCompleteAdjusted=!0}if(h())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const o="shipping"===this.type?100:600,s=this.el.closest(".zonos--group"),e=this.el.getBoundingClientRect().top+o;null==s||s.scrollTo({behavior:"smooth",top:e})}}),600)),this.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},s),{firstName:s.firstName||s.name.split(" ")[0],lastName:s.lastName||s.name.split(" ")[1]})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:f,type:this.type})}disconnectedCallback(){const o=this.getStripeAddressInstance().stripeAddressElement;null==o||o.destroy()}componentDidLoad(){const o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0,this.watchInitStripe()}render(){return e(t,{key:"2bc89330a07e2f14f21805d8d38a5455b85cf295",class:"zonos--address zonos--elements"},e("zonos-text",{key:"17f156c41379d68822f605e7fd4a8329d32b7dee",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"5f032eab47ca5751ee38ea644d00255d9d12a588",class:"zonos--address-component"}))}get el(){return n(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};x.style=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const k=class{constructor(s){o(this,s),this.currentAddress=void 0,this.addressType=void 0}render(){var o;const{city:s,country:n,email:i,line1:a,line2:r,name:h,phone:c,postal_code:p,state:f}=this.currentAddress,u=null===(o=l.shippingZoneCountries)||void 0===o?void 0:o[n],z=({bold:o,content:s})=>{const t=b(s)?"red-600":"gray-1000";return e("zonos-text",{textColor:t,type:o?"boldLabel":"body"},s)};return e(t,{class:"zonos--address-form zonos--elements"},e("div",{class:"zonos--title"},e("zonos-text",{textColor:"gray-700",type:"smallHeader"},d("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{class:"zonos--address-group"},h&&e("div",{class:"zonos--address-line"},z({bold:!0,content:h})),i&&e("div",{class:"zonos--address-line"},z({content:i})),c&&e("div",{class:"zonos--address-line"},z({content:c})),a&&e("div",{class:"zonos--address-line"},z({content:a})),r&&e("div",{class:"zonos--address-line"},z({content:r})),e("div",{class:"zonos--address-line"},s&&z({content:s}),f&&z({content:f}),p&&z({content:p})),u&&e("div",{class:"zonos--address-line"},e("zonos-country-flag",{class:"zonos--country-flag",countryCode:u.code})," ",z({content:u.displayName}))))}};k.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';const w=class{constructor(e){o(this,e),this.addressChange=s(this,"addressChange",7),this.onInputChange=({key:o,value:s})=>{this.addressChange.emit(Object.assign(Object.assign({},this.localAddress),{[o]:s}))},this.currentAddress=void 0,this.translatedAddress=void 0,this.addressType=void 0,this.localAddress=this.currentAddress}watchCurrentAddress(){var o,s,e,t,n,i;const{city:a,line1:l,line2:d,name:r,postal_code:h,state:c}=this.currentAddress;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:(null===(o=this.translatedAddress.city)||void 0===o?void 0:o[a])||a,line1:(null===(s=this.translatedAddress.line1)||void 0===s?void 0:s[l])||l,line2:(null===(e=this.translatedAddress.line2)||void 0===e?void 0:e[d])||d,name:(null===(t=this.translatedAddress.name)||void 0===t?void 0:t[r])||r,postal_code:(null===(n=this.translatedAddress.postal_code)||void 0===n?void 0:n[h])||h,state:(null===(i=this.translatedAddress.state)||void 0===i?void 0:i[c])||c})}componentWillLoad(){this.watchCurrentAddress()}render(){const{city:o,country:s,line1:n,line2:i,name:a,phone:l,postal_code:r,state:h}=this.localAddress,c=a.split(" ")[0]||"",p=a.split(" ").slice(1).join(" ")||"";return e(t,{key:"8b578737e33203a23563be7e9be0778deec99bbf",class:"zonos--address-form zonos--elements"},e("div",{key:"793675a1348547bf3f781788956befe325191011",class:"zonos--title"},e("zonos-text",{key:"13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9",textColor:"gray-700",type:"smallHeader"},d("shipping"===this.addressType?"Shipping":"Billing"))),e("div",{key:"2c5de5b5283fb99ee5f8b61d7a217177986fc2db",class:"zonos--address-group"},e("div",{key:"23bf3c893071000d5995a5f175867bab11929193",class:"zonos--contact"},e("zonos-text",{key:"7cdfe2a84ebad89ba5b16498d75def99cf392384",type:"label"},d("Contact")),e("zonos-input",{key:"1c39c38767fd306c5eb1164cdc989b8291209cf0",class:"zonos--form-email",inputLabel:d("Email"),inputValue:this.currentAddress.email,isDisabled:!0}),e("div",{key:"cbdf61217125e22b1a6cec9a340ef0aca2c75670",class:"zonos--name zonos--address-row"},e("zonos-input",{key:"360c99e7b2c6caa64580d5768b5bb53368927275",class:"zonos--form-first-name",inputLabel:d("First name"),inputValue:c,isError:b(c),onInputChange:o=>this.onInputChange({key:"name",value:`${o.detail} ${p}`})}),e("zonos-input",{key:"8ce5fa5c15c6f7928339ea10009ce0e68954a91f",class:"zonos--form-last-name",inputLabel:d("Last name"),inputValue:p,isError:b(p),onInputChange:o=>this.onInputChange({key:"name",value:`${c} ${o.detail}`})}))),e("div",{key:"7b4fa2d3baa6cb257e7688e5ba6777123898b3fd",class:"zonos--address"},e("zonos-text",{key:"9d5782331b2642755a755aeb7f98c9f4d87f9a20",type:"label"},d("Address")),e("zonos-input",{key:"a622025924ca86bdbf1d3c04b79e6dee172b4c42",class:"zonos--form-country",inputLabel:d("Country"),inputValue:s,isDisabled:!0}),e("zonos-input",{key:"f99b3a74db09ab5730878e80705b9aeac76bf800",class:"zonos--form-line1",inputLabel:d("Address line 1"),inputValue:n,isError:b(n),onInputChange:o=>this.onInputChange({key:"line1",value:o.detail})}),e("zonos-input",{key:"5d16aefa45a78045c87d166aaaec0255606e455e",class:"zonos--form-line2",inputLabel:d("Address line 2"),inputValue:i,isError:b(i),onInputChange:o=>this.onInputChange({key:"line2",value:o.detail})}),e("div",{key:"dc166be9381142835d72e731cb38a718522a068a",class:"zonos--address-row"},e("zonos-input",{key:"4f1a98f9d10ce0cff3ef18a3037a12382552b31d",class:"zonos--form-city",inputLabel:d("City"),inputValue:o,isError:b(o),onInputChange:o=>this.onInputChange({key:"city",value:o.detail})}),e("zonos-input",{key:"d4f97900b5fe2e1619950a52d1d1f716a8bc19ff",class:"zonos--form-state",inputLabel:d("State/Province"),inputValue:h,isError:b(h),onInputChange:o=>this.onInputChange({key:"state",value:o.detail})})),e("zonos-input",{key:"cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733",class:"zonos--form-postal-code",inputLabel:d("Postal code"),inputValue:r,isError:b(r),onInputChange:o=>this.onInputChange({key:"postal_code",value:o.detail})}),e("zonos-input",{key:"7421c82847eded6bdbcce49ef8196124d8e50c1d",class:"zonos--form-phone",inputLabel:d("Phone number"),inputValue:l,onInputChange:o=>this.onInputChange({key:"phone",value:o.detail})}))))}static get watchers(){return{translatedAddress:["watchCurrentAddress"]}}};w.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";const A=class{constructor(e){o(this,e),this.closeUpdateDialog=s(this,"closeUpdateDialog",7),this.continueClicked=s(this,"continueClicked",7),this.closeUpdateDialogHandler=()=>{this.closeUpdateDialog.emit()},this.getTranslatedAddress=({currentAddress:o,translatedAddress:s})=>{var e,t,n,i,a,l;const{city:d,line1:r,line2:h,name:c,postal_code:p,state:b}=o;return{city:(null===(e=s.city)||void 0===e?void 0:e[d])||d,line1:(null===(t=s.line1)||void 0===t?void 0:t[r])||r,line2:(null===(n=s.line2)||void 0===n?void 0:n[h])||h,name:(null===(i=s.name)||void 0===i?void 0:i[c])||c,postal_code:(null===(a=s.postal_code)||void 0===a?void 0:a[p])||p,state:(null===(l=s.state)||void 0===l?void 0:l[b])||b}},this.continueClickHandler=async()=>{var o,s,e;this.continueLoading=!0;const t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null,n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState}),i=f(Object.assign(Object.assign({},n),{country:this.shippingAddress.country})),a=t&&this.billingAddress&&f(Object.assign(Object.assign({},t),{country:this.billingAddress.country})),l=!!Object.keys(i).length,d=!!a&&!!Object.keys(a).length;if(l||d){const t=null===(o=this.el.shadowRoot)||void 0===o?void 0:o.querySelectorAll("zonos-address-form"),n=null==t?void 0:t[0],i=null==t?void 0:t[1],a=(null===(s=null==n?void 0:n.shadowRoot)||void 0===s?void 0:s.querySelector(".has-error"))||(null===(e=null==i?void 0:i.shadowRoot)||void 0===e?void 0:e.querySelector(".has-error"));return a&&a.scrollIntoView({behavior:"smooth",block:"center"}),void(this.continueLoading=!1)}this.continueClicked.emit({billingAddress:t,shippingAddress:n})},this.buildTranslateAddressState=({currentAddress:o,translatedAddress:s})=>{const{city:e,line1:t,line2:n,name:i,postal_code:a,state:l}=o;return{city:{[e]:s.city},line1:{[t]:s.line1},line2:{[n]:s.line2},name:{[i]:s.name},postal_code:{[a]:s.postal_code},state:{[l]:s.state}}},this.continueLoading=!1,this.dialogLoading=void 0,this.dialogOpen=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.isMobile=!1,this.shippingAddress=void 0,this.billingAddress=void 0,this.translatedShippingAddress=void 0,this.translatedBillingAddress=void 0,this.showErrorBanner=!1,this.translatedShippingAddressState={},this.translatedBillingAddressState={}}watchTranslatedShippingAddress(){this.translatedShippingAddressState=this.translatedShippingAddress}watchTranslatedBillingAddress(){this.translatedBillingAddressState=this.translatedBillingAddress}componentWillLoad(){this.watchTranslatedBillingAddress(),this.watchTranslatedShippingAddress()}render(){const o="#ffffff"===(this.submitBtnColor||u.appearance.colorSecondary)?"outline":this.submitBtnType||"standard",s=this.billingAddress,n=this.shippingAddress;return e(t,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:m(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},e("zonos-dialog",{key:"eab429bb78ce6f05ba463d8748d7edd5499402fa",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeUpdateDialog.emit(),open:this.dialogOpen,width:"568px"},e("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},e("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},e("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},e("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},d("Update your address")),e("zonos-button",{key:"66abf7b74045e68e84e631298504236d32ca9c4e",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:y}),noBackground:!0,onClick:()=>this.closeUpdateDialogHandler()})),e("zonos-text",{key:"ffb3d8f169867d5f6dff269e1becd99c98c5a7da"},d("To ensure delivery all address details must be in Latin characters."))),e("div",{key:"2cb61f06ce174e2317870decfdd337c67c5cf128",class:"zonos--group"},e("zonos-text",{key:"a616c540984120b468e52bccfb380ea3974ced22",class:"zonos--what-you-entered",type:"semiBoldLabel"},d("What you entered")),e("div",{key:"6ac8f9c14472370c501af1b0d50bd8f8746b7694",class:"zonos--address-display-group"},e("zonos-address-display",{key:"ea2c67a7bba51c99f80be968e448beeffcf1f863",addressType:"shipping",currentAddress:n}),s&&e("zonos-address-display",{key:"7ea1683dc04a292810e04ed6550d86086f25186f",addressType:"billing",currentAddress:s})),e("div",{key:"4d1cd9096943518b8b4e267608a5e1542befb6a9",class:"zonos--address-form-section"},e("zonos-text",{key:"e4184a2cc618d26d43979fa8cfe06070cf8b5af8",type:"semiBoldLabel"},d("Translated address")),e("zonos-address-form",{key:"c55d9d3c658565ceb7c7b879f444e3937b9f7ad6",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:n,onAddressChange:o=>{this.translatedShippingAddressState=this.buildTranslateAddressState({currentAddress:n,translatedAddress:o.detail})},translatedAddress:this.translatedShippingAddressState}),s&&e("zonos-address-form",{key:"c3facc295b1322bb00baa6081f343dcea4f10777",addressType:"billing",class:"zonos--billing-address-form",currentAddress:s,onAddressChange:o=>{this.translatedBillingAddressState=this.buildTranslateAddressState({currentAddress:s,translatedAddress:o.detail})},translatedAddress:this.translatedBillingAddressState}))),e("div",{key:"1c89c9604ba0dece40275fcfac97e7f93706b430",class:"zonos--group-btn"},e("div",{key:"e47d393940b094b4e123864e4070daa87f0616f0",class:"zonos--button-wrapper"},e("zonos-button",{key:"216b7afe268a4acd6bb8a76b7f5a32dc09bdd4f6",class:"zonos--cancel-btn",onClick:()=>this.closeUpdateDialogHandler(),variant:"subtle"},d("Cancel")),e("zonos-button",{key:"acbacb92cedb325b46843d8f3aff13f4e7c86ab5",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"sm",variant:o},d("Update address")))))))}get el(){return n(this)}static get watchers(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}}};A.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";const C=["blue","cyan","green","orange","purple","red","gray","glass"],I=class{constructor(e){o(this,e),this.checkboxSelected=s(this,"checkboxSelected",7),this.backgroundColor="blue",this.label=void 0,this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base",this.borderStyle=void 0}onClick(){this.isDisabled||this.checkboxSelected.emit(!this.isChecked)}render(){const o=C.includes(this.backgroundColor),s=o?`var(--zonos-elements-${this.backgroundColor}-600)`:this.backgroundColor,n=o?`var(--zonos-elements-${this.backgroundColor}-200)`:v(s)?"var(--zonos-elements-gray-0)":"var(--zonos-elements-gray-800)",i=g({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return e(t,{key:"7a2972128b04d5dffe09f60b5292d90f7201066a",class:m(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":i,"--zonos--font-family":z(),"--zonos--size":`${this.size}px`}},e("label",{key:"b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41",class:m([this.isDisabled&&"disabled"])},e("input",{key:"f3b86525ef7988d6df87f9147f5aa22b447c1303",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,onChange:o=>{this.checkboxSelected.emit(o.target.checked)},type:"checkbox"}),e("span",{key:"2007c2fbc4d8437f75b9a3d7a4e65d394922abf4",class:"checkmark-container"},e("svg",{key:"481b9272c99cf464d8d88ab24a8dba35de921abf",class:"checkmark",color:n,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"ab7690fba113135175248c8926907312dfe478d5","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{key:"99689099e7469f2ff928619daa2fcee0ce35a418",size:this.fontSize},this.label)))}};I.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const j=class{constructor(e){o(this,e),this.closeDialog=s(this,"closeDialog",3),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.open&&this.closeDialog.emit()},this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.minHeight=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}handleKeyDown(o){"Escape"===o.key&&this.closeButtonHandler()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){const o=g({overrideBorderStyle:this.borderStyle});return e(t,{key:"a9932187bccf8e7fa505c7e07175d03541d66852",class:m(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":z(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},e("div",{key:"0298cf365a50e3544656a6d27ae59e922b9e3aed",class:"zonos--backdrop"}),e("div",{key:"9fce580a07147d51f17c898a22204c3d9ce6ac7b",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},e("div",{key:"b168439cd985cc5c0166a653db206688504cf7dd",class:"zonos--dialog"},this.isLoading&&e("div",{key:"e0b6215f3c7bc939721669069bc294e08558d8b5",class:"zonos--loading"},e("zonos-spinner",{key:"687bcd6d2695933de828484c34aff1230bf71d49",size:30})),(this.headerText||!this.noCloseButton)&&e("div",{key:"04a57a4add896e3d96faca8b77321bba5f00b889",class:"zonos--header"},this.headerText&&e("h3",{key:"d084cb3aedcb7e5bb8fd82012b57f441d7dce4a2",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&e("zonos-button",{key:"7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee",class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close dialog",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.closeButtonHandler,variant:"subtle"})),e("div",{key:"7af04c281b6410b87bfe53913e74fa215f6de24b",class:m(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},e("slot",{key:"8c6ce4437d2bc98f9eccea0280cee31794883b77"})),e("slot",{key:"11f97e705b3cc1bad11c037ede940d2f392d67e7",name:"dialog-footer"}))))}static get assetsDirs(){return["assets"]}};j.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const L=o=>/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/.test(o),E=class{constructor(e){o(this,e),this.linkAuthenticationChange=s(this,"linkAuthenticationChange",7),this.setCustomEmailInputToLinkEvent=o=>{const s=L(o);i.stripeLinkEventData={complete:!!s,elementType:"linkAuthentication",empty:!o,value:{email:o}}},this.handleNormalEmailInput=o=>{var s;this.setCustomEmailInputToLinkEvent(o.detail),null===(s=this.linkAuthenticationChange)||void 0===s||s.emit()},this.titleText=void 0,this.defaultEmail=null,this.isEmailError=!1,this.stripe=i.stripe,this.isStagingMode=r.isStagingMode,this.clientSecret=i.clientSecret}watchIsStagingMode(){setTimeout((()=>{this.watchInitStripe()}),0)}watchInitStripe(){if(!this.stripe||!i.stripeElements)return;if(r.isStagingMode||!this.clientSecret)return;const o=i.stripeLinkElement||i.stripeElements.create("linkAuthentication",{defaultValues:(this.defaultEmail?{email:this.defaultEmail}:void 0)||void 0}),s=this.el.querySelector(".zonos--link-authentication-component");s?(o.mount(s),o.on("change",(o=>{var s;i.stripeLinkEventData=o,null===(s=this.linkAuthenticationChange)||void 0===s||s.emit()})),i.stripeLinkElement=o):c("Cannot find container element for linkAuthenticationElement")}watchDefaultEmail(){this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}componentDidLoad(){this.watchInitStripe(),this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}render(){return this.isStagingMode=r.isStagingMode,this.clientSecret=i.clientSecret,e(t,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":g()}},e("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),(()=>{var o;return r.isStagingMode?e("zonos-stripe-input",{inputLabel:d("Email"),inputValue:this.defaultEmail||(null===(o=i.stripeLinkEventData)||void 0===o?void 0:o.value.email)||"",isError:this.isEmailError,onBlur:()=>{var o;const s=(null===(o=i.stripeLinkEventData)||void 0===o?void 0:o.value.email)||"";if(!s)return;const e=L(s);this.isEmailError=!e},onInputChange:this.handleNormalEmailInput}):e("div",{class:`zonos--link-authentication-component ${this.isEmailError&&"zonos--input-invalid"}`})})(),this.isEmailError&&e("zonos-text",{textColor:"red-600"},d("Please enter a valid email address.")))}get el(){return n(this)}static get watchers(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}}};E.style=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";const _=class{constructor(e){o(this,e),this.inputChange=s(this,"inputChange",7),this.inputValue="",this.inputLabel=void 0,this.overridePrimaryColor=void 0,this.overrideSecondaryColor=void 0,this.isDisabled=!1,this.isError=!1,this.inputPlaceholder="",this.value="",this.internalValue=this.inputValue}onInputValueChange(o){this.internalValue=o,this.inputChange.emit(o),this.value=o}onValueChange(o){this.internalValue=o}render(){const o=this.overridePrimaryColor||u.appearance.colorPrimary,s=this.overrideSecondaryColor||u.appearance.colorSecondary,n=o&&v(o),i=u.appearance.fontSizeInputValue||16;return e(t,{key:"d78f2aee99ac4e6d95cf1628e058e6d3bb70e309",class:m(["zonos--input zonos--elements",n&&"dark",this.isError&&"has-error"]),"data-theme":n?"DARK":"LIGHT",style:{"--zonos--border-radius":g(),"--zonos--font-family":z(),"--zonos--font-size":`${i}px`,"--zonos--primary-color":s}},e("div",{key:"a3e7f765b0081a564c5955e387ff4b521a28d1a5",class:m(["zonos--label-wrapper",this.isDisabled&&"disabled"])},e("input",{key:"181c5230ddeb02e9cea646b7f0a8efa3a530796e",class:m(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,id:"zonos--input",onChange:o=>{const s=o.target;this.inputChange.emit(s.value),this.el.inputValue=s.value,this.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder,type:"text",value:this.internalValue}),e("div",{key:"ac6e97971905ba130c3533da6a409de60f99ed6d",class:"zonos--floated-label"},e("label",{key:"1643ab4ef5b9449332351c854f8e43db8d192164",htmlFor:"zonos--input"},this.inputLabel))))}get el(){return n(this)}static get watchers(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}}};_.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}:host(.dark){color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}:host{margin:1px;height:calc(var(--zonos-elements-size-xl) - 2px);}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size)}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:24px 4px 2px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix~.zonos--floated-label label{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none;border:var(--zonos--border)}:host .zonos--floated-input:focus~.zonos--floated-label::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content~.zonos--floated-label label,:host .zonos--floated-input:focus~.zonos--floated-label label{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label label{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.dark) .zonos--label-wrapper{background:#30313d}';export{x as zonos_address,k as zonos_address_display,w as zonos_address_form,A as zonos_address_update_dialog,I as zonos_checkbox,j as zonos_dialog,E as zonos_link_authentication,_ as zonos_stripe_input}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,s){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function a(o){try{l(s.next(o))}catch(o){i(o)}}function r(o){try{l(s["throw"](o))}catch(o){i(o)}}function l(o){o.done?t(o.value):n(o.value).then(a,r)}l((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return l([o,e])}}function l(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(s=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;n=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=e.call(o,t)}catch(o){r=[6,o];n=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-15d4d606.system.js","./p-aed0098c.system.js","./p-18e5b741.system.js","./p-2670438c.system.js","./p-a9a95fae.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-6658cc02.system.js","./p-b6fdbbf4.system.js"],(function(o){"use strict";var e,t,s,n,i,a,r,l,d,c,h,f,u,b,p,z,m,v,y,g,x;return{setters:[function(o){e=o.r;t=o.c;s=o.h;n=o.H;i=o.d},function(o){a=o.f;r=o.V;l=o.l;d=o.r;c=o.e},function(o){h=o.i},function(o){f=o.b;u=o.l},function(o){b=o.i;p=o.c},function(o){z=o.z;m=o.d},function(o){v=o.c},function(o){y=o.R},function(o){g=o.g},function(o){x=o.i}],execute:function(){var k=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var w=k;var C=o("zonos_address",function(){function o(o){e(this,o);this.invalidCharacters=t(this,"invalidCharacters",7);this.isAutoCompleteAdjusted=false;this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}o.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};o.prototype.updateAddressEventData=function(o){var e=o.event,t=o.type;switch(t){case"billing":a.stripeBillingAddressEventData=e;break;default:a.stripeAddressEventData=e;break}};o.prototype.updateAddressElement=function(o){var e=o.stripeAddressElement,t=o.type;if(t==="shipping"){a.stripeAddressElement=e;return}a.stripeBillingAddressElement=e};o.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,n,i,a,d,c,b,p,z;var m=this;return __generator(this,(function(v){this.stripe=window.Zonos.stripe;t=this.getStripeAddressInstance(),s=t.stripeAddressEventData,n=t.stripeElements;if(!this.stripe||!n){f("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(o=this.defaultAddress)===null||o===void 0?void 0:o.phone;if(!i){(e=this.defaultAddress)===null||e===void 0?true:delete e.phone}a=l.shippingZoneCountries;d=a?Object.values(a).map((function(o){return o.code})):[];c=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");b=this.type==="shipping"?d:[];p=(s===null||s===void 0?void 0:s.value.address.country)||r(b);u("Stripe country code: ".concat(p),"info");z=n.create("address",{allowedCountries:c?[]:b,contacts:this.defaultAddress&&!s?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:p}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});z.mount(this.el.querySelector(".zonos--address-component"));z.on("change",(function(o){var e=o.value;if(!m.isDirtyAddress&&e.address.line1.length>=3){m.isDirtyAddress=true;setTimeout((function(){if(!m.isAutoCompleteAdjusted){var o=m.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(o){o.style.zIndex="2"}m.isAutoCompleteAdjusted=true}if(h()){m.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var e=m.type==="shipping"?100:600;var t=m.el.closest(".zonos--group");var s=m.el.getBoundingClientRect().top+e;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:s})}}),600)}m.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:m.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:m.type})}));this.updateAddressElement({stripeAddressElement:z,type:this.type});return[2]}))}))};o.prototype.disconnectedCallback=function(){var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.destroy()};o.prototype.componentDidLoad=function(){var o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0;void this.watchInitStripe()};o.prototype.render=function(){return s(n,{key:"2bc89330a07e2f14f21805d8d38a5455b85cf295",class:"zonos--address zonos--elements"},s("zonos-text",{key:"17f156c41379d68822f605e7fd4a8329d32b7dee",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"5f032eab47ca5751ee38ea644d00255d9d12a588",class:"zonos--address-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return o}());C.style=w;var I=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var j=I;var A=o("zonos_address_display",function(){function o(o){e(this,o);this.currentAddress=undefined;this.addressType=undefined}o.prototype.render=function(){var o;var e=this.currentAddress,t=e.city,i=e.country,a=e.email,r=e.line1,c=e.line2,h=e.name,f=e.phone,u=e.postal_code,p=e.state;var z=(o=l.shippingZoneCountries)===null||o===void 0?void 0:o[i];var m=function(o){var e=o.bold,t=o.content;var n=b(t)?"red-600":"gray-1000";return s("zonos-text",{textColor:n,type:e?"boldLabel":"body"},t)};return s(n,{class:"zonos--address-form zonos--elements"},s("div",{class:"zonos--title"},s("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),s("div",{class:"zonos--address-group"},h&&s("div",{class:"zonos--address-line"},m({bold:true,content:h})),a&&s("div",{class:"zonos--address-line"},m({content:a})),f&&s("div",{class:"zonos--address-line"},m({content:f})),r&&s("div",{class:"zonos--address-line"},m({content:r})),c&&s("div",{class:"zonos--address-line"},m({content:c})),s("div",{class:"zonos--address-line"},t&&m({content:t}),p&&m({content:p}),u&&m({content:u})),z&&s("div",{class:"zonos--address-line"},s("zonos-country-flag",{class:"zonos--country-flag",countryCode:z.code})," ",m({content:z.displayName}))))};return o}());A.style=j;var _=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var O=_;var L=o("zonos_address_form",function(){function o(o){var s=this;e(this,o);this.addressChange=t(this,"addressChange",7);this.onInputChange=function(o){var e;var t=o.key,n=o.value;s.addressChange.emit(Object.assign(Object.assign({},s.localAddress),(e={},e[t]=n,e)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}o.prototype.watchCurrentAddress=function(){var o,e,t,s,n,i;var a=this.currentAddress,r=a.city,l=a.line1,d=a.line2,c=a.name,h=a.postal_code,f=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((o=this.translatedAddress.city)===null||o===void 0?void 0:o[r])||r,line1:((e=this.translatedAddress.line1)===null||e===void 0?void 0:e[l])||l,line2:((t=this.translatedAddress.line2)===null||t===void 0?void 0:t[d])||d,name:((s=this.translatedAddress.name)===null||s===void 0?void 0:s[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[f])||f})};o.prototype.componentWillLoad=function(){this.watchCurrentAddress()};o.prototype.render=function(){var o=this;var e=this.localAddress,t=e.city,i=e.country,a=e.line1,r=e.line2,l=e.name,c=e.phone,h=e.postal_code,f=e.state;var u=l.split(" ")[0]||"";var p=l.split(" ").slice(1).join(" ")||"";return s(n,{key:"8b578737e33203a23563be7e9be0778deec99bbf",class:"zonos--address-form zonos--elements"},s("div",{key:"793675a1348547bf3f781788956befe325191011",class:"zonos--title"},s("zonos-text",{key:"13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?d("Shipping"):d("Billing"))),s("div",{key:"2c5de5b5283fb99ee5f8b61d7a217177986fc2db",class:"zonos--address-group"},s("div",{key:"23bf3c893071000d5995a5f175867bab11929193",class:"zonos--contact"},s("zonos-text",{key:"7cdfe2a84ebad89ba5b16498d75def99cf392384",type:"label"},d("Contact")),s("zonos-input",{key:"1c39c38767fd306c5eb1164cdc989b8291209cf0",class:"zonos--form-email",inputLabel:d("Email"),inputValue:this.currentAddress.email,isDisabled:true}),s("div",{key:"cbdf61217125e22b1a6cec9a340ef0aca2c75670",class:"zonos--name zonos--address-row"},s("zonos-input",{key:"360c99e7b2c6caa64580d5768b5bb53368927275",class:"zonos--form-first-name",inputLabel:d("First name"),inputValue:u,isError:b(u),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(e.detail," ").concat(p)})}}),s("zonos-input",{key:"8ce5fa5c15c6f7928339ea10009ce0e68954a91f",class:"zonos--form-last-name",inputLabel:d("Last name"),inputValue:p,isError:b(p),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(u," ").concat(e.detail)})}}))),s("div",{key:"7b4fa2d3baa6cb257e7688e5ba6777123898b3fd",class:"zonos--address"},s("zonos-text",{key:"9d5782331b2642755a755aeb7f98c9f4d87f9a20",type:"label"},d("Address")),s("zonos-input",{key:"a622025924ca86bdbf1d3c04b79e6dee172b4c42",class:"zonos--form-country",inputLabel:d("Country"),inputValue:i,isDisabled:true}),s("zonos-input",{key:"f99b3a74db09ab5730878e80705b9aeac76bf800",class:"zonos--form-line1",inputLabel:d("Address line 1"),inputValue:a,isError:b(a),onInputChange:function(e){return o.onInputChange({key:"line1",value:e.detail})}}),s("zonos-input",{key:"5d16aefa45a78045c87d166aaaec0255606e455e",class:"zonos--form-line2",inputLabel:d("Address line 2"),inputValue:r,isError:b(r),onInputChange:function(e){return o.onInputChange({key:"line2",value:e.detail})}}),s("div",{key:"dc166be9381142835d72e731cb38a718522a068a",class:"zonos--address-row"},s("zonos-input",{key:"4f1a98f9d10ce0cff3ef18a3037a12382552b31d",class:"zonos--form-city",inputLabel:d("City"),inputValue:t,isError:b(t),onInputChange:function(e){return o.onInputChange({key:"city",value:e.detail})}}),s("zonos-input",{key:"d4f97900b5fe2e1619950a52d1d1f716a8bc19ff",class:"zonos--form-state",inputLabel:d("State/Province"),inputValue:f,isError:b(f),onInputChange:function(e){return o.onInputChange({key:"state",value:e.detail})}})),s("zonos-input",{key:"cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733",class:"zonos--form-postal-code",inputLabel:d("Postal code"),inputValue:h,isError:b(h),onInputChange:function(e){return o.onInputChange({key:"postal_code",value:e.detail})}}),s("zonos-input",{key:"7421c82847eded6bdbcce49ef8196124d8e50c1d",class:"zonos--form-phone",inputLabel:d("Phone number"),inputValue:c,onInputChange:function(e){return o.onInputChange({key:"phone",value:e.detail})}}))))};Object.defineProperty(o,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return o}());L.style=O;var E=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var S=E;var B=o("zonos_address_update_dialog",function(){function o(o){var s=this;e(this,o);this.closeUpdateDialog=t(this,"closeUpdateDialog",7);this.continueClicked=t(this,"continueClicked",7);this.closeUpdateDialogHandler=function(){s.closeUpdateDialog.emit()};this.getTranslatedAddress=function(o){var e=o.currentAddress,t=o.translatedAddress;var s,n,i,a,r,l;var d=e.city,c=e.line1,h=e.line2,f=e.name,u=e.postal_code,b=e.state;return{city:((s=t.city)===null||s===void 0?void 0:s[d])||d,line1:((n=t.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=t.line2)===null||i===void 0?void 0:i[h])||h,name:((a=t.name)===null||a===void 0?void 0:a[f])||f,postal_code:((r=t.postal_code)===null||r===void 0?void 0:r[u])||u,state:((l=t.state)===null||l===void 0?void 0:l[b])||b}};this.continueClickHandler=function(){return __awaiter(s,void 0,void 0,(function(){var o,e,t,s,n,i,a,r,l,d,c,h,f;return __generator(this,(function(u){this.continueLoading=true;s=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=p(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=s&&this.billingAddress&&p(Object.assign(Object.assign({},s),{country:this.billingAddress.country}));r=!!Object.keys(i).length;l=!!a&&!!Object.keys(a).length;if(r||l){d=(o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("zonos-address-form");c=d===null||d===void 0?void 0:d[0];h=d===null||d===void 0?void 0:d[1];f=((e=c===null||c===void 0?void 0:c.shadowRoot)===null||e===void 0?void 0:e.querySelector(".has-error"))||((t=h===null||h===void 0?void 0:h.shadowRoot)===null||t===void 0?void 0:t.querySelector(".has-error"));if(f){f.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:s,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(o){var e,t,s,n,i,a;var r=o.currentAddress,l=o.translatedAddress;var d=r.city,c=r.line1,h=r.line2,f=r.name,u=r.postal_code,b=r.state;return{city:(e={},e[d]=l.city,e),line1:(t={},t[c]=l.line1,t),line2:(s={},s[h]=l.line2,s),name:(n={},n[f]=l.name,n),postal_code:(i={},i[u]=l.postal_code,i),state:(a={},a[b]=l.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}o.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};o.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};o.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};o.prototype.render=function(){var o=this;var e=this.submitBtnColor||z.appearance.colorSecondary;var t=e==="#ffffff"?"outline":this.submitBtnType||"standard";var i=this.billingAddress;var a=this.shippingAddress;return s(n,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:v(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},s("zonos-dialog",{key:"eab429bb78ce6f05ba463d8748d7edd5499402fa",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeUpdateDialog.emit()},open:this.dialogOpen,width:"568px"},s("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},s("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},s("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},s("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},d("Update your address")),s("zonos-button",{key:"66abf7b74045e68e84e631298504236d32ca9c4e",class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:y}),noBackground:true,onClick:function(){return o.closeUpdateDialogHandler()}})),s("zonos-text",{key:"ffb3d8f169867d5f6dff269e1becd99c98c5a7da"},d("To ensure delivery all address details must be in Latin characters."))),s("div",{key:"2cb61f06ce174e2317870decfdd337c67c5cf128",class:"zonos--group"},s("zonos-text",{key:"a616c540984120b468e52bccfb380ea3974ced22",class:"zonos--what-you-entered",type:"semiBoldLabel"},d("What you entered")),s("div",{key:"6ac8f9c14472370c501af1b0d50bd8f8746b7694",class:"zonos--address-display-group"},s("zonos-address-display",{key:"ea2c67a7bba51c99f80be968e448beeffcf1f863",addressType:"shipping",currentAddress:a}),i&&s("zonos-address-display",{key:"7ea1683dc04a292810e04ed6550d86086f25186f",addressType:"billing",currentAddress:i})),s("div",{key:"4d1cd9096943518b8b4e267608a5e1542befb6a9",class:"zonos--address-form-section"},s("zonos-text",{key:"e4184a2cc618d26d43979fa8cfe06070cf8b5af8",type:"semiBoldLabel"},d("Translated address")),s("zonos-address-form",{key:"c55d9d3c658565ceb7c7b879f444e3937b9f7ad6",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:a,onAddressChange:function(e){var t=e.detail;o.translatedShippingAddressState=o.buildTranslateAddressState({currentAddress:a,translatedAddress:t})},translatedAddress:this.translatedShippingAddressState}),i&&s("zonos-address-form",{key:"c3facc295b1322bb00baa6081f343dcea4f10777",addressType:"billing",class:"zonos--billing-address-form",currentAddress:i,onAddressChange:function(e){var t=e.detail;o.translatedBillingAddressState=o.buildTranslateAddressState({currentAddress:i,translatedAddress:t})},translatedAddress:this.translatedBillingAddressState}))),s("div",{key:"1c89c9604ba0dece40275fcfac97e7f93706b430",class:"zonos--group-btn"},s("div",{key:"e47d393940b094b4e123864e4070daa87f0616f0",class:"zonos--button-wrapper"},s("zonos-button",{key:"216b7afe268a4acd6bb8a76b7f5a32dc09bdd4f6",class:"zonos--cancel-btn",onClick:function(){return o.closeUpdateDialogHandler()},variant:"subtle"},d("Cancel")),s("zonos-button",{key:"acbacb92cedb325b46843d8f3aff13f4e7c86ab5",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"sm",variant:t},d("Update address")))))))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return o}());B.style=S;var V=["blue","cyan","green","orange","purple","red","gray","glass"];var T=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var D=T;var P=o("zonos_checkbox",function(){function o(o){e(this,o);this.checkboxSelected=t(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}o.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};o.prototype.render=function(){var o=this;var e=V.includes(this.backgroundColor);var t=e?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=e?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!x(t)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var a=g({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return s(n,{key:"7a2972128b04d5dffe09f60b5292d90f7201066a",class:v(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":t,"--zonos--border-radius":a,"--zonos--font-family":m(),"--zonos--size":"".concat(this.size,"px")}},s("label",{key:"b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41",class:v([this.isDisabled&&"disabled"])},s("input",{key:"f3b86525ef7988d6df87f9147f5aa22b447c1303",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){o.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),s("span",{key:"2007c2fbc4d8437f75b9a3d7a4e65d394922abf4",class:"checkmark-container"},s("svg",{key:"481b9272c99cf464d8d88ab24a8dba35de921abf",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"ab7690fba113135175248c8926907312dfe478d5","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&s("zonos-text",{key:"99689099e7469f2ff928619daa2fcee0ce35a418",size:this.fontSize},this.label)))};return o}());P.style=D;var Z='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var M=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var N=M;var R=o("zonos_dialog",function(){function o(o){var s=this;e(this,o);this.closeDialog=t(this,"closeDialog",3);this.isMobileMode=function(){return s.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!s.open){return}s.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!s.noClickOutside){s.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.minHeight=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.handleKeyDown=function(o){if(o.key==="Escape"){this.closeButtonHandler()}};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){var o=g({overrideBorderStyle:this.borderStyle});return s(n,{key:"a9932187bccf8e7fa505c7e07175d03541d66852",class:v(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":m(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},s("div",{key:"0298cf365a50e3544656a6d27ae59e922b9e3aed",class:"zonos--backdrop"}),s("div",{key:"9fce580a07147d51f17c898a22204c3d9ce6ac7b",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},s("div",{key:"b168439cd985cc5c0166a653db206688504cf7dd",class:"zonos--dialog"},this.isLoading&&s("div",{key:"e0b6215f3c7bc939721669069bc294e08558d8b5",class:"zonos--loading"},s("zonos-spinner",{key:"687bcd6d2695933de828484c34aff1230bf71d49",size:30})),(this.headerText||!this.noCloseButton)&&s("div",{key:"04a57a4add896e3d96faca8b77321bba5f00b889",class:"zonos--header"},this.headerText&&s("h3",{key:"d084cb3aedcb7e5bb8fd82012b57f441d7dce4a2",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&s("zonos-button",{key:"7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee",class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close dialog",content:Z}),noBackground:true,onClick:this.closeButtonHandler,variant:"subtle"})),s("div",{key:"7af04c281b6410b87bfe53913e74fa215f6de24b",class:v(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},s("slot",{key:"8c6ce4437d2bc98f9eccea0280cee31794883b77"})),s("slot",{key:"11f97e705b3cc1bad11c037ede940d2f392d67e7",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());R.style=N;var U=function(o){var e=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return e.test(o)};var H=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var F=H;var G=o("zonos_link_authentication",function(){function o(o){var s=this;e(this,o);this.linkAuthenticationChange=t(this,"linkAuthenticationChange",7);this.setCustomEmailInputToLinkEvent=function(o){var e=U(o);var t={complete:!!e,elementType:"linkAuthentication",empty:!o,value:{email:o}};a.stripeLinkEventData=t};this.handleNormalEmailInput=function(o){var e;var t=o.detail;s.setCustomEmailInputToLinkEvent(t);(e=s.linkAuthenticationChange)===null||e===void 0?void 0:e.emit()};this.titleText=undefined;this.defaultEmail=null;this.isEmailError=false;this.stripe=a.stripe;this.isStagingMode=c.isStagingMode;this.clientSecret=a.clientSecret}o.prototype.watchIsStagingMode=function(){var o=this;setTimeout((function(){o.watchInitStripe()}),0)};o.prototype.watchInitStripe=function(){var o=this;if(!this.stripe||!a.stripeElements){return}if(c.isStagingMode||!this.clientSecret){return}var e=this.defaultEmail?{email:this.defaultEmail}:undefined;var t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication",{defaultValues:e||undefined});var s=this.el.querySelector(".zonos--link-authentication-component");if(!s){f("Cannot find container element for linkAuthenticationElement");return}t.mount(s);t.on("change",(function(e){var t;a.stripeLinkEventData=e;(t=o.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}));a.stripeLinkElement=t};o.prototype.watchDefaultEmail=function(){if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};o.prototype.componentDidLoad=function(){this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};o.prototype.render=function(){var o=this;this.isStagingMode=c.isStagingMode;this.clientSecret=a.clientSecret;var e=function(){var e;if(c.isStagingMode){return s("zonos-stripe-input",{inputLabel:d("Email"),inputValue:o.defaultEmail||((e=a.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",isError:o.isEmailError,onBlur:function(){var e;var t=((e=a.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"";if(!t){return}var s=U(t);o.isEmailError=!s},onInputChange:o.handleNormalEmailInput})}return s("div",{class:"zonos--link-authentication-component ".concat(o.isEmailError&&"zonos--input-invalid")})};return s(n,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":g()}},s("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e(),this.isEmailError&&s("zonos-text",{textColor:"red-600"},d("Please enter a valid email address.")))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return o}());G.style=F;var q=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}:host(.dark){color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}:host{margin:1px;height:calc(var(--zonos-elements-size-xl) - 2px);}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size)}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:24px 4px 2px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix~.zonos--floated-label label{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none;border:var(--zonos--border)}:host .zonos--floated-input:focus~.zonos--floated-label::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content~.zonos--floated-label label,:host .zonos--floated-input:focus~.zonos--floated-label label{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label label{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.dark) .zonos--label-wrapper{background:#30313d}';var K=q;var W=o("zonos_stripe_input",function(){function o(o){e(this,o);this.inputChange=t(this,"inputChange",7);this.inputValue="";this.inputLabel=undefined;this.overridePrimaryColor=undefined;this.overrideSecondaryColor=undefined;this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value="";this.internalValue=this.inputValue}o.prototype.onInputValueChange=function(o){this.internalValue=o;this.inputChange.emit(o);this.value=o};o.prototype.onValueChange=function(o){this.internalValue=o};o.prototype.render=function(){var o=this;var e=this.overridePrimaryColor||z.appearance.colorPrimary;var t=this.overrideSecondaryColor||z.appearance.colorSecondary;var i=e&&x(e);var a=z.appearance.fontSizeInputValue||16;return s(n,{key:"d78f2aee99ac4e6d95cf1628e058e6d3bb70e309",class:v(["zonos--input zonos--elements",i&&"dark",this.isError&&"has-error"]),"data-theme":i?"DARK":"LIGHT",style:{"--zonos--border-radius":g(),"--zonos--font-family":m(),"--zonos--font-size":"".concat(a,"px"),"--zonos--primary-color":t}},s("div",{key:"a3e7f765b0081a564c5955e387ff4b521a28d1a5",class:v(["zonos--label-wrapper",this.isDisabled&&"disabled"])},s("input",{key:"181c5230ddeb02e9cea646b7f0a8efa3a530796e",class:v(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,id:"zonos--input",onChange:function(e){var t=e.target;o.inputChange.emit(t.value);o.el.inputValue=t.value;o.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder,type:"text",value:this.internalValue}),s("div",{key:"ac6e97971905ba130c3533da6a409de60f99ed6d",class:"zonos--floated-label"},s("label",{key:"1643ab4ef5b9449332351c854f8e43db8d192164",htmlFor:"zonos--input"},this.inputLabel))))};Object.defineProperty(o.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}},enumerable:false,configurable:true});return o}());W.style=K}}}));