@zonos/elements 1.3.180 → 1.3.182
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-29feab56.js → cart-dcd068d1.js} +18 -3
- package/dist/cjs/index.cjs.js +8 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-e032a7fc.js → paypal-4bbc4779.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +14 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -2
- 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-elements.cjs.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.js +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +0 -10
- package/dist/collection/components/store/checkout/cart.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +17 -4
- package/dist/collection/components/utils/api/trackConversionEvent.js +18 -3
- package/dist/collection/scripts/_zonosBase.js +1 -0
- package/dist/esm/{cart-7e26e0bc.js → cart-d2c86d90.js} +18 -3
- package/dist/esm/index.js +8 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-a1a69765.js → paypal-5c0d6407.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +14 -4
- package/dist/esm/zonos-cart-items_13.entry.js +2 -9
- package/dist/esm/zonos-checkout.entry.js +9 -2
- 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-elements.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-7e26e0bc.js → cart-d2c86d90.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-a1a69765.js → paypal-5c0d6407.js} +1 -1
- package/dist/esm-es5/zonos-address_7.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-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +10 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +5 -1
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-00e5d2be.system.js +1 -0
- package/dist/zonos-elements/{p-24fd72f3.entry.js → p-09fbafe4.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8b106a5.js → p-18ec705b.js} +1 -1
- package/dist/zonos-elements/{p-ff6e291b.system.entry.js → p-1b1cdb4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dacb8c7c.entry.js → p-1cebd67c.entry.js} +1 -1
- package/dist/zonos-elements/{p-df027c13.system.entry.js → p-33de55b8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52ab67d9.system.entry.js → p-42abd4dd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/p-57af5f9c.entry.js +1 -0
- package/dist/zonos-elements/{p-797fab15.system.entry.js → p-5957eff5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b8c2c94d.entry.js → p-5a71d418.entry.js} +1 -1
- package/dist/zonos-elements/{p-9165c2c1.system.entry.js → p-5be6b837.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5cccf332.entry.js → p-5c695748.entry.js} +1 -1
- package/dist/zonos-elements/{p-ace74aa3.system.entry.js → p-5e1a782a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-797c2e00.system.entry.js → p-753811b7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-79e43df6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e21e93e9.system.js → p-91bc2187.system.js} +1 -1
- package/dist/zonos-elements/{p-5cf886fc.entry.js → p-99f17671.entry.js} +1 -1
- package/dist/zonos-elements/{p-bb1d560d.system.js → p-99f50bf3.system.js} +1 -1
- package/dist/zonos-elements/{p-f424d6b4.system.entry.js → p-9d014d94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-590f4df3.system.entry.js → p-a2368c1c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cced0000.js → p-a43fba41.js} +1 -1
- package/dist/zonos-elements/{p-b7e1254e.entry.js → p-c3f2b86c.entry.js} +1 -1
- package/dist/zonos-elements/p-d00049db.entry.js +1 -0
- package/dist/zonos-elements/{p-98715a5b.entry.js → p-e42e0cdb.entry.js} +1 -1
- package/dist/zonos-elements/{p-960140ed.entry.js → p-ff8d9f3a.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-464a3633.system.js +0 -1
- package/dist/zonos-elements/p-8f9fa09a.system.entry.js +0 -1
- package/dist/zonos-elements/p-d6eda1f8.entry.js +0 -1
- package/dist/zonos-elements/p-e5102a1d.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function r(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function s(o){try{a(n.next(o))}catch(o){i(o)}}function c(o){try{a(n["throw"](o))}catch(o){i(o)}}function a(o){o.done?t(o.value):r(o.value).then(s,c)}a((n=n.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:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(o){return function(e){return a([o,e])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(o,t)}catch(o){c=[6,o];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,i;n<r;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-4caffd96.system.js","./p-e21e93e9.system.js","./p-bb1d560d.system.js","./p-5187ba8f.system.js","./p-1b75aa35.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-e4f8114a.system.js","./p-69255ed2.system.js","./p-1aa93d1e.system.js","./p-8ee34712.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,r,i,s,c,a,u,d,l,h,f,m,v,z,p,g,w,k,b,y,C,_,x,S,O,A,T,I,P,j,L,D,E,B,U,N,R,Z,M,H,F,G,K,V,W,q,Y,J,Q,X,$,oo,eo,to,no,ro,io,so,co,ao;return{setters:[function(o){e=o.r;t=o.h;n=o.H;r=o.F},function(o){i=o.l;s=o.s;c=o.a;a=o.b;u=o.c;d=o.i;l=o.d;h=o.e;f=o.f;m=o.g;v=o.h;z=o.j;p=o.k;g=o.m;w=o.n;k=o.o;b=o.t;y=o.p;C=o.q;_=o.r;x=o.u;S=o.v;O=o.w;A=o.x;T=o.y;I=o.z;P=o.A;j=o.B;L=o.C;D=o.D;E=o.E},function(o){B=o.p;U=o.s;N=o.a;R=o.b},function(o){Z=o.z;M=o.g;H=o.m},function(o){F=o.h;G=o.l;K=o.b;V=o.s;W=o.c;q=o.d;Y=o.e;J=o.g;Q=o.j;X=o.a;$=o.i},function(o){oo=o.c},function(o){eo=o.c},function(o){to=o.g},function(o){no=o.i},function(o){ro=o.s},function(o){io=o._;so=o.c;co=o.d},function(o){ao=o.R}],execute:function(){var uo=this;var lo=function(o){var e=o.items.map((function(o){return{amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||undefined,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}};var ho=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,F("/api/zonos-elements/get-store-discount-enabled-status")];case 1:o=n.sent(),e=o.errors,t=o.json;if(e.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var fo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return true}if(i.isDisabledCountry){if(o){G("Checkout: disabled country")}return true}return false};var mo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return false}if(!i.isShippableCountry){if(o){G("Checkout: not shippable country")}return false}return true};var vo=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(uo,void 0,void 0,(function(){var o,r,i,d,l;var h=this;return __generator(this,(function(f){o=document.querySelector(e);r=s();if(!o&&r){i=document.createElement("button");i.style.display="none";i.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(i);t===null||t===void 0?void 0:t(r);n.disconnect();return[2]}d=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!d||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(h,void 0,void 0,(function(){var e,t,n,r,i,s,l;return __generator(this,(function(h){n=d.value;if(!n){return[2]}c(n);if(!mo(false)){a();return[2]}r=document.querySelector("form");if(!r){return[2]}i=new FormData(r);s=document.querySelector("input#addressLine1Input");l={address1:(e=i.get("shippingAddress.address1"))!==null&&e!==void 0?e:s&&s.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){K("One or more shipping address field is missing",Object.entries(l));void V({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:Z.storeId}});return[2]}u({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="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var zo=0;var po=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}G("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});o={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,F("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"})];case 1:e=n.sent().errors;if(e.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,o.data);zo++;if(zo>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var go=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){o=W().elapsedTime;e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:q},Y()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void F("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var wo=function(o){return __awaiter(uo,[o],void 0,(function(o){var e;var t=o.loadTime;return __generator(this,(function(o){e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:q},Y()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};void F("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var ko=function(o){return __awaiter(uo,[o],void 0,(function(o){var e,t,n,r,i;var s=o.cartId,c=o.retries;return __generator(this,(function(o){switch(o.label){case 0:e=J();return[4,F("/api/zonos-elements/get-temp-cart",{body:{isTestMode:e,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=o.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];G("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(o){return setTimeout(o,500)}))];case 2:o.sent();return[2,ko({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var bo=function(o){return __awaiter(uo,void 0,void 0,(function(){var e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:e=io(o),t=e.isDgsCartId,n=e.isLegacyCartId;if(!n&&!t){K("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,ko({cartId:o,retries:5})];case 1:r=i.sent();G("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){K("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var yo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var Co=".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}";var _o=Co;var xo=90*60*1e3;var So=6*60*60*1e3;var Oo=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||Z.appearance.theme;return[4,d({overrideBorderRadius:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:B()})];case 1:i.sent();return[2]}}))}))};this.handleCartExpiredCheck=function(){var o;if(J()){G("Not checking for cart expiration in test mode");return false}if(!Z.checkoutSettings.defaultCartExpiration||!((o=window.Zonos.cartData)===null||o===void 0?void 0:o.createdAt)){return false}var e=new Date(window.Zonos.cartData.createdAt).getTime();var n=(new Date).getTime();var r=n-e;var i=Math.floor(r/1e3);G("Cart has been created for ".concat(i/60," minutes"));if(Z.checkoutSettings.defaultCartExpiration){if(i>Z.checkoutSettings.defaultCartExpiration){t.isCartExpired=true;return true}}return false};this.checkStripePaymentIntentStatus=function(o){return __awaiter(t,[o],void 0,(function(o){var e,t,n,r,i,s,c,a,u;var d=o.triggeredButton;return __generator(this,(function(o){switch(o.label){case 0:e=d===null||d===void 0?void 0:d.matches("#".concat(so));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!e){G("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}G("Payment intent exist, checking stripe payment intent status");if(!r){G("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,l({clientSecret:r})];case 1:s=o.sent(),c=s.error,a=s.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!c){G("Payment intent is succeeded or in a good state to move forward, show success screen")}else{G("Payment intent failed, show status from error")}this.open=true;h.checkoutSessionId=i;f.clientSecret=r;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}]}if(!t){G("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}G("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.formatDate=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleDateString()};this.formatTime=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var o=h.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.overrideStagingMode=undefined;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=f.clientSecret;this.stripeCustomerSessionClientSecret=f.stripeCustomerSessionClientSecret}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void m({adjustments:h.adjustments,cartItems:e});return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;U("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&h.step==="finish"){v()}h.step="customer-info";z();p();(t=(e=Z.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,r,s,c,a,r,u,c,a,a,d,l,c,f;return __generator(this,(function(v){switch(v.label){case 0:if(!(typeof Z.checkoutSettings.createCartId==="function"))return[3,4];G('"createCartId" is provided, start building cart');return[4,Z.checkoutSettings.createCartId()];case 1:o=v.sent();e=void 0;if(typeof o==="object"){G("object detected, use cartId and prefill address from createCartId");e=o.cartId;this.useShippingDataFromCreateCartId(o.shippingData);h.customerAuthenticationToken=o.customerAuthenticationToken||null}else{e=o}window.Zonos.cartId=e;return[4,bo(e)];case 2:t=v.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){K("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=this.handleCartExpiredCheck();if(r){return[2,false]}s=lo(n),c=s.adjustments,a=s.cartItems;return[4,m({adjustments:c,cartItems:a})];case 3:v.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];G("tempCartUUID is provided, start building cart");r=this.handleCartExpiredCheck();if(r){return[2,false]}u=lo(window.Zonos.cartData),c=u.adjustments,a=u.cartItems;return[4,m({adjustments:c,cartItems:a})];case 5:v.sent();return[3,9];case 6:if(!(Z.checkoutSettings.buildCartDetail&&i.selectedCountryCode))return[3,9];G("build cart detail");return[4,Z.checkoutSettings.buildCartDetail({countryCode:i.selectedCountryCode,currencyCode:i.targetCurrency})];case 7:a=v.sent();d=a.filter((function(o){return o.amount>=0}));l=a.filter((function(o){return o.amount<0}));c=l.map((function(o){return{amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"}}));return[4,m({adjustments:c,cartItems:d})];case 8:v.sent();v.label=9;case 9:if(!!h.checkoutSessionId)return[3,11];return[4,g()];case 10:f=v.sent();G("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}v.label=11;case 11:if(!h.isStagingMode){void w()}return[4,this.applyStripeTheme()];case 12:v.sent();this.isRedirectAfterOrder=Z.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!h.externalConfirmationPageURL;return[2,true]}}))}))};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.handleOrderDuplication=function(){var o=Q(localStorage.getItem("zonos--placed-order-info"));if(!o){localStorage.removeItem("zonos--placed-order-info");return}var e=Date.now()-o.time;G("=== Existing placed order info: ".concat(o.orderId," - ").concat(this.formatDate(o.time)," - elapsed in hh:ss format: ").concat(new Date(e).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||So;if(e>t){G("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=o;G("=== Showing order duplication confirmation","warn")};o.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!h.checkoutSessionId){return}void F("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})};o.prototype.handleCancelOrderDuplication=function(){var o;this.placedOrderInfo=null;if(this.isLegacyCheckout){var e=((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||Z.onlineStoreSettings.url;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}void this.closeDialogHandler({confirmed:true})};o.prototype.attachCheckout=function(){var o=this;var e=Z.checkoutSettings.placeOrderButtonSelector;G("attach checkout ".concat(e));if(!e&&!window.Zonos.cartData){return}var t=[e,"#".concat(co),"#".concat(so)].filter(Boolean);var n=document.querySelectorAll(t.join(","));n.forEach((function(t){var n=t.getAttribute("data-zonos-checkout-attached");if(n){return}G("attached event to button ".concat(e),"info",{button:t});t.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t,n,r,i,s,c,a,u;return __generator(this,(function(d){switch(d.label){case 0:t=performance.now();if(!window.Zonos.isLegacyCheckout&&(!mo()||fo())){return[2]}e.preventDefault();e.stopPropagation();G("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:e.target})];case 1:n=d.sent().shouldAllowOrder;if(!n){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void po()}),2e3)}f.isFetchingSession=true;this.open=true;d.label=2;case 2:d.trys.push([2,5,,6]);return[4,this.buildCartAndInit()];case 3:r=d.sent();if(this.isCartExpired){throw new Error("This shopping cart is expired")}if(!r){throw new Error("Error building cart")}k({isPreview:this.preview,sessionTimeout:xo});U("zonos-checkout-start");i=h.checkoutSessionId;void b({checkoutSessionId:i,eventName:"checkout_open"});return[4,ho()];case 4:s=d.sent().enabled;h.shouldHideDiscountInput=!s;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void go()}else{c=performance.now();a=c-t;void wo({loadTime:a})}return[3,6];case 5:u=d.sent();f.isFetchingSession=false;K(u);if(this.isCartExpired){return[2]}void V({endpoint:"Error creating Checkout",errors:[u instanceof Error?u.toString():"Unknown error"],metadata:{allLogs:q,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||Z.onlineStoreSettings.url}});C({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,6];case 6:return[2]}}))}))}),{capture:true,passive:false});if(!Z.checkoutSettings.disablePlaceOrderButtonActivation){t.removeAttribute("disabled")}t.setAttribute("data-zonos-checkout-attached","true");if(t.matches(co)){t.dispatchEvent(eo("click"));a();t.remove()}if(t.matches("#".concat(so))){t.dispatchEvent(eo("click"));t.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useShippingDataFromCreateCartId=function(o){if(!o){return}G("shipping data from createCartId result","info",Object.entries(o));var e=o.customerAddress1,t=o.customerAddress2,n=o.customerCity,r=o.customerCountry,s=o.customerEmail,c=o.customerName,a=o.customerPhone,u=o.customerState,d=o.customerZip;var l=new URLSearchParams(window.location.search);var h=r||x(l)||i.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:s,customerName:c,customerPhone:a,customerState:u,customerZip:d})};o.prototype.useLegacyQueryParams=function(){var o=new URLSearchParams(window.location.search);G("legacy urlParams","info",Object.fromEntries(o.entries()));var e=function(e){var t=o.get(e);if(!t||t==="undefined"){return null}return t};var t=x(o)||i.selectedCountryCode;var n=e("customerCity");var r=e("customerEmail");var s=e("customerAddress1");var c=e("customerAddress2");var a=e("customerName");var u=e("customerPhone");var d=e("customerZip");var l=e("customerState");this.applyPrefillAddress({customerAddress1:s,customerAddress2:c,customerCity:n,customerCountry:t,customerEmail:r,customerName:a,customerPhone:u,customerState:l,customerZip:d})};o.prototype.applyPrefillAddress=function(o){var e=o.customerAddress1||"";var t=o.customerCountry||"";var n=o.customerAddress2||"";var r=o.customerCity||"";var s=o.customerEmail||"";var c=o.customerName||"";var a=o.customerPhone||"";var u=o.customerZip||"";var d=o.customerState||"";if(!e||!c||!a||!t){G("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&i.shippingZoneCountries&&!(t in i.shippingZoneCountries)){G('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:e,line2:n,postal_code:u,state:d},email:s,name:c,phone:a}];G("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})};o.prototype.overrideStagingModeChanged=function(){h.isStagingMode=!!this.overrideStagingMode};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){f.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;h.isStagingMode=X();if(typeof this.overrideStagingMode!=="undefined"){h.isStagingMode=this.overrideStagingMode}vo({domesticRedirectedBtnSelector:co,onShippingAddressSessionFound:function(o){e.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}o=setInterval((function(){f.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){G("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}G("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){e.attachCheckout()}else if(window){e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){h.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.mockCheckoutSession=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){S(o);return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.submitLoading=true;return[4,O()];case 1:t.sent();o=setInterval((function(){if(h.landedCostData||!f.isFetchingLandedCost){if(h.landedCostData){void N({currency:h.currency});A()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){A();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogConfirm=function(){h.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};o.prototype.handleCartExpiredDialogConfirm=function(){var o;this.isCartExpired=false;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=f.checkoutSettlementCurrency==="USD";if(o&&f.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;R.paypalErrorMessage=null;f.hasPaymentError=false;this.submitLoading=true;h.inventoryCheckErrorMessage=null;return[4,T()];case 1:e=i.sent();if(!e){f.hasPaymentError=true;f.customErrorMessage=_("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:f.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=h;return[4,I()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();h.inventoryCheckErrorMessage=_("Unable to check inventory. Please try again.");return[3,5];case 5:if(h.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,P()];case 7:i.sent();A();p();return[3,9];case 8:r=i.sent();K(r);U("zonos-checkout-payment-fail");f.hasPaymentError=true;if(f.shouldInventoryRefund){void j();f.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n;return __generator(this,(function(r){switch(r.label){case 0:L();if(!this.preview)return[3,2];h.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:v();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){o=window.Zonos.cartData.storeBaseUrl||Z.onlineStoreSettings.url;if(window.parent){window.parent.location.href=o}window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=$(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=$(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=M(this.appearanceSettingsOverride.theme)}};o.prototype.handleAddressChange=function(){L()};o.prototype.handleCustomerProfileChange=function(){var o,e;if(!this.customerProfile){G("No customer profile","info");this.defaultCustomerProfileAddress=[];return}G("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((e=(o=f.customerProfile)===null||o===void 0?void 0:o.locations)===null||e===void 0?void 0:e.map((function(o){var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||((e=f.customerProfile)===null||e===void 0?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]};o.prototype.handleClientSecretChange=function(){G("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};o.prototype.handleOpenChange=function(){var o="data-zonos-overflow-origin";var e=document.body;var t=document.documentElement;if(this.open){if(e.style.overflow){e.setAttribute(o,e.style.overflow)}e.style.overflow="hidden";if(t.style.overflow){t.setAttribute(o,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=e.getAttribute(o);var r=t.getAttribute(o);if(n){e.removeAttribute(o);e.style.overflow=n}else{e.style.removeProperty("overflow")}if(r){t.removeAttribute(o);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=$(this.mobile);this.isIframed=window.self!==window.top;G("iframed: ".concat(this.isIframed));this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=D("selectedLocale",(function(){void o.applyStripeTheme()}));G("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){L();v();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e,s,c,a;this.customerProfile=f.customerProfile;this.clientSecret=f.clientSecret;if(f.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=f.stripeCustomerSessionClientSecret}var u=h.step!=="finish"&&h.step!=="error"&&!f.stripeElements||f.isFetchingSession;var d=H(Z.appearance,this.appearanceSettingsOverride||null),l=d.colorPrimary,m=d.colorSecondary,v=d.logoUrl,z=d.style;var p=Z.appearance.zonosAttribution==="ENABLED";var g=Z.appearance.theme;var w=l&&no(l)?"DARK":"LIGHT";var k=this.isMobile?g:w;var b=!this.isMobile?m:undefined;var y=i.customMessages;var C=(e=y.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var x=this.getCurrentLocalePageEnum();var S=y.filter((function(o){return o.pageName===x}));var O=this.getBaseCurrencySettlementInfo();var A=function(){var e=o.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(Z.organizationName," logo"),src:e}))};var T=J();var I=function(){var e=new URLSearchParams(window.location.search);var n=e.get("zonosQaUrl");var r=e.get("zonosDebug");var i=e.get("zonosE2ETest");var s=o.overrideStagingMode||X();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},A(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},_("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},_("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),S.map((function(o){return t("zonos-custom-message",{icon:yo,message:o.message})})))};var P=function(){if(h.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:_("Your checkout session has expired. Please reload the page to continue."),restStateTitle:_("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},_("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":to({overrideBorderStyle:z})}},h.step!=="finish"&&h.step!=="error"&&t(r,null,t("div",{class:"zonos--left","data-theme":k,style:ro({"--zonos--primary-color":!o.isMobile?l:undefined})},!o.isMobile&&I(),h.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.getDefaultAddress(),isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:b}),h.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:b}),h.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,isMobile:o.isMobile,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))},submitBtnColor:b})),t("div",{class:"zonos--right","data-theme":g},o.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:b}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:yo,message:C})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:yo,message:C}))))),(h.step==="finish"||h.step==="error")&&t("div",{class:"zonos--done","data-theme":g},t("div",{class:"zonos--header"},A(),!o.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:g})),t("zonos-checkout-finish",{borderRadius:z,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:h.step==="error"&&!!h.error?Object.assign(Object.assign({},h.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":g,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(n,{class:oo(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?P():t("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},P()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:_("Don't close"),dialogConfirmBtnText:_("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:_("Would you like to close checkout and return to the site?"),dialogTitle:_("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:_("Return to merchant site"),dialogConfirmBtnText:_("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((s=this.placedOrderInfo)===null||s===void 0?void 0:s.zonosOrderNumber)?_("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)}):_("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(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:_("Are you sure?"),dialogWidth:530,onCancelClicked:function(){o.handleCancelOrderDuplication()},onConfirmClicked:function(){o.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:_("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:_("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}),O&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:_("Cancel"),dialogConfirmBtnText:_("Pay [orderTotal]",{orderTotal:E({amount:O.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:_("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:_("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:_("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:_("You are being sent back to the shop to re-add items to your cart."),dialogTitle:_("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return o.handleCartExpiredDialogConfirm()}}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return o}());Oo.style=_o}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function r(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function s(o){try{a(n.next(o))}catch(o){i(o)}}function c(o){try{a(n["throw"](o))}catch(o){i(o)}}function a(o){o.done?t(o.value):r(o.value).then(s,c)}a((n=n.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:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(o){return function(e){return a([o,e])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(o,t)}catch(o){c=[6,o];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,i;n<r;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-4caffd96.system.js","./p-91bc2187.system.js","./p-99f50bf3.system.js","./p-5187ba8f.system.js","./p-1b75aa35.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-e4f8114a.system.js","./p-69255ed2.system.js","./p-1aa93d1e.system.js","./p-8ee34712.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,r,i,s,c,a,u,d,l,h,f,m,v,z,p,g,w,k,b,y,C,_,x,S,O,A,I,T,P,j,L,D,E,B,U,N,R,Z,M,H,F,G,K,V,W,q,Y,J,Q,X,$,oo,eo,to,no,ro,io,so,co,ao;return{setters:[function(o){e=o.r;t=o.h;n=o.H;r=o.F},function(o){i=o.l;s=o.s;c=o.a;a=o.b;u=o.c;d=o.i;l=o.d;h=o.e;f=o.f;m=o.g;v=o.h;z=o.j;p=o.k;g=o.m;w=o.n;k=o.o;b=o.t;y=o.p;C=o.q;_=o.r;x=o.u;S=o.v;O=o.w;A=o.x;I=o.y;T=o.z;P=o.A;j=o.B;L=o.C;D=o.D;E=o.E},function(o){B=o.p;U=o.s;N=o.a;R=o.b},function(o){Z=o.z;M=o.g;H=o.m},function(o){F=o.h;G=o.l;K=o.b;V=o.s;W=o.c;q=o.d;Y=o.e;J=o.g;Q=o.j;X=o.a;$=o.i},function(o){oo=o.c},function(o){eo=o.c},function(o){to=o.g},function(o){no=o.i},function(o){ro=o.s},function(o){io=o._;so=o.c;co=o.d},function(o){ao=o.R}],execute:function(){var uo=this;var lo=function(o){var e=o.items.map((function(o){return{amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||undefined,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}};var ho=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,F("/api/zonos-elements/get-store-discount-enabled-status")];case 1:o=n.sent(),e=o.errors,t=o.json;if(e.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var fo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return true}if(i.isDisabledCountry){if(o){G("Checkout: disabled country")}return true}return false};var mo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return false}if(!i.isShippableCountry){if(o){G("Checkout: not shippable country")}return false}return true};var vo=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(uo,void 0,void 0,(function(){var o,r,i,d,l;var h=this;return __generator(this,(function(f){o=document.querySelector(e);r=s();if(!o&&r){i=document.createElement("button");i.style.display="none";i.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(i);t===null||t===void 0?void 0:t(r);n.disconnect();return[2]}d=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!d||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(h,void 0,void 0,(function(){var e,t,n,r,i,s,l;return __generator(this,(function(h){n=d.value;if(!n){return[2]}c(n);if(!mo(false)){a();return[2]}r=document.querySelector("form");if(!r){return[2]}i=new FormData(r);s=document.querySelector("input#addressLine1Input");l={address1:(e=i.get("shippingAddress.address1"))!==null&&e!==void 0?e:s&&s.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){K("One or more shipping address field is missing",Object.entries(l));void V({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:Z.storeId}});return[2]}u({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="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var zo=0;var po=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}G("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});o={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,F("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"})];case 1:e=n.sent().errors;if(e.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,o.data);zo++;if(zo>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var go=function(){return __awaiter(uo,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){o=W().elapsedTime;e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:q},Y()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void F("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var wo=function(o){return __awaiter(uo,[o],void 0,(function(o){var e;var t=o.loadTime;return __generator(this,(function(o){e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:q},Y()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};void F("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var ko=function(o){return __awaiter(uo,[o],void 0,(function(o){var e,t,n,r,i;var s=o.cartId,c=o.retries;return __generator(this,(function(o){switch(o.label){case 0:e=J();return[4,F("/api/zonos-elements/get-temp-cart",{body:{isTestMode:e,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=o.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];G("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(o){return setTimeout(o,500)}))];case 2:o.sent();return[2,ko({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var bo=function(o){return __awaiter(uo,void 0,void 0,(function(){var e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:e=io(o),t=e.isDgsCartId,n=e.isLegacyCartId;if(!n&&!t){K("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,ko({cartId:o,retries:5})];case 1:r=i.sent();G("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){K("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var yo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var Co=".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}";var _o=Co;var xo=90*60*1e3;var So=6*60*60*1e3;var Oo=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||Z.appearance.theme;return[4,d({overrideBorderRadius:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:B()})];case 1:i.sent();return[2]}}))}))};this.handleCartExpiredCheck=function(){var o;if(J()){G("Not checking for cart expiration in test mode");return false}if(!Z.checkoutSettings.defaultCartExpiration||!((o=window.Zonos.cartData)===null||o===void 0?void 0:o.createdAt)){return false}var e=new Date(window.Zonos.cartData.createdAt).getTime();var n=(new Date).getTime();var r=n-e;var i=Math.floor(r/1e3);G("Cart has been created for ".concat(i/60," minutes"));if(Z.checkoutSettings.defaultCartExpiration){if(i>Z.checkoutSettings.defaultCartExpiration){t.isCartExpired=true;return true}}return false};this.checkStripePaymentIntentStatus=function(o){return __awaiter(t,[o],void 0,(function(o){var e,t,n,r,i,s,c,a,u;var d=o.triggeredButton;return __generator(this,(function(o){switch(o.label){case 0:e=d===null||d===void 0?void 0:d.matches("#".concat(so));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!e){G("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}G("Payment intent exist, checking stripe payment intent status");if(!r){G("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,l({clientSecret:r})];case 1:s=o.sent(),c=s.error,a=s.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!c){G("Payment intent is succeeded or in a good state to move forward, show success screen")}else{G("Payment intent failed, show status from error")}this.open=true;h.checkoutSessionId=i;f.clientSecret=r;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}]}if(!t){G("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}G("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.formatDate=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleDateString()};this.formatTime=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var o=h.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.overrideStagingMode=undefined;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=f.clientSecret;this.stripeCustomerSessionClientSecret=f.stripeCustomerSessionClientSecret}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void m({adjustments:h.adjustments,cartItems:e});return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;U("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&h.step==="finish"){v()}h.step="customer-info";z();p();(t=(e=Z.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,r,s,c,a,r,u,c,a,a,d,l,c,f;return __generator(this,(function(v){switch(v.label){case 0:if(!(typeof Z.checkoutSettings.createCartId==="function"))return[3,4];G('"createCartId" is provided, start building cart');return[4,Z.checkoutSettings.createCartId()];case 1:o=v.sent();e=void 0;if(typeof o==="object"){G("object detected, use cartId and prefill address from createCartId");e=o.cartId;this.useShippingDataFromCreateCartId(o.shippingData);h.customerAuthenticationToken=o.customerAuthenticationToken||null}else{e=o}window.Zonos.cartId=e;return[4,bo(e)];case 2:t=v.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){K("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=this.handleCartExpiredCheck();if(r){return[2,false]}s=lo(n),c=s.adjustments,a=s.cartItems;return[4,m({adjustments:c,cartItems:a})];case 3:v.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];G("tempCartUUID is provided, start building cart");r=this.handleCartExpiredCheck();if(r){return[2,false]}u=lo(window.Zonos.cartData),c=u.adjustments,a=u.cartItems;return[4,m({adjustments:c,cartItems:a})];case 5:v.sent();return[3,9];case 6:if(!(Z.checkoutSettings.buildCartDetail&&i.selectedCountryCode))return[3,9];G("build cart detail");return[4,Z.checkoutSettings.buildCartDetail({countryCode:i.selectedCountryCode,currencyCode:i.targetCurrency})];case 7:a=v.sent();d=a.filter((function(o){return o.amount>=0}));l=a.filter((function(o){return o.amount<0}));c=l.map((function(o){return{amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"}}));return[4,m({adjustments:c,cartItems:d})];case 8:v.sent();v.label=9;case 9:if(!!h.checkoutSessionId)return[3,11];return[4,g()];case 10:f=v.sent();G("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}v.label=11;case 11:if(!h.isStagingMode){void w()}return[4,this.applyStripeTheme()];case 12:v.sent();this.isRedirectAfterOrder=Z.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!h.externalConfirmationPageURL;return[2,true]}}))}))};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.handleOrderDuplication=function(){var o=Q(localStorage.getItem("zonos--placed-order-info"));if(!o){localStorage.removeItem("zonos--placed-order-info");return}var e=Date.now()-o.time;G("=== Existing placed order info: ".concat(o.orderId," - ").concat(this.formatDate(o.time)," - elapsed in hh:ss format: ").concat(new Date(e).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||So;if(e>t){G("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=o;G("=== Showing order duplication confirmation","warn")};o.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!h.checkoutSessionId){return}void F("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})};o.prototype.handleCancelOrderDuplication=function(){var o;this.placedOrderInfo=null;if(this.isLegacyCheckout){var e=((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||Z.onlineStoreSettings.url;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}void this.closeDialogHandler({confirmed:true})};o.prototype.attachCheckout=function(){var o=this;var e=Z.checkoutSettings.placeOrderButtonSelector;G("attach checkout ".concat(e));if(!e&&!window.Zonos.cartData){return}var t=[e,"#".concat(co),"#".concat(so)].filter(Boolean);var n=document.querySelectorAll(t.join(","));n.forEach((function(t){var n=t.getAttribute("data-zonos-checkout-attached");if(n){return}G("attached event to button ".concat(e),"info",{button:t});t.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t,n,r,i,s,c,a,u;return __generator(this,(function(d){switch(d.label){case 0:t=performance.now();if(!window.Zonos.isLegacyCheckout&&(!mo()||fo())){return[2]}e.preventDefault();e.stopPropagation();G("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:e.target})];case 1:n=d.sent().shouldAllowOrder;if(!n){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void po()}),2e3)}f.isFetchingSession=true;this.open=true;d.label=2;case 2:d.trys.push([2,5,,6]);return[4,this.buildCartAndInit()];case 3:r=d.sent();if(this.isCartExpired){throw new Error("This shopping cart is expired")}if(!r){throw new Error("Error building cart")}k({isPreview:this.preview,sessionTimeout:xo});U("zonos-checkout-start");i=h.checkoutSessionId;void b({checkoutSessionId:i,eventName:"checkout_open"});return[4,ho()];case 4:s=d.sent().enabled;h.shouldHideDiscountInput=!s;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void go()}else{c=performance.now();a=c-t;void wo({loadTime:a})}return[3,6];case 5:u=d.sent();f.isFetchingSession=false;K(u);if(this.isCartExpired){return[2]}void V({endpoint:"Error creating Checkout",errors:[u instanceof Error?u.toString():"Unknown error"],metadata:{allLogs:q,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||Z.onlineStoreSettings.url}});C({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,6];case 6:return[2]}}))}))}),{capture:true,passive:false});if(!Z.checkoutSettings.disablePlaceOrderButtonActivation){t.removeAttribute("disabled")}t.setAttribute("data-zonos-checkout-attached","true");if(t.matches(co)){t.dispatchEvent(eo("click"));a();t.remove()}if(t.matches("#".concat(so))){t.dispatchEvent(eo("click"));t.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useShippingDataFromCreateCartId=function(o){if(!o){return}G("shipping data from createCartId result","info",Object.entries(o));var e=o.customerAddress1,t=o.customerAddress2,n=o.customerCity,r=o.customerCountry,s=o.customerEmail,c=o.customerName,a=o.customerPhone,u=o.customerState,d=o.customerZip;var l=new URLSearchParams(window.location.search);var h=r||x(l)||i.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:s,customerName:c,customerPhone:a,customerState:u,customerZip:d})};o.prototype.useLegacyQueryParams=function(){var o=new URLSearchParams(window.location.search);G("legacy urlParams","info",Object.fromEntries(o.entries()));var e=function(e){var t=o.get(e);if(!t||t==="undefined"){return null}return t};var t=x(o)||i.selectedCountryCode;var n=e("customerCity");var r=e("customerEmail");var s=e("customerAddress1");var c=e("customerAddress2");var a=e("customerName");var u=e("customerPhone");var d=e("customerZip");var l=e("customerState");this.applyPrefillAddress({customerAddress1:s,customerAddress2:c,customerCity:n,customerCountry:t,customerEmail:r,customerName:a,customerPhone:u,customerState:l,customerZip:d})};o.prototype.applyPrefillAddress=function(o){var e=o.customerAddress1||"";var t=o.customerCountry||"";var n=o.customerAddress2||"";var r=o.customerCity||"";var s=o.customerEmail||"";var c=o.customerName||"";var a=o.customerPhone||"";var u=o.customerZip||"";var d=o.customerState||"";if(!e||!c||!a||!t){G("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&i.shippingZoneCountries&&!(t in i.shippingZoneCountries)){G('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:e,line2:n,postal_code:u,state:d},email:s,name:c,phone:a}];G("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})};o.prototype.overrideStagingModeChanged=function(){h.isStagingMode=!!this.overrideStagingMode};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){f.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;h.isStagingMode=X();if(typeof this.overrideStagingMode!=="undefined"){h.isStagingMode=this.overrideStagingMode}vo({domesticRedirectedBtnSelector:co,onShippingAddressSessionFound:function(o){e.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}o=setInterval((function(){f.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){G("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}G("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){e.attachCheckout()}else if(window){e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){h.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.mockCheckoutSession=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){S(o);return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;var t=this;return __generator(this,(function(n){switch(n.label){case 0:U("zonos-checkout-customer-info");o=h.checkoutSessionId;void b({checkoutSessionId:o,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,O()];case 1:n.sent();e=setInterval((function(){if(h.landedCostData||!f.isFetchingLandedCost){if(h.landedCostData){void N({currency:h.currency});A()}t.submitLoading=false;clearInterval(e)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){A();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogConfirm=function(){h.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};o.prototype.handleCartExpiredDialogConfirm=function(){var o;this.isCartExpired=false;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=f.checkoutSettlementCurrency==="USD";if(o&&f.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;R.paypalErrorMessage=null;f.hasPaymentError=false;this.submitLoading=true;h.inventoryCheckErrorMessage=null;return[4,I()];case 1:e=i.sent();if(!e){f.hasPaymentError=true;f.customErrorMessage=_("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:f.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=h;return[4,T()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();h.inventoryCheckErrorMessage=_("Unable to check inventory. Please try again.");return[3,5];case 5:if(h.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,P()];case 7:i.sent();A();p();return[3,9];case 8:r=i.sent();K(r);U("zonos-checkout-payment-fail");f.hasPaymentError=true;if(f.shouldInventoryRefund){void j();f.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n;return __generator(this,(function(r){switch(r.label){case 0:L();if(!this.preview)return[3,2];h.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:v();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){o=window.Zonos.cartData.storeBaseUrl||Z.onlineStoreSettings.url;if(window.parent){window.parent.location.href=o}window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=$(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=$(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=M(this.appearanceSettingsOverride.theme)}};o.prototype.handleAddressChange=function(){L()};o.prototype.handleCustomerProfileChange=function(){var o,e;if(!this.customerProfile){G("No customer profile","info");this.defaultCustomerProfileAddress=[];return}G("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((e=(o=f.customerProfile)===null||o===void 0?void 0:o.locations)===null||e===void 0?void 0:e.map((function(o){var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||((e=f.customerProfile)===null||e===void 0?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]};o.prototype.handleClientSecretChange=function(){G("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};o.prototype.handleOpenChange=function(){var o="data-zonos-overflow-origin";var e=document.body;var t=document.documentElement;if(this.open){if(e.style.overflow){e.setAttribute(o,e.style.overflow)}e.style.overflow="hidden";if(t.style.overflow){t.setAttribute(o,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=e.getAttribute(o);var r=t.getAttribute(o);if(n){e.removeAttribute(o);e.style.overflow=n}else{e.style.removeProperty("overflow")}if(r){t.removeAttribute(o);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=$(this.mobile);this.isIframed=window.self!==window.top;G("iframed: ".concat(this.isIframed));this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=D("selectedLocale",(function(){void o.applyStripeTheme()}));G("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){L();v();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e,s,c,a;this.customerProfile=f.customerProfile;this.clientSecret=f.clientSecret;if(f.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=f.stripeCustomerSessionClientSecret}var u=h.step!=="finish"&&h.step!=="error"&&!f.stripeElements||f.isFetchingSession;var d=H(Z.appearance,this.appearanceSettingsOverride||null),l=d.colorPrimary,m=d.colorSecondary,v=d.logoUrl,z=d.style;var p=Z.appearance.zonosAttribution==="ENABLED";var g=Z.appearance.theme;var w=l&&no(l)?"DARK":"LIGHT";var k=this.isMobile?g:w;var b=!this.isMobile?m:undefined;var y=i.customMessages;var C=(e=y.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var x=this.getCurrentLocalePageEnum();var S=y.filter((function(o){return o.pageName===x}));var O=this.getBaseCurrencySettlementInfo();var A=function(){var e=o.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(Z.organizationName," logo"),src:e}))};var I=J();var T=function(){var e=new URLSearchParams(window.location.search);var n=e.get("zonosQaUrl");var r=e.get("zonosDebug");var i=e.get("zonosE2ETest");var s=o.overrideStagingMode||X();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},A(),I&&t("zonos-badge",{badgeColor:"orange",size:"small"},_("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},_("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),S.map((function(o){return t("zonos-custom-message",{icon:yo,message:o.message})})))};var P=function(){if(h.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:_("Your checkout session has expired. Please reload the page to continue."),restStateTitle:_("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},_("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":to({overrideBorderStyle:z})}},h.step!=="finish"&&h.step!=="error"&&t(r,null,t("div",{class:"zonos--left","data-theme":k,style:ro({"--zonos--primary-color":!o.isMobile?l:undefined})},!o.isMobile&&T(),h.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.getDefaultAddress(),isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:b}),h.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:b}),h.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,isMobile:o.isMobile,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))},submitBtnColor:b})),t("div",{class:"zonos--right","data-theme":g},o.isMobile&&T(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:b}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:yo,message:C})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:yo,message:C}))))),(h.step==="finish"||h.step==="error")&&t("div",{class:"zonos--done","data-theme":g},t("div",{class:"zonos--header"},A(),!o.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:g})),t("zonos-checkout-finish",{borderRadius:z,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:h.step==="error"&&!!h.error?Object.assign(Object.assign({},h.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":g,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(n,{class:oo(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?P():t("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},P()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:_("Don't close"),dialogConfirmBtnText:_("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:_("Would you like to close checkout and return to the site?"),dialogTitle:_("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:_("Return to merchant site"),dialogConfirmBtnText:_("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((s=this.placedOrderInfo)===null||s===void 0?void 0:s.zonosOrderNumber)?_("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)}):_("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(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:_("Are you sure?"),dialogWidth:530,onCancelClicked:function(){o.handleCancelOrderDuplication()},onConfirmClicked:function(){o.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:_("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:_("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}),O&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:_("Cancel"),dialogConfirmBtnText:_("Pay [orderTotal]",{orderTotal:E({amount:O.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:_("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:_("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:_("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:_("You are being sent back to the shop to re-add items to your cart."),dialogTitle:_("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return o.handleCartExpiredDialogConfirm()}}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return o}());Oo.style=_o}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o,H as s}from"./p-ab68ad11.js";import{W as t,r as a,l as n}from"./p-
|
|
1
|
+
import{r as e,h as o,H as s}from"./p-ab68ad11.js";import{W as t,r as a,l as n}from"./p-18ec705b.js";import{d as l}from"./p-30fdcbee.js";import{l as i}from"./p-97aceb11.js";import"./p-0fc02cde.js";import"./p-98aa88b1.js";import"./p-a1cfbd0a.js";const c=class{constructor(o){e(this,o),this.languageSelected=e=>{t(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(s,{key:"cc711dba7371852eab6e20994389ae3b95bb3be7",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("div",{key:"47135e2b7363a3179139a7b8e23cb22435ce3299",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"3bf830e585fa6478f560c57dfa978721af47ad19",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"f693b231755087ec849f5a759b2dc43e2695b24f",class:"zonos--language-select-content"},i.map((s=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(s.code)},o("zonos-text",{textColor:"gray-800"},s.translatedLabel),s.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};c.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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const d=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(s,{key:"15035421483b079dde47eeb3ddcb4dcc6edffae4",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("zonos-v-stack",{key:"bf1bbdb1bb8a62841616893d8e9005002772adc4",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"a2593795816ceb851489c386231a1b90e6dd6261",class:"zonos--select-dialog-header"},o("zonos-text",{key:"e91d4a54ac0deb073c30272c5e9626168fea52b7",type:"boldLabel"},this.label),o("zonos-button",{key:"e8fdf75686b33e9958f64925ddf95fb5c89d74bb",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select 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>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"ede6d09a4f6900419bf16df0ca8a2b79882bf266"})))}};d.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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{c as zonos_language_select,d as zonos_select_dialog_header}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-4caffd96.system.js","./p-
|
|
1
|
+
System.register(["./p-4caffd96.system.js","./p-91bc2187.system.js","./p-5187ba8f.system.js","./p-c9e433c0.system.js","./p-1b75aa35.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){s=e.W;a=e.r;l=e.l},function(e){i=e.d},function(e){c=e.l},function(){},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.languageSelected=function(e){void s(e);t.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var o=l.selectedLocale;return t(n,{key:"cc711dba7371852eab6e20994389ae3b95bb3be7",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"47135e2b7363a3179139a7b8e23cb22435ce3299",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"3bf830e585fa6478f560c57dfa978721af47ad19",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"f693b231755087ec849f5a759b2dc43e2695b24f",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<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 u=":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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var b=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"15035421483b079dde47eeb3ddcb4dcc6edffae4",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"bf1bbdb1bb8a62841616893d8e9005002772adc4",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"a2593795816ceb851489c386231a1b90e6dd6261",class:"zonos--select-dialog-header"},t("zonos-text",{key:"e91d4a54ac0deb073c30272c5e9626168fea52b7",type:"boldLabel"},this.label),t("zonos-button",{key:"e8fdf75686b33e9958f64925ddf95fb5c89d74bb",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"ede6d09a4f6900419bf16df0ca8a2b79882bf266"})))};return e}());b.style=p}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-5187ba8f.system.js","./p-e21e93e9.system.js","./p-23e7c655.system.js","./p-1b75aa35.system.js","./p-bc7bf53e.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(e){"use strict";var o,t,n,i,r,s,l,a,h,d,u,f,c,v,w,m,g,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){i=e._;r=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.l;f=e.G;c=e.r;v=e.u;w=e.I;m=e.J;g=e.K;p=e.L;z=e.E},function(e){b=e.c},function(e){x=e.h;y=e.b;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=i;var O=function(){return T.Date.now()};var E=O;var S=/\s/;function j(e){var o=e.length;while(o--&&S.test(e.charAt(o))){}return o}var I=j;var D=I;var X=/^\s+/;function C(e){return e?e.slice(0,D(e)+1).replace(X,""):e}var A=C;var B=r,M=s;var R="[object Symbol]";function F(e){return typeof e=="symbol"||M(e)&&B(e)==R}var H=F;var N=A,P=l,W=H;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if(W(e)){return $}if(P(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=P(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=N(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):U.test(e)?$:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,i,r,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oe(Z(t.maxWait)||0,o):r;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,r=i;n=i=undefined;h=o;s=e.apply(r,t);return s}function v(e){h=e;l=setTimeout(g,o);return d?c(e):s}function w(e){var t=e-a,n=e-h,i=o-t;return u?te(i,r-n):i}function m(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=r}function g(){var e=V();if(m(e)){return p(e)}l=setTimeout(g,w(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=i=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=i=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=m(e);n=arguments;i=this;a=e;if(t){if(l===undefined){return v(a)}if(u){clearTimeout(l);l=setTimeout(g,o);return c(a)}}if(l===undefined){l=setTimeout(g,o)}return s}x.cancel=z;x.flush=b;return x}var ie=ne;var re=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,i,r;var s=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,x("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,r=n.json;if(i.length||!r){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!e.length){return[2,[]]}o=u.selectedCountryCode;if(!o){y("Hello could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,re({items:t,shipFrom:"AD",shipTo:o})];case 1:n=r.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,i]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(i)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){k("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&f(r)&&document.querySelectorAll(r)||[];var h=i&&f(i)&&document.querySelectorAll(i)||[];if(l.length!==h.length){k("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&f(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){k('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var v=0;v<l.length;v++){var w=l[v];var m=h[v];var g=u[v];if(w&&m){var p={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=w.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(p)}}return c};var de=":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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .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-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ue=de;var fe=3e3;var ce=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=c("click to learn more");var i=a.currentHelloPage==="productDetail"?c("Restricted item"):c("Restricted items found");return"".concat(i," - ").concat(n)}switch(a.currentHelloPage){case"cart":return c("Prepay duties and taxes at checkout");case"productList":case"productDetail":return c("See duty and tax thresholds");default:return c("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=r.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=ie((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==u.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(u.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!u.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!u.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return u.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(u.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,u.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!u.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}m();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,g(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(u.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=a.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this.mobileLocationOverride||a.helloSettings.mobileLocation;var o=a.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"));var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!e}}default:case!t:{var r=!a.helloSettings.anchorElementSelector&&!!o;var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var r=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(r){k("Hello is excluded on this url","warn");return null}var s=u.selectedCountryCode,l=u.targetCurrency;var h=this.getHelloLocation(),f=h.isOnLeft,c=h.isOnTop,v=h.shouldFloat;var w=d(a.appearance,this.appearanceSettingsOverride||null);var m=w.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":m},p&&t("div",{class:b(["zonos--hello-wrapper",v&&"zonos--hello-widget-float"])},t("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",f&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",v&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",v&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());ce.style=ue}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-5187ba8f.system.js","./p-91bc2187.system.js","./p-23e7c655.system.js","./p-1b75aa35.system.js","./p-bc7bf53e.system.js","./p-69255ed2.system.js","./p-e4f8114a.system.js"],(function(e){"use strict";var o,t,n,i,r,s,l,a,h,d,u,f,c,v,w,m,g,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){i=e._;r=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.l;f=e.G;c=e.r;v=e.u;w=e.I;m=e.J;g=e.K;p=e.L;z=e.E},function(e){b=e.c},function(e){x=e.h;y=e.b;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=i;var O=function(){return T.Date.now()};var E=O;var S=/\s/;function j(e){var o=e.length;while(o--&&S.test(e.charAt(o))){}return o}var I=j;var D=I;var X=/^\s+/;function C(e){return e?e.slice(0,D(e)+1).replace(X,""):e}var A=C;var B=r,M=s;var R="[object Symbol]";function F(e){return typeof e=="symbol"||M(e)&&B(e)==R}var H=F;var N=A,P=l,W=H;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if(W(e)){return $}if(P(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=P(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=N(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):U.test(e)?$:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,i,r,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oe(Z(t.maxWait)||0,o):r;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,r=i;n=i=undefined;h=o;s=e.apply(r,t);return s}function v(e){h=e;l=setTimeout(g,o);return d?c(e):s}function w(e){var t=e-a,n=e-h,i=o-t;return u?te(i,r-n):i}function m(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=r}function g(){var e=V();if(m(e)){return p(e)}l=setTimeout(g,w(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=i=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=i=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=m(e);n=arguments;i=this;a=e;if(t){if(l===undefined){return v(a)}if(u){clearTimeout(l);l=setTimeout(g,o);return c(a)}}if(l===undefined){l=setTimeout(g,o)}return s}x.cancel=z;x.flush=b;return x}var ie=ne;var re=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,i,r;var s=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,x("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,r=n.json;if(i.length||!r){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!e.length){return[2,[]]}o=u.selectedCountryCode;if(!o){y("Hello could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,re({items:t,shipFrom:"AD",shipTo:o})];case 1:n=r.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,i]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(i)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){k("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&f(r)&&document.querySelectorAll(r)||[];var h=i&&f(i)&&document.querySelectorAll(i)||[];if(l.length!==h.length){k("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&f(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){k('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var v=0;v<l.length;v++){var w=l[v];var m=h[v];var g=u[v];if(w&&m){var p={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=w.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(p)}}return c};var de=":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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .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-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ue=de;var fe=3e3;var ce=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=c("click to learn more");var i=a.currentHelloPage==="productDetail"?c("Restricted item"):c("Restricted items found");return"".concat(i," - ").concat(n)}switch(a.currentHelloPage){case"cart":return c("Prepay duties and taxes at checkout");case"productList":case"productDetail":return c("See duty and tax thresholds");default:return c("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=r.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=ie((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==u.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(u.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!u.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!u.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return u.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(u.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,u.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!u.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}m();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,g(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(u.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=a.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this.mobileLocationOverride||a.helloSettings.mobileLocation;var o=a.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"));var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!e}}default:case!t:{var r=!a.helloSettings.anchorElementSelector&&!!o;var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var r=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(r){k("Hello is excluded on this url","warn");return null}var s=u.selectedCountryCode,l=u.targetCurrency;var h=this.getHelloLocation(),f=h.isOnLeft,c=h.isOnTop,v=h.shouldFloat;var w=d(a.appearance,this.appearanceSettingsOverride||null);var m=w.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":m},p&&t("div",{class:b(["zonos--hello-wrapper",v&&"zonos--hello-widget-float"])},t("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",f&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",v&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",v&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());ce.style=ue}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(i=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var r=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};r().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-ff6e291b.system",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-52ab67d9.system",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-590f4df3.system",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-81084be5.system",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-e8c70c7d.system",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-3d221556.system",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-0e63259c.system",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-9165c2c1.system",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-58f660d4.system",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-f378b4d3.system",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-d49c6a3e.system",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-d0944cc8.system",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-e99e75dd.system",[[1,"zonos-stripe-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-236f32c8.system",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-c4fa8524.system",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-739014f8.system",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-be9e1818.system",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-797c2e00.system",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-6c0c8722.system",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-f424d6b4.system",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-ce853f8f.system",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-df027c13.system",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-ace74aa3.system",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-8f9fa09a.system",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32]},null,{"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["p-797fab15.system",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"isTaxIdError":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),t)]}}))}))}))}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):n(e.value).then(r,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-1b1cdb4c.system",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-42abd4dd.system",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-a2368c1c.system",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-81084be5.system",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-e8c70c7d.system",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-3d221556.system",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-0e63259c.system",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-5be6b837.system",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-58f660d4.system",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-f378b4d3.system",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-d49c6a3e.system",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-d0944cc8.system",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-e99e75dd.system",[[1,"zonos-stripe-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-236f32c8.system",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-c4fa8524.system",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-739014f8.system",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-be9e1818.system",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-753811b7.system",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-6c0c8722.system",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-9d014d94.system",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-ce853f8f.system",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-33de55b8.system",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-5e1a782a.system",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-79e43df6.system",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["p-5957eff5.system",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"isTaxIdError":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),t)]}}))}))}))}}}));
|