@zonos/elements 1.3.290 → 1.3.291
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-7DceSLKl.js → cart-B6Aty-21.js} +1 -1
- package/dist/cjs/{collect-C08DUE1L.js → collect-Oeo5tjN5.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-Duz8xpmf.js → getMissingRequiredShippingFields-D03ICqss.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-C-iyXqJ0.js → hasInclusivePrice-CPCoVeU3.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-DSuHUQpi.js → invoice-Cj8W7NW0.js} +2 -2
- package/dist/cjs/{localization-BJqYz_PB.js → localization-BzNeXeDe.js} +24 -15
- package/dist/cjs/{paypal-CZoctP9S.js → paypal-CuKshRmZ.js} +2 -2
- package/dist/cjs/{placeTestOrder-D7baFuaV.js → placeTestOrder-7czjwkjm.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-Ca2HH1Gc.js → renderCheckoutCurrency-BH8t2b2x.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-FyTdz7U_.js → shouldShowLanguageSelect-yAbtCmd8.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/collection/components/store/hello/localization.js +4 -1
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +20 -14
- package/dist/esm/{cart-Cleo1j5P.js → cart-BoQp8Ema.js} +1 -1
- package/dist/esm/{collect-CspdWIRo.js → collect-CdrR5OBy.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-B1IL1-gn.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +1 -1
- package/dist/esm/{hasInclusivePrice-DKRplpLX.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-D49igPQ9.js → invoice-S1KahJ_Z.js} +2 -2
- package/dist/esm/{localization-BiL8bPsY.js → localization-BIh-4pc_.js} +24 -15
- package/dist/esm/{paypal-D4vWRxHJ.js → paypal-DNfvnuUU.js} +2 -2
- package/dist/esm/{placeTestOrder-BNmc5RCo.js → placeTestOrder-CQaMKFOg.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-BNbwijGo.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-B82gTfHz.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +3 -3
- package/dist/esm/zonos-address-display_2.entry.js +1 -1
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/{cart-Cleo1j5P.js → cart-BoQp8Ema.js} +8 -8
- package/dist/esm-es5/{collect-CspdWIRo.js → collect-CdrR5OBy.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-B1IL1-gn.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-DKRplpLX.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
- package/dist/esm-es5/index.js +4 -4
- package/dist/esm-es5/{invoice-D49igPQ9.js → invoice-S1KahJ_Z.js} +1 -1
- package/dist/esm-es5/{localization-BiL8bPsY.js → localization-BIh-4pc_.js} +13 -3
- package/dist/esm-es5/{paypal-D4vWRxHJ.js → paypal-DNfvnuUU.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-BNmc5RCo.js → placeTestOrder-CQaMKFOg.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-BNbwijGo.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
- package/dist/esm-es5/{shouldShowLanguageSelect-B82gTfHz.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
- package/dist/esm-es5/zonos-address-display_2.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 +3 -3
- 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-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
- 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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-0ee74bf3.system.entry.js → p-04bded81.system.entry.js} +22 -22
- package/dist/zonos-elements/{p-c3b02dbf.entry.js → p-06fe2939.entry.js} +1 -1
- package/dist/zonos-elements/{p-13d3a372.system.entry.js → p-0b81f8b9.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-d6b72f6d.entry.js → p-0fca452b.entry.js} +1 -1
- package/dist/zonos-elements/{p-a571beaa.system.entry.js → p-11defdca.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-fb869759.system.entry.js → p-17c7ea4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ef0f69e.system.entry.js → p-23352709.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-a5c25829.system.entry.js → p-249c1ee1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52d9fd3a.entry.js → p-34656e6c.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4ad6d4b.entry.js → p-39ee1558.entry.js} +1 -1
- package/dist/zonos-elements/{p-23f6346b.system.entry.js → p-4806b264.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3c800376.system.entry.js → p-5016d71b.system.entry.js} +59 -59
- package/dist/zonos-elements/{p-5f347f91.system.entry.js → p-51400242.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-35509b10.system.entry.js → p-5236c676.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-ddca5ee1.entry.js → p-550d4eea.entry.js} +1 -1
- package/dist/zonos-elements/{p-481ecc23.system.entry.js → p-552fbde1.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-1b77464d.system.entry.js → p-5b80aff2.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-079af8c0.system.entry.js → p-69c3e367.system.entry.js} +9 -9
- package/dist/zonos-elements/{p-7d284341.system.entry.js → p-6abec43f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-5df25a1a.entry.js → p-6c41b00c.entry.js} +1 -1
- package/dist/zonos-elements/{p-f37b8aaf.system.entry.js → p-6db7c0b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-990b49f2.entry.js → p-6e296228.entry.js} +1 -1
- package/dist/zonos-elements/{p-BDrM4x5N.js → p-7abqRc9V.js} +2 -2
- package/dist/zonos-elements/{p-ba510730.entry.js → p-82595838.entry.js} +1 -1
- package/dist/zonos-elements/{p-84c9ce16.entry.js → p-938fc1e4.entry.js} +1 -1
- package/dist/zonos-elements/{p-DVITR-Eu.system.js → p-Be3Hpms1.system.js} +1 -1
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-BT9_ehlh.system.js → p-CEK_Wk6v.system.js} +1 -1
- package/dist/zonos-elements/p-CFbfEmjN.js +1 -0
- package/dist/zonos-elements/p-D-bZg-Pc.js +1 -0
- package/dist/zonos-elements/{p-CASTsiDR.system.js → p-D4MevhAL.system.js} +3 -3
- package/dist/zonos-elements/{p-tGJYTlGL.system.js → p-DI2vXnXc.system.js} +3 -3
- package/dist/zonos-elements/{p-Cpe_ISNt.system.js → p-DNc279vN.system.js} +27 -27
- package/dist/zonos-elements/{p-CEmXVahp.system.js → p-DOD2I44l.system.js} +92 -82
- package/dist/zonos-elements/{p-uuZUZPIm.system.js → p-DS-qw_qc.system.js} +10 -10
- package/dist/zonos-elements/p-DZ2mevDK.js +1 -0
- package/dist/zonos-elements/{p-B5NDhB1w.system.js → p-DuufSrhH.system.js} +4 -4
- package/dist/zonos-elements/{p-CewmhMGk.js → p-DzLNk-Pf.js} +1 -1
- package/dist/zonos-elements/{p-DwkyNtpD.js → p-FRWZayxL.js} +1 -1
- package/dist/zonos-elements/p-Mrz_lnC1.js +1 -0
- package/dist/zonos-elements/{p-B_5RofQ9.system.js → p-XDxdMlQl.system.js} +23 -23
- package/dist/zonos-elements/{p-DYIisqF7.system.js → p-XqkqjeNV.system.js} +1 -1
- package/dist/zonos-elements/{p-4fd78ecf.system.entry.js → p-a40fd99b.system.entry.js} +9 -9
- package/dist/zonos-elements/{p-79ddb12a.system.entry.js → p-b2dd7f02.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-11bab88b.entry.js → p-b79036fc.entry.js} +1 -1
- package/dist/zonos-elements/{p-26295311.entry.js → p-bb3546c0.entry.js} +1 -1
- package/dist/zonos-elements/p-c1cbfdba.entry.js +1 -0
- package/dist/zonos-elements/{p-7e1050dd.system.entry.js → p-c3646ae6.system.entry.js} +15 -15
- package/dist/zonos-elements/{p-028e0500.entry.js → p-c47ce656.entry.js} +1 -1
- package/dist/zonos-elements/{p-34c5e145.entry.js → p-c5bab786.entry.js} +1 -1
- package/dist/zonos-elements/{p-234c202c.entry.js → p-c961caaf.entry.js} +1 -1
- package/dist/zonos-elements/{p-NJVOYjda.js → p-c9QtIdJX.js} +1 -1
- package/dist/zonos-elements/{p-Cuk0LLGQ.js → p-clDfq9AL.js} +1 -1
- package/dist/zonos-elements/{p-db75322d.entry.js → p-d168023b.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b06f069.entry.js → p-db87b0dd.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab54d0a1.entry.js → p-dea26048.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd8ca91e.entry.js → p-defc2d18.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ee2af6e.system.entry.js → p-e005b6a5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0dca8a26.system.entry.js → p-e0e9cff5.system.entry.js} +26 -26
- package/dist/zonos-elements/p-f8b50aa0.entry.js +1 -0
- package/dist/zonos-elements/{p-tkSf-lrO.system.js → p-kaOxUR9u.system.js} +5 -5
- package/dist/zonos-elements/p-rVp8hgWw.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-35539d3d.entry.js +0 -1
- package/dist/zonos-elements/p-BJzAgoqz.js +0 -1
- package/dist/zonos-elements/p-BKoLoalh.js +0 -1
- package/dist/zonos-elements/p-BaF00SfB.js +0 -1
- package/dist/zonos-elements/p-BtWDzGMx.js +0 -1
- package/dist/zonos-elements/p-CX_vfdWt.js +0 -1
- package/dist/zonos-elements/p-ca3175d9.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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{l(i.next(n))}catch(n){s(n)}}function r(n){try{l(i["throw"](n))}catch(n){s(n)}}function l(n){n.done?e(n.value):o(n.value).then(a,r)}l((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=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=r(0),a["throw"]=r(1),a["return"]=r(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return l([n,t])}}function l(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-CIevpRv_.system.js","./p-B4Ufchqh.system.js","./p-
|
|
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{l(i.next(n))}catch(n){s(n)}}function r(n){try{l(i["throw"](n))}catch(n){s(n)}}function l(n){n.done?e(n.value):o(n.value).then(a,r)}l((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=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=r(0),a["throw"]=r(1),a["return"]=r(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return l([n,t])}}function l(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-CIevpRv_.system.js","./p-B4Ufchqh.system.js","./p-DS-qw_qc.system.js","./p-DOD2I44l.system.js","./p-BuU_p5DP.system.js","./p-zVLAvre1.system.js","./p-Bi-s0fp_.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js","./p-Cby4EkFu.system.js","./p-DQZncB2d.system.js","./p-8PPEbm_0.system.js","./p-DW-fW8yR.system.js","./p-C29tlYn0.system.js"],(function(n){"use strict";var t,e,i,o,s,a,r,l,c,d,h,u,f,v,p,m,z,b,y,g,k,w,x,_,C,I,j,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;l=n.w;c=n.b;d=n.t;h=n.J;u=n.d},function(n){f=n.s;v=n.l;p=n.C;m=n.t;z=n.z},function(n){b=n.z;y=n.g;g=n.a},function(n){k=n.l;w=n.i;x=n.s},function(n){_=n.a;C=n.s},function(n){I=n.c},function(n){j=n.l},function(n){A=n.c;E=n.s},function(n){S=n.g},null,null,null],execute:function(){
|
|
2
2
|
/**
|
|
3
3
|
* Map a Stripe address change event value into a Stripe `ContactOption`, used to
|
|
4
4
|
* pre-seed the address element's saved-address (contacts) list on remount.
|
|
@@ -7,13 +7,13 @@ var O=function(n){var t=r({firstName:n.firstName,lastName:n.lastName,name:n.name
|
|
|
7
7
|
/**
|
|
8
8
|
* Build a dedupe key for a contact so we don't add a duplicate saved address. Compared
|
|
9
9
|
* case- and whitespace-insensitively on the distinguishing fields.
|
|
10
|
-
*/var
|
|
10
|
+
*/var B=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("|")};
|
|
11
11
|
/**
|
|
12
12
|
* Prepend the currently selected address (from the latest Stripe address event) to the
|
|
13
13
|
* list of default saved addresses so it stays selected when the address element is
|
|
14
14
|
* remounted (e.g. navigating between the customer and shipping steps). Avoids adding a
|
|
15
15
|
* duplicate contact when the current address already exists in the list.
|
|
16
|
-
*/var
|
|
16
|
+
*/var D=function(n){var t=n.currentEvent,e=n.defaultAddress;if(!t){return e}var i=O(t.value);var o=B(i);var s=e.some((function(n){return B(n)===o}));if(s){return e}return __spreadArray([i],e,true)};var L=function(){return".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 Z=n("zonos_address",/** @class */function(){function n(n){t(this,n);this.invalidCharacters=e(this,"invalidCharacters",7);this.taxIdChanged=e(this,"taxIdChanged",7);this.storeUnsubscribeList=[];
|
|
17
17
|
/**
|
|
18
18
|
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
19
19
|
*/this.isAutoCompleteAdjusted=false;
|
|
@@ -53,7 +53,7 @@ if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.tracki
|
|
|
53
53
|
// (customer <-> shipping step navigation), de-duped against the default addresses.
|
|
54
54
|
// Contacts are computed once here at create() time and never mutated afterwards—
|
|
55
55
|
// mutating the contacts value after a remount breaks the element's onChange events.
|
|
56
|
-
contacts:
|
|
56
|
+
contacts:D({currentEvent:t,defaultAddress:i}),defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:c}),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"));
|
|
57
57
|
// Initialize previous values if address data exists
|
|
58
58
|
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}
|
|
59
59
|
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
@@ -101,7 +101,7 @@ try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.p
|
|
|
101
101
|
// @Watch doesn't get trigger on initial load
|
|
102
102
|
void this.watchInitStripe();this.checkoutSessionId=f.checkoutSessionId;this.storeUnsubscribeList=[z("checkoutSessionId",(function(){n.checkoutSessionId=f.checkoutSessionId})),h("stripeElements",(function(){if(n.type==="shipping"){void n.watchInitStripe()}})),h("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}
|
|
103
103
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
104
|
-
return i(o,{key:"302dafde973c4bf2d847640d8f0e064d88f350f8",class:I(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&i("zonos-text",{key:"706204604ad32eed710e38adbe8133b3384044eb",class:"zonos--title",type:"semiBoldLabel"},this.titleText),i("slot",{key:"0edc4c5d6c3ff965be6edbf680acaed892c71a16",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),i("div",{key:"6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5",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:0}],isAddressFilled:[{isAddressFilledChanged:0}],stripe:[{watchInitStripe:0}],defaultAddress:[{defaultAddressChanged:0}]}},enumerable:false,configurable:true});return n}());
|
|
104
|
+
return i(o,{key:"302dafde973c4bf2d847640d8f0e064d88f350f8",class:I(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&i("zonos-text",{key:"706204604ad32eed710e38adbe8133b3384044eb",class:"zonos--title",type:"semiBoldLabel"},this.titleText),i("slot",{key:"0edc4c5d6c3ff965be6edbf680acaed892c71a16",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),i("div",{key:"6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5",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:0}],isAddressFilled:[{isAddressFilledChanged:0}],stripe:[{watchInitStripe:0}],defaultAddress:[{defaultAddressChanged:0}]}},enumerable:false,configurable:true});return n}());Z.style=L();var N='<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 M='<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=function(){return":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=n("zonos_confirm_dialog",/** @class */function(){function n(n){var i=this;t(this,n);this.confirmClicked=e(this,"confirmClicked",7);this.cancelClicked=e(this,"cancelClicked",7);
|
|
105
105
|
/**
|
|
106
106
|
* Dialog title text
|
|
107
107
|
* @default "Are you sure?"
|
|
@@ -140,9 +140,9 @@ this.confirmClicked.emit()};n.prototype.closeDialogHandler=function(){
|
|
|
140
140
|
// Only do the action if the dialog is open
|
|
141
141
|
if(!this.dialogOpen){return}
|
|
142
142
|
// Emit cancel event
|
|
143
|
-
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:
|
|
143
|
+
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:N,iconColor:"red-800"});case"warn":return i("zonos-icon",{content:M,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();
|
|
144
144
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
145
|
-
var e=y(b.appearance.theme);return i(o,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:I([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:I(["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||m("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}());R.style=
|
|
145
|
+
var e=y(b.appearance.theme);return i(o,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:I([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:I(["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||m("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}());R.style=P();var T=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 F=function(){return".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 q=51;var U=n("zonos_link_authentication",/** @class */function(){function n(n){var i=this;t(this,n);this.linkAuthenticationChange=e(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];
|
|
146
146
|
/**
|
|
147
147
|
* Default email for stripe
|
|
148
148
|
*/this.defaultEmail=null;
|
|
@@ -158,7 +158,7 @@ if(u.isStagingMode||!this.clientSecret){return[2/*return*/]}n=this.defaultEmail?
|
|
|
158
158
|
// 10 seconds
|
|
159
159
|
if(this.retriesInitializeLink>11){j("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/*break*/,6];case 2:i=s.sent();if(!(i instanceof Error))return[3/*break*/,5];
|
|
160
160
|
// Wait for the stripe elements to be ready with the new client secret
|
|
161
|
-
this.retriesInitializeLink++;if(!(this.retriesInitializeLink<
|
|
161
|
+
this.retriesInitializeLink++;if(!(this.retriesInitializeLink<q))return[3/*break*/,4];return[4/*yield*/,new Promise((function(n){return setTimeout(n,500)}))];case 3:s.sent();void this.watchInitStripe();s.label=4;case 4:if(this.retriesInitializeLink===q){void x({endpoint:"stripe-link-authentication-init-error",errors:[i.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}s.label=5;case 5:return[3/*break*/,6];case 6:return[2/*return*/]}}))}))};n.prototype.watchDefaultEmail=function(n,t){var e,i;j("Default email is changed","info",{newDefaultEmail:n,oldDefaultEmail:t});if(t===n){return}if(!n){c.stripeLinkEventData=null}
|
|
162
162
|
// Only set value for Stripe input input to stripeLinkEventData when checkout is in staging mode
|
|
163
163
|
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;j("Reset stripe link element when default email is changed","info",{defaultEmail:n});void this.watchInitStripe()};n.prototype.disconnectedCallback=function(){
|
|
164
164
|
// unsubscribe from store subscriptions
|
|
@@ -170,7 +170,7 @@ this.setCustomEmailInputToLinkEvent(this.defaultEmail)};n.prototype.render=funct
|
|
|
170
170
|
// check if the email is valid
|
|
171
171
|
var i=T(e);n.isEmailError=!i},onInputChange:n.handleNormalEmailInput})}return i("div",{class:"zonos--link-authentication-component ".concat(n.isEmailError&&"zonos--input-invalid")})};
|
|
172
172
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
173
|
-
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"},m("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:0}],stripe:[{watchInitStripe:0}],clientSecret:[{watchInitStripe:0}],defaultEmail:[{watchDefaultEmail:0}]}},enumerable:false,configurable:true});return n}());
|
|
173
|
+
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"},m("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:0}],stripe:[{watchInitStripe:0}],clientSecret:[{watchInitStripe:0}],defaultEmail:[{watchDefaultEmail:0}]}},enumerable:false,configurable:true});return n}());U.style=F();var J=function(){return":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 Q=n("zonos_loading_overlay",/** @class */function(){function n(n){t(this,n);
|
|
174
174
|
/**
|
|
175
175
|
* Whether or not the overlay is open
|
|
176
176
|
* @default false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,t,a){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{l(a.next(e))}catch(e){s(e)}}function r(e){try{l(a["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,r)}l((a=a.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,i,s,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=r(0),o["throw"]=r(1),o["return"]=r(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(t=0)),t)try{if(a=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=n.call(e,t)}catch(e){r=[6,e];i=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,a){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{l(a.next(e))}catch(e){s(e)}}function r(e){try{l(a["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,r)}l((a=a.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,i,s,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=r(0),o["throw"]=r(1),o["return"]=r(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(t=0)),t)try{if(a=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=n.call(e,t)}catch(e){r=[6,e];i=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-DNc279vN.system.js","./p-DS-qw_qc.system.js","./p-DOD2I44l.system.js","./p-BuU_p5DP.system.js","./p-BbgqQIHv.system.js","./p-zVLAvre1.system.js","./p-DW-fW8yR.system.js","./p-DQZncB2d.system.js","./p-Cby4EkFu.system.js"],(function(e){"use strict";var n,t,a,i,s,o,r,l,c,u,f,h,m,y,p,w,x,z;return{setters:[function(e){n=e.r;t=e.d;a=e.h;i=e.a;s=e.g},function(e){o=e.b;r=e.c;l=e.f;c=e.l;u=e.m;f=e.n},function(e){h=e.d},function(e){m=e.h;y=e.t;p=e.l},function(e){w=e.z},function(e){x=e.l},function(e){z=e.l},null,null,null],execute:function(){var d=function(){return".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}"};var v=e("zonos_airwallex_payment",/** @class */function(){function e(e){var a=this;n(this,e);this.airwallexPaymentSuccess=t(this,"airwallexPaymentSuccess",7);this.airwallexPaymentError=t(this,"airwallexPaymentError",7);this.element=null;this.storeUnsubscribeList=[];
|
|
2
2
|
/** Client secret currently being mounted, to avoid overlapping mounts. */this.mountingClientSecret=null;
|
|
3
3
|
/**
|
|
4
4
|
* Whether the SDK failed to load or the element failed to mount.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o,a as s}from"./p-_lt63o7c.js";import{D as t,t as a,A as n,l}from"./p-
|
|
1
|
+
import{r as e,h as o,a as s}from"./p-_lt63o7c.js";import{D as t,t as a,A as n,l}from"./p-clDfq9AL.js";import{a as i}from"./p-W82paT5F.js";import"./p-DE4a-QD5.js";import"./p-BJmZPrZl.js";const c=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.languageSelected=e=>{t(e),this.handleOnClose()}}render(){const{selectedLocale:e}=l;return o(s,{key:"b557082e699209af33ab25715d5cb23fb8a20f56",class:"zonos--elements",style:{"--zonos--font-family":i()}},o("div",{key:"f5fa8a8163aa46589d67df8d7b69a9b60c7c3994",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"7ffc14b7fab4014352361424de6ea6e2fc8d7f6c",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"ab06dd27d199ef7223ce4421ab4d4e7a5816e402",class:"zonos--language-select-content"},n().map((s=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(s.code)},o("zonos-text",{textColor:"gray-800"},s.translatedLabel),s.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};c.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const d=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(s,{key:"2c3fe65b8226875d1e543d87d622a2356c975bae",class:"zonos--elements",style:{"--zonos--font-family":i()}},o("zonos-v-stack",{key:"7e065cce508376405350d8cf0b90437c5bbbd6e9",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"363ff8e4b18b50497b904af45bcf62ae374f90de",class:"zonos--select-dialog-header"},o("zonos-text",{key:"5b3833d7186579859d067c205ab3cb70bf01ed99",type:"boldLabel"},this.label),o("zonos-button",{key:"7dd27337e33c3d97544696a8d850204296474f5e",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"a5f6b16ecc6a1fb8c24bd783f0384d3506656f01"})))}};d.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{c as zonos_language_select,d as zonos_select_dialog_header}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,F as s,a as t,g as n}from"./p-_lt63o7c.js";import{a1 as r,G as a,a2 as i,a3 as l,a4 as c,R as d,a5 as m,a6 as p,K as z}from"./p-DwkyNtpD.js";import{l as h,t as g}from"./p-Cuk0LLGQ.js";import{z as x,a as f}from"./p-W82paT5F.js";import{r as u}from"./p-CX_vfdWt.js";import{g as y}from"./p-C_z9WL8a.js";import"./p-BJmZPrZl.js";import"./p-DE4a-QD5.js";import"./p-YdrG78th.js";import"./p-Cye-evFK.js";const v="POLICIES",b=class{constructor(e){o(this,e)}render(){const o=r();if(!o.length)return null;const n=Intl.ListFormat,i=(n?new n(h.selectedLocale,{style:"long",type:"conjunction"}).formatToParts(o.map((o=>o.name))):o.flatMap(((o,e)=>0===e?[{type:"element",value:o.name}]:[{type:"literal",value:", "},{type:"element",value:o.name}]))).map((s=>{if("literal"===s.type)return s.value;const t=o.find((o=>o.name===s.value));return t?e("a",{href:t.url,onClick:o=>{o.preventDefault(),o.stopPropagation(),window.open(t.url,"_blank","noopener,noreferrer")},rel:"noopener noreferrer",target:"_blank"},s.value):s.value})),l=x.organizationName,c=l?g("I agree to [merchantName]'s [policies]",{merchantName:l,policies:v}):g("I agree to the [policies]",{policies:v}),[d="",m=""]=c.split(v),p=a.showError,z="zonos--policy-consent-error";return e(t,{class:"zonos--policy-consent-host"},e("div",{class:"zonos--policy-consent"+(p?" zonos--policy-consent--error":"")},e("label",{class:"zonos--policy-consent-label"},e("input",{"aria-describedby":p?z:void 0,"aria-invalid":p?"true":"false",checked:a.accepted,class:"zonos--policy-consent-checkbox",disabled:a.locked,onChange:o=>{const e=o.target.checked;a.accepted=e,e?(a.acceptedAt||(a.acceptedAt=(new Date).toISOString()),a.showError=!1):a.acceptedAt=null},type:"checkbox"}),e("span",{class:"zonos--policy-consent-text"},d,e(s,null,i),m))),p&&e("div",{class:"zonos--policy-consent-error",id:z,role:"alert"},g("You must accept the policies to place this order")))}};b.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:block;margin-top:20px}.zonos--policy-consent{background-color:var(--zonos-elements-gray-50);border:1px solid var(--zonos-elements-gray-200);border-radius:8px;padding:12px 14px;-webkit-transition:border-color 0.15s ease, background-color 0.15s ease;transition:border-color 0.15s ease, background-color 0.15s ease}.zonos--policy-consent:hover{border-color:var(--zonos-elements-gray-300)}.zonos--policy-consent--error{background-color:var(--zonos-elements-red-50);border-color:var(--zonos-elements-red-400)}.zonos--policy-consent-label{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;gap:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.zonos--policy-consent-checkbox{accent-color:var(--zonos-elements-blue-600);cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:18px;margin:0;width:18px}.zonos--policy-consent-text{color:var(--zonos-elements-gray-800);font-size:14px;line-height:1.45}.zonos--policy-consent-text a{color:var(--zonos-elements-blue-600);text-decoration:underline;text-underline-offset:2px}.zonos--policy-consent-text a:hover{color:var(--zonos-elements-blue-700)}.zonos--policy-consent-error{color:var(--zonos-elements-red-600);font-size:13px;line-height:1.4;margin-top:8px;padding:0 4px}";var k='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n <path fill="currentColor" fill-rule="evenodd" d="M4 5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3H4Zm16 2H4a1 1 0 0 0-1 1v1h18V8a1 1 0 0 0-1-1ZM2 11h20v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3Zm6 4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>\n</svg>\n';const w="full",C="custom",j=class{constructor(e){o(this,e),this.enabled=!0,this.customAmountInput="",this.handleUseStoreCreditChange=o=>{i(o),o&&l(!0),c()},this.handleAmountModeChange=o=>{const e=o===w;l(e),e||(this.customAmountInput=""),c()},this.handleCustomAmountChange=o=>{this.customAmountInput=o,d.error=null},this.handleApplyCustomAmount=()=>{const o=parseFloat(this.customAmountInput);!isNaN(o)&&o>0?m(o):m(null),d.error||c()}}async componentWillLoad(){await p()}render(){if(!this.enabled)return null;const{colorPrimary:o}=x.appearance,n=y({}),r=d.availableBalance,a=null!==r&&r>0,i=d.isEnabled,l=d.useFullBalance,c=d.error,m=z(),p=u({amount:null!=r?r:0,isForeign:!0});return e(t,{class:"zonos--elements zonos--store-credit",style:{"--zonos--border-radius":n,"--zonos--font-family":f(),"--zonos--primary-color":o}},e("div",{class:"zonos--store-credit-container"},e("div",{class:"zonos--store-credit-header"},e("div",{class:"zonos--store-credit-title-row"},e("div",{class:"zonos--store-credit-title-left"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-title-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:22})),e("zonos-text",{type:"semiBoldLabel"},g("Store credit"))),a&&e("div",{class:"zonos--store-credit-balance-badge"},e("zonos-text",{textColor:"gray-600",type:"caption"},p)))),e(s,null,a?e("div",{class:"zonos--store-credit-content"},e("div",{class:"zonos--store-credit-checkbox"},e("zonos-checkbox",{isChecked:i,label:g("Use store credit"),onCheckboxSelected:o=>this.handleUseStoreCreditChange(o.detail),size:16})),i&&e("div",{class:"zonos--store-credit-options"},e("div",{class:"zonos--store-credit-toggle-row"},e("zonos-toggle",{onToggleChanged:o=>this.handleAmountModeChange(o.detail),options:[{label:g("Apply full balance"),value:w},{label:g("Enter amount"),value:C}],value:l?w:C})),!l&&e("div",{class:"zonos--store-credit-custom-amount"},e("div",{class:"zonos--store-credit-custom-amount-row"},e("zonos-input",{inputLabel:g("Enter amount"),inputValue:this.customAmountInput,isError:!!c,onInputChange:o=>this.handleCustomAmountChange(o.detail)}),e("zonos-button",{onClick:this.handleApplyCustomAmount,size:"sm",variant:"primary"},g("Apply")))),c&&e("div",{class:"zonos--store-credit-error"},e("zonos-text",{textColor:"red-600",type:"caption"},c)),e("div",{class:"zonos--store-credit-summary"},e("zonos-text",{textColor:"gray-800",type:"semiBoldLabel"},g("Amount to apply: [amount]",{amount:u({amount:m,isForeign:!0})}))))):e("div",{class:"zonos--store-credit-empty"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-empty-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:28})),e("zonos-text",{textColor:"gray-600",type:"caption"},g("No store credit available"))))))}get el(){return n(this)}};j.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:block;margin-bottom:var(--zonos-elements-font-size-xl)}:host .zonos--store-credit-container{background:-webkit-gradient(linear, left top, left bottom, from(var(--zonos-elements-gray-0)), to(var(--zonos-elements-gray-50)));background:linear-gradient(180deg, var(--zonos-elements-gray-0) 0%, var(--zonos-elements-gray-50) 100%);border:1px solid var(--zonos-elements-gray-200);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-8));-webkit-box-shadow:var(--zonos-elements-v3-shadow-base);box-shadow:var(--zonos-elements-v3-shadow-base);overflow:hidden;padding:0;position:relative}:host .zonos--store-credit-container::before{background:var(--zonos--primary-color, var(--zonos-elements-gray-400));content:"";height:3px;left:0;position:absolute;right:0;top:0}:host .zonos--store-credit-header{padding:var(--zonos-elements-radius-12) var(--zonos-elements-font-size-l) 0}:host .zonos--store-credit-title-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .zonos--store-credit-title-left{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-title-icon{-ms-flex-align:center;align-items:center;background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 14%, transparent);border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.75);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:22px;-ms-flex-pack:center;justify-content:center;width:22px}:host .zonos--store-credit-balance-badge{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 8%, var(--zonos-elements-gray-50));border:1px solid color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 22%, var(--zonos-elements-gray-200));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:2px var(--zonos-elements-font-size-s)}:host .zonos--store-credit-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-s) var(--zonos-elements-font-size-l) var(--zonos-elements-radius-12)}:host .zonos--store-credit-checkbox{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}:host .zonos--store-credit-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-toggle-row{display:-ms-flexbox;display:flex}:host .zonos--store-credit-custom-amount{max-width:240px}:host .zonos--store-credit-custom-amount-row{-ms-flex-align:end;align-items:flex-end;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-custom-amount-row zonos-input{-ms-flex:1;flex:1}:host .zonos--store-credit-error{margin-top:2px}:host .zonos--store-credit-summary{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 6%, var(--zonos-elements-gray-50));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:var(--zonos-elements-radius-10) var(--zonos-elements-font-size-s)}:host .zonos--store-credit-empty{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-xl) var(--zonos-elements-font-size-l) 22px;text-align:center}:host .zonos--store-credit-empty-icon{-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-100);border-radius:50%;display:-ms-flexbox;display:flex;height:52px;-ms-flex-pack:center;justify-content:center;opacity:0.95;width:52px}';export{b as zonos_policy_consent,j as zonos_store_credit}
|
|
1
|
+
import{r as o,h as e,F as s,a as t,g as n}from"./p-_lt63o7c.js";import{a1 as r,G as a,a2 as i,a3 as l,a4 as c,R as d,a5 as m,a6 as p,K as z}from"./p-FRWZayxL.js";import{l as h,t as g}from"./p-clDfq9AL.js";import{z as x,a as f}from"./p-W82paT5F.js";import{r as u}from"./p-Mrz_lnC1.js";import{g as y}from"./p-C_z9WL8a.js";import"./p-BJmZPrZl.js";import"./p-DE4a-QD5.js";import"./p-YdrG78th.js";import"./p-Cye-evFK.js";const v="POLICIES",b=class{constructor(e){o(this,e)}render(){const o=r();if(!o.length)return null;const n=Intl.ListFormat,i=(n?new n(h.selectedLocale,{style:"long",type:"conjunction"}).formatToParts(o.map((o=>o.name))):o.flatMap(((o,e)=>0===e?[{type:"element",value:o.name}]:[{type:"literal",value:", "},{type:"element",value:o.name}]))).map((s=>{if("literal"===s.type)return s.value;const t=o.find((o=>o.name===s.value));return t?e("a",{href:t.url,onClick:o=>{o.preventDefault(),o.stopPropagation(),window.open(t.url,"_blank","noopener,noreferrer")},rel:"noopener noreferrer",target:"_blank"},s.value):s.value})),l=x.organizationName,c=l?g("I agree to [merchantName]'s [policies]",{merchantName:l,policies:v}):g("I agree to the [policies]",{policies:v}),[d="",m=""]=c.split(v),p=a.showError,z="zonos--policy-consent-error";return e(t,{class:"zonos--policy-consent-host"},e("div",{class:"zonos--policy-consent"+(p?" zonos--policy-consent--error":"")},e("label",{class:"zonos--policy-consent-label"},e("input",{"aria-describedby":p?z:void 0,"aria-invalid":p?"true":"false",checked:a.accepted,class:"zonos--policy-consent-checkbox",disabled:a.locked,onChange:o=>{const e=o.target.checked;a.accepted=e,e?(a.acceptedAt||(a.acceptedAt=(new Date).toISOString()),a.showError=!1):a.acceptedAt=null},type:"checkbox"}),e("span",{class:"zonos--policy-consent-text"},d,e(s,null,i),m))),p&&e("div",{class:"zonos--policy-consent-error",id:z,role:"alert"},g("You must accept the policies to place this order")))}};b.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:block;margin-top:20px}.zonos--policy-consent{background-color:var(--zonos-elements-gray-50);border:1px solid var(--zonos-elements-gray-200);border-radius:8px;padding:12px 14px;-webkit-transition:border-color 0.15s ease, background-color 0.15s ease;transition:border-color 0.15s ease, background-color 0.15s ease}.zonos--policy-consent:hover{border-color:var(--zonos-elements-gray-300)}.zonos--policy-consent--error{background-color:var(--zonos-elements-red-50);border-color:var(--zonos-elements-red-400)}.zonos--policy-consent-label{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;gap:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.zonos--policy-consent-checkbox{accent-color:var(--zonos-elements-blue-600);cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:18px;margin:0;width:18px}.zonos--policy-consent-text{color:var(--zonos-elements-gray-800);font-size:14px;line-height:1.45}.zonos--policy-consent-text a{color:var(--zonos-elements-blue-600);text-decoration:underline;text-underline-offset:2px}.zonos--policy-consent-text a:hover{color:var(--zonos-elements-blue-700)}.zonos--policy-consent-error{color:var(--zonos-elements-red-600);font-size:13px;line-height:1.4;margin-top:8px;padding:0 4px}";var k='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n <path fill="currentColor" fill-rule="evenodd" d="M4 5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3H4Zm16 2H4a1 1 0 0 0-1 1v1h18V8a1 1 0 0 0-1-1ZM2 11h20v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3Zm6 4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>\n</svg>\n';const w="full",C="custom",j=class{constructor(e){o(this,e),this.enabled=!0,this.customAmountInput="",this.handleUseStoreCreditChange=o=>{i(o),o&&l(!0),c()},this.handleAmountModeChange=o=>{const e=o===w;l(e),e||(this.customAmountInput=""),c()},this.handleCustomAmountChange=o=>{this.customAmountInput=o,d.error=null},this.handleApplyCustomAmount=()=>{const o=parseFloat(this.customAmountInput);!isNaN(o)&&o>0?m(o):m(null),d.error||c()}}async componentWillLoad(){await p()}render(){if(!this.enabled)return null;const{colorPrimary:o}=x.appearance,n=y({}),r=d.availableBalance,a=null!==r&&r>0,i=d.isEnabled,l=d.useFullBalance,c=d.error,m=z(),p=u({amount:null!=r?r:0,isForeign:!0});return e(t,{class:"zonos--elements zonos--store-credit",style:{"--zonos--border-radius":n,"--zonos--font-family":f(),"--zonos--primary-color":o}},e("div",{class:"zonos--store-credit-container"},e("div",{class:"zonos--store-credit-header"},e("div",{class:"zonos--store-credit-title-row"},e("div",{class:"zonos--store-credit-title-left"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-title-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:22})),e("zonos-text",{type:"semiBoldLabel"},g("Store credit"))),a&&e("div",{class:"zonos--store-credit-balance-badge"},e("zonos-text",{textColor:"gray-600",type:"caption"},p)))),e(s,null,a?e("div",{class:"zonos--store-credit-content"},e("div",{class:"zonos--store-credit-checkbox"},e("zonos-checkbox",{isChecked:i,label:g("Use store credit"),onCheckboxSelected:o=>this.handleUseStoreCreditChange(o.detail),size:16})),i&&e("div",{class:"zonos--store-credit-options"},e("div",{class:"zonos--store-credit-toggle-row"},e("zonos-toggle",{onToggleChanged:o=>this.handleAmountModeChange(o.detail),options:[{label:g("Apply full balance"),value:w},{label:g("Enter amount"),value:C}],value:l?w:C})),!l&&e("div",{class:"zonos--store-credit-custom-amount"},e("div",{class:"zonos--store-credit-custom-amount-row"},e("zonos-input",{inputLabel:g("Enter amount"),inputValue:this.customAmountInput,isError:!!c,onInputChange:o=>this.handleCustomAmountChange(o.detail)}),e("zonos-button",{onClick:this.handleApplyCustomAmount,size:"sm",variant:"primary"},g("Apply")))),c&&e("div",{class:"zonos--store-credit-error"},e("zonos-text",{textColor:"red-600",type:"caption"},c)),e("div",{class:"zonos--store-credit-summary"},e("zonos-text",{textColor:"gray-800",type:"semiBoldLabel"},g("Amount to apply: [amount]",{amount:u({amount:m,isForeign:!0})}))))):e("div",{class:"zonos--store-credit-empty"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-empty-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:28})),e("zonos-text",{textColor:"gray-600",type:"caption"},g("No store credit available"))))))}get el(){return n(this)}};j.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:block;margin-bottom:var(--zonos-elements-font-size-xl)}:host .zonos--store-credit-container{background:-webkit-gradient(linear, left top, left bottom, from(var(--zonos-elements-gray-0)), to(var(--zonos-elements-gray-50)));background:linear-gradient(180deg, var(--zonos-elements-gray-0) 0%, var(--zonos-elements-gray-50) 100%);border:1px solid var(--zonos-elements-gray-200);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-8));-webkit-box-shadow:var(--zonos-elements-v3-shadow-base);box-shadow:var(--zonos-elements-v3-shadow-base);overflow:hidden;padding:0;position:relative}:host .zonos--store-credit-container::before{background:var(--zonos--primary-color, var(--zonos-elements-gray-400));content:"";height:3px;left:0;position:absolute;right:0;top:0}:host .zonos--store-credit-header{padding:var(--zonos-elements-radius-12) var(--zonos-elements-font-size-l) 0}:host .zonos--store-credit-title-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .zonos--store-credit-title-left{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-title-icon{-ms-flex-align:center;align-items:center;background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 14%, transparent);border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.75);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:22px;-ms-flex-pack:center;justify-content:center;width:22px}:host .zonos--store-credit-balance-badge{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 8%, var(--zonos-elements-gray-50));border:1px solid color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 22%, var(--zonos-elements-gray-200));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:2px var(--zonos-elements-font-size-s)}:host .zonos--store-credit-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-s) var(--zonos-elements-font-size-l) var(--zonos-elements-radius-12)}:host .zonos--store-credit-checkbox{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}:host .zonos--store-credit-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-toggle-row{display:-ms-flexbox;display:flex}:host .zonos--store-credit-custom-amount{max-width:240px}:host .zonos--store-credit-custom-amount-row{-ms-flex-align:end;align-items:flex-end;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-custom-amount-row zonos-input{-ms-flex:1;flex:1}:host .zonos--store-credit-error{margin-top:2px}:host .zonos--store-credit-summary{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 6%, var(--zonos-elements-gray-50));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:var(--zonos-elements-radius-10) var(--zonos-elements-font-size-s)}:host .zonos--store-credit-empty{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-xl) var(--zonos-elements-font-size-l) 22px;text-align:center}:host .zonos--store-credit-empty-icon{-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-100);border-radius:50%;display:-ms-flexbox;display:flex;height:52px;-ms-flex-pack:center;justify-content:center;opacity:0.95;width:52px}';export{b as zonos_policy_consent,j as zonos_store_credit}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,a as s}from"./p-_lt63o7c.js";import{d as e}from"./p-FRWZayxL.js";import{t as n}from"./p-clDfq9AL.js";import{r as i}from"./p-Mrz_lnC1.js";import{c as a}from"./p-BJHSB96f.js";import{c as l}from"./p-c9QtIdJX.js";import{r as c}from"./p-BXjdMMUy.js";import"./p-W82paT5F.js";import"./p-BJmZPrZl.js";import"./p-DE4a-QD5.js";import"./p-YdrG78th.js";import"./p-C_z9WL8a.js";import"./p-Cye-evFK.js";const r=class{constructor(t){o(this,t),this.isMobile=!1,this.errorImages=[],this.locale=null}componentWillLoad(){const o=navigator.language;this.locale=o}render(){const o=e.items.filter((o=>!o.isRestricted));return t(s,{key:"48cbe765b1096303cf0f2b051b0bac3911fba19b",class:a(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"83a2f9d2de381d1f941f5d09681b3a8e58a38a08",class:"zonos--cart-table"},t("tbody",{key:"5fbce46a1069457eb578ea737b42f05982aa5867"},o.map((o=>{var s,e,a,l;const c=null===(e=null===(s=o.attributes)||void 0===s?void 0:s.find((o=>"invoiceId"===o.key||"INVOICE_ID"===o.key)))||void 0===e?void 0:e.value,r=null===(l=null===(a=o.attributes)||void 0===a?void 0:a.find((o=>"invoiceCreatedAt"===o.key)))||void 0===l?void 0:l.value,h=r&&this.locale?new Date(r).toLocaleDateString(this.locale,{day:"numeric",month:"long",year:"numeric"}):null,d=c?`https://dashboard.zonos.com/billing/invoices/${c}`:null;return t("tr",{class:"zonos--invoice-cart-item"},t("td",{class:"zonos--column zonos--cart-item-title"},t("zonos-text",{type:"semiBoldLabel"},n("Invoice:"))),t("td",{class:"zonos--column zonos--cart-item-link"},d&&c&&t("zonos-link",{href:d},c),this.isMobile&&t("zonos-text",{type:"caption"},h)),t("td",{class:"zonos--column zonos--cart-item-created-at"},!this.isMobile&&t("zonos-text",{type:"label"},h)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"label"},i({amount:o.amount,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};r.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";const h=class{constructor(t){o(this,t),this.isMobile=!1}render(){return t(s,{key:"b98712b01891581bb2b64f5afd82711f7d41b585",class:a(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"ea7242545b5aa891a5214d426a96fa51ed8d5b5c",class:"zonos--invoice-table"},t("tr",{key:"7aef27c5154017fd322869c514dc20c42009a855",class:"zonos--row zonos--invoice-total"},t("td",{key:"60c5689c39d962b6c5a415bb93243259c815bfad",class:"zonos--column"}),t("td",{key:"b5886f54449738b01fa7a2884f7101a2f910dd21",class:"zonos--column zonos--invoice-subtotal-title"},t("zonos-text",{key:"1689b03f73918e7c2b6d3e1ef458473e817ac54c",type:"semiBoldLabel"},n("Payment total"))),t("td",{key:"f456cd24f03fe451814a7f0de609eed2ad761530",class:"zonos--column zonos--invoice-subtotal-price"},c({content:t("zonos-text",{type:"semiBoldLabel"},i({amount:l.amountTotalDue||0,isForeign:!0})),isLoading:l.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};h.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-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--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";export{r as zonos_invoice_cart_items,h as zonos_invoice_subtotal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,s){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,c){function l(o){try{r(s.next(o))}catch(o){c(o)}}function i(o){try{r(s["throw"](o))}catch(o){c(o)}}function r(o){o.done?t(o.value):n(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},s,n,c,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=i(0),l["throw"]=i(1),l["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(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,n&&(c=i[0]&2?n["return"]:i[0]?n["throw"]||((c=n["return"])&&c.call(n),0):n.next)&&!(c=c.call(n,i[1])).done)return c;if(n=0,c)i=[i[0]&2,c.value];switch(i[0]){case 0:case 1:c=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;n=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!c||i[1]>c[0]&&i[1]<c[3])){t.label=i[1];break}if(i[0]===6&&t.label<c[1]){t.label=c[1];c=i;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(i);break}if(c[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];n=0}finally{s=c=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-Cpe_ISNt.system.js","./p-uuZUZPIm.system.js","./p-B_5RofQ9.system.js","./p-CEmXVahp.system.js","./p-BuU_p5DP.system.js","./p-BDopxBpR.system.js","./p-zVLAvre1.system.js","./p-_GDmY2H7.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js","./p-CeLaK0Ff.system.js","./p-DW-fW8yR.system.js","./p-DQZncB2d.system.js","./p-Cby4EkFu.system.js","./p-B3GRrRtL.system.js","./p-DoEHepOc.system.js"],(function(o){"use strict";var e,t,s,n,c,l,i,r,a,d,z,u,h,f,m,p,g,b,v,w,x,y,k,_,C,I,j,S,L,E,A,O,T,D,P,U,R,N,B,W,H,F,X,Q,V;return{setters:[function(o){e=o.r;t=o.h;s=o.a;n=o.F},function(o){c=o.c;l=o.a;i=o.b;r=o.d;a=o.e;d=o.f;z=o.g;u=o.h;h=o.i},function(o){f=o.b;m=o.i;p=o.d;g=o.c;b=o.r;v=o.e;w=o.k;x=o.l;y=o.z;k=o.E;_=o.J;C=o.H;I=o.f},function(o){j=o.p;S=o.a},function(o){L=o.s;E=o.t;A=o.h;O=o.j;T=o.k;D=o.l},function(o){P=o.z},function(o){U=o.b},function(o){R=o.h;N=o.s;B=o.l;W=o.g},function(o){H=o.i;F=o.a},function(o){X=o.c},function(o){Q=o.l},function(o){V=o.r},null,null,null,null,null],execute:function(){var Z='<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 G=function(){return".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{display:-ms-flexbox;display:flex;width:100%;max-width:1400px;height:calc(100% - 100px);overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-collect-finish.sc-zonos-collect{-ms-flex:1;flex:1;min-height:0}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;max-width:100%;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;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);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);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}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var K=o("zonos_collect",/** @class */function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,s){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,c){function l(o){try{r(s.next(o))}catch(o){c(o)}}function i(o){try{r(s["throw"](o))}catch(o){c(o)}}function r(o){o.done?t(o.value):n(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},s,n,c,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=i(0),l["throw"]=i(1),l["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(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,n&&(c=i[0]&2?n["return"]:i[0]?n["throw"]||((c=n["return"])&&c.call(n),0):n.next)&&!(c=c.call(n,i[1])).done)return c;if(n=0,c)i=[i[0]&2,c.value];switch(i[0]){case 0:case 1:c=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;n=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(c=t.trys,c=c.length>0&&c[c.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!c||i[1]>c[0]&&i[1]<c[3])){t.label=i[1];break}if(i[0]===6&&t.label<c[1]){t.label=c[1];c=i;break}if(c&&t.label<c[2]){t.label=c[2];t.ops.push(i);break}if(c[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];n=0}finally{s=c=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-DNc279vN.system.js","./p-DS-qw_qc.system.js","./p-XDxdMlQl.system.js","./p-DOD2I44l.system.js","./p-BuU_p5DP.system.js","./p-BDopxBpR.system.js","./p-zVLAvre1.system.js","./p-_GDmY2H7.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js","./p-CeLaK0Ff.system.js","./p-DW-fW8yR.system.js","./p-DQZncB2d.system.js","./p-Cby4EkFu.system.js","./p-B3GRrRtL.system.js","./p-DoEHepOc.system.js"],(function(o){"use strict";var e,t,s,n,c,l,i,r,a,d,z,u,h,f,m,p,g,b,v,w,x,y,k,_,C,I,j,S,L,D,O,A,E,T,P,U,N,R,B,W,H,F,X,q,Q;return{setters:[function(o){e=o.r;t=o.h;s=o.a;n=o.F},function(o){c=o.c;l=o.a;i=o.b;r=o.d;a=o.e;d=o.f;z=o.g;u=o.h;h=o.i},function(o){f=o.b;m=o.i;p=o.d;g=o.c;b=o.r;v=o.e;w=o.k;x=o.l;y=o.z;k=o.E;_=o.J;C=o.H;I=o.f},function(o){j=o.p;S=o.a},function(o){L=o.s;D=o.t;O=o.h;A=o.j;E=o.k;T=o.l},function(o){P=o.z},function(o){U=o.b},function(o){N=o.h;R=o.s;B=o.l;W=o.g},function(o){H=o.i;F=o.a},function(o){X=o.c},function(o){q=o.l},function(o){Q=o.r},null,null,null,null,null],execute:function(){var G='<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 K=function(){return".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{display:-ms-flexbox;display:flex;width:100%;max-width:1400px;height:calc(100% - 100px);overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-collect-finish.sc-zonos-collect{-ms-flex:1;flex:1;min-height:0}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;max-width:100%;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;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);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);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}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var V=o("zonos_collect",/** @class */function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];
|
|
2
2
|
/**
|
|
3
3
|
* Listener for locale change in localization store
|
|
4
4
|
*/this.onChangeLocaleListener=function(){};
|
|
@@ -43,7 +43,7 @@ this.isOverlayLoading=true;
|
|
|
43
43
|
* Client secret value of customer session (use to load saved payment method and render saved consent)
|
|
44
44
|
*/this.stripeCustomerSessionClientSecret=f.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=p.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=P.appearance.theme;return[4/*yield*/,m({
|
|
45
45
|
// only override theme or theme from appearance if it's mobile
|
|
46
|
-
overrideTheme:this.isMobile?o:undefined,paypalEnabled:j()})];case 1:e.sent();return[2/*return*/]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4/*yield*/,
|
|
46
|
+
overrideTheme:this.isMobile?o:undefined,paypalEnabled:j()})];case 1:e.sent();return[2/*return*/]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4/*yield*/,N("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2/*return*/,e]}}))}))};
|
|
47
47
|
/**
|
|
48
48
|
* Determine which payment processor the collect session uses and initialize it.
|
|
49
49
|
*
|
|
@@ -67,9 +67,9 @@ if(!t||!l(t.checkoutSession)){throw new Error("Airwallex checkout session is mis
|
|
|
67
67
|
return[2/*return*/];case 4:void this.applyStripeTheme();return[2/*return*/]}}))}))};
|
|
68
68
|
/**
|
|
69
69
|
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
70
|
-
*/this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,n,c,l,i,r,a;return __generator(this,(function(d){switch(d.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");n=t.get("zonosCheckoutSessionId");
|
|
70
|
+
*/this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,n,c,l,i,r,a;return __generator(this,(function(d){switch(d.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");n=t.get("zonosCheckoutSessionId");q("Payment intent exist, checking stripe payment intent status");
|
|
71
71
|
// Allow to proceed to order if there's no stripe client secret and cart data is available
|
|
72
|
-
if(!s){
|
|
72
|
+
if(!s){q("No stripe client secret found in the URL, proceed to order if cart data is available");return[2/*return*/,{shouldAllowOrder:e}]}return[4/*yield*/,g({clientSecret:s})];case 1:c=d.sent(),l=c.error,i=c.status;r=new URLSearchParams(window.location.search).get("redirect_status");if(!(r&&n))return[3/*break*/,3];if(!l){q("Payment intent is succeeded or in a good state to move forward, show success screen")}else{q("Payment intent failed, show status from error")}return[4/*yield*/,this.fetchCheckoutSession(n)];case 2:a=d.sent();this.confirmationId=((o=a===null||a===void 0?void 0:a.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;L.checkoutSessionId=n;f.clientSecret=s;void this.setToFinishStep(i);return[2/*return*/,{shouldAllowOrder:false}];case 3:if(!e){q("Cart data is not available, only check payment intent status, skip order.");return[2/*return*/,{shouldAllowOrder:false}]}q("Payment intent is not succeeded, proceed to order");return[2/*return*/,{shouldAllowOrder:true}]}}))}))};
|
|
73
73
|
/**
|
|
74
74
|
* Recover the collect flow when updating the checkout session failed — which
|
|
75
75
|
* happens once the session is already completed/paid (e.g. the customer already
|
|
@@ -99,26 +99,26 @@ if(d==="processing"||d==="succeeded"){f.clientSecret=s.clientSecret;void this.se
|
|
|
99
99
|
*/o.prototype.resizeListener=function(){this.isMobile=H(this.mobile);this.isTablet=F(this.tablet)};
|
|
100
100
|
/**
|
|
101
101
|
* For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
|
|
102
|
-
*/o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){f.stripe=window.Zonos.stripe;p.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2/*return*/]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,n,l,r,a,d,h,f,m,g,y,k,_,C,I,j,S,A
|
|
102
|
+
*/o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){f.stripe=window.Zonos.stripe;p.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2/*return*/]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,n,l,r,a,d,h,f,m,g,y,k,_,C,I,j,S,O,A;return __generator(this,(function(E){switch(E.label){case 0:
|
|
103
103
|
// Should not happen since we will throw error way earlier if cartData is not available
|
|
104
|
-
if(!window.Zonos.cartData){return[2/*return*/]}m=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(m){p.currency=m}g=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;y=(l=(n=window.Zonos.cartData)===null||n===void 0?void 0:n.references)===null||l===void 0?void 0:l.landedCostId;if(!y){b({messages:[
|
|
104
|
+
if(!window.Zonos.cartData){return[2/*return*/]}m=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(m){p.currency=m}g=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;y=(l=(n=window.Zonos.cartData)===null||n===void 0?void 0:n.references)===null||l===void 0?void 0:l.landedCostId;if(!y){b({messages:[D("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:P.organizationName})],title:D("Invalid session")});return[2/*return*/]}
|
|
105
105
|
// Override checkout session id for collect if we found one in the cart reference
|
|
106
|
-
if(g){
|
|
106
|
+
if(g){q("Setting checkout session id from cart reference","info",g);L.checkoutSessionId=g}else{q("Clear checkout session id from storage so we start from a fresh session for the collect cart");L.checkoutSessionId=null}return[4/*yield*/,this.checkStripePaymentIntentStatus()];case 1:k=E.sent().shouldAllowOrder;if(!k){return[2/*return*/]}E.label=2;case 2:E.trys.push([2,13,,14]);_=U(window.Zonos.cartData),C=_.adjustments,I=_.cartItems;return[4/*yield*/,v({adjustments:C,cartItems:I,landedCostId:y,
|
|
107
107
|
// No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
|
|
108
|
-
shouldInitSessionOnFailure:false})];case 3:
|
|
108
|
+
shouldInitSessionOnFailure:false})];case 3:E.sent();if(!(!L.checkoutSessionId&&!g))return[3/*break*/,5];return[4/*yield*/,w()];case 4:j=E.sent();q("stripeStoreInitCheckoutSession: ".concat(j));if(!j){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}E.label=5;case 5:if(!((!p.checkoutSession||((r=p.checkoutSession)===null||r===void 0?void 0:r.completedAt))&&g))return[3/*break*/,7];return[4/*yield*/,this.recoverCompletedCollectSession(g)];case 6:S=E.sent();if(S){return[2/*return*/]}void R({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:g,cartId:(a=window.Zonos.cartData)===null||a===void 0?void 0:a.id,cartLandedCostId:y}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 7:if(!p.checkoutSession){void R({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:g||"N/A",cartId:(d=window.Zonos.cartData)===null||d===void 0?void 0:d.id,cartLandedCostId:y||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}c.paymentProcessor=p.checkoutSession.paymentProcessor;if(!(c.paymentProcessor==="AIRWALLEX"))return[3/*break*/,9];
|
|
109
109
|
// Airwallex needs the payment intent (client secret) created before we
|
|
110
110
|
// fetch the session and render its element.
|
|
111
111
|
return[4/*yield*/,x()];case 8:
|
|
112
112
|
// Airwallex needs the payment intent (client secret) created before we
|
|
113
113
|
// fetch the session and render its element.
|
|
114
|
-
|
|
114
|
+
E.sent();
|
|
115
115
|
// Seed the Airwallex store from the payment-intent create response (the
|
|
116
116
|
// reliable source of the client secret) so the drop-in can mount even if
|
|
117
117
|
// the follow-up get-checkout-session fetch is missing it.
|
|
118
118
|
if((h=p.checkoutSession)===null||h===void 0?void 0:h.clientSecret){i.clientSecret=p.checkoutSession.clientSecret;i.currency=p.currency}return[3/*break*/,10];case 9:
|
|
119
119
|
// Stripe, PayPal, and legacy sessions without a processor still need a
|
|
120
120
|
// payment intent so the payment UI loads with a client secret.
|
|
121
|
-
void x();
|
|
121
|
+
void x();E.label=10;case 10:O=(f=p.checkoutSession)===null||f===void 0?void 0:f.landedCost;if(!O){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4/*yield*/,z(Object.assign(Object.assign({},p.checkoutSession),{id:L.checkoutSessionId||""}))];case 11:E.sent();void u({landedCostId:O.id});return[4/*yield*/,this.initPaymentProcessor()];case 12:E.sent();return[3/*break*/,14];case 13:A=E.sent();B(A);b({messages:[D("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:P.organizationName})],title:D("Invalid session")});return[3/*break*/,14];case 14:this.isOverlayLoading=false;return[2/*return*/]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,n,l,i,r,a;return __generator(this,(function(d){switch(d.label){case 0:
|
|
122
122
|
// Attempt to get the value of the billing address element to validate the form
|
|
123
123
|
void((o=f.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());
|
|
124
124
|
// If the email is not complete, scroll to the link authentication section
|
|
@@ -134,7 +134,7 @@ f.hasPaymentError=false;this.submitLoading=true;
|
|
|
134
134
|
// reset inventory check message
|
|
135
135
|
p.inventoryCheckErrorMessage=null;return[4/*yield*/,y()];case 1:r=d.sent();
|
|
136
136
|
// Should not proceed to confirm payment if base currency update failed
|
|
137
|
-
if(!r){f.hasPaymentError=true;f.customErrorMessage=
|
|
137
|
+
if(!r){f.hasPaymentError=true;f.customErrorMessage=D("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:f.checkoutSettlementCurrency});this.submitLoading=false;return[2/*return*/]}
|
|
138
138
|
// Update the billing party id to the checkout session
|
|
139
139
|
return[4/*yield*/,h()];case 2:
|
|
140
140
|
// Update the billing party id to the checkout session
|
|
@@ -142,7 +142,7 @@ d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4/*yield*/,k({noLandedCos
|
|
|
142
142
|
// Some merchants use landed cost id as the confirmation id
|
|
143
143
|
this.confirmationId=c.landedCostShortId||((s=p.selectedLandedCost)===null||s===void 0?void 0:s.landedCostId)||null;return[2/*return*/];case 5:a=d.sent();B(a);f.hasPaymentError=true;return[3/*break*/,6];case 6:this.submitLoading=false;return[2/*return*/]}}))}))};o.prototype.componentWillLoad=function(){var o=this;f.stripe=window.Zonos.stripe;
|
|
144
144
|
// Set the step to payment
|
|
145
|
-
p.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[_("clientSecret",(function(){void o.applyStripeTheme()})),
|
|
145
|
+
p.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[_("clientSecret",(function(){void o.applyStripeTheme()})),O("selectedLocale",(function(){void o.applyStripeTheme()}))];q("mobile: ".concat(this.isMobile))};
|
|
146
146
|
// do clean up when component is unmounted
|
|
147
147
|
o.prototype.disconnectedCallback=function(){
|
|
148
148
|
// reset stripe store
|
|
@@ -164,8 +164,8 @@ var a=c.originCompanyName;var d=function(){var o;
|
|
|
164
164
|
// logo if the `shouldFallbackToOrganizationLogoForCollect` generic setting
|
|
165
165
|
// is enabled; otherwise no logo is shown.
|
|
166
166
|
var e=c.collectLogoUrl?c.collectLogoUrl:((o=P.genericSettings)===null||o===void 0?void 0:o.shouldFallbackToOrganizationLogoForCollect)&&i?// Timestamped so the browser won't cache a stale dashboard logo.
|
|
167
|
-
"".concat(i,"?timestamp=").concat(Date.now()):"";if(!e){return null}return t("div",{class:"zonos--logo"},t("img",{alt:"".concat(a||P.organizationName," logo"),src:e}))};var z=W();var u=function(){var e;var s=new URLSearchParams(window.location.search);var l=s.get("zonosQaUrl");var i=s.get("zonosDebug");var r=(e=
|
|
167
|
+
"".concat(i,"?timestamp=").concat(Date.now()):"";if(!e){return null}return t("div",{class:"zonos--logo"},t("img",{alt:"".concat(a||P.organizationName," logo"),src:e}))};var z=W();var u=function(){var e;var s=new URLSearchParams(window.location.search);var l=s.get("zonosQaUrl");var i=s.get("zonosDebug");var r=(e=E.find((function(o){return o.code===T.selectedLocale})))===null||e===void 0?void 0:e.label;return t(n,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},d(),z&&t("zonos-badge",{badgeColor:"orange",size:"small"},D("Test mode")),i==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),l&&t("zonos-badge",{badgeColor:"purple",size:"small"},l)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},r,t("zonos-icon",{"aria-label":"Language select",content:G,iconColor:"gray-1200"})),t("div",{class:X(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),Q({content:t("zonos-text",{class:"zonos--header-title",type:"header"},a?D("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:a}):D("Customs charges from your recent purchase are available for payment")),isLoading:c.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};
|
|
168
168
|
// const isAirwallex = collectStore.paymentProcessor === 'AIRWALLEX';
|
|
169
|
-
var h=function(){if(o.isOverlayLoading||f.isFetchingSession){return null}return t("div",{class:"zonos--content"},p.step!=="finish"&&p.step!=="error"&&t(n,null,(o.isMobile||o.isTablet)&&u(),t("div",{class:"zonos--left","data-theme":r},!o.isMobile&&!o.isTablet&&u(),c.paymentProcessor!=="AIRWALLEX"&&t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},
|
|
169
|
+
var h=function(){if(o.isOverlayLoading||f.isFetchingSession){return null}return t("div",{class:"zonos--content"},p.step!=="finish"&&p.step!=="error"&&t(n,null,(o.isMobile||o.isTablet)&&u(),t("div",{class:"zonos--left","data-theme":r},!o.isMobile&&!o.isTablet&&u(),c.paymentProcessor!=="AIRWALLEX"&&t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},D("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"}))),t("zonos-collect-payment",{class:X(["zonos--collect-container"]),continueLoading:o.submitLoading,onAirwallexPaymentDone:function(){var e;p.step="finish";o.confirmationId=c.landedCostShortId||((e=p.selectedLandedCost)===null||e===void 0?void 0:e.landedCostId)||null},onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.handleStripePaymentContinue()];case 1:o.sent();return[2/*return*/]}}))}))}})),t("div",{class:"zonos--right","data-theme":r},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":r,mobile:o.isMobile,tablet:o.isTablet})))),(p.step==="finish"||p.step==="error")&&t("div",{class:"zonos--done","data-theme":r},t("div",{class:"zonos--header"},d()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:p.step==="error"&&!!p.error?Object.assign(Object.assign({},p.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||p.step==="finish"||p.step==="error")&&t("zonos-collect-footer",{"data-theme":r,mobile:o.isMobile,tablet:o.isTablet}))};return t(s,{class:X(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":r},h(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:D("Cancel"),dialogConfirmBtnText:D("Pay [orderTotal]",{orderTotal:A({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:D("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:D("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},
|
|
170
170
|
// Mark user selected confirm to continue with payment
|
|
171
|
-
onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());
|
|
171
|
+
onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());V.style=K()}}}));
|