@zonos/elements 1.3.285 → 1.3.286
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-94908542.js → cart-0cf8897b.js} +26 -3
- package/dist/cjs/{collect-0c05e2b4.js → collect-79131e52.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-124b3f20.js → getMissingRequiredShippingFields-a8f04267.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-205fb5bc.js → invoice-254ae23b.js} +1 -1
- package/dist/cjs/{paypal-45ca5301.js → paypal-8ca67278.js} +1 -1
- package/dist/cjs/{placeTestOrder-302b6862.js → placeTestOrder-12b63822.js} +1 -1
- package/dist/cjs/{renderCheckoutCurrency-1b0cd5f2.js → renderCheckoutCurrency-a1f71587.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +21 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +103 -5
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +17 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +104 -5
- package/dist/collection/components/store/checkout/cart.js +14 -1
- package/dist/collection/components/utils/validateCheckoutSession.js +11 -3
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +71 -6
- package/dist/esm/{cart-2e407f7b.js → cart-d04742f5.js} +25 -4
- package/dist/esm/{collect-19428e18.js → collect-4c310a16.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-719b206f.js → getMissingRequiredShippingFields-f0878e32.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-67a47785.js → invoice-86487dac.js} +1 -1
- package/dist/esm/{paypal-6dca6567.js → paypal-997935ab.js} +1 -1
- package/dist/esm/{placeTestOrder-9563c89a.js → placeTestOrder-a53f2056.js} +1 -1
- package/dist/esm/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-e0e16eb7.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +1 -1
- package/dist/esm/zonos-airwallex-payment.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +2 -2
- package/dist/esm/zonos-cart-items_12.entry.js +21 -9
- package/dist/esm/zonos-checkout.entry.js +103 -5
- package/dist/esm/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm/zonos-collect-finish_6.entry.js +5 -5
- package/dist/esm/zonos-collect.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +3 -3
- package/dist/esm/zonos-invoice-finish_5.entry.js +5 -5
- package/dist/esm/zonos-invoice.entry.js +3 -3
- package/dist/esm/zonos-policy-consent_2.entry.js +2 -2
- package/dist/esm-es5/cart-d04742f5.js +1 -0
- package/dist/esm-es5/{collect-19428e18.js → collect-4c310a16.js} +1 -1
- package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-67a47785.js → invoice-86487dac.js} +1 -1
- package/dist/esm-es5/{paypal-6dca6567.js → paypal-997935ab.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-9563c89a.js → placeTestOrder-a53f2056.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-e0e16eb7.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +37 -34
- 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/checkout/zonos-checkout/zonos-checkout.d.ts +14 -0
- package/dist/types/components/store/checkout/cart.d.ts +10 -1
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +24 -24
- package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +2 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +188 -98
- package/dist/types/types/generated/graphql.internal.types.ts +200 -93
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-dd3c00d6.system.entry.js → p-0c327a57.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e32ee011.system.entry.js → p-117953db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-260ad739.system.entry.js → p-1cfb5c2a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f4acce01.js → p-277b77e3.js} +1 -1
- package/dist/zonos-elements/{p-ae0de3e4.entry.js → p-278abdcf.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-e5c76a9b.js → p-344a6278.js} +2 -2
- package/dist/zonos-elements/{p-f59a0129.system.entry.js → p-3a26e5e7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-94722bf6.system.entry.js → p-40af92a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8587f9f.system.entry.js → p-41f1697a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e2b4c082.system.entry.js → p-490d7fec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1277abac.system.entry.js → p-4941c096.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d20fe2c2.system.entry.js → p-50d088f7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8311edc7.entry.js → p-5227aa69.entry.js} +1 -1
- package/dist/zonos-elements/{p-bced320e.entry.js → p-5d110c2b.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1e95f95.entry.js → p-6de2f9c9.entry.js} +1 -1
- package/dist/zonos-elements/{p-6dde1e85.system.entry.js → p-6eaf7c9e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7352abe9.js +1 -0
- package/dist/zonos-elements/{p-fe5f05fc.system.js → p-74230da8.system.js} +1 -1
- package/dist/zonos-elements/{p-22e10b7d.entry.js → p-77993ba1.entry.js} +1 -1
- package/dist/zonos-elements/p-78f8e594.entry.js +1 -0
- package/dist/zonos-elements/p-7b525c75.system.js +1 -0
- package/dist/zonos-elements/p-7f688485.system.entry.js +1 -0
- package/dist/zonos-elements/p-8861d47e.js +1 -0
- package/dist/zonos-elements/p-8d14cb66.entry.js +1 -0
- package/dist/zonos-elements/{p-a07e5011.entry.js → p-944c1fb3.entry.js} +1 -1
- package/dist/zonos-elements/{p-cb49dcfe.entry.js → p-96ab529e.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb5f3451.system.js → p-998975a3.system.js} +1 -1
- package/dist/zonos-elements/p-a4c7ee17.js +1 -0
- package/dist/zonos-elements/{p-3a13e58c.system.js → p-c0af11fe.system.js} +1 -1
- package/dist/zonos-elements/p-c112fa12.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2b8c96e3.system.js → p-c4321a1a.system.js} +1 -1
- package/dist/zonos-elements/{p-aecb5d61.entry.js → p-c7329333.entry.js} +1 -1
- package/dist/zonos-elements/{p-6695de06.system.js → p-c756a59d.system.js} +1 -1
- package/dist/zonos-elements/p-d1a51fac.js +1 -0
- package/dist/zonos-elements/{p-d42bd250.system.entry.js → p-d75726e5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dd866ca3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-8bfe5b2b.entry.js → p-dd8a7bf4.entry.js} +1 -1
- package/dist/zonos-elements/p-e4dc24e1.system.js +1 -0
- package/dist/zonos-elements/{p-60a6b71d.system.js → p-e5865ad9.system.js} +1 -1
- package/dist/zonos-elements/{p-65c1f51e.entry.js → p-e7d7afda.entry.js} +1 -1
- package/dist/zonos-elements/p-f9346f1c.entry.js +1 -0
- package/dist/zonos-elements/{p-0c9fec73.js → p-fc5f6113.js} +1 -1
- package/dist/zonos-elements/p-fe28dbe6.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-2e407f7b.js +0 -1
- package/dist/esm-es5/getMissingRequiredShippingFields-719b206f.js +0 -1
- package/dist/zonos-elements/p-2c2afed4.entry.js +0 -1
- package/dist/zonos-elements/p-2cdd1b49.system.entry.js +0 -1
- package/dist/zonos-elements/p-46cd14e5.js +0 -1
- package/dist/zonos-elements/p-4a20893e.system.js +0 -1
- package/dist/zonos-elements/p-5a491f28.js +0 -1
- package/dist/zonos-elements/p-5ebb7ae6.entry.js +0 -1
- package/dist/zonos-elements/p-62f6a757.entry.js +0 -1
- package/dist/zonos-elements/p-8b298971.system.entry.js +0 -1
- package/dist/zonos-elements/p-a9ad74e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-c1631c9c.js +0 -1
- package/dist/zonos-elements/p-cb4cb5a3.system.js +0 -1
- package/dist/zonos-elements/p-dc80cb87.js +0 -1
- package/dist/zonos-elements/p-ff4e6811.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function l(o){try{r(n.next(o))}catch(o){a(o)}}function i(o){try{r(n["throw"](o))}catch(o){a(o)}}function r(o){o.done?t(o.value):s(o.value).then(l,i)}r((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(n)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(n=1,s&&(a=i[0]&2?s["return"]:i[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;if(s=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-2b8c96e3.system.js","./p-4a20893e.system.js","./p-eb5f3451.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-14afffa8.system.js","./p-d938f42f.system.js","./p-2adbbce7.system.js","./p-23e7c655.system.js","./p-8be02f3a.system.js","./p-3a13e58c.system.js","./p-60a6b71d.system.js","./p-45bd8072.system.js","./p-6890e060.system.js","./p-989cb22b.system.js","./p-7fbbdb0f.system.js","./p-af19722c.system.js"],(function(o){"use strict";var e,t,n,s,a,l,i,r,c,d,u,f,h,p,m,b,z,y,g,v,x,w,k,C,_,L,S,I,j,H,P,Z,M,B,D,F,T,U,V,O,W,A,R,E,N,Y,q;return{setters:[function(o){e=o.r;t=o.d;n=o.h;s=o.F;a=o.a;l=o.g},function(o){i=o.b;r=o.d;c=o.j;d=o.k;u=o.c;f=o.e},function(o){h=o.b;p=o.c;m=o.t;b=o.Q;z=o.F;y=o.R;g=o.d;v=o.v;x=o.G},function(o){w=o.s;k=o.c;C=o.a;_=o.b},function(o){L=o.t;S=o.s;I=o.k;j=o.l;H=o.z},function(o){P=o.z},function(o){Z=o.h;M=o.s;B=o.g;D=o.i;F=o.a},function(o){T=o.c},function(o){U=o.g},function(o){V=o.l;O=o.b},function(o){W=o.i;A=o.a},function(o){R=o.c},function(o){E=o.s},function(o){N=o.r},function(o){Y=o.p},function(o){q=o.r},function(){},function(){},function(){},function(){}],execute:function(){var Q='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var X='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var G=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var K=G;var J=30;var $=o("zonos_collect_finish",function(){function o(o){var n=this;e(this,o);this.closeClick=t(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=L("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i;return __generator(this,(function(r){switch(r.label){case 0:t=S.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,Z("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=r.sent(),a=s.baseUrl,l=s.errors,i=s.json;if(l.length||!(i===null||i===void 0?void 0:i.id)){return[2,{baseUrl:a,order:null}]}return[4,(e=(o=P.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:a,zonosOrder:i})];case 2:r.sent();return[2,{baseUrl:a,order:i}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(n,__spreadArray([],o,true),void 0,(function(o){var e,t,n,s,a,l,i,r;if(o===void 0){o=0}return __generator(this,(function(c){switch(c.label){case 0:if(o===0){V("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=c.sent(),s=n.baseUrl,a=n.order;l=!!((t=(e=a===null||a===void 0?void 0:a.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);i=S.checkoutSessionId;r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||J;V("=== Polling order (".concat(o," attemps)"),"info");if(!a)return[3,2];V("=== CollectOrder info found","info");if(o>10){void M({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i,"&orderId=").concat(a.id),errors:["Collect order found after ".concat(o," attempts")],metadata:{allLogs:O,checkoutSessionId:S.checkoutSessionId||"",orderId:a.id,storeId:P.storeId}})}this.order=a;return[3,6];case 2:if(!((!a||!l)&&o<r))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:c.sent();return[4,this.getPullOrder(o+1)];case 4:c.sent();return[3,6];case 5:void M({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i),errors:["Collect order not found after ".concat(r," attempts")],metadata:{allLogs:O,checkoutSessionId:S.checkoutSessionId||"",storeId:P.storeId}});c.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i,r;return __generator(this,(function(c){switch(c.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||h.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,p({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=c.sent(),t=e.error,n=e.messages,s=e.status;a=s==="requires_action"||t;this.notificationType=a?"error":"success";this.notificationMessages=n||[];this.notificationTitle=a?L("Payment failed"):L("You're all set!");V("=== Payment intent retrieve status","info",{clientSecret:o,error:t,messages:n,status:s});l=new URL(window.location.href);l.searchParams.delete("payment_intent_client_secret");l.searchParams.delete("payment_intent");l.searchParams.delete("redirect_status");l.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",l.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];w({event:"zonos-checkout-payment-fail"});void M({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(S.checkoutSessionId)],metadata:{allLogs:O,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:w({event:"zonos-checkout-success"});i=S.checkoutSessionId;void m({checkoutSessionId:i,eventName:"checkout_orderCompleted"});r=T("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(r);return[4,this.handleSuccessBehavior()];case 3:c.sent();c.label=4;case 4:this.isLoading=false;b();z();S.checkoutSessionId=null;return[2]}}))}))};this.getAirwallexSessionInfo=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:if(i.paymentIntentId){return[2,{isCompleted:false,paymentIntentId:i.paymentIntentId}]}o=S.checkoutSessionId;if(!o){return[2,{isCompleted:false,paymentIntentId:null}]}return[4,Z("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=n.sent().json;t=e===null||e===void 0?void 0:e.checkoutSession;return[2,{isCompleted:!!((t===null||t===void 0?void 0:t.completedAt)||(t===null||t===void 0?void 0:t.order)),paymentIntentId:(t===null||t===void 0?void 0:t.paymentIntentId)||null}]}}))}))};this.checkAirwallexPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,u,h,p,y;return __generator(this,(function(g){switch(g.label){case 0:o=i.paymentConfirmed;e=this.storybookForceStatus==="succeeded";return[4,this.getAirwallexSessionInfo()];case 1:t=g.sent(),n=t.isCompleted,s=t.paymentIntentId;if(!s)return[3,3];return[4,r(s)];case 2:l=g.sent();return[3,4];case 3:l={status:null};g.label=4;case 4:a=l.status;u=o||e||n||f(a);h=(o||e||n?c("SUCCEEDED"):c(a)).messages;V("=== Airwallex payment intent retrieve status","info",{forcedSuccess:e,isCompleted:n,isPaid:u,paymentIntentId:s,sdkConfirmed:o,status:a});this.notificationType=u?"success":"error";this.notificationTitle=u?L("You're all set!"):L("Payment failed");this.notificationMessages=h;if(!u)return[3,6];w({event:"zonos-checkout-success"});p=S.checkoutSessionId;void m({checkoutSessionId:p,eventName:"checkout_orderCompleted"});y=T("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(y);return[4,this.handleSuccessBehavior()];case 5:g.sent();return[3,7];case 6:w({event:"zonos-checkout-payment-fail"});void M({endpoint:"Airwallex payment failed",errors:['Payment intent "'.concat(s,'" status: ').concat(a," - checkout session: ").concat(S.checkoutSessionId)],metadata:{allLogs:O,credentialToken:window.Zonos.zonosApiKey}});g.label=7;case 7:this.isLoading=false;b();z();d();S.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=y("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();b();z();k();S.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(C.paypalErrorMessage){this.notificationType="error";this.notificationTitle=L("Payment failed");this.notificationMessages=[C.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!C.orderIdCreated)return[3,2];w({event:"zonos-checkout-success"});o=S.checkoutSessionId;void m({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=y("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:b();z();k();S.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",e);var n=B();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(g.isStagingMode){void this.checkStagingOrderStatus()}else if(u.paymentProcessor==="AIRWALLEX"){void this.checkAirwallexPaymentStatus()}else if(C.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return n(a,{key:"af26499a2062cf495d4c46a7763ed988a4da0669",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":U({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&n("div",{key:"54fb28be3daee7dd1d63f1dcbdb9a84354fcdb6c",class:"zonos--finish-details"},n("div",{key:"9c71e5dbd23e613e1038924f14c0465d94dbad07",class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{"aria-label":"Order success",content:X,iconColor:"blue-800",size:50}):n("zonos-icon",{"aria-label":"Order failed",content:Q,iconColor:"red-800",size:50}),n("zonos-text",{key:"3285f4bb8854d5bab6eef487d2b2ae3556794998",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&n("zonos-badge",{key:"4cecd6f15ed26fe1e525c01a48e3961845e6f6d8",badgeColor:"gray"},this.confirmationId),n("zonos-text",{key:"dd7c4011d4d7f92fcd19d53e945adf42f2b3f05e",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return n(s,null,o,n("br",null))}))),this.order&&e&&n("div",{key:"a11bd49a754d32dd15dc34f2311f9706d459f07b",class:"zonos--button-container"},n("zonos-button",{key:"305bcf958a1772cc123414285522e9e0f0b1a839",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},L("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());$.style=K;var oo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var to='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var no=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-locale-wrapper .zonos--collect-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";var so=no;var ao=o("zonos_collect_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=W(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=A(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=W(this.mobile);this.isTablet=A(this.tablet)};o.prototype.render=function(){var o=this;var e;var t=(e=I.find((function(o){return o.code===j.selectedLocale})))===null||e===void 0?void 0:e.label;var l="gray-1000";return n(a,{key:"7733eba3e2253cc976484a9da290f66afd6ef93d",class:R(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"2c5a058034844d818010f4002704fa17e6fd9a46",class:"zonos--collect-footer"},n("div",{key:"bffe2afd93ca0531b7eea825a7fd69d68b7aa308",class:"zonos--collect-locale-wrapper"},E()&&n(s,{key:"5469f522ea7b4b3f25fd7c0a63e717c29e34a84c"},n("zonos-button",{key:"1c88778482c2960cf2a5e55beeda3f3c7f21b950",buttonColor:l,class:"zonos--collect-footer-language-button",icon:n("zonos-icon",{"aria-label":"Language select",content:eo,iconColor:l}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},n("span",{key:"451485445df5f34ca64a36dddd5007ce9f229173",class:"zonos--collect-locale-label"},t,n("zonos-icon",{key:"a395943215ca541f3db4d3aa6e111c87930a6d08","aria-hidden":"true",class:"zonos--collect-locale-chevron",content:oo,iconColor:l,size:18}))),n("div",{key:"46edba3f7fc8f9316b69626872e0cb478e72cbd4",class:R(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},n("zonos-language-select",{key:"e77a7197a218755149ee6b7f3e07a646bc95e930",handleOnClose:function(){return o.toggleLanguageDialog()}})))),n("div",{key:"b18dcfe4f0806f3abb6b5855321381334e5206a7",class:"zonos--collect-footer-icon-wrapper"},n("div",{key:"5c6c376fe1174cec16e9b6c029172138bc8b180a",class:"zonos--collect-footer-logo"},n("zonos-text",{key:"0899e6990f8f37cf2d604ef15ffd3db0571d5389",textColor:l},"Powered by"),n("a",{key:"853891db2db1a4d1297597a9857772503e5b4d10",href:"https://zonos.com",target:"_blank",title:"Zonos website"},n("zonos-icon",{key:"d8731023822bffdec3cfe821c67387df651de13a",autoHeight:true,content:to,size:42}))),n("div",{key:"ba5ae7870c1ed277142ceccf1d44276270b967d0",class:"dot"}),n("a",{key:"253dd9112d0626981473d0d0a3309cc577ea5b54",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},n("zonos-text",{key:"a5117f4e2194a4b5d1a5de1696763ca1e174b004",textColor:l},"Privacy policy")))))};Object.defineProperty(o.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());ao.style=so;var lo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var io='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ro=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var co=ro;var uo=o("zonos_collect_order_details",function(){function o(o){e(this,o);this.collapseClicked=t(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=D(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.renderShippingAddress=function(){if(u.isFetchingShippingInfo){return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},n("zonos-skeleton",{skeletonWidth:"99px"})),n("div",{class:"zonos--collect-order-shipping-info"},n("zonos-skeleton",{skeletonWidth:"152px"}),n("zonos-h-stack",{spacing:8},n("zonos-skeleton",{skeletonWidth:"75px"}),n("zonos-skeleton",{skeletonWidth:"75px"})),n("zonos-skeleton",{skeletonWidth:"50px"})))}var o=u.shippingAddress;if(!o){return null}return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Shipping address")),n("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((function(o){return n("zonos-text",null,o)}))))};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return n("zonos-icon",{"aria-label":"Collapse expanded section",content:lo,iconColor:"gray-1200"})}return n("zonos-icon",{"aria-label":"Expand collapsed section",content:io,iconColor:"gray-1200"})};return n(a,{class:R(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--wrapper"},n("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},n("zonos-text",{type:"semiBoldLabel"},L("Shipment details")),e()),n("div",{class:"zonos--order-details-wrapper"},n("zonos-collapse",{collapsed:this.collapseState},n("div",{class:"zonos--collect-order-details-content"},n("zonos-collect-cart-items",null),n("div",{class:"zonos--collect-order-info"},n("div",{class:"zonos--collect-order-details-row"},u.amountTotalPaid!==null&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Total paid")),n("zonos-text",null,N({amount:u.amountTotalPaid||0,isForeign:true}))),u.originCompanyName&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Ordered from")),n("zonos-text",null,u.originCompanyName||""))),this.renderShippingAddress()))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());uo.style=co;var fo='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var ho='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var po=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:visible;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";var mo=po;var bo=o("zonos_collect_payment",function(){function o(o){var n=this;e(this,o);this.continueClicked=t(this,"continueClicked",7);this.paypalSessionFailed=t(this,"paypalSessionFailed",7);this.paypalSessionDone=t(this,"paypalSessionDone",7);this.airwallexPaymentDone=t(this,"airwallexPaymentDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=h.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(n,[o],void 0,(function(o){var e,t;var n=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=h.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((t=h.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=n.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}h.checkoutSettlementCurrency=s;w({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(n,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:n.sent();return[3,3];case 2:e=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=o;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:L("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,Y()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;v();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[x("currency",(function(){void _({currency:g.currency})}))];void _({currency:g.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;if(u.paymentProcessor==="AIRWALLEX"){return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Payment method")),n("zonos-airwallex-payment",{onAirwallexPaymentSuccess:function(){return o.airwallexPaymentDone.emit()}})))}this.hasStripePaymentError=h.hasPaymentError;if(!h.stripeElements){return null}if(!h.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=B();var l=g.isStagingMode||F();var i=((e=h.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var r=function(){if(l){var e=P.appearance.theme;return n(s,null,o.stagingOrderCreateErrorMessage&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),n("zonos-empty-state-payment",{emptyStateText:L("No payment method needed for staging"),theme:e}),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},L("Place test order"))))}if(h.isFetchingSession||u.isFetchingShippingInfo){return null}return n(s,null,o.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},L("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},h.customErrorMessage||L("We couldn't complete your payment. Please verify the payment details and try again.")),C.paypalErrorMessage&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},C.paypalErrorMessage),n("zonos-payment",null),n("div",{class:"zonos--group-btn"},!i&&n(s,null,n("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&h.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!g.checkoutSession){V("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:g.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},L("Pay [orderTotal]",{orderTotal:N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})})),h.shouldRenderPayInUsdButton&&n("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},L("Click to pay in USD"))),n("zonos-paypal-payment",{onPaypalSessionDone:function(e){var t=e.detail.orderId;o.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:i?"block":"none"}})),t&&n("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},n("zonos-v-stack",{spacing:16},n("div",null,n("zonos-text",{type:"semiBoldLabel"},L("Test cards")),n("zonos-text",{textColor:"gray-700"},L("Click to copy the card number. Use any future expiration date and three number CVC."))),n("zonos-button",{icon:n("zonos-icon",{content:fo}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},L("Success")," (****4242)"),n("zonos-button",{icon:n("zonos-icon",{content:ho}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},L("Failure")," (****0002)")),n("zonos-notification",null)))};return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Payment method")),r()))};Object.defineProperty(o.prototype,"ele",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());bo.style=mo;var zo=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var yo=zo;var go=o("zonos_collect_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=W(this.mobile);this.isTablet=A(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return n(a,{key:"2ed81c7a0a16b9414fe1ce3799efa3b85679f982",class:R(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"fcf9fbc8dd807289bcd1c70406495b0c3396bfb8",class:"zonos--title"},n("zonos-text",{key:"44cfb3b82b8e617687c212e108cacafb45713243",textColor:o,type:"semiBoldLabel"},L("Pay [organizationName] duties, taxes and fees for your shipment",{organizationName:P.organizationName}))),n("div",{key:"5472a1ccc61b49ce8c9578a4c3f801386cab1e7d",class:"zonos--total-pay"},q({content:n("zonos-text",{type:"secondaryPageHeader"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());go.style=yo;var vo=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";var xo=vo;var wo=o("zonos_collect_subtotal",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.subtotals={};this.initSubtotalData=function(){var o;var e;var n=(e=g.checkoutSession)===null||e===void 0?void 0:e.subtotals;if(!n){return}var s=L("Duties");var a=L("Taxes");var l=L("Fees");var i=(o={},o[s]=0,o[l]=0,o[a]=0,o);var r=n.duties;var c=n.taxes;var d=n.fees;if(r!==undefined){i[s]||(i[s]=0);i[s]+=r}if(c!==undefined){i[a]||(i[a]=0);i[a]+=c}if(d!==undefined){i[l]||(i[l]=0);i[l]+=d}t.subtotals=i}}o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[x("checkoutSession",this.initSubtotalData),H("translatedChunks",this.initSubtotalData)]};o.prototype.render=function(){this.initSubtotalData();return n(a,{key:"f014c2ae733fe652d7d74349c0e12f93f46d71f5",class:"zonos--collect-subtotal zonos--elements"},n("table",{key:"0bab186aa957c29f026151f5a112ff66bb42cb04",class:"zonos--collect-table"},!!this.subtotals[L("Duties")]&&n("tr",{key:"97c24d5f179f5b59bcb91bc156b1d3e15b811262",class:"zonos--row zonos--collect-duty"},n("td",{key:"cba67296a6d17c0cd665981eb19ba95706f68843",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"6665f531a8656c4a1e0f9761d919c150587a36fb",type:"semiBoldLabel"},L("Duties"))),n("td",{key:"20aeeee1fde0e63aaa168f32a5400ea82758a14c",class:"zonos--column"}),n("td",{key:"14994ca56e814f68fa3511098f5299a0942a295a",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Duties")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[L("Taxes")]&&n("tr",{key:"cbbe4ddf13aabca9ff86b21317b067191f4155b8",class:"zonos--row zonos--collect-tax"},n("td",{key:"675a36a92e136f3afd1960616e842e152cba6256",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"8896868f1e7f545d5b92c148a0f9812936ac2a9a",type:"semiBoldLabel"},L("Taxes"))),n("td",{key:"8a4c29f6d2d513fd7da8be7b1ab695794f3a99ab",class:"zonos--column"}),n("td",{key:"c15f7a872e59cce222a674acb55388dd18bfb74a",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Taxes")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[L("Fees")]&&n("tr",{key:"4cf155874e4446b9ecab121cbaceba2328323359",class:"zonos--row zonos--collect-fee"},n("td",{key:"3efcb4779f34f35a2398eb661f4b799b6b4480c7",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"41d30bb15d216663cd507f2c92d6639b5559708c",type:"semiBoldLabel"},L("Fees"))),n("td",{key:"ef8259d337fb047d8979f5008d2d46f3fc76b007",class:"zonos--column"}),n("td",{key:"e0430efffbe23880a776953ba6a05b0cea268df4",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Fees")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"279ddddfc6e9fe88bc1f16aeaeb6464737ec212f",class:"zonos--row zonos--collect-spacing"},n("td",{key:"de88842e26eb39938b573fc2ac89915d9f6708ba",class:"zonos--column",colSpan:3})),n("tr",{key:"48ecfc5852f1cb25b7816503f3279a3cffc1a581",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},n("td",{key:"06e65acfd5dd213481f415dc2475d9353e18ee53",class:"zonos--column"}),n("td",{key:"b5ae37799d471defdb983a9167b96aa5e176f78e",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"52afa80c7b0eeda13093c26ce031dab4e4a62ee8",type:"label"},L("Subtotal"))),n("td",{key:"840e0413b9c0d651ba7de6529d7c6581f165c047",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"62ffc4102084c920e8bde4527415ea93d8ae8292",class:"zonos--row zonos--collect-total"},n("td",{key:"ef199898aa67686f1c36d2d0c73d1695443e81a9",class:"zonos--column"}),n("td",{key:"1bd5949e640823841ac7425a46b519482b975c37",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"96d53a1ffd935ac98cd5560419cc7d5395945da4",type:"semiBoldLabel"},L("Customs fees total"))),n("td",{key:"008f69a34b557f2660426acccafe925f6b554293",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"semiBoldLabel"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());wo.style=xo}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function l(o){try{r(n.next(o))}catch(o){a(o)}}function i(o){try{r(n["throw"](o))}catch(o){a(o)}}function r(o){o.done?t(o.value):s(o.value).then(l,i)}r((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(n)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(n=1,s&&(a=i[0]&2?s["return"]:i[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;if(s=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-c4321a1a.system.js","./p-e4dc24e1.system.js","./p-998975a3.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-14afffa8.system.js","./p-d938f42f.system.js","./p-2adbbce7.system.js","./p-23e7c655.system.js","./p-8be02f3a.system.js","./p-c0af11fe.system.js","./p-e5865ad9.system.js","./p-45bd8072.system.js","./p-6890e060.system.js","./p-989cb22b.system.js","./p-7fbbdb0f.system.js","./p-af19722c.system.js"],(function(o){"use strict";var e,t,n,s,a,l,i,r,c,d,u,f,h,p,m,b,z,y,g,v,x,w,k,C,_,L,S,I,j,H,P,Z,M,B,D,F,T,U,V,O,W,A,R,E,N,Y,q;return{setters:[function(o){e=o.r;t=o.d;n=o.h;s=o.F;a=o.a;l=o.g},function(o){i=o.b;r=o.d;c=o.j;d=o.k;u=o.c;f=o.e},function(o){h=o.b;p=o.c;m=o.t;b=o.S;z=o.H;y=o.T;g=o.d;v=o.x;x=o.I},function(o){w=o.s;k=o.c;C=o.a;_=o.b},function(o){L=o.t;S=o.s;I=o.k;j=o.l;H=o.z},function(o){P=o.z},function(o){Z=o.h;M=o.s;B=o.g;D=o.i;F=o.a},function(o){T=o.c},function(o){U=o.g},function(o){V=o.l;O=o.b},function(o){W=o.i;A=o.a},function(o){R=o.c},function(o){E=o.s},function(o){N=o.r},function(o){Y=o.p},function(o){q=o.r},function(){},function(){},function(){},function(){}],execute:function(){var Q='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var X='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var G=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var K=G;var J=30;var $=o("zonos_collect_finish",function(){function o(o){var n=this;e(this,o);this.closeClick=t(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=L("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i;return __generator(this,(function(r){switch(r.label){case 0:t=S.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,Z("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=r.sent(),a=s.baseUrl,l=s.errors,i=s.json;if(l.length||!(i===null||i===void 0?void 0:i.id)){return[2,{baseUrl:a,order:null}]}return[4,(e=(o=P.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:a,zonosOrder:i})];case 2:r.sent();return[2,{baseUrl:a,order:i}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(n,__spreadArray([],o,true),void 0,(function(o){var e,t,n,s,a,l,i,r;if(o===void 0){o=0}return __generator(this,(function(c){switch(c.label){case 0:if(o===0){V("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=c.sent(),s=n.baseUrl,a=n.order;l=!!((t=(e=a===null||a===void 0?void 0:a.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);i=S.checkoutSessionId;r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||J;V("=== Polling order (".concat(o," attemps)"),"info");if(!a)return[3,2];V("=== CollectOrder info found","info");if(o>10){void M({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i,"&orderId=").concat(a.id),errors:["Collect order found after ".concat(o," attempts")],metadata:{allLogs:O,checkoutSessionId:S.checkoutSessionId||"",orderId:a.id,storeId:P.storeId}})}this.order=a;return[3,6];case 2:if(!((!a||!l)&&o<r))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:c.sent();return[4,this.getPullOrder(o+1)];case 4:c.sent();return[3,6];case 5:void M({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i),errors:["Collect order not found after ".concat(r," attempts")],metadata:{allLogs:O,checkoutSessionId:S.checkoutSessionId||"",storeId:P.storeId}});c.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i,r;return __generator(this,(function(c){switch(c.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||h.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,p({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=c.sent(),t=e.error,n=e.messages,s=e.status;a=s==="requires_action"||t;this.notificationType=a?"error":"success";this.notificationMessages=n||[];this.notificationTitle=a?L("Payment failed"):L("You're all set!");V("=== Payment intent retrieve status","info",{clientSecret:o,error:t,messages:n,status:s});l=new URL(window.location.href);l.searchParams.delete("payment_intent_client_secret");l.searchParams.delete("payment_intent");l.searchParams.delete("redirect_status");l.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",l.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];w({event:"zonos-checkout-payment-fail"});void M({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(S.checkoutSessionId)],metadata:{allLogs:O,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:w({event:"zonos-checkout-success"});i=S.checkoutSessionId;void m({checkoutSessionId:i,eventName:"checkout_orderCompleted"});r=T("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(r);return[4,this.handleSuccessBehavior()];case 3:c.sent();c.label=4;case 4:this.isLoading=false;b();z();S.checkoutSessionId=null;return[2]}}))}))};this.getAirwallexSessionInfo=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:if(i.paymentIntentId){return[2,{isCompleted:false,paymentIntentId:i.paymentIntentId}]}o=S.checkoutSessionId;if(!o){return[2,{isCompleted:false,paymentIntentId:null}]}return[4,Z("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=n.sent().json;t=e===null||e===void 0?void 0:e.checkoutSession;return[2,{isCompleted:!!((t===null||t===void 0?void 0:t.completedAt)||(t===null||t===void 0?void 0:t.order)),paymentIntentId:(t===null||t===void 0?void 0:t.paymentIntentId)||null}]}}))}))};this.checkAirwallexPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,u,h,p,y;return __generator(this,(function(g){switch(g.label){case 0:o=i.paymentConfirmed;e=this.storybookForceStatus==="succeeded";return[4,this.getAirwallexSessionInfo()];case 1:t=g.sent(),n=t.isCompleted,s=t.paymentIntentId;if(!s)return[3,3];return[4,r(s)];case 2:l=g.sent();return[3,4];case 3:l={status:null};g.label=4;case 4:a=l.status;u=o||e||n||f(a);h=(o||e||n?c("SUCCEEDED"):c(a)).messages;V("=== Airwallex payment intent retrieve status","info",{forcedSuccess:e,isCompleted:n,isPaid:u,paymentIntentId:s,sdkConfirmed:o,status:a});this.notificationType=u?"success":"error";this.notificationTitle=u?L("You're all set!"):L("Payment failed");this.notificationMessages=h;if(!u)return[3,6];w({event:"zonos-checkout-success"});p=S.checkoutSessionId;void m({checkoutSessionId:p,eventName:"checkout_orderCompleted"});y=T("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(y);return[4,this.handleSuccessBehavior()];case 5:g.sent();return[3,7];case 6:w({event:"zonos-checkout-payment-fail"});void M({endpoint:"Airwallex payment failed",errors:['Payment intent "'.concat(s,'" status: ').concat(a," - checkout session: ").concat(S.checkoutSessionId)],metadata:{allLogs:O,credentialToken:window.Zonos.zonosApiKey}});g.label=7;case 7:this.isLoading=false;b();z();d();S.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=y("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();b();z();k();S.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(C.paypalErrorMessage){this.notificationType="error";this.notificationTitle=L("Payment failed");this.notificationMessages=[C.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!C.orderIdCreated)return[3,2];w({event:"zonos-checkout-success"});o=S.checkoutSessionId;void m({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=L("You're all set!");this.notificationMessages=y("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:b();z();k();S.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",e);var n=B();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(g.isStagingMode){void this.checkStagingOrderStatus()}else if(u.paymentProcessor==="AIRWALLEX"){void this.checkAirwallexPaymentStatus()}else if(C.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return n(a,{key:"af26499a2062cf495d4c46a7763ed988a4da0669",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":U({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&n("div",{key:"54fb28be3daee7dd1d63f1dcbdb9a84354fcdb6c",class:"zonos--finish-details"},n("div",{key:"9c71e5dbd23e613e1038924f14c0465d94dbad07",class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{"aria-label":"Order success",content:X,iconColor:"blue-800",size:50}):n("zonos-icon",{"aria-label":"Order failed",content:Q,iconColor:"red-800",size:50}),n("zonos-text",{key:"3285f4bb8854d5bab6eef487d2b2ae3556794998",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&n("zonos-badge",{key:"4cecd6f15ed26fe1e525c01a48e3961845e6f6d8",badgeColor:"gray"},this.confirmationId),n("zonos-text",{key:"dd7c4011d4d7f92fcd19d53e945adf42f2b3f05e",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return n(s,null,o,n("br",null))}))),this.order&&e&&n("div",{key:"a11bd49a754d32dd15dc34f2311f9706d459f07b",class:"zonos--button-container"},n("zonos-button",{key:"305bcf958a1772cc123414285522e9e0f0b1a839",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},L("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());$.style=K;var oo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var to='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var no=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-locale-wrapper .zonos--collect-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";var so=no;var ao=o("zonos_collect_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=W(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=A(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=W(this.mobile);this.isTablet=A(this.tablet)};o.prototype.render=function(){var o=this;var e;var t=(e=I.find((function(o){return o.code===j.selectedLocale})))===null||e===void 0?void 0:e.label;var l="gray-1000";return n(a,{key:"7733eba3e2253cc976484a9da290f66afd6ef93d",class:R(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"2c5a058034844d818010f4002704fa17e6fd9a46",class:"zonos--collect-footer"},n("div",{key:"bffe2afd93ca0531b7eea825a7fd69d68b7aa308",class:"zonos--collect-locale-wrapper"},E()&&n(s,{key:"5469f522ea7b4b3f25fd7c0a63e717c29e34a84c"},n("zonos-button",{key:"1c88778482c2960cf2a5e55beeda3f3c7f21b950",buttonColor:l,class:"zonos--collect-footer-language-button",icon:n("zonos-icon",{"aria-label":"Language select",content:eo,iconColor:l}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},n("span",{key:"451485445df5f34ca64a36dddd5007ce9f229173",class:"zonos--collect-locale-label"},t,n("zonos-icon",{key:"a395943215ca541f3db4d3aa6e111c87930a6d08","aria-hidden":"true",class:"zonos--collect-locale-chevron",content:oo,iconColor:l,size:18}))),n("div",{key:"46edba3f7fc8f9316b69626872e0cb478e72cbd4",class:R(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},n("zonos-language-select",{key:"e77a7197a218755149ee6b7f3e07a646bc95e930",handleOnClose:function(){return o.toggleLanguageDialog()}})))),n("div",{key:"b18dcfe4f0806f3abb6b5855321381334e5206a7",class:"zonos--collect-footer-icon-wrapper"},n("div",{key:"5c6c376fe1174cec16e9b6c029172138bc8b180a",class:"zonos--collect-footer-logo"},n("zonos-text",{key:"0899e6990f8f37cf2d604ef15ffd3db0571d5389",textColor:l},"Powered by"),n("a",{key:"853891db2db1a4d1297597a9857772503e5b4d10",href:"https://zonos.com",target:"_blank",title:"Zonos website"},n("zonos-icon",{key:"d8731023822bffdec3cfe821c67387df651de13a",autoHeight:true,content:to,size:42}))),n("div",{key:"ba5ae7870c1ed277142ceccf1d44276270b967d0",class:"dot"}),n("a",{key:"253dd9112d0626981473d0d0a3309cc577ea5b54",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},n("zonos-text",{key:"a5117f4e2194a4b5d1a5de1696763ca1e174b004",textColor:l},"Privacy policy")))))};Object.defineProperty(o.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());ao.style=so;var lo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var io='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ro=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var co=ro;var uo=o("zonos_collect_order_details",function(){function o(o){e(this,o);this.collapseClicked=t(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=D(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.renderShippingAddress=function(){if(u.isFetchingShippingInfo){return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},n("zonos-skeleton",{skeletonWidth:"99px"})),n("div",{class:"zonos--collect-order-shipping-info"},n("zonos-skeleton",{skeletonWidth:"152px"}),n("zonos-h-stack",{spacing:8},n("zonos-skeleton",{skeletonWidth:"75px"}),n("zonos-skeleton",{skeletonWidth:"75px"})),n("zonos-skeleton",{skeletonWidth:"50px"})))}var o=u.shippingAddress;if(!o){return null}return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Shipping address")),n("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((function(o){return n("zonos-text",null,o)}))))};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return n("zonos-icon",{"aria-label":"Collapse expanded section",content:lo,iconColor:"gray-1200"})}return n("zonos-icon",{"aria-label":"Expand collapsed section",content:io,iconColor:"gray-1200"})};return n(a,{class:R(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--wrapper"},n("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},n("zonos-text",{type:"semiBoldLabel"},L("Shipment details")),e()),n("div",{class:"zonos--order-details-wrapper"},n("zonos-collapse",{collapsed:this.collapseState},n("div",{class:"zonos--collect-order-details-content"},n("zonos-collect-cart-items",null),n("div",{class:"zonos--collect-order-info"},n("div",{class:"zonos--collect-order-details-row"},u.amountTotalPaid!==null&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Total paid")),n("zonos-text",null,N({amount:u.amountTotalPaid||0,isForeign:true}))),u.originCompanyName&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},L("Ordered from")),n("zonos-text",null,u.originCompanyName||""))),this.renderShippingAddress()))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());uo.style=co;var fo='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var ho='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var po=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:visible;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";var mo=po;var bo=o("zonos_collect_payment",function(){function o(o){var n=this;e(this,o);this.continueClicked=t(this,"continueClicked",7);this.paypalSessionFailed=t(this,"paypalSessionFailed",7);this.paypalSessionDone=t(this,"paypalSessionDone",7);this.airwallexPaymentDone=t(this,"airwallexPaymentDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=h.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(n,[o],void 0,(function(o){var e,t;var n=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=h.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((t=h.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=n.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}h.checkoutSettlementCurrency=s;w({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(n,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:n.sent();return[3,3];case 2:e=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=o;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:L("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,Y()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;v();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[x("currency",(function(){void _({currency:g.currency})}))];void _({currency:g.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;if(u.paymentProcessor==="AIRWALLEX"){return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Payment method")),n("zonos-airwallex-payment",{onAirwallexPaymentSuccess:function(){return o.airwallexPaymentDone.emit()}})))}this.hasStripePaymentError=h.hasPaymentError;if(!h.stripeElements){return null}if(!h.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=B();var l=g.isStagingMode||F();var i=((e=h.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var r=function(){if(l){var e=P.appearance.theme;return n(s,null,o.stagingOrderCreateErrorMessage&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),n("zonos-empty-state-payment",{emptyStateText:L("No payment method needed for staging"),theme:e}),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},L("Place test order"))))}if(h.isFetchingSession||u.isFetchingShippingInfo){return null}return n(s,null,o.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},L("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},h.customErrorMessage||L("We couldn't complete your payment. Please verify the payment details and try again.")),C.paypalErrorMessage&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},C.paypalErrorMessage),n("zonos-payment",null),n("div",{class:"zonos--group-btn"},!i&&n(s,null,n("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&h.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!g.checkoutSession){V("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:g.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},L("Pay [orderTotal]",{orderTotal:N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})})),h.shouldRenderPayInUsdButton&&n("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&h.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&h.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},L("Click to pay in USD"))),n("zonos-paypal-payment",{onPaypalSessionDone:function(e){var t=e.detail.orderId;o.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:i?"block":"none"}})),t&&n("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},n("zonos-v-stack",{spacing:16},n("div",null,n("zonos-text",{type:"semiBoldLabel"},L("Test cards")),n("zonos-text",{textColor:"gray-700"},L("Click to copy the card number. Use any future expiration date and three number CVC."))),n("zonos-button",{icon:n("zonos-icon",{content:fo}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},L("Success")," (****4242)"),n("zonos-button",{icon:n("zonos-icon",{content:ho}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},L("Failure")," (****0002)")),n("zonos-notification",null)))};return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},L("Payment method")),r()))};Object.defineProperty(o.prototype,"ele",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());bo.style=mo;var zo=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var yo=zo;var go=o("zonos_collect_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=W(this.mobile);this.isTablet=A(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return n(a,{key:"2ed81c7a0a16b9414fe1ce3799efa3b85679f982",class:R(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"fcf9fbc8dd807289bcd1c70406495b0c3396bfb8",class:"zonos--title"},n("zonos-text",{key:"44cfb3b82b8e617687c212e108cacafb45713243",textColor:o,type:"semiBoldLabel"},L("Pay [organizationName] duties, taxes and fees for your shipment",{organizationName:P.organizationName}))),n("div",{key:"5472a1ccc61b49ce8c9578a4c3f801386cab1e7d",class:"zonos--total-pay"},q({content:n("zonos-text",{type:"secondaryPageHeader"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());go.style=yo;var vo=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";var xo=vo;var wo=o("zonos_collect_subtotal",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.subtotals={};this.initSubtotalData=function(){var o;var e;var n=(e=g.checkoutSession)===null||e===void 0?void 0:e.subtotals;if(!n){return}var s=L("Duties");var a=L("Taxes");var l=L("Fees");var i=(o={},o[s]=0,o[l]=0,o[a]=0,o);var r=n.duties;var c=n.taxes;var d=n.fees;if(r!==undefined){i[s]||(i[s]=0);i[s]+=r}if(c!==undefined){i[a]||(i[a]=0);i[a]+=c}if(d!==undefined){i[l]||(i[l]=0);i[l]+=d}t.subtotals=i}}o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[x("checkoutSession",this.initSubtotalData),H("translatedChunks",this.initSubtotalData)]};o.prototype.render=function(){this.initSubtotalData();return n(a,{key:"f014c2ae733fe652d7d74349c0e12f93f46d71f5",class:"zonos--collect-subtotal zonos--elements"},n("table",{key:"0bab186aa957c29f026151f5a112ff66bb42cb04",class:"zonos--collect-table"},!!this.subtotals[L("Duties")]&&n("tr",{key:"97c24d5f179f5b59bcb91bc156b1d3e15b811262",class:"zonos--row zonos--collect-duty"},n("td",{key:"cba67296a6d17c0cd665981eb19ba95706f68843",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"6665f531a8656c4a1e0f9761d919c150587a36fb",type:"semiBoldLabel"},L("Duties"))),n("td",{key:"20aeeee1fde0e63aaa168f32a5400ea82758a14c",class:"zonos--column"}),n("td",{key:"14994ca56e814f68fa3511098f5299a0942a295a",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Duties")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[L("Taxes")]&&n("tr",{key:"cbbe4ddf13aabca9ff86b21317b067191f4155b8",class:"zonos--row zonos--collect-tax"},n("td",{key:"675a36a92e136f3afd1960616e842e152cba6256",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"8896868f1e7f545d5b92c148a0f9812936ac2a9a",type:"semiBoldLabel"},L("Taxes"))),n("td",{key:"8a4c29f6d2d513fd7da8be7b1ab695794f3a99ab",class:"zonos--column"}),n("td",{key:"c15f7a872e59cce222a674acb55388dd18bfb74a",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Taxes")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[L("Fees")]&&n("tr",{key:"4cf155874e4446b9ecab121cbaceba2328323359",class:"zonos--row zonos--collect-fee"},n("td",{key:"3efcb4779f34f35a2398eb661f4b799b6b4480c7",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"41d30bb15d216663cd507f2c92d6639b5559708c",type:"semiBoldLabel"},L("Fees"))),n("td",{key:"ef8259d337fb047d8979f5008d2d46f3fc76b007",class:"zonos--column"}),n("td",{key:"e0430efffbe23880a776953ba6a05b0cea268df4",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:this.subtotals[L("Fees")]||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"279ddddfc6e9fe88bc1f16aeaeb6464737ec212f",class:"zonos--row zonos--collect-spacing"},n("td",{key:"de88842e26eb39938b573fc2ac89915d9f6708ba",class:"zonos--column",colSpan:3})),n("tr",{key:"48ecfc5852f1cb25b7816503f3279a3cffc1a581",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},n("td",{key:"06e65acfd5dd213481f415dc2475d9353e18ee53",class:"zonos--column"}),n("td",{key:"b5ae37799d471defdb983a9167b96aa5e176f78e",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"52afa80c7b0eeda13093c26ce031dab4e4a62ee8",type:"label"},L("Subtotal"))),n("td",{key:"840e0413b9c0d651ba7de6529d7c6581f165c047",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"label"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"62ffc4102084c920e8bde4527415ea93d8ae8292",class:"zonos--row zonos--collect-total"},n("td",{key:"ef199898aa67686f1c36d2d0c73d1695443e81a9",class:"zonos--column"}),n("td",{key:"1bd5949e640823841ac7425a46b519482b975c37",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"96d53a1ffd935ac98cd5560419cc7d5395945da4",type:"semiBoldLabel"},L("Customs fees total"))),n("td",{key:"008f69a34b557f2660426acccafe925f6b554293",class:"zonos--column zonos--collect-subtotal-price"},q({content:n("zonos-text",{type:"semiBoldLabel"},N({amount:u.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:u.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());wo.style=xo}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,e,i){function o(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,s){function a(n){try{c(i.next(n))}catch(n){s(n)}}function r(n){try{c(i["throw"](n))}catch(n){s(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,r)}c((i=i.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return c([n,t])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(n,e)}catch(n){r=[6,n];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++){if(s||!(i in t)){if(!s)s=Array.prototype.slice.call(t,0,i);s[i]=t[i]}}return n.concat(s||Array.prototype.slice.call(t))};System.register(["./p-7261e245.system.js","./p-60832726.system.js","./p-4a20893e.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-01174496.system.js","./p-7ac8846c.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-989cb22b.system.js","./p-14afffa8.system.js","./p-551fa762.system.js","./p-6890e060.system.js","./p-655ec440.system.js"],(function(n){"use strict";var t,e,i,o,s,a,r,c,l,d,h,u,f,v,p,m,z,b,y,g,k,w,x,_,C,j,I,A,E,S;return{setters:[function(n){t=n.r;e=n.d;i=n.h;o=n.a;s=n.g},function(n){a=n.t},function(n){r=n.U;c=n.b;l=n.t;d=n.H;h=n.u;u=n.d},function(n){f=n.s;v=n.B;p=n.t;m=n.A;z=n.l},function(n){b=n.z;y=n.g;g=n.f},function(n){k=n.l;w=n.i;x=n.s},function(n){_=n.a;C=n.s},function(n){j=n.c},function(n){I=n.l},function(n){A=n.c;E=n.s},function(n){S=n.g},function(){},function(){},function(){}],execute:function(){var O=function(n){var t=r({firstName:n.firstName,lastName:n.lastName,name:n.name}),e=t.firstName,i=t.lastName;return{address:{city:n.address.city,country:n.address.country,line1:n.address.line1,line2:n.address.line2||undefined,postal_code:n.address.postal_code,state:n.address.state},name:(n.name||"".concat(e," ").concat(i)).trim(),phone:n.phone||undefined}};var L=function(n){var t,e,i;return[n.name,(t=n.address)===null||t===void 0?void 0:t.line1,(e=n.address)===null||e===void 0?void 0:e.postal_code,(i=n.address)===null||i===void 0?void 0:i.country].map((function(n){return(n||"").trim().toLowerCase()})).join("|")};var N=function(n){var t=n.currentEvent,e=n.defaultAddress;if(!t){return e}var i=O(t.value);var o=L(i);var s=e.some((function(n){return L(n)===o}));if(s){return e}return __spreadArray([i],e,true)};var Z=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var B=Z;var D=n("zonos_address",function(){function n(n){t(this,n);this.invalidCharacters=e(this,"invalidCharacters",7);this.taxIdChanged=e(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=f.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=a(h,1e3)}n.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:c.stripeBillingAddressElement,stripeAddressEventData:c.stripeBillingAddressEventData,stripeElements:c.stripeElementsForBillingAddress}}return{stripeAddressElement:c.stripeAddressElement,stripeAddressEventData:c.stripeAddressEventData,stripeElements:c.stripeElements}};n.prototype.updateAddressEventData=function(n){var t=n.event,e=n.type;switch(e){case"billing":c.stripeBillingAddressEventData=t;break;default:{c.stripeAddressEventData=t;break}}if(e==="shipping"){if(t.value.address.line1.length){void this.prefetchLandedCost()}}};n.prototype.isAddressFilledChanged=function(){if(!f.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var n=f.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_customerInfoFilled"})}};n.prototype.updateAddressElement=function(n){var t=n.stripeAddressElement,e=n.type;if(e==="shipping"){c.stripeAddressElement=t;return}c.stripeBillingAddressElement=t};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i,o,s,a,c,l,d;var h=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;n=this.getStripeAddressInstance(),t=n.stripeAddressEventData,e=n.stripeElements;if(!this.stripe||!e){k("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=this.defaultAddress.map((function(n){return Object.assign(Object.assign({},n),{name:n.name,phone:n.phone||undefined})}));o=z.shippingZoneCountries;s=o?Object.values(o).map((function(n){return n.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");c=this.type==="shipping"?s:[];l=(t===null||t===void 0?void 0:t.value.address.country)||v(c);I("Stripe country code: ".concat(l),"info");d=e.create("address",{allowedCountries:a?[]:c,contacts:N({currentEvent:t,defaultAddress:i}),defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:l}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));if(t===null||t===void 0?void 0:t.value.address){this.prevCountry=t.value.address.country;this.prevPostalCode=t.value.address.postal_code}d.on("change",(function(n){var t=n.value;if(!h.isDirtyAddress&&t.address.line1.length>=3){h.isDirtyAddress=true;if(!h.isAutoCompleteAdjusted){var e=h.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(e){e.style.zIndex="3"}h.isAutoCompleteAdjusted=true}setTimeout((function(){if(w()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var n=h.type==="shipping"?100:600;var t=h.el.closest(".zonos--group");var e=h.el.getBoundingClientRect().top+n;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:e})}}),600)}var i=r({firstName:t.firstName,lastName:t.lastName,name:t.name}),o=i.firstName,s=i.lastName;h.updateAddressEventData({event:Object.assign(Object.assign({},n),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:s})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};n.prototype.defaultAddressChanged=function(n,t){var e=JSON.stringify(t);var i=JSON.stringify(n);if(e===i){return}I("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.clear();o===null||o===void 0?void 0:o.destroy();if(this.type==="shipping"){c.stripeAddressEventData=null}else{c.stripeBillingAddressEventData=null}void this.watchInitStripe()};n.prototype.isInTaxIdCountry=function(n){return A.includes(n)};n.prototype.renderTaxIdInput=function(){var n=this;var t;if(this.type==="billing"){return null}var e=(t=c.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!e){return null}if(!this.isInTaxIdCountry(e)){return null}var o=_({companyName:c.companyName,countryCode:e});if(!o){return null}var s=E[e];return i("div",{class:"zonos--tax-id-input"},i("zonos-stripe-input",{inputLabel:p(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:c.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(t){c.taxId=t.detail;n.taxIdChanged.emit(t.detail)}}),this.taxIdErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};n.prototype.renderShortAddressCodeInput=function(){var n;if(this.type==="billing"){return null}var t=(n=c.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country;if(!t){return null}var e=C({countryCode:t});if(!e){return null}return i("div",{class:"zonos--short-address-code-input"},i("zonos-stripe-input",{inputLabel:p("Short address code"),inputPlaceholder:"RRRD2929",inputValue:c.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(n){c.shortAddressCode=n.detail}}),this.shortAddressCodeErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};n.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var n=b.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!n){return null}return i("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:p("Company name (optional)"),inputValue:c.companyName,onInputChange:function(n){c.companyName=n.detail}})};n.prototype.disconnectedCallback=function(){var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.destroy();try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=f.checkoutSessionId;this.storeUnsubscribeList=[m("checkoutSessionId",(function(){n.checkoutSessionId=f.checkoutSessionId})),d("stripeElements",(function(){if(n.type==="shipping"){void n.watchInitStripe()}})),d("stripeElementsForBillingAddress",(function(){if(n.type==="billing"){void n.watchInitStripe()}}))]};n.prototype.render=function(){var n;this.checkoutSessionId=f.checkoutSessionId;if((n=c.stripeAddressEventData)===null||n===void 0?void 0:n.complete){this.isAddressFilled=true}return i(o,{key:"9b7a5340b839d63c64da03639bdfda5a11a5c25e",class:j(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&i("zonos-text",{key:"23739f6a48e5698372df2d53098dea6ad1c0559a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),i("slot",{key:"dea4b437eedaad2af2f6bbe3a1e2ae4f0706aa13",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),i("div",{key:"b4be684977a632371b9b6ff4587ccdd7bacc8c67",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return n}());D.style=B;var M='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var V='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var T='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var P=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var R=P;var F=n("zonos_confirm_dialog",function(){function n(n){var i=this;t(this,n);this.confirmClicked=e(this,"confirmClicked",7);this.cancelClicked=e(this,"cancelClicked",7);this.dialogTitle=p("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(n){if(n.target===n.currentTarget&&!i.noClickOutside){i.closeDialogHandler()}}}n.prototype.handleKeyDown=function(n){if(n.key==="Escape"){this.closeDialogHandler()}};n.prototype.focusDialog=function(){var n=this;if(this.dialogOpen){setTimeout((function(){var t,e;(e=(t=n.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".zonos--backdrop"))===null||e===void 0?void 0:e.focus()}),100)}};n.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};n.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};n.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return i("zonos-icon",{content:V,iconColor:"blue-800"});case"danger":return i("zonos-icon",{content:M,iconColor:"red-800"});case"warn":return i("zonos-icon",{content:T,iconColor:"orange-800"})}};n.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};n.prototype.render=function(){var n=this;this.focusDialog();var t=S();var e=y(b.appearance.theme);return i(o,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:j([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":e,style:{"--zonos--border-radius":t,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":g()}},i("div",{key:"6d7c55b90bfb05890d876a0243558eb9a2e7a772",class:"zonos--backdrop",tabIndex:-1}),i("div",{key:"abf306ddd70cefd64aa6804aeccf700506c175d7",class:j(["zonos--confirm-layout",this.dialogIntent]),onClick:function(t){return n.clickOutsideDialogHandler(t)}},i("div",{key:"dc7e9e6d501872597928603ded57d82c15c26710",class:"zonos--confirm-dialog",onBlur:function(){n.focusDialog()}},i("div",{key:"5c1fa9ec8b59cba68ccbc5dc36e66e2fdefdeae5",class:"wrapper"},i("div",{key:"0ce48c41c78e393a181fd5e9beeac90622b5c620",class:"icon-wrapper"},this.renderIcon()),i("div",{key:"b42157f8e76de8a60190e384d7d53a36d8051c67",class:"content"},i("div",{key:"bd8eb897f15a6d095df8fbd1803f62a11b9d5d7b",class:"title"},i("zonos-text",{key:"d1c06b89d4917b2366f881dda7da9e1369722126",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&i("div",{key:"4f1269aaab5ad3965d6ddfc0949341d4f202f296",class:"subtitle"},i("zonos-text",{key:"f784b5dd86ff684e790f27a586e3eeb4ac683884",textColor:"gray-800"},this.dialogSubtitle))),i("div",{key:"e0403a968aee6ff878c9e916e9ff216e2052ab0c",class:"footer"},this.dialogType==="confirm"&&i("zonos-button",{key:"66e34a9d61f677786bfe286f377854c9ebc780ed",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return n.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||p("Cancel")),i("zonos-button",{key:"3652507591e3055856a044e191525ea36b6042ca",class:"confirm-button",onClick:function(){return n.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(n,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return n}());F.style=R;var J=function(n){var t=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return t.test(n)};var q=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var G=q;var U=51;var $=n("zonos_link_authentication",function(){function n(n){var i=this;t(this,n);this.linkAuthenticationChange=e(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=c.stripe;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(n){var t=J(n);var e={complete:!!t,elementType:"linkAuthentication",empty:!n,value:{email:n}};c.stripeLinkEventData=e};this.handleNormalEmailInput=function(n){var t;var e=n.detail;i.setCustomEmailInputToLinkEvent(e);(t=i.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}}n.prototype.watchIsStagingMode=function(){var n=this;setTimeout((function(){void n.watchInitStripe()}),0)};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i;var o=this;return __generator(this,(function(s){switch(s.label){case 0:if(!this.stripe||!c.stripeElements){return[2]}if(u.isStagingMode||!this.clientSecret){return[2]}n=this.defaultEmail?{email:this.defaultEmail}:undefined;s.label=1;case 1:s.trys.push([1,2,,6]);t=c.stripeLinkElement||c.stripeElements.create("linkAuthentication",{defaultValues:n});e=this.el.querySelector(".zonos--link-authentication-component");if(!e){k("Cannot find container element for linkAuthenticationElement");return[2]}t.mount(e);t.on("change",(function(n){var t;c.stripeLinkEventData=n;(t=o.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}));c.stripeLinkElement=t;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){I("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void x({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:i=s.sent();if(!(i instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<U))return[3,4];return[4,new Promise((function(n){return setTimeout(n,500)}))];case 3:s.sent();void this.watchInitStripe();s.label=4;case 4:if(this.retriesInitializeLink===U){void x({endpoint:"stripe-link-authentication-init-error",errors:[i.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}s.label=5;case 5:return[3,6];case 6:return[2]}}))}))};n.prototype.watchDefaultEmail=function(n,t){var e,i;I("Default email is changed","info",{newDefaultEmail:n,oldDefaultEmail:t});if(t===n){return}if(!n){c.stripeLinkEventData=null}if(u.isStagingMode){this.setCustomEmailInputToLinkEvent(n||"");return}(e=c.stripeLinkElement)===null||e===void 0?void 0:e.clear();(i=c.stripeLinkElement)===null||i===void 0?void 0:i.destroy();c.stripeLinkElement=null;c.stripeLinkEventData=null;I("Reset stripe link element when default email is changed","info",{defaultEmail:n});void this.watchInitStripe()};n.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;this.storeUnsubscribeList=[d("stripeElements",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){void this.watchInitStripe();return[2]}))}))})),d("clientSecret",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.clientSecret=c.clientSecret;return[2]}))}))})),d("stripe",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.stripe=c.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};n.prototype.render=function(){var n=this;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;var t=function(){var t;if(u.isStagingMode){return i("zonos-stripe-input",{inputLabel:p("Email"),inputValue:n.defaultEmail||((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",isError:n.isEmailError,onBlur:function(){var t;var e=((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"";if(!e){return}var i=J(e);n.isEmailError=!i},onInputChange:n.handleNormalEmailInput})}return i("div",{class:"zonos--link-authentication-component ".concat(n.isEmailError&&"zonos--input-invalid")})};return i(o,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":S()}},this.titleText&&i("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),t(),this.isEmailError&&i("zonos-text",{textColor:"red-600"},p("Please enter a valid email address.")))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return n}());$.style=G;var H=":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{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var K=H;var Q=n("zonos_loading_overlay",function(){function n(n){t(this,n);this.open=false;this.size=40}n.prototype.render=function(){return i(o,{key:"8cafd99b309b04da5cf1b26b0f0804f4699c06b2",class:j(["zonos--elements",this.open&&"zonos--open"])},i("div",{key:"9ce7ac9b7e6956a5f76fc2105fa7f5d05299fd36",class:"zonos--loading-overlay"},i("zonos-spinner",{key:"4be3a8d471e3aead2e4194c4ecbf66878a7a3f17",size:this.size,spinnerColor:this.spinnerColor})))};return n}());Q.style=K}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,e,i){function o(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,s){function a(n){try{c(i.next(n))}catch(n){s(n)}}function r(n){try{c(i["throw"](n))}catch(n){s(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,r)}c((i=i.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return c([n,t])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(n,e)}catch(n){r=[6,n];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++){if(s||!(i in t)){if(!s)s=Array.prototype.slice.call(t,0,i);s[i]=t[i]}}return n.concat(s||Array.prototype.slice.call(t))};System.register(["./p-7261e245.system.js","./p-60832726.system.js","./p-e4dc24e1.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-01174496.system.js","./p-7ac8846c.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-989cb22b.system.js","./p-14afffa8.system.js","./p-551fa762.system.js","./p-6890e060.system.js","./p-655ec440.system.js"],(function(n){"use strict";var t,e,i,o,s,a,r,c,l,d,h,u,f,v,p,m,z,b,y,g,k,w,x,_,C,j,I,A,E,S;return{setters:[function(n){t=n.r;e=n.d;i=n.h;o=n.a;s=n.g},function(n){a=n.t},function(n){r=n.W;c=n.b;l=n.t;d=n.J;h=n.w;u=n.d},function(n){f=n.s;v=n.B;p=n.t;m=n.A;z=n.l},function(n){b=n.z;y=n.g;g=n.f},function(n){k=n.l;w=n.i;x=n.s},function(n){_=n.a;C=n.s},function(n){j=n.c},function(n){I=n.l},function(n){A=n.c;E=n.s},function(n){S=n.g},function(){},function(){},function(){}],execute:function(){var O=function(n){var t=r({firstName:n.firstName,lastName:n.lastName,name:n.name}),e=t.firstName,i=t.lastName;return{address:{city:n.address.city,country:n.address.country,line1:n.address.line1,line2:n.address.line2||undefined,postal_code:n.address.postal_code,state:n.address.state},name:(n.name||"".concat(e," ").concat(i)).trim(),phone:n.phone||undefined}};var L=function(n){var t,e,i;return[n.name,(t=n.address)===null||t===void 0?void 0:t.line1,(e=n.address)===null||e===void 0?void 0:e.postal_code,(i=n.address)===null||i===void 0?void 0:i.country].map((function(n){return(n||"").trim().toLowerCase()})).join("|")};var N=function(n){var t=n.currentEvent,e=n.defaultAddress;if(!t){return e}var i=O(t.value);var o=L(i);var s=e.some((function(n){return L(n)===o}));if(s){return e}return __spreadArray([i],e,true)};var Z=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var B=Z;var D=n("zonos_address",function(){function n(n){t(this,n);this.invalidCharacters=e(this,"invalidCharacters",7);this.taxIdChanged=e(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=f.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=a(h,1e3)}n.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:c.stripeBillingAddressElement,stripeAddressEventData:c.stripeBillingAddressEventData,stripeElements:c.stripeElementsForBillingAddress}}return{stripeAddressElement:c.stripeAddressElement,stripeAddressEventData:c.stripeAddressEventData,stripeElements:c.stripeElements}};n.prototype.updateAddressEventData=function(n){var t=n.event,e=n.type;switch(e){case"billing":c.stripeBillingAddressEventData=t;break;default:{c.stripeAddressEventData=t;break}}if(e==="shipping"){if(t.value.address.line1.length){void this.prefetchLandedCost()}}};n.prototype.isAddressFilledChanged=function(){if(!f.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var n=f.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_customerInfoFilled"})}};n.prototype.updateAddressElement=function(n){var t=n.stripeAddressElement,e=n.type;if(e==="shipping"){c.stripeAddressElement=t;return}c.stripeBillingAddressElement=t};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i,o,s,a,c,l,d;var h=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;n=this.getStripeAddressInstance(),t=n.stripeAddressEventData,e=n.stripeElements;if(!this.stripe||!e){k("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=this.defaultAddress.map((function(n){return Object.assign(Object.assign({},n),{name:n.name,phone:n.phone||undefined})}));o=z.shippingZoneCountries;s=o?Object.values(o).map((function(n){return n.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");c=this.type==="shipping"?s:[];l=(t===null||t===void 0?void 0:t.value.address.country)||v(c);I("Stripe country code: ".concat(l),"info");d=e.create("address",{allowedCountries:a?[]:c,contacts:N({currentEvent:t,defaultAddress:i}),defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:l}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));if(t===null||t===void 0?void 0:t.value.address){this.prevCountry=t.value.address.country;this.prevPostalCode=t.value.address.postal_code}d.on("change",(function(n){var t=n.value;if(!h.isDirtyAddress&&t.address.line1.length>=3){h.isDirtyAddress=true;if(!h.isAutoCompleteAdjusted){var e=h.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(e){e.style.zIndex="3"}h.isAutoCompleteAdjusted=true}setTimeout((function(){if(w()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var n=h.type==="shipping"?100:600;var t=h.el.closest(".zonos--group");var e=h.el.getBoundingClientRect().top+n;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:e})}}),600)}var i=r({firstName:t.firstName,lastName:t.lastName,name:t.name}),o=i.firstName,s=i.lastName;h.updateAddressEventData({event:Object.assign(Object.assign({},n),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:s})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};n.prototype.defaultAddressChanged=function(n,t){var e=JSON.stringify(t);var i=JSON.stringify(n);if(e===i){return}I("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.clear();o===null||o===void 0?void 0:o.destroy();if(this.type==="shipping"){c.stripeAddressEventData=null}else{c.stripeBillingAddressEventData=null}void this.watchInitStripe()};n.prototype.isInTaxIdCountry=function(n){return A.includes(n)};n.prototype.renderTaxIdInput=function(){var n=this;var t;if(this.type==="billing"){return null}var e=(t=c.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!e){return null}if(!this.isInTaxIdCountry(e)){return null}var o=_({companyName:c.companyName,countryCode:e});if(!o){return null}var s=E[e];return i("div",{class:"zonos--tax-id-input"},i("zonos-stripe-input",{inputLabel:p(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:c.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(t){c.taxId=t.detail;n.taxIdChanged.emit(t.detail)}}),this.taxIdErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};n.prototype.renderShortAddressCodeInput=function(){var n;if(this.type==="billing"){return null}var t=(n=c.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country;if(!t){return null}var e=C({countryCode:t});if(!e){return null}return i("div",{class:"zonos--short-address-code-input"},i("zonos-stripe-input",{inputLabel:p("Short address code"),inputPlaceholder:"RRRD2929",inputValue:c.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(n){c.shortAddressCode=n.detail}}),this.shortAddressCodeErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};n.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var n=b.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!n){return null}return i("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:p("Company name (optional)"),inputValue:c.companyName,onInputChange:function(n){c.companyName=n.detail}})};n.prototype.disconnectedCallback=function(){var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.destroy();try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=f.checkoutSessionId;this.storeUnsubscribeList=[m("checkoutSessionId",(function(){n.checkoutSessionId=f.checkoutSessionId})),d("stripeElements",(function(){if(n.type==="shipping"){void n.watchInitStripe()}})),d("stripeElementsForBillingAddress",(function(){if(n.type==="billing"){void n.watchInitStripe()}}))]};n.prototype.render=function(){var n;this.checkoutSessionId=f.checkoutSessionId;if((n=c.stripeAddressEventData)===null||n===void 0?void 0:n.complete){this.isAddressFilled=true}return i(o,{key:"9b7a5340b839d63c64da03639bdfda5a11a5c25e",class:j(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&i("zonos-text",{key:"23739f6a48e5698372df2d53098dea6ad1c0559a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),i("slot",{key:"dea4b437eedaad2af2f6bbe3a1e2ae4f0706aa13",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),i("div",{key:"b4be684977a632371b9b6ff4587ccdd7bacc8c67",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return n}());D.style=B;var M='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var V='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var T='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var P=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var R=P;var F=n("zonos_confirm_dialog",function(){function n(n){var i=this;t(this,n);this.confirmClicked=e(this,"confirmClicked",7);this.cancelClicked=e(this,"cancelClicked",7);this.dialogTitle=p("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(n){if(n.target===n.currentTarget&&!i.noClickOutside){i.closeDialogHandler()}}}n.prototype.handleKeyDown=function(n){if(n.key==="Escape"){this.closeDialogHandler()}};n.prototype.focusDialog=function(){var n=this;if(this.dialogOpen){setTimeout((function(){var t,e;(e=(t=n.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".zonos--backdrop"))===null||e===void 0?void 0:e.focus()}),100)}};n.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};n.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};n.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return i("zonos-icon",{content:V,iconColor:"blue-800"});case"danger":return i("zonos-icon",{content:M,iconColor:"red-800"});case"warn":return i("zonos-icon",{content:T,iconColor:"orange-800"})}};n.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};n.prototype.render=function(){var n=this;this.focusDialog();var t=S();var e=y(b.appearance.theme);return i(o,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:j([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":e,style:{"--zonos--border-radius":t,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":g()}},i("div",{key:"6d7c55b90bfb05890d876a0243558eb9a2e7a772",class:"zonos--backdrop",tabIndex:-1}),i("div",{key:"abf306ddd70cefd64aa6804aeccf700506c175d7",class:j(["zonos--confirm-layout",this.dialogIntent]),onClick:function(t){return n.clickOutsideDialogHandler(t)}},i("div",{key:"dc7e9e6d501872597928603ded57d82c15c26710",class:"zonos--confirm-dialog",onBlur:function(){n.focusDialog()}},i("div",{key:"5c1fa9ec8b59cba68ccbc5dc36e66e2fdefdeae5",class:"wrapper"},i("div",{key:"0ce48c41c78e393a181fd5e9beeac90622b5c620",class:"icon-wrapper"},this.renderIcon()),i("div",{key:"b42157f8e76de8a60190e384d7d53a36d8051c67",class:"content"},i("div",{key:"bd8eb897f15a6d095df8fbd1803f62a11b9d5d7b",class:"title"},i("zonos-text",{key:"d1c06b89d4917b2366f881dda7da9e1369722126",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&i("div",{key:"4f1269aaab5ad3965d6ddfc0949341d4f202f296",class:"subtitle"},i("zonos-text",{key:"f784b5dd86ff684e790f27a586e3eeb4ac683884",textColor:"gray-800"},this.dialogSubtitle))),i("div",{key:"e0403a968aee6ff878c9e916e9ff216e2052ab0c",class:"footer"},this.dialogType==="confirm"&&i("zonos-button",{key:"66e34a9d61f677786bfe286f377854c9ebc780ed",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return n.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||p("Cancel")),i("zonos-button",{key:"3652507591e3055856a044e191525ea36b6042ca",class:"confirm-button",onClick:function(){return n.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(n,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return n}());F.style=R;var J=function(n){var t=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return t.test(n)};var q=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var G=q;var U=51;var $=n("zonos_link_authentication",function(){function n(n){var i=this;t(this,n);this.linkAuthenticationChange=e(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=c.stripe;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(n){var t=J(n);var e={complete:!!t,elementType:"linkAuthentication",empty:!n,value:{email:n}};c.stripeLinkEventData=e};this.handleNormalEmailInput=function(n){var t;var e=n.detail;i.setCustomEmailInputToLinkEvent(e);(t=i.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}}n.prototype.watchIsStagingMode=function(){var n=this;setTimeout((function(){void n.watchInitStripe()}),0)};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i;var o=this;return __generator(this,(function(s){switch(s.label){case 0:if(!this.stripe||!c.stripeElements){return[2]}if(u.isStagingMode||!this.clientSecret){return[2]}n=this.defaultEmail?{email:this.defaultEmail}:undefined;s.label=1;case 1:s.trys.push([1,2,,6]);t=c.stripeLinkElement||c.stripeElements.create("linkAuthentication",{defaultValues:n});e=this.el.querySelector(".zonos--link-authentication-component");if(!e){k("Cannot find container element for linkAuthenticationElement");return[2]}t.mount(e);t.on("change",(function(n){var t;c.stripeLinkEventData=n;(t=o.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}));c.stripeLinkElement=t;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){I("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void x({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:i=s.sent();if(!(i instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<U))return[3,4];return[4,new Promise((function(n){return setTimeout(n,500)}))];case 3:s.sent();void this.watchInitStripe();s.label=4;case 4:if(this.retriesInitializeLink===U){void x({endpoint:"stripe-link-authentication-init-error",errors:[i.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}s.label=5;case 5:return[3,6];case 6:return[2]}}))}))};n.prototype.watchDefaultEmail=function(n,t){var e,i;I("Default email is changed","info",{newDefaultEmail:n,oldDefaultEmail:t});if(t===n){return}if(!n){c.stripeLinkEventData=null}if(u.isStagingMode){this.setCustomEmailInputToLinkEvent(n||"");return}(e=c.stripeLinkElement)===null||e===void 0?void 0:e.clear();(i=c.stripeLinkElement)===null||i===void 0?void 0:i.destroy();c.stripeLinkElement=null;c.stripeLinkEventData=null;I("Reset stripe link element when default email is changed","info",{defaultEmail:n});void this.watchInitStripe()};n.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;this.storeUnsubscribeList=[d("stripeElements",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){void this.watchInitStripe();return[2]}))}))})),d("clientSecret",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.clientSecret=c.clientSecret;return[2]}))}))})),d("stripe",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.stripe=c.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};n.prototype.render=function(){var n=this;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;var t=function(){var t;if(u.isStagingMode){return i("zonos-stripe-input",{inputLabel:p("Email"),inputValue:n.defaultEmail||((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",isError:n.isEmailError,onBlur:function(){var t;var e=((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"";if(!e){return}var i=J(e);n.isEmailError=!i},onInputChange:n.handleNormalEmailInput})}return i("div",{class:"zonos--link-authentication-component ".concat(n.isEmailError&&"zonos--input-invalid")})};return i(o,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":S()}},this.titleText&&i("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),t(),this.isEmailError&&i("zonos-text",{textColor:"red-600"},p("Please enter a valid email address.")))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return n}());$.style=G;var H=":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{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var K=H;var Q=n("zonos_loading_overlay",function(){function n(n){t(this,n);this.open=false;this.size=40}n.prototype.render=function(){return i(o,{key:"8cafd99b309b04da5cf1b26b0f0804f4699c06b2",class:j(["zonos--elements",this.open&&"zonos--open"])},i("div",{key:"9ce7ac9b7e6956a5f76fc2105fa7f5d05299fd36",class:"zonos--loading-overlay"},i("zonos-spinner",{key:"4be3a8d471e3aead2e4194c4ecbf66878a7a3f17",size:this.size,spinnerColor:this.spinnerColor})))};return n}());Q.style=K}}}));
|