@zonos/elements 1.3.150 → 1.3.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-a19315fd.js → cart-0ce9e90b.js} +80 -80
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-5d326579.js → paypal-d4d0bb3c.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +5 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +19 -15
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +0 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +16 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +4 -4
- package/dist/collection/components/store/translationStore/strings.base.js +4 -4
- package/dist/collection/components/store/translationStore/strings.chinese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.danish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.dutch.js +4 -4
- package/dist/collection/components/store/translationStore/strings.french.js +4 -4
- package/dist/collection/components/store/translationStore/strings.german.js +4 -4
- package/dist/collection/components/store/translationStore/strings.hebrew.js +4 -4
- package/dist/collection/components/store/translationStore/strings.indonesian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.italian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.japanese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.korean.js +4 -4
- package/dist/collection/components/store/translationStore/strings.norwegian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.polish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.portuguese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.russian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.spanish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.swedish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.turkish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +4 -4
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +4 -2
- package/dist/esm/{cart-260f8518.js → cart-eadc7067.js} +80 -80
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-5453a7db.js → paypal-897e2b5c.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +5 -3
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +19 -15
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/cart-eadc7067.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-5453a7db.js → paypal-897e2b5c.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.base.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.danish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.french.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.german.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.italian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.korean.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.polish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.russian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +2 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-1cace07e.system.entry.js → p-06af7849.system.entry.js} +1 -1
- package/dist/zonos-elements/p-11063d30.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a5a1a1d9.system.js → p-28a516f8.system.js} +1 -1
- package/dist/zonos-elements/{p-2ae03baf.system.js → p-2f8909b0.system.js} +1 -1
- package/dist/zonos-elements/p-353b2453.entry.js +1 -0
- package/dist/zonos-elements/{p-0728843a.entry.js → p-3e20fb8f.entry.js} +1 -1
- package/dist/zonos-elements/{p-cb4500cc.entry.js → p-3e3e7800.entry.js} +1 -1
- package/dist/zonos-elements/{p-7cad853b.entry.js → p-3ea350e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-08be2f4d.entry.js → p-43b8406e.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-84bcd390.system.entry.js → p-5784a0fc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebe1a0bb.system.entry.js → p-57d31762.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-50bbb2f5.entry.js → p-5d9c5413.entry.js} +1 -1
- package/dist/zonos-elements/p-5ee576e3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7ccbd8cb.system.entry.js → p-65dda2b5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1859837.entry.js → p-7c7f0c32.entry.js} +1 -1
- package/dist/zonos-elements/p-8a4c6a42.js +1 -0
- package/dist/zonos-elements/{p-caf27d12.entry.js → p-8cb90d9e.entry.js} +1 -1
- package/dist/zonos-elements/{p-a50c36b5.system.entry.js → p-8fe71612.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dca47550.system.entry.js → p-aaecde60.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea5b3c72.js → p-c36f823b.js} +1 -1
- package/dist/zonos-elements/{p-fbf89adf.entry.js → p-c94d82fb.entry.js} +1 -1
- package/dist/zonos-elements/{p-85e7f592.system.entry.js → p-d642f149.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dec30fa4.entry.js +1 -0
- package/dist/zonos-elements/p-eb192fa3.system.js +1 -0
- package/dist/zonos-elements/{p-526d2758.system.entry.js → p-ee871492.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-260f8518.js +0 -1
- package/dist/zonos-elements/p-366be853.system.entry.js +0 -1
- package/dist/zonos-elements/p-6d2cd324.system.entry.js +0 -1
- package/dist/zonos-elements/p-92d5df16.js +0 -1
- package/dist/zonos-elements/p-d512afcf.system.js +0 -1
- package/dist/zonos-elements/p-ea866dd3.entry.js +0 -1
- package/dist/zonos-elements/p-f946289f.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,i){function e(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?o(t.value):e(t.value).then(u,s)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,e,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return c([t,n])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(i=1,e&&(r=s[0]&2?e["return"]:s[0]?e["throw"]||((r=e["return"])&&r.call(e),0):e.next)&&!(r=r.call(e,s[1])).done)return r;if(e=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;e=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];e=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-d512afcf.system.js","./p-32912caf.system.js","./p-18e5b741.system.js","./p-12546668.system.js","./p-c015be06.system.js"],(function(t){"use strict";var n,o,i,e,r,u,s,c,a,f,d,l,h,v,w;return{setters:[function(t){n=t.r;o=t.c;i=t.h;e=t.H},function(t){r=t.E;u=t.f;s=t.F;c=t.e;a=t.a},function(t){f=t.z;d=t.b;l=t.d},function(t){h=t.h;v=t.b;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,o,i;return __generator(this,(function(e){switch(e.label){case 0:return[4,h("/api/zonos-elements/zonos-settings")];case 1:t=e.sent(),n=t.errors,o=t.json,i=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:i}]}return[2,{errors:[],json:o,zonosMode:i}]}}))}))};var p=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var b=function(t){if(!t.placeOrderButtonSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!r(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}p()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var y=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var z=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var e=document.querySelector(i);if(e){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return i};var j=function(t){return __awaiter(m,void 0,void 0,(function(){var n,o,i,e,u;return __generator(this,(function(s){if(window.Zonos.isLegacyCheckout){w("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;o=n;if(!t.anchorElementSelector&&t.desktopLocation){i=z({position:"bottom-right"});o=i}if(!o||!r(o)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");e=g(o);if(!e){u=new MutationObserver((function(){var t=g(o);if(t){u.disconnect()}}));u.observe(document.body,{childList:true,subtree:true});setTimeout((function(){g(o)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){w("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=z({position:y(t.notFoundElementFallback)});g(n)}}),3e3)}return[2]}))}))};var k=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var I=k;var O=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=o(this,"paypalInitEvent",7);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}u.stripe=t;void b(f.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,i,e,r,u,s,c;return __generator(this,(function(a){switch(a.label){case 0:i=t||l();if(i==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}e=new URLSearchParams;e.set("family",i);return[4,h("/api/zonos-elements/get-font-detail?".concat(e.toString()))];case 1:r=a.sent(),u=r.errors,s=r.json;if(u.length>0){w("Failed to load font ".concat(i),"warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:"Inter"});return[2]}c=s===null||s===void 0?void 0:s.fontUrl;if(c){(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,c)}if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void j(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.injectCustomHTML=function(t){if(!t){return}if(!window.Zonos.isLegacyCheckout){w("=== Skip injecting custom HTML for hosted checkout","info");return}w("=== Injecting custom HTML for hosted checkout");var n=document.createElement("template");n.innerHTML=t;var o=n.content.querySelectorAll("script");o.forEach((function(t){var n=document.createElement("script");if(t.src){n.src=t.src;n.async=t.async}else{n.textContent=t.innerHTML}document.body.appendChild(n)}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,i,e,r,u,c,a,l,h;var v=this;return __generator(this,(function(m){switch(m.label){case 0:return[4,_()];case 1:i=m.sent(),e=i.errors,r=i.json,u=i.zonosMode;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}c=((n=r===null||r===void 0?void 0:r.checkoutSettings)===null||n===void 0?void 0:n.customHTML)||"";this.injectCustomHTML(c);this.initZonosNotification();a=function(){var t,n,o;if(window.Zonos.isLegacyCheckout){return((t=r===null||r===void 0?void 0:r.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=v.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(o=v.config.appearance)===null||o===void 0?void 0:o.logoUrl};l=Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:a()}),checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});d({overrideSettings:l,zonosSettings:r});f.zonosMode=u;void this.setupGoogleFont();if(f.helloSettings.visibilityStatus==="DISABLED"){w("=== Hello is disabled by store owner ===","warn")}if(f.helloSettings&&f.helloSettings.visibilityStatus==="ENABLED"){w("Initializing hello");void j(f.helloSettings)}return[4,s()];case 2:m.sent();h=((o=r===null||r===void 0?void 0:r.checkoutSettings)===null||o===void 0?void 0:o.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!h||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:h.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){c.checkoutSessionId=null;u.clientSecret="";return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void a(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(e,{key:"001f728dc41550b734fd1b5c9cf15f43c0c4cbdb",class:"zonos--elements"})};return t}());O.style=I}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,o,i){function e(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?o(t.value):e(t.value).then(u,s)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,e,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return c([t,n])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(i=1,e&&(r=s[0]&2?e["return"]:s[0]?e["throw"]||((r=e["return"])&&r.call(e),0):e.next)&&!(r=r.call(e,s[1])).done)return r;if(e=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;e=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];e=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-eb192fa3.system.js","./p-32912caf.system.js","./p-18e5b741.system.js","./p-12546668.system.js","./p-c015be06.system.js"],(function(t){"use strict";var n,o,i,e,r,u,s,c,a,f,d,l,h,v,w;return{setters:[function(t){n=t.r;o=t.c;i=t.h;e=t.H},function(t){r=t.E;u=t.f;s=t.F;c=t.e;a=t.a},function(t){f=t.z;d=t.b;l=t.d},function(t){h=t.h;v=t.b;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,o,i;return __generator(this,(function(e){switch(e.label){case 0:return[4,h("/api/zonos-elements/zonos-settings")];case 1:t=e.sent(),n=t.errors,o=t.json,i=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:i}]}return[2,{errors:[],json:o,zonosMode:i}]}}))}))};var p=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var b=function(t){if(!t.placeOrderButtonSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!r(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}p()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var y=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var z=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var e=document.querySelector(i);if(e){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return i};var j=function(t){return __awaiter(m,void 0,void 0,(function(){var n,o,i,e,u;return __generator(this,(function(s){if(window.Zonos.isLegacyCheckout){w("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;o=n;if(!t.anchorElementSelector&&t.desktopLocation){i=z({position:"bottom-right"});o=i}if(!o||!r(o)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");e=g(o);if(!e){u=new MutationObserver((function(){var t=g(o);if(t){u.disconnect()}}));u.observe(document.body,{childList:true,subtree:true});setTimeout((function(){g(o)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){w("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=z({position:y(t.notFoundElementFallback)});g(n)}}),3e3)}return[2]}))}))};var k=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var I=k;var O=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=o(this,"paypalInitEvent",7);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}u.stripe=t;void b(f.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,i,e,r,u,s,c;return __generator(this,(function(a){switch(a.label){case 0:i=t||l();if(i==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}e=new URLSearchParams;e.set("family",i);return[4,h("/api/zonos-elements/get-font-detail?".concat(e.toString()))];case 1:r=a.sent(),u=r.errors,s=r.json;if(u.length>0){w("Failed to load font ".concat(i),"warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:"Inter"});return[2]}c=s===null||s===void 0?void 0:s.fontUrl;if(c){(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,c)}if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void j(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.injectCustomHTML=function(t){if(!t){return}if(!window.Zonos.isLegacyCheckout){w("=== Skip injecting custom HTML for hosted checkout","info");return}w("=== Injecting custom HTML for hosted checkout");var n=document.createElement("template");n.innerHTML=t;var o=n.content.querySelectorAll("script");o.forEach((function(t){var n=document.createElement("script");if(t.src){n.src=t.src;n.async=t.async}else{n.textContent=t.innerHTML}document.body.appendChild(n)}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,i,e,r,u,c,a,l,h;var v=this;return __generator(this,(function(m){switch(m.label){case 0:return[4,_()];case 1:i=m.sent(),e=i.errors,r=i.json,u=i.zonosMode;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}c=((n=r===null||r===void 0?void 0:r.checkoutSettings)===null||n===void 0?void 0:n.customHTML)||"";this.injectCustomHTML(c);this.initZonosNotification();a=function(){var t,n,o;if(window.Zonos.isLegacyCheckout){return((t=r===null||r===void 0?void 0:r.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=v.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(o=v.config.appearance)===null||o===void 0?void 0:o.logoUrl};l=Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:a()}),checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});d({overrideSettings:l,zonosSettings:r});f.zonosMode=u;void this.setupGoogleFont();if(f.helloSettings.visibilityStatus==="DISABLED"){w("=== Hello is disabled by store owner ===","warn")}if(f.helloSettings&&f.helloSettings.visibilityStatus==="ENABLED"){w("Initializing hello");void j(f.helloSettings)}return[4,s()];case 2:m.sent();h=((o=r===null||r===void 0?void 0:r.checkoutSettings)===null||o===void 0?void 0:o.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!h||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:h.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){c.checkoutSessionId=null;u.clientSecret="";return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void a(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(e,{key:"001f728dc41550b734fd1b5c9cf15f43c0c4cbdb",class:"zonos--elements"})};return t}());O.style=I}}}));
|
|
@@ -0,0 +1 @@
|
|
|
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-eb192fa3.system.js","./p-aed0098c.system.js","./p-18e5b741.system.js","./p-2670438c.system.js","./p-32912caf.system.js","./p-23e7c655.system.js","./p-2770ba48.system.js","./p-c015be06.system.js","./p-12546668.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.U;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}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r instanceof e?r:new e((function(n){n(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{c(t.next(r))}catch(r){i(r)}}function u(r){try{c(t["throw"](r))}catch(r){i(r)}}function c(r){r.done?e(r.value):o(r.value).then(a,u)}c((t=t.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(r){return function(n){return c([r,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(r,e)}catch(r){u=[6,r];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-32912caf.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r instanceof e?r:new e((function(n){n(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{c(t.next(r))}catch(r){i(r)}}function u(r){try{c(t["throw"](r))}catch(r){i(r)}}function c(r){r.done?e(r.value):o(r.value).then(a,u)}c((t=t.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(r){return function(n){return c([r,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(r,e)}catch(r){u=[6,r];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-32912caf.system.js","./p-eb192fa3.system.js","./p-18e5b741.system.js","./p-12546668.system.js"],(function(r){"use strict";var n,e,t,o,i,a,u,c,s,l,d,f,v,p;return{setters:[function(r){n=r.z;e=r.c},function(r){t=r.D;o=r.f;i=r.e;a=r.y;u=r.r;c=r.x;s=r.k},function(r){l=r.h;d=r.l;f=r.b;v=r.j},function(r){p=r.t}],execute:function(){var w=this;
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(r.next(n))}catch(n){i(n)}}function s(n){try{a(r["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):o(n.value).then(u,s)}a((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(t=0)),t)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=e.call(n,t)}catch(n){s=[6,n];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-18e5b741.system.js","./p-b3882a73.system.js","./p-12a6b7bd.system.js"],(function(n){"use strict";var e,t,r,o,i,u,s;return{setters:[function(n){e=n.g;t=n.a;r=n.l;o=n.h;i=n.b},function(e){u=e.s;s=e.c;var t={};t.checkoutHiddenBtnSelector=e.c;t.domesticRedirectedBtnSelector=e.d;n(t)},function(e){var t={};t.countryRequireTaxId=e.c;t.shipToTaxIdLabels=e.s;n(t)}],execute:function(){var a=this;var c=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(e).origin;var i=t.some((function(n){return o.includes(n)}));var u=r.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var d=["jsdelivr","cdnjs","unpkg","vercel"];var l="jsdelivr";var f=function(n){var e=d.indexOf(n);var t=d[e+1];return t||null};var v=function(){return __awaiter(a,void 0,void 0,(function(){var n,u,s,a,c,d;return __generator(this,(function(l){switch(l.label){case 0:n=e();u=t();if(!n&&!u||!window.Zonos.zonosApiKey){return[2,null]}r("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,o("/api/get-test-public-credential")];case 1:s=l.sent(),a=s.errors,c=s.json;if(a.length||!c){i("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",a);return[2,null]}d=c.publicCredential;if(!d){i("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}r("[ZONOS - loadZonos] Retrieve new test public token ".concat(d),"info");return[2,d]}}))}))};var m=function(n){if(!n){return null}var e=new URL(n).searchParams;var t=e.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var w=function(){var n=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||n){return null}var e=m(window.location.href);var t="https://v1.3.150.js.zonos.com";if(!e&&(t.includes("test.")||t.includes("test-"))){return t}if(!e&&["dev.demo.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!e){return null}if(e==="dev-elements"){return"https://dev.elements.zonos.com"}var o="preview.js.zonos.com";var i="https://".concat(e,".").concat(o);r("[ZONOS-WARNING] using '".concat(i,"' for loading elements script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var t="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return i};var p="https://js.stripe.com/v3";var h=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var y="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var z=function(){var n=document.querySelectorAll('script[src^="'.concat(p,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(!h.test(t.src)){continue}return t}return null};var g=null;var j=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(p).concat(e);var r=document.head||document.body;if(!r){i("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}r.appendChild(t);return t};var S=function(n){if(g!==null){return g}g=new Promise((function(e,t){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(y)}if(window.Stripe){e(window.Stripe);return}try{var r=z();if(r&&n){console.warn(y)}else if(!r){r=j(n)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(n){t(n);return}}));return g};var b=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var k=function(n,e,t){if(n===null){return null}var r=n.apply(undefined,e);b(r,t);return r};var O=Promise.resolve().then((function(){return S(null)}));var N=false;O.catch((function(n){if(!N){console.warn(n)}}));var Z=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(a,void 0,void 0,(function(){var e;return __generator(this,(function(t){N=true;e=Date.now();return[2,O.then((function(t){return k(t,n,e)}))]}))}))};var _="tempCartUUID";var R=function(){var n=new URLSearchParams(window.location.search);var e=n.get(_);return e};var U;var I=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=c({loadScriptSrc:n===null||n===void 0?void 0:n.src}),t=e.currentLoadScriptUrl,r=e.isWhiteListed;if(r){return t}return null}();var L="https://v1.3.150.js.zonos.com";var F=I||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.150";var A="https://unpkg.com/@zonos/elements@1.3.150";var E="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.150";var T="https://fonts.googleapis.com";var P=/^https:\/\/fonts\.googleapis\.com/;var D=function(){function n(){}return n}();n("Zonos",D);U=D;D.doneInit=false;D.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);D.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);D._paypalMockResponse=null;D.isBigCommerce=false;D.releaseDate="1737148584151";D.isLegacyCheckout=false;D.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";D.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");D.isNpm=true;D.zonosQaUrl=null;D.zonosQaUrlApi=null;D.version="v".concat("1.3.150");D.modeAlerted=false;D.cartData=null;D.paypal=null;D.getCurrentTimestamp=function(){return(new Date).getTime()};D.zonosController=null;D.init=function(n){return __awaiter(a,void 0,void 0,(function(){var e,t,o,a,c,d,l,f,m,p,h,y,z,g,j;return __generator(this,(function(S){switch(S.label){case 0:e=n.appearance,t=n.checkoutSettings,o=n.currencyConverter,a=n.helloSettings,c=n.onCountryChange,d=n.overrideCurrencyFormat,l=n.storeId,f=n.zonosApiKey;U.cartId=R();if(U.doneInit){return[2]}r("====== ZONOS DEBUG MODE: on (".concat(U.version,") ======"));U.zonosApiKey=f;U.storeId=l;if(!U.isNpm)return[3,4];r("====== ZONOS LOADING FROM NPM ======");m=w();if(m&&!window.isZonosPreview){r('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(m," ======"),"info");p=document.createElement("script");p.src="".concat(m,"/dist/scripts/zonos.js");document.head.appendChild(p);p.addEventListener("load",(function(){window.Zonos.isNpm=U.isNpm;window.Zonos.isBigCommerce=U.isBigCommerce;window.Zonos.isLegacyCheckout=U.isLegacyCheckout;void window.Zonos.init(n)}));p.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(m))}));window.isZonosPreview=true;return[2]}if(!f&&!U.cartId){i("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!U.cartData&&U.cartId))return[3,2];r("Initialize cart data");return[4,u(U.cartId)];case 1:h=S.sent();if(!h){i("Failed to get cart data");return[2]}U.cartData=h.cartData;U.zonosApiKey=h.zonosApiKey;S.label=2;case 2:return[4,v()];case 3:y=S.sent();if(y){U.zonosApiKey=y}S.label=4;case 4:z=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");g=U.cartId&&U.cartData||!!z;if(g){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");j=document.createElement("button");j.style.display="none";j.id="".concat(s);document.body.appendChild(j)}r("init zonos");U.injectCustomScriptForHostedCheckout();U.injectZonosCdn();U.injectZonosCss();U.injectFonts();U.injectController({config:{appearance:e,checkoutSettings:t,currencyConverter:o,helloSettings:a,onCountryChange:c,overrideCurrencyFormat:d}});U.doneInit=true;return[2]}}))}))};D.injectCustomScriptForHostedCheckout=function(){var n=U.cartData;var e=(n===null||n===void 0?void 0:n.metadata)||[];var t=e.find((function(n){return n.key==="customHeaderScript"}));var o=e.find((function(n){return n.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!t&&!o){r("Skip injecting custom script for hosted checkout","info",{footerScript:o,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(t){r("Injecting custom header script");var i=document.createElement("script");i.textContent=t.value;document.head.appendChild(i)}if(o){r("Injecting custom footer script");var i=document.createElement("script");i.textContent=o.value;document.body.appendChild(i)}};D.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};D.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};D.showNotification=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.showNotification(n))};D.updateOrganizationName=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};D.disablePlaceOrderButtons=function(n){var e=n.autoEnable,t=e===void 0?true:e,r=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=r.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var a=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",a)}else{n.removeAttribute("disabled");n.removeEventListener("click",a)}}));if(t&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",a)}))}),5e3)}}};D.injectController=function(n){var e=n.config;var t;if(document.querySelector("zonos-controller")){return}if((t=e.checkoutSettings)===null||t===void 0?void 0:t.placeOrderButtonSelector){var o=e.checkoutSettings.placeOrderButtonSelector;U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o});var u=new MutationObserver((function(){U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o})}));u.observe(document.body,{childList:true,subtree:true})}var s=document.createElement("zonos-controller");s.config=e;s.zonosApiKey=U.zonosApiKey||"";s.addEventListener("stripeInitEvent",(function(n){return __awaiter(a,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:e=n.detail;r("loading Stripe");return[4,Z(e.publishableKey)];case 1:t=o.sent();if(!t){i("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=t;void s.initCheckoutElement(t);return[2]}}))}))}));document.body.appendChild(s);U.zonosController=s;r("Zonos controller injected!")};D.injectScript=function(n){var e=n.cdnType,t=n.isModule,o=n.theRestUrl;var u=U.getZonosUrl(e);var s="".concat(u,"/").concat(o);var a=function(){var n=document.querySelector('script[src="'.concat(s,'"]'));return!!n};if(a()){r('Zonos script "'.concat(s,'" already exists in the document'),"warn");return}var c=document.head||document.body;var d=document.createElement("script");if(!!t){d.type="module"}else{d.noModule=true}d.src=s;d.crossOrigin="anonymous";d.onerror=function(){i("Failed to load ".concat(d.src));var n=f(e);if(!n){return}U.injectScript({cdnType:n,isModule:t,theRestUrl:o})};c.appendChild(d)};D.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return F;case"unpkg":return A;case"cdnjs":return E;case"vercel":return L}};if(U.isNpm){var t=w();return t||e()}return e()};D.injectZonosCdn=function(){U.injectScript({cdnType:l,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});U.injectScript({cdnType:l,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});r("Zonos cdn script injected!")};D.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var r=U.getZonosUrl(e);var o=document.head||document.body;var u=document.createElement("link");u.rel="preconnect";u.href="".concat(L,"/");o.appendChild(u);var s=document.createElement("link");s.rel="stylesheet";s.href="".concat(r,"/").concat(t);s.onerror=function(){i("Failed to load ".concat(s.href));var n=f(e);if(!n){return}U.injectStylesheet({cdnType:n,theRestUrl:t})};o.appendChild(s)};D.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){r("Zonos style links already injected","warn");return}U.injectStylesheet({cdnType:l,theRestUrl:"dist/zonos-elements/zonos-elements.css"});r("Zonos style css injected!")};D.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(T,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(P.test(t.href)){continue}return t}return null};if(n()){r("Inter font already injected","warn");return}var e=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=T;e.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(T,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");e.appendChild(o);r("Zonos font injected!")};D.setupGoogleFont=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};D.injectSupportGoogleFont=function(n){var e;r("[FONT] injecting ".concat(n));var t=(e=n.match(/family=(.*?):/))===null||e===void 0?void 0:e[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(T,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=T;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){r("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);r("[FONT] ".concat(t," font injected!"))}}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(r.next(n))}catch(n){i(n)}}function s(n){try{a(r["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):o(n.value).then(u,s)}a((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(t=0)),t)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=e.call(n,t)}catch(n){s=[6,n];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-18e5b741.system.js","./p-b3882a73.system.js","./p-12a6b7bd.system.js"],(function(n){"use strict";var e,t,r,o,i,u,s;return{setters:[function(n){e=n.g;t=n.a;r=n.l;o=n.h;i=n.b},function(e){u=e.s;s=e.c;var t={};t.checkoutHiddenBtnSelector=e.c;t.domesticRedirectedBtnSelector=e.d;n(t)},function(e){var t={};t.countryRequireTaxId=e.c;t.shipToTaxIdLabels=e.s;n(t)}],execute:function(){var a=this;var c=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(e).origin;var i=t.some((function(n){return o.includes(n)}));var u=r.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var d=["jsdelivr","cdnjs","unpkg","vercel"];var l="jsdelivr";var f=function(n){var e=d.indexOf(n);var t=d[e+1];return t||null};var v=function(){return __awaiter(a,void 0,void 0,(function(){var n,u,s,a,c,d;return __generator(this,(function(l){switch(l.label){case 0:n=e();u=t();if(!n&&!u||!window.Zonos.zonosApiKey){return[2,null]}r("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,o("/api/get-test-public-credential")];case 1:s=l.sent(),a=s.errors,c=s.json;if(a.length||!c){i("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",a);return[2,null]}d=c.publicCredential;if(!d){i("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}r("[ZONOS - loadZonos] Retrieve new test public token ".concat(d),"info");return[2,d]}}))}))};var m=function(n){if(!n){return null}var e=new URL(n).searchParams;var t=e.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var w=function(){var n=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||n){return null}var e=m(window.location.href);var t="https://v1.3.151.js.zonos.com";if(!e&&(t.includes("test.")||t.includes("test-"))){return t}if(!e&&["dev.demo.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!e){return null}if(e==="dev-elements"){return"https://dev.elements.zonos.com"}var o="preview.js.zonos.com";var i="https://".concat(e,".").concat(o);r("[ZONOS-WARNING] using '".concat(i,"' for loading elements script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var t="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return i};var p="https://js.stripe.com/v3";var h=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var y="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var z=function(){var n=document.querySelectorAll('script[src^="'.concat(p,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(!h.test(t.src)){continue}return t}return null};var g=null;var j=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(p).concat(e);var r=document.head||document.body;if(!r){i("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}r.appendChild(t);return t};var S=function(n){if(g!==null){return g}g=new Promise((function(e,t){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(y)}if(window.Stripe){e(window.Stripe);return}try{var r=z();if(r&&n){console.warn(y)}else if(!r){r=j(n)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(n){t(n);return}}));return g};var b=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var k=function(n,e,t){if(n===null){return null}var r=n.apply(undefined,e);b(r,t);return r};var O=Promise.resolve().then((function(){return S(null)}));var N=false;O.catch((function(n){if(!N){console.warn(n)}}));var Z=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(a,void 0,void 0,(function(){var e;return __generator(this,(function(t){N=true;e=Date.now();return[2,O.then((function(t){return k(t,n,e)}))]}))}))};var _="tempCartUUID";var R=function(){var n=new URLSearchParams(window.location.search);var e=n.get(_);return e};var U;var I=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=c({loadScriptSrc:n===null||n===void 0?void 0:n.src}),t=e.currentLoadScriptUrl,r=e.isWhiteListed;if(r){return t}return null}();var L="https://v1.3.151.js.zonos.com";var F=I||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.151";var A="https://unpkg.com/@zonos/elements@1.3.151";var E="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.151";var T="https://fonts.googleapis.com";var P=/^https:\/\/fonts\.googleapis\.com/;var D=function(){function n(){}return n}();n("Zonos",D);U=D;D.doneInit=false;D.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);D.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);D._paypalMockResponse=null;D.isBigCommerce=false;D.releaseDate="1737654725866";D.isLegacyCheckout=false;D.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";D.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");D.isNpm=true;D.zonosQaUrl=null;D.zonosQaUrlApi=null;D.version="v".concat("1.3.151");D.modeAlerted=false;D.cartData=null;D.paypal=null;D.getCurrentTimestamp=function(){return(new Date).getTime()};D.zonosController=null;D.init=function(n){return __awaiter(a,void 0,void 0,(function(){var e,t,o,a,c,d,l,f,m,p,h,y,z,g,j;return __generator(this,(function(S){switch(S.label){case 0:e=n.appearance,t=n.checkoutSettings,o=n.currencyConverter,a=n.helloSettings,c=n.onCountryChange,d=n.overrideCurrencyFormat,l=n.storeId,f=n.zonosApiKey;U.cartId=R();if(U.doneInit){return[2]}r("====== ZONOS DEBUG MODE: on (".concat(U.version,") ======"));U.zonosApiKey=f;U.storeId=l;if(!U.isNpm)return[3,4];r("====== ZONOS LOADING FROM NPM ======");m=w();if(m&&!window.isZonosPreview){r('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(m," ======"),"info");p=document.createElement("script");p.src="".concat(m,"/dist/scripts/zonos.js");document.head.appendChild(p);p.addEventListener("load",(function(){window.Zonos.isNpm=U.isNpm;window.Zonos.isBigCommerce=U.isBigCommerce;window.Zonos.isLegacyCheckout=U.isLegacyCheckout;void window.Zonos.init(n)}));p.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(m))}));window.isZonosPreview=true;return[2]}if(!f&&!U.cartId){i("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!U.cartData&&U.cartId))return[3,2];r("Initialize cart data");return[4,u(U.cartId)];case 1:h=S.sent();if(!h){i("Failed to get cart data");return[2]}U.cartData=h.cartData;U.zonosApiKey=h.zonosApiKey;S.label=2;case 2:return[4,v()];case 3:y=S.sent();if(y){U.zonosApiKey=y}S.label=4;case 4:z=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");g=U.cartId&&U.cartData||!!z;if(g){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");j=document.createElement("button");j.style.display="none";j.id="".concat(s);document.body.appendChild(j)}r("init zonos");U.injectCustomScriptForHostedCheckout();U.injectZonosCdn();U.injectZonosCss();U.injectFonts();U.injectController({config:{appearance:e,checkoutSettings:t,currencyConverter:o,helloSettings:a,onCountryChange:c,overrideCurrencyFormat:d}});U.doneInit=true;return[2]}}))}))};D.injectCustomScriptForHostedCheckout=function(){var n=U.cartData;var e=(n===null||n===void 0?void 0:n.metadata)||[];var t=e.find((function(n){return n.key==="customHeaderScript"}));var o=e.find((function(n){return n.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!t&&!o){r("Skip injecting custom script for hosted checkout","info",{footerScript:o,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(t){r("Injecting custom header script");var i=document.createElement("script");i.textContent=t.value;document.head.appendChild(i)}if(o){r("Injecting custom footer script");var i=document.createElement("script");i.textContent=o.value;document.body.appendChild(i)}};D.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};D.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};D.showNotification=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.showNotification(n))};D.updateOrganizationName=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};D.disablePlaceOrderButtons=function(n){var e=n.autoEnable,t=e===void 0?true:e,r=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=r.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var a=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",a)}else{n.removeAttribute("disabled");n.removeEventListener("click",a)}}));if(t&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",a)}))}),5e3)}}};D.injectController=function(n){var e=n.config;var t;if(document.querySelector("zonos-controller")){return}if((t=e.checkoutSettings)===null||t===void 0?void 0:t.placeOrderButtonSelector){var o=e.checkoutSettings.placeOrderButtonSelector;U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o});var u=new MutationObserver((function(){U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o})}));u.observe(document.body,{childList:true,subtree:true})}var s=document.createElement("zonos-controller");s.config=e;s.zonosApiKey=U.zonosApiKey||"";s.addEventListener("stripeInitEvent",(function(n){return __awaiter(a,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:e=n.detail;r("loading Stripe");return[4,Z(e.publishableKey)];case 1:t=o.sent();if(!t){i("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=t;void s.initCheckoutElement(t);return[2]}}))}))}));document.body.appendChild(s);U.zonosController=s;r("Zonos controller injected!")};D.injectScript=function(n){var e=n.cdnType,t=n.isModule,o=n.theRestUrl;var u=U.getZonosUrl(e);var s="".concat(u,"/").concat(o);var a=function(){var n=document.querySelector('script[src="'.concat(s,'"]'));return!!n};if(a()){r('Zonos script "'.concat(s,'" already exists in the document'),"warn");return}var c=document.head||document.body;var d=document.createElement("script");if(!!t){d.type="module"}else{d.noModule=true}d.src=s;d.crossOrigin="anonymous";d.onerror=function(){i("Failed to load ".concat(d.src));var n=f(e);if(!n){return}U.injectScript({cdnType:n,isModule:t,theRestUrl:o})};c.appendChild(d)};D.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return F;case"unpkg":return A;case"cdnjs":return E;case"vercel":return L}};if(U.isNpm){var t=w();return t||e()}return e()};D.injectZonosCdn=function(){U.injectScript({cdnType:l,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});U.injectScript({cdnType:l,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});r("Zonos cdn script injected!")};D.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var r=U.getZonosUrl(e);var o=document.head||document.body;var u=document.createElement("link");u.rel="preconnect";u.href="".concat(L,"/");o.appendChild(u);var s=document.createElement("link");s.rel="stylesheet";s.href="".concat(r,"/").concat(t);s.onerror=function(){i("Failed to load ".concat(s.href));var n=f(e);if(!n){return}U.injectStylesheet({cdnType:n,theRestUrl:t})};o.appendChild(s)};D.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){r("Zonos style links already injected","warn");return}U.injectStylesheet({cdnType:l,theRestUrl:"dist/zonos-elements/zonos-elements.css"});r("Zonos style css injected!")};D.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(T,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(P.test(t.href)){continue}return t}return null};if(n()){r("Inter font already injected","warn");return}var e=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=T;e.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(T,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");e.appendChild(o);r("Zonos font injected!")};D.setupGoogleFont=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};D.injectSupportGoogleFont=function(n){var e;r("[FONT] injecting ".concat(n));var t=(e=n.match(/family=(.*?):/))===null||e===void 0?void 0:e[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(T,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=T;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){r("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);r("[FONT] ".concat(t," font injected!"))}}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as e,H as s,F as t}from"./p-ab68ad11.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as h,e as l,f as u,g as m,h as z,j as p,k as g,m as k,n as w,o as f,t as b,p as v,q as y,r as C,u as x,v as S,w as A,x as O,y as I,z as j,A as T,B as P,C as D}from"./p-8a4c6a42.js";import{p as B,s as E,a as L,b as _}from"./p-c36f823b.js";import{z as R,g as $,m as N}from"./p-b0616716.js";import{h as U,l as M,b as H,s as F,c as Z,d as W,g as q,j as G,a as K}from"./p-f0c8150e.js";import{i as V}from"./p-81a54668.js";import{c as Y}from"./p-b4b7f705.js";import{c as Q}from"./p-595f5dd2.js";import{g as J}from"./p-e02fd9ae.js";import{i as X}from"./p-6c578d26.js";import{s as oo}from"./p-96d77739.js";import{c as eo,s as so,d as to}from"./p-81a5dd5c.js";import{R as no}from"./p-08e7107d.js";const io=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},co=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&M("Checkout: not shippable country"),1)),ro=()=>{const o="userAgentData"in window.navigator?window.navigator.userAgentData:null,e=(()=>{const o="connection"in window.navigator?window.navigator.connection:null,e="mozConnection"in window.navigator?window.navigator.mozConnection:null,s="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return o||e||s})();return{connectionDownlink:null==e?void 0:e.downlink,connectionEffectiveType:null==e?void 0:e.effectiveType,connectionRtt:null==e?void 0:e.rtt,connectionSaveData:null==e?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}},ao='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',ho=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,s,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||R.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:B()})},this.handleCartExpiredCheck=()=>{var o;if(q())return M("Not checking for cart expiration in test mode"),!1;if(!R.checkoutSettings.cartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),s=(new Date).getTime(),t=Math.floor((s-e)/6e4);return M(`Cart has been created for ${t} minutes`),!!(R.checkoutSettings.cartExpiration&&t>R.checkoutSettings.cartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${eo}`),s=!!window.Zonos.cartData,t=new URL(window.location.href).searchParams,n=t.get("payment_intent_client_secret"),i=t.get("zonosCheckoutSessionId");if(!e)return M("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(M("Payment intent exist, checking stripe payment intent status"),!n)return M("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:c,status:r}=await h({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(M(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,l.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):s?(M("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(M("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.overrideStagingMode=void 0,this.defaultAddress=null,this.forceDialogOpen=!1,this.defaultAddressParams=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.clientSecret=u.clientSecret}async initCartInfoHandler(o){m({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,s;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,E("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||z(),l.step="customer-info",p(),g(),null===(s=(e=R.checkoutSettings).onClose)||void 0===s||s.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof R.checkoutSettings.createCartId){M('"createCartId" is provided, start building cart');const o=await R.checkoutSettings.createCartId();let e;"object"==typeof o?(M("object detected, use cartId and prefill address from createCartId"),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData)):e=o,window.Zonos.cartId=e;const s=await so(e),t=null==s?void 0:s.cartData;if(!t)return H("Failed to build cart, please try again."),!1;if(window.Zonos.cartData=t,this.handleCartExpiredCheck())return!1;const{adjustments:n,cartItems:i}=io(t);await m({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){if(M("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return!1;const{adjustments:o,cartItems:e}=io(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if(R.checkoutSettings.buildCartDetail&&n.selectedCountryCode){M("build cart detail");const o=await R.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),s=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:s,cartItems:e})}if(!l.checkoutSessionId){const o=await k();if(M(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return l.isStagingMode||w(),await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===R.checkoutSettings.successBehavior||!!l.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=G(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;M(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const s=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>s)return M(`=== Existing placed order info is older than ${s}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,M("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,l.checkoutSessionId&&U("/api/zonos-elements/update-checkout-session-metadata",{body:{id:l.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=R.checkoutSettings.placeOrderButtonSelector;if(M(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const e=[o,`#${to}`,`#${eo}`].filter(Boolean);document.querySelectorAll(e.join(",")).forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(M(`attached event to button ${o}`,"info",{button:e}),e.addEventListener("click",(async o=>{var e;if(!window.Zonos.isLegacyCheckout&&(!co()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&M("Checkout: disabled country"),!0))()))return;o.preventDefault(),o.stopPropagation(),M("zonos checkout button clicked");const{shouldAllowOrder:s}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(s){u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");f({isPreview:this.preview,sessionTimeout:54e5});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await U("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();l.shouldHideDiscountInput=!e,E("zonos-checkout-start"),b("checkout_open"),this.handleOrderDuplication(),window.Zonos.isLegacyCheckout&&(async()=>{const{elapsedTime:o}=Z(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:W},ro()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};U("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})()}catch(o){if(u.isFetchingSession=!1,H(o),this.isCartExpired)return;F({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:W,cartId:window.Zonos.cartId,checkoutSessionBody:v(),href:window.location.href,storeBaseUrl:null===(e=window.Zonos.cartData)||void 0===e?void 0:e.storeBaseUrl}}),y({messages:[C("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:C("Error creating Checkout")})}}}),{capture:!0,passive:!1}),R.checkoutSettings.disablePlaceOrderButtonActivation||e.removeAttribute("disabled"),e.setAttribute("data-zonos-checkout-attached","true"),e.matches(to)&&(e.dispatchEvent(Q("click")),r(),e.remove()),e.matches(`#${eo}`)&&(e.dispatchEvent(Q("click")),e.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;M("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:s,customerCity:t,customerCountry:i,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:h}=o,l=new URLSearchParams(window.location.search),u=i||x(l)||n.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:s,customerCity:t,customerCountry:u,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:h})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);M("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const s=o.get(e);return s&&"undefined"!==s?s:null},s=x(o)||n.selectedCountryCode,t=e("customerCity"),i=e("customerEmail"),c=e("customerAddress1"),r=e("customerAddress2"),a=e("customerName"),d=e("customerPhone"),h=e("customerZip"),l=e("customerState");this.applyPrefillAddress({customerAddress1:c,customerAddress2:r,customerCity:t,customerCountry:s,customerEmail:i,customerName:a,customerPhone:d,customerState:l,customerZip:h})}applyPrefillAddress(o){const e=o.customerAddress1||"",s=o.customerCountry||"",t=o.customerName||"",n=o.customerPhone||"";e&&t&&n&&s?(this.defaultAddressParams={address:{city:o.customerCity||"",country:s,line1:e,line2:o.customerAddress2||"",postal_code:o.customerZip||"",state:o.customerState||""},email:o.customerEmail||"",name:t,phone:n},M("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):M("Missing required query params so it can not be prefilled","info",[!e&&"line1",!t&&"name",!n&&"phone",!s&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){l.isStagingMode=!!this.overrideStagingMode}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,l.isStagingMode=K(),void 0!==this.overrideStagingMode&&(l.isStagingMode=this.overrideStagingMode),(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const s=new MutationObserver((async()=>{const t=document.querySelector(o),n=i();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void s.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),h=document.querySelector("#checkout-shipping-continue");d&&h&&(s.disconnect(),h.addEventListener("click",(async o=>{var e,s;const t=d.value;if(!t)return;if(c(t),!co(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),h=document.querySelector("input#addressLine1Input"),l={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:h&&h.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(s=i.get("shippingAddress.stateOrProvince"))&&void 0!==s?s:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return H("One or more shipping address field is missing",Object.entries(l)),void F({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:R.storeId}});a({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));s.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:to,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(M("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):M("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){S(o)}async handleCustomerInfoContinue(){this.submitLoading=!0,await A();const o=setInterval((()=>{!l.landedCostData&&u.isFetchingLandedCost||(l.landedCostData&&(L({currency:l.currency}),O()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{O(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){_.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null;try{l.inventoryCheckErrorMessage=await I()}catch(o){l.inventoryCheckErrorMessage=C("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await j(),O(),g()}catch(o){H(o),E("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(T(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}async handleFinishClick(){if(P(),this.preview)return l.step="customer-info",void await this.init();if(z(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=V(this.mobile),this.applyStripeTheme(),M(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=V(this.mobile),this.applyStripeTheme(),M(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=$(this.appearanceSettingsOverride.theme))}handleAddressChange(){P()}handleClientSecretChange(){this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,s=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",s.style.overflow&&s.setAttribute(o,s.style.overflow),s.style.overflow="hidden";else{const t=e.getAttribute(o),n=s.getAttribute(o);t?(e.removeAttribute(o),e.style.overflow=t):e.style.removeProperty("overflow"),n?(s.removeAttribute(o),s.style.overflow=n):s.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=V(this.mobile),this.isIframed=window.self!==window.top,M(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=D("selectedLocale",(()=>{this.applyStripeTheme()})),M(`mobile: ${this.isMobile}`)}disconnectedCallback(){P(),z(),this.onChangeLocaleListener()}render(){var o,i,c,r;this.clientSecret=u.clientSecret;const a="finish"!==l.step&&"error"!==l.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:h,logoUrl:m,style:z}=N(R.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===R.appearance.zonosAttribution,g=R.appearance.theme,k=d&&X(d)?"DARK":"LIGHT",w=this.isMobile?g:k,f=this.isMobile?void 0:h,{customMessages:b}=n,v=null===(o=b.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,y=this.getCurrentLocalePageEnum(),x=b.filter((o=>o.pageName===y)),S=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${R.organizationName} logo`,src:o}))},A=q(),O=()=>{const o=new URLSearchParams(window.location.search),s=o.get("zonosQaUrl"),t=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||K();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),A&&e("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},C("Staging mode")),"1"===t&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),s&&e("zonos-badge",{badgeColor:"purple",size:"small"},s),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:ao,message:o.message}))))},I=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:C("Your checkout session has expired. Please reload the page to continue."),restStateTitle:C("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},C("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":J({overrideBorderStyle:z})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":w,style:oo({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&O(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress||this.defaultAddressParams,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:f}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:f}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:f})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&O(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:no}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:f}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:ao,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:ao,message:v}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:no}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:z,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:Y(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?I():e("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},I()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:C("Don't close"),dialogConfirmBtnText:C("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:C("Would you like to close checkout and return to the site?"),dialogTitle:C("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:C("Return to merchant site"),dialogConfirmBtnText:C("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?C("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):C("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:C("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:C("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:C("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:C("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:C("You are being sent back to the shop to re-add items to your cart."),dialogTitle:C("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],clientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};ho.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{ho as zonos_checkout}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as e,h as t,F as s,H as i}from"./p-ab68ad11.js";import{r as n,l as a,K as l}from"./p-92d5df16.js";import{z as r}from"./p-b0616716.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as c}from"./p-5883217a.js";import"./p-f0c8150e.js";import"./p-6c578d26.js";import"./p-e02fd9ae.js";const m=`${n("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${(({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`)({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.hasInclusivePrices=()=>{var o;return"ENABLED"===(null===(o=a.inclusivePricing)||void 0===o?void 0:o.status)},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>this.hasInclusivePrices()?[m]:[n("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:100*o.vatTaxRate+"%"}),m],this.getNewZealandDutyTaxMessge=o=>this.hasInclusivePrices()?null:[n("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:l({amount:o.vatTaxDeminimus})})],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricing;return"ENABLED"!==(null==o?void 0:o.status)?null:"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status?n("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status?n("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status?n("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.fee.status?n("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions."):null},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=a,l=this.hasInclusivePrices(),m=this.getInclusivePriceMessage(),f=this.getDutyMessage(),g=this.getTaxMessage(),u=this.getAdditionalDutyTaxMessage(),b=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef),p=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:w}=a,x=n("Welcome to [storeName]",{storeName:r.organizationName}),C=(null===(o=w.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),z=h(C),v=this.getCurrentPageEnum(),y=w.filter((o=>o.pageName===v));return t(i,{key:"1fce2b616b062a02f97f711f674836d75ad25035",class:"zonos--elements"},t("div",{key:"caa338a462d1c0cde1727e5147268c782d6063f0",class:d(["zonos--hello-dialog",b&&"zonos--hello-dialog-animate-from-left",p&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"49968ece06cddb09bf870c7fac18999d9d43ad75"},t("div",{key:"0557a439e3676dcda4668324e0ed4701a50cb365",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"ccf16ff294f2168d1c3b3735a1b364cc71e5d392",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello 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.setIsOpen(!1)}),t("zonos-v-stack",{key:"7aa4d6322cf48204a4eb4aa62b2ebdaab637e96b",spacing:24},t("zonos-country-flag",{key:"1152da449f95ebd8f2cc3364c2ba742ed0696b0c",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"c449283c10a1e71f1e55d7da04ae51234bb58ccf",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"2adb9745513f6f9041509d07a9584cf421a22ee9",type:"boldSubheader"},x),t("zonos-text",{key:"ece4b349db2f121b2245090a04327927775162f0",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"30849c1c301eed69fe3d1db06755164d852ef547",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"fbd14cc231da833e4930a52483f40c32b1e24e2d",spacing:"12px"},t("zonos-v-stack",{key:"75da2be8ba28555258e8ff50e78c5b1ffa2403ac",spacing:12},l?t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>'}),t("zonos-text",null,m)):t(s,null,t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",null,f)),t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",null,g))),null==u?void 0:u.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{innerHTML:o})))))),y.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"6c15ad7d36590e1b93007e3786c0e0db191b4b8d",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"fae16c45b01ed1345d439c77267d1c80ce908598"},t("zonos-country-select",{key:"a6abe0661ee91ad227877ebbb5ee21253b110ea0",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7550bec8646301a4bd5afb94b79b18b62698891b"},t("zonos-language-select",{key:"da2e8007ebf7e33723baaf3bdd2818334090c81c",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;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;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{f as zonos_hello_dialog}
|
|
1
|
+
import{r as o,c as e,h as t,F as s,H as i}from"./p-ab68ad11.js";import{r as n,l as a,K as l}from"./p-8a4c6a42.js";import{z as r}from"./p-b0616716.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as c}from"./p-5883217a.js";import"./p-f0c8150e.js";import"./p-6c578d26.js";import"./p-e02fd9ae.js";const m=`${n("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${(({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`)({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`,g=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.hasInclusivePrices=()=>{var o;return"ENABLED"===(null===(o=a.inclusivePricing)||void 0===o?void 0:o.status)},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>this.hasInclusivePrices()?[m]:[n("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:100*o.vatTaxRate+"%"}),m],this.getNewZealandDutyTaxMessge=o=>this.hasInclusivePrices()?null:[n("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:l({amount:o.vatTaxDeminimus})})],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricing;return"ENABLED"!==(null==o?void 0:o.status)?null:"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status?n("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status?n("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status?n("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.fee.status?n("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions."):null},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=a,l=this.hasInclusivePrices(),m=this.getInclusivePriceMessage(),g=this.getDutyMessage(),u=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),b=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef),p=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:w}=a,x=n("Welcome to [storeName]",{storeName:r.organizationName}),C=(null===(o=w.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),z=h(C),v=this.getCurrentPageEnum(),y=w.filter((o=>o.pageName===v));return t(i,{key:"1fce2b616b062a02f97f711f674836d75ad25035",class:"zonos--elements"},t("div",{key:"caa338a462d1c0cde1727e5147268c782d6063f0",class:d(["zonos--hello-dialog",b&&"zonos--hello-dialog-animate-from-left",p&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"49968ece06cddb09bf870c7fac18999d9d43ad75"},t("div",{key:"0557a439e3676dcda4668324e0ed4701a50cb365",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"ccf16ff294f2168d1c3b3735a1b364cc71e5d392",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello 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.setIsOpen(!1)}),t("zonos-v-stack",{key:"7aa4d6322cf48204a4eb4aa62b2ebdaab637e96b",spacing:24},t("zonos-country-flag",{key:"1152da449f95ebd8f2cc3364c2ba742ed0696b0c",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"c449283c10a1e71f1e55d7da04ae51234bb58ccf",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"2adb9745513f6f9041509d07a9584cf421a22ee9",type:"boldSubheader"},x),t("zonos-text",{key:"ece4b349db2f121b2245090a04327927775162f0",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"30849c1c301eed69fe3d1db06755164d852ef547",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"fbd14cc231da833e4930a52483f40c32b1e24e2d",spacing:"12px"},t("zonos-v-stack",{key:"75da2be8ba28555258e8ff50e78c5b1ffa2403ac",spacing:12},l?t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>'}),t("zonos-text",null,m)):t(s,null,t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",null,g)),t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",null,u))),null==f?void 0:f.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{innerHTML:o})))))),y.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"6c15ad7d36590e1b93007e3786c0e0db191b4b8d",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"fae16c45b01ed1345d439c77267d1c80ce908598"},t("zonos-country-select",{key:"a6abe0661ee91ad227877ebbb5ee21253b110ea0",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7550bec8646301a4bd5afb94b79b18b62698891b"},t("zonos-language-select",{key:"da2e8007ebf7e33723baaf3bdd2818334090c81c",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};g.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;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;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{g as zonos_hello_dialog}
|