@zonos/elements 1.3.181 → 1.3.182

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 (39) 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_7.cjs.entry.js +12 -3
  4. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +0 -7
  5. package/dist/cjs/zonos-checkout.cjs.entry.js +7 -0
  6. package/dist/cjs/zonos-elements.cjs.js +1 -1
  7. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -0
  8. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +0 -10
  9. package/dist/collection/components/stripe/zonos-address/zonos-address.js +16 -4
  10. package/dist/esm/index.js +7 -7
  11. package/dist/esm/loader.js +1 -1
  12. package/dist/esm/zonos-address_7.entry.js +13 -4
  13. package/dist/esm/zonos-cart-items_13.entry.js +0 -7
  14. package/dist/esm/zonos-checkout.entry.js +7 -0
  15. package/dist/esm/zonos-elements.js +1 -1
  16. package/dist/esm-es5/index.js +1 -1
  17. package/dist/esm-es5/loader.js +1 -1
  18. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  19. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  20. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  21. package/dist/esm-es5/zonos-elements.js +1 -1
  22. package/dist/scripts/index.js +1 -1
  23. package/dist/scripts/loadZonos.js +1 -1
  24. package/dist/scripts/zonos.js +1 -1
  25. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +5 -1
  26. package/dist/zonos-elements/index.esm.js +1 -1
  27. package/dist/zonos-elements/{p-c4d519cf.system.js → p-00e5d2be.system.js} +1 -1
  28. package/dist/zonos-elements/{p-29d9bc4a.system.entry.js → p-1b1cdb4c.system.entry.js} +1 -1
  29. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  30. package/dist/zonos-elements/p-57af5f9c.entry.js +1 -0
  31. package/dist/zonos-elements/{p-4661c29c.system.entry.js → p-5957eff5.system.entry.js} +1 -1
  32. package/dist/zonos-elements/p-79e43df6.system.entry.js +1 -0
  33. package/dist/zonos-elements/{p-27ce063e.entry.js → p-c3f2b86c.entry.js} +1 -1
  34. package/dist/zonos-elements/p-d00049db.entry.js +1 -0
  35. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/zonos-elements/p-1ea1376e.system.entry.js +0 -1
  38. package/dist/zonos-elements/p-2ad5692f.entry.js +0 -1
  39. package/dist/zonos-elements/p-95921a43.entry.js +0 -1
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(o,e,s,t){function n(o){return o instanceof s?o:new s((function(e){e(o)}))}return new(s||(s=Promise))((function(s,i){function a(o){try{d(t.next(o))}catch(o){i(o)}}function r(o){try{d(t["throw"](o))}catch(o){i(o)}}function d(o){o.done?s(o.value):n(o.value).then(a,r)}d((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,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 d([o,e])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(s=0)),s)try{if(t=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:s.label++;return{value:r[1],done:false};case 5:s.label++;n=r[1];r=[0];continue;case 7:r=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){s=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(r[0]===6&&s.label<i[1]){s.label=i[1];i=r;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(r);break}if(i[2])s.ops.pop();s.trys.pop();continue}r=e.call(o,s)}catch(o){r=[6,o];n=0}finally{t=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-91bc2187.system.js","./p-5187ba8f.system.js","./p-1b75aa35.system.js","./p-2670438c.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-e4f8114a.system.js","./p-69255ed2.system.js"],(function(o){"use strict";var e,s,t,n,i,a,r,d,l,c,h,u,f,b,p,m,z,v,y,g,x,k;return{setters:[function(o){e=o.r;s=o.c;t=o.h;n=o.H;i=o.d},function(o){a=o.e;r=o.f;d=o.t;l=o.V;c=o.r;h=o.l},function(o){u=o.z;f=o.d},function(o){b=o.b;p=o.l;m=o.i},function(o){z=o.i;v=o.c},function(o){y=o.c},function(o){g=o.R},function(o){x=o.g},function(o){k=o.i}],execute:function(){var w=".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--company-name-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var C=w;var A=o("zonos_address",function(){function o(o){e(this,o);this.invalidCharacters=s(this,"invalidCharacters",7);this.isAutoCompleteAdjusted=false;this.trackingSent=false;this.type=undefined;this.titleText=undefined;this.defaultAddress=[];this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=a.checkoutSessionId}o.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:r.stripeBillingAddressElement,stripeAddressEventData:r.stripeBillingAddressEventData,stripeElements:r.stripeElementsForBillingAddress}}return{stripeAddressElement:r.stripeAddressElement,stripeAddressEventData:r.stripeAddressEventData,stripeElements:r.stripeElements}};o.prototype.updateAddressEventData=function(o){var e=o.event,s=o.type;switch(s){case"billing":r.stripeBillingAddressEventData=e;break;default:{r.stripeAddressEventData=e;break}}};o.prototype.isAddressFilledChanged=function(){if(!a.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var o=a.checkoutSessionId;void d({checkoutSessionId:o,eventName:"checkout_customerInfoFilled"})}};o.prototype.updateAddressElement=function(o){var e=o.stripeAddressElement,s=o.type;if(s==="shipping"){r.stripeAddressElement=e;return}r.stripeBillingAddressElement=e};o.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d,c;var u=this;return __generator(this,(function(f){this.stripe=window.Zonos.stripe;o=this.getStripeAddressInstance(),e=o.stripeAddressEventData,s=o.stripeElements;if(!this.stripe||!s){b("Stripe is not initialized. Couldn't load stripe element.");return[2]}t=this.defaultAddress.map((function(o){return Object.assign(Object.assign({},o),{name:o.name,phone:o.phone||undefined})}));n=h.shippingZoneCountries;i=n?Object.values(n).map((function(o){return o.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");r=this.type==="shipping"?i:[];d=(e===null||e===void 0?void 0:e.value.address.country)||l(r);p("Stripe country code: ".concat(d),"info");c=s.create("address",{allowedCountries:a?[]:r,contacts:t.length&&!e?this.defaultAddress:[],defaultValues:{address:Object.assign(Object.assign({},e===null||e===void 0?void 0:e.value.address),{country:d}),firstName:e===null||e===void 0?void 0:e.value.firstName,lastName:e===null||e===void 0?void 0:e.value.lastName,phone:e===null||e===void 0?void 0:e.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});c.mount(this.el.querySelector(".zonos--address-component"));c.on("change",(function(o){var e=o.value;if(!u.isDirtyAddress&&e.address.line1.length>=3){u.isDirtyAddress=true;setTimeout((function(){if(!u.isAutoCompleteAdjusted){var o=u.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(o){o.style.zIndex="2"}u.isAutoCompleteAdjusted=true}if(m()){u.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var e=u.type==="shipping"?100:600;var s=u.el.closest(".zonos--group");var t=u.el.getBoundingClientRect().top+e;s===null||s===void 0?void 0:s.scrollTo({behavior:"smooth",top:t})}}),600)}u.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:u.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:u.type})}));this.updateAddressElement({stripeAddressElement:c,type:this.type});return[2]}))}))};o.prototype.defaultAddressChanged=function(o,e){var s=JSON.stringify(e);var t=JSON.stringify(o);if(s===t){return}p("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.clear();n===null||n===void 0?void 0:n.destroy();if(this.type==="shipping"){r.stripeAddressEventData=null}else{r.stripeBillingAddressEventData=null}void this.watchInitStripe()};o.prototype.renderCompanyNameInput=function(){var o;if(this.type==="billing"){return null}if(!((o=u.genericSettings)===null||o===void 0?void 0:o.companyNameInputEnabled)){r.companyName="";return null}return t("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:c("Company name (optional)"),inputValue:r.companyName,onInputChange:function(o){r.companyName=o.detail}})};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(){var o;this.checkoutSessionId=a.checkoutSessionId;if((o=r.stripeAddressEventData)===null||o===void 0?void 0:o.complete){this.isAddressFilled=true}return t(n,{key:"f31fc745e5c024dd2b594a26a0a81ebe3a5f8060",class:"zonos--address zonos--elements"},t("zonos-text",{key:"7b51df49edb4d7abbff9733b1e220771caca7f12",class:"zonos--title",type:"semiBoldLabel"},this.titleText),this.renderCompanyNameInput(),t("div",{key:"781cd2076d8319979bb5ed2ea3bb24dfa97f7010",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{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return o}());A.style=C;var j=':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 I=j;var O=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,s=e.city,i=e.country,a=e.email,r=e.line1,d=e.line2,l=e.name,u=e.phone,f=e.postal_code,b=e.state;var p=(o=h.shippingZoneCountries)===null||o===void 0?void 0:o[i];var m=function(o){var e=o.bold,s=o.content;var n=z(s)?"red-600":"gray-1000";return t("zonos-text",{textColor:n,type:e?"boldLabel":"body"},s)};return t(n,{class:"zonos--address-form zonos--elements"},t("div",{class:"zonos--title"},t("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?c("Shipping"):c("Billing"))),t("div",{class:"zonos--address-group"},l&&t("div",{class:"zonos--address-line"},m({bold:true,content:l})),a&&t("div",{class:"zonos--address-line"},m({content:a})),u&&t("div",{class:"zonos--address-line"},m({content:u})),r&&t("div",{class:"zonos--address-line"},m({content:r})),d&&t("div",{class:"zonos--address-line"},m({content:d})),t("div",{class:"zonos--address-line"},s&&m({content:s}),b&&m({content:b}),f&&m({content:f})),p&&t("div",{class:"zonos--address-line"},t("zonos-country-flag",{class:"zonos--country-flag",countryCode:p.code})," ",m({content:p.displayName}))))};return o}());O.style=I;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 E=_;var L=o("zonos_address_form",function(){function o(o){var t=this;e(this,o);this.addressChange=s(this,"addressChange",7);this.onInputChange=function(o){var e;var s=o.key,n=o.value;t.addressChange.emit(Object.assign(Object.assign({},t.localAddress),(e={},e[s]=n,e)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}o.prototype.watchCurrentAddress=function(){var o,e,s,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,u=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[d])||d,line2:((s=this.translatedAddress.line2)===null||s===void 0?void 0:s[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[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[u])||u})};o.prototype.componentWillLoad=function(){this.watchCurrentAddress()};o.prototype.render=function(){var o=this;var e=this.localAddress,s=e.city,i=e.country,a=e.line1,r=e.line2,d=e.name,l=e.phone,h=e.postal_code,u=e.state;var f=d.split(" ")[0]||"";var b=d.split(" ").slice(1).join(" ")||"";return t(n,{key:"8b578737e33203a23563be7e9be0778deec99bbf",class:"zonos--address-form zonos--elements"},t("div",{key:"793675a1348547bf3f781788956befe325191011",class:"zonos--title"},t("zonos-text",{key:"13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?c("Shipping"):c("Billing"))),t("div",{key:"2c5de5b5283fb99ee5f8b61d7a217177986fc2db",class:"zonos--address-group"},t("div",{key:"23bf3c893071000d5995a5f175867bab11929193",class:"zonos--contact"},t("zonos-text",{key:"7cdfe2a84ebad89ba5b16498d75def99cf392384",type:"label"},c("Contact")),t("zonos-input",{key:"1c39c38767fd306c5eb1164cdc989b8291209cf0",class:"zonos--form-email",inputLabel:c("Email"),inputValue:this.currentAddress.email,isDisabled:true}),t("div",{key:"cbdf61217125e22b1a6cec9a340ef0aca2c75670",class:"zonos--name zonos--address-row"},t("zonos-input",{key:"360c99e7b2c6caa64580d5768b5bb53368927275",class:"zonos--form-first-name",inputLabel:c("First name"),inputValue:f,isError:z(f),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(e.detail," ").concat(b)})}}),t("zonos-input",{key:"8ce5fa5c15c6f7928339ea10009ce0e68954a91f",class:"zonos--form-last-name",inputLabel:c("Last name"),inputValue:b,isError:z(b),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(f," ").concat(e.detail)})}}))),t("div",{key:"7b4fa2d3baa6cb257e7688e5ba6777123898b3fd",class:"zonos--address"},t("zonos-text",{key:"9d5782331b2642755a755aeb7f98c9f4d87f9a20",type:"label"},c("Address")),t("zonos-input",{key:"a622025924ca86bdbf1d3c04b79e6dee172b4c42",class:"zonos--form-country",inputLabel:c("Country"),inputValue:i,isDisabled:true}),t("zonos-input",{key:"f99b3a74db09ab5730878e80705b9aeac76bf800",class:"zonos--form-line1",inputLabel:c("Address line 1"),inputValue:a,isError:z(a),onInputChange:function(e){return o.onInputChange({key:"line1",value:e.detail})}}),t("zonos-input",{key:"5d16aefa45a78045c87d166aaaec0255606e455e",class:"zonos--form-line2",inputLabel:c("Address line 2"),inputValue:r,isError:z(r),onInputChange:function(e){return o.onInputChange({key:"line2",value:e.detail})}}),t("div",{key:"dc166be9381142835d72e731cb38a718522a068a",class:"zonos--address-row"},t("zonos-input",{key:"4f1a98f9d10ce0cff3ef18a3037a12382552b31d",class:"zonos--form-city",inputLabel:c("City"),inputValue:s,isError:z(s),onInputChange:function(e){return o.onInputChange({key:"city",value:e.detail})}}),t("zonos-input",{key:"d4f97900b5fe2e1619950a52d1d1f716a8bc19ff",class:"zonos--form-state",inputLabel:c("State/Province"),inputValue:u,isError:z(u),onInputChange:function(e){return o.onInputChange({key:"state",value:e.detail})}})),t("zonos-input",{key:"cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733",class:"zonos--form-postal-code",inputLabel:c("Postal code"),inputValue:h,isError:z(h),onInputChange:function(e){return o.onInputChange({key:"postal_code",value:e.detail})}}),t("zonos-input",{key:"7421c82847eded6bdbcce49ef8196124d8e50c1d",class:"zonos--form-phone",inputLabel:c("Phone number"),inputValue:l,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=E;var S=":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 B=S;var T=o("zonos_address_update_dialog",function(){function o(o){var t=this;e(this,o);this.closeUpdateDialog=s(this,"closeUpdateDialog",7);this.continueClicked=s(this,"continueClicked",7);this.closeUpdateDialogHandler=function(){t.closeUpdateDialog.emit()};this.getTranslatedAddress=function(o){var e=o.currentAddress,s=o.translatedAddress;var t,n,i,a,r,d;var l=e.city,c=e.line1,h=e.line2,u=e.name,f=e.postal_code,b=e.state;return{city:((t=s.city)===null||t===void 0?void 0:t[l])||l,line1:((n=s.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=s.line2)===null||i===void 0?void 0:i[h])||h,name:((a=s.name)===null||a===void 0?void 0:a[u])||u,postal_code:((r=s.postal_code)===null||r===void 0?void 0:r[f])||f,state:((d=s.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d,l,c,h,u;return __generator(this,(function(f){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=v(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&v(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];u=((e=c===null||c===void 0?void 0:c.shadowRoot)===null||e===void 0?void 0:e.querySelector(".has-error"))||((s=h===null||h===void 0?void 0:h.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"));if(u){u.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(o){var e,s,t,n,i,a;var r=o.currentAddress,d=o.translatedAddress;var l=r.city,c=r.line1,h=r.line2,u=r.name,f=r.postal_code,b=r.state;return{city:(e={},e[l]=d.city,e),line1:(s={},s[c]=d.line1,s),line2:(t={},t[h]=d.line2,t),name:(n={},n[u]=d.name,n),postal_code:(i={},i[f]=d.postal_code,i),state:(a={},a[b]=d.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||u.appearance.colorSecondary;var s=e==="#ffffff"?"outline":this.submitBtnType||"standard";var i=this.billingAddress;var a=this.shippingAddress;return t(n,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:y(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},t("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"},t("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},t("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},t("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},t("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},c("Update your address")),t("zonos-button",{key:"66abf7b74045e68e84e631298504236d32ca9c4e",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:g}),noBackground:true,onClick:function(){return o.closeUpdateDialogHandler()}})),t("zonos-text",{key:"ffb3d8f169867d5f6dff269e1becd99c98c5a7da"},c("To ensure delivery all address details must be in Latin characters."))),t("div",{key:"2cb61f06ce174e2317870decfdd337c67c5cf128",class:"zonos--group"},t("zonos-text",{key:"a616c540984120b468e52bccfb380ea3974ced22",class:"zonos--what-you-entered",type:"semiBoldLabel"},c("What you entered")),t("div",{key:"6ac8f9c14472370c501af1b0d50bd8f8746b7694",class:"zonos--address-display-group"},t("zonos-address-display",{key:"ea2c67a7bba51c99f80be968e448beeffcf1f863",addressType:"shipping",currentAddress:a}),i&&t("zonos-address-display",{key:"7ea1683dc04a292810e04ed6550d86086f25186f",addressType:"billing",currentAddress:i})),t("div",{key:"4d1cd9096943518b8b4e267608a5e1542befb6a9",class:"zonos--address-form-section"},t("zonos-text",{key:"e4184a2cc618d26d43979fa8cfe06070cf8b5af8",type:"semiBoldLabel"},c("Translated address")),t("zonos-address-form",{key:"c55d9d3c658565ceb7c7b879f444e3937b9f7ad6",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:a,onAddressChange:function(e){var s=e.detail;o.translatedShippingAddressState=o.buildTranslateAddressState({currentAddress:a,translatedAddress:s})},translatedAddress:this.translatedShippingAddressState}),i&&t("zonos-address-form",{key:"c3facc295b1322bb00baa6081f343dcea4f10777",addressType:"billing",class:"zonos--billing-address-form",currentAddress:i,onAddressChange:function(e){var s=e.detail;o.translatedBillingAddressState=o.buildTranslateAddressState({currentAddress:i,translatedAddress:s})},translatedAddress:this.translatedBillingAddressState}))),t("div",{key:"1c89c9604ba0dece40275fcfac97e7f93706b430",class:"zonos--group-btn"},t("div",{key:"e47d393940b094b4e123864e4070daa87f0616f0",class:"zonos--button-wrapper"},t("zonos-button",{key:"216b7afe268a4acd6bb8a76b7f5a32dc09bdd4f6",class:"zonos--cancel-btn",onClick:function(){return o.closeUpdateDialogHandler()},variant:"subtle"},c("Cancel")),t("zonos-button",{key:"acbacb92cedb325b46843d8f3aff13f4e7c86ab5",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"sm",variant:s},c("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}());T.style=B;var V=["blue","cyan","green","orange","purple","red","gray","glass"];var D=":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 N=D;var P=o("zonos_checkbox",function(){function o(o){e(this,o);this.checkboxSelected=s(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 s=e?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=e?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!k(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var a=x({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return t(n,{key:"7a2972128b04d5dffe09f60b5292d90f7201066a",class:y(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":a,"--zonos--font-family":f(),"--zonos--size":"".concat(this.size,"px")}},t("label",{key:"b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41",class:y([this.isDisabled&&"disabled"])},t("input",{key:"f3b86525ef7988d6df87f9147f5aa22b447c1303",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){o.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),t("span",{key:"2007c2fbc4d8437f75b9a3d7a4e65d394922abf4",class:"checkmark-container"},t("svg",{key:"481b9272c99cf464d8d88ab24a8dba35de921abf",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("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&&t("zonos-text",{key:"99689099e7469f2ff928619daa2fcee0ce35a418",size:this.fontSize},this.label)))};return o}());P.style=N;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 F=M;var R=o("zonos_dialog",function(){function o(o){var t=this;e(this,o);this.closeDialog=s(this,"closeDialog",3);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!t.open){return}t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.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=x({overrideBorderStyle:this.borderStyle});return t(n,{key:"a9932187bccf8e7fa505c7e07175d03541d66852",class:y(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":f(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},t("div",{key:"0298cf365a50e3544656a6d27ae59e922b9e3aed",class:"zonos--backdrop"}),t("div",{key:"9fce580a07147d51f17c898a22204c3d9ce6ac7b",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},t("div",{key:"b168439cd985cc5c0166a653db206688504cf7dd",class:"zonos--dialog"},this.isLoading&&t("div",{key:"e0b6215f3c7bc939721669069bc294e08558d8b5",class:"zonos--loading"},t("zonos-spinner",{key:"687bcd6d2695933de828484c34aff1230bf71d49",size:30})),(this.headerText||!this.noCloseButton)&&t("div",{key:"04a57a4add896e3d96faca8b77321bba5f00b889",class:"zonos--header"},this.headerText&&t("h3",{key:"d084cb3aedcb7e5bb8fd82012b57f441d7dce4a2",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{key:"7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close dialog",content:Z}),noBackground:true,onClick:this.closeButtonHandler,variant:"subtle"})),t("div",{key:"7af04c281b6410b87bfe53913e74fa215f6de24b",class:y(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",{key:"8c6ce4437d2bc98f9eccea0280cee31794883b77"})),t("slot",{key:"11f97e705b3cc1bad11c037ede940d2f392d67e7",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());R.style=F;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 J=H;var q=o("zonos_link_authentication",function(){function o(o){var t=this;e(this,o);this.linkAuthenticationChange=s(this,"linkAuthenticationChange",7);this.setCustomEmailInputToLinkEvent=function(o){var e=U(o);var s={complete:!!e,elementType:"linkAuthentication",empty:!o,value:{email:o}};r.stripeLinkEventData=s};this.handleNormalEmailInput=function(o){var e;var s=o.detail;t.setCustomEmailInputToLinkEvent(s);(e=t.linkAuthenticationChange)===null||e===void 0?void 0:e.emit()};this.titleText=undefined;this.defaultEmail=null;this.isEmailError=false;this.stripe=r.stripe;this.isStagingMode=a.isStagingMode;this.clientSecret=r.clientSecret}o.prototype.watchIsStagingMode=function(){var o=this;setTimeout((function(){o.watchInitStripe()}),0)};o.prototype.watchInitStripe=function(){var o=this;if(!this.stripe||!r.stripeElements){return}if(a.isStagingMode||!this.clientSecret){return}var e=this.defaultEmail?{email:this.defaultEmail}:undefined;var s=r.stripeLinkElement||r.stripeElements.create("linkAuthentication",{defaultValues:e});var t=this.el.querySelector(".zonos--link-authentication-component");if(!t){b("Cannot find container element for linkAuthenticationElement");return}s.mount(t);s.on("change",(function(e){var s;r.stripeLinkEventData=e;(s=o.linkAuthenticationChange)===null||s===void 0?void 0:s.emit()}));r.stripeLinkElement=s};o.prototype.watchDefaultEmail=function(o,e){var s=this;var t,n;p("Default email is changed","info",{newDefaultEmail:o,oldDefaultEmail:e});if(e===o){return}if(!o){r.stripeLinkEventData=null}if(a.isStagingMode){this.setCustomEmailInputToLinkEvent(o||"");return}(t=r.stripeLinkElement)===null||t===void 0?void 0:t.clear();(n=r.stripeLinkElement)===null||n===void 0?void 0:n.destroy();r.stripeLinkElement=null;r.stripeLinkEventData=null;p("Reset stripe link element when default email is changed","info",{defaultEmail:o});setTimeout((function(){void s.watchInitStripe()}),5)};o.prototype.componentDidLoad=function(){this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};o.prototype.render=function(){var o=this;this.isStagingMode=a.isStagingMode;this.clientSecret=r.clientSecret;var e=function(){var e;if(a.isStagingMode){return t("zonos-stripe-input",{inputLabel:c("Email"),inputValue:o.defaultEmail||((e=r.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",isError:o.isEmailError,onBlur:function(){var e;var s=((e=r.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"";if(!s){return}var t=U(s);o.isEmailError=!t},onInputChange:o.handleNormalEmailInput})}return t("div",{class:"zonos--link-authentication-component ".concat(o.isEmailError&&"zonos--input-invalid")})};return t(n,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":x()}},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e(),this.isEmailError&&t("zonos-text",{textColor:"red-600"},c("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}());q.style=J}}}));