@zonos/elements 1.3.167 → 1.3.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/cjs/index.cjs.js +7 -7
  2. package/dist/cjs/{paypal-38ab2263.js → paypal-ea1693b0.js} +10 -2
  3. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +1 -1
  4. package/dist/cjs/zonos-checkout.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-controller.cjs.entry.js +3 -1
  6. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +1 -1
  7. package/dist/collection/components/main/zonos-controller.js +3 -1
  8. package/dist/collection/components/store/checkout/paypal.js +8 -0
  9. package/dist/collection/components/utils/api/paypalCreateOrder.js +2 -2
  10. package/dist/collection/types/generated/graphql.internal.types.js +35 -0
  11. package/dist/esm/index.js +7 -7
  12. package/dist/esm/{paypal-7d253663.js → paypal-a4f2a79c.js} +10 -2
  13. package/dist/esm/zonos-cart-items_13.entry.js +1 -1
  14. package/dist/esm/zonos-checkout.entry.js +1 -1
  15. package/dist/esm/zonos-controller.entry.js +3 -1
  16. package/dist/esm/zonos-empty-state-payment_4.entry.js +1 -1
  17. package/dist/esm-es5/index.js +1 -1
  18. package/dist/esm-es5/paypal-a4f2a79c.js +17 -0
  19. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  20. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  21. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  22. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  23. package/dist/scripts/index.d.ts +4 -0
  24. package/dist/scripts/index.js +1 -1
  25. package/dist/scripts/loadZonos.js +1 -1
  26. package/dist/scripts/zonos.js +1 -1
  27. package/dist/types/components/store/checkout/paypal.d.ts +2 -0
  28. package/dist/types/components/utils/api/paypalCreateOrder.d.ts +1 -1
  29. package/dist/types/types/checkout/CheckoutConfig.d.ts +4 -0
  30. package/dist/types/types/checkout/api/Paypal.d.ts +3 -1
  31. package/dist/types/types/generated/graphql.internal.types.d.ts +51 -5
  32. package/dist/types/types/generated/graphql.internal.types.ts +68 -5
  33. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  34. package/dist/zonos-elements/index.esm.js +1 -1
  35. package/dist/zonos-elements/{p-0150bb1e.entry.js → p-0e524fae.entry.js} +1 -1
  36. package/dist/zonos-elements/{p-82a0fcb7.system.entry.js → p-18af4af9.system.entry.js} +1 -1
  37. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  38. package/dist/zonos-elements/{p-d9b0094e.system.js → p-5af56bda.system.js} +1 -1
  39. package/dist/zonos-elements/{p-8654b135.system.entry.js → p-75b8db34.system.entry.js} +1 -1
  40. package/dist/zonos-elements/p-7f69ad17.system.js +17 -0
  41. package/dist/zonos-elements/{p-20802055.entry.js → p-a7246199.entry.js} +1 -1
  42. package/dist/zonos-elements/{p-d0adc1b5.system.entry.js → p-a9425cb3.system.entry.js} +1 -1
  43. package/dist/zonos-elements/{p-68584880.entry.js → p-af107510.entry.js} +1 -1
  44. package/dist/zonos-elements/p-b21c0d7f.js +17 -0
  45. package/dist/zonos-elements/{p-4508c22b.entry.js → p-bcfb4e10.entry.js} +1 -1
  46. package/dist/zonos-elements/{p-669a7b5d.system.entry.js → p-e427c0d6.system.entry.js} +1 -1
  47. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/esm-es5/paypal-7d253663.js +0 -17
  50. package/dist/zonos-elements/p-4a0d1e3c.system.js +0 -17
  51. package/dist/zonos-elements/p-e97f9606.js +0 -17
@@ -0,0 +1,17 @@
1
+ var __awaiter=this&&this.__awaiter||function(r,n,e,t){function o(r){return r instanceof e?r:new e((function(n){n(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{c(t.next(r))}catch(r){i(r)}}function u(r){try{c(t["throw"](r))}catch(r){i(r)}}function c(r){r.done?e(r.value):o(r.value).then(a,u)}c((t=t.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(r){return function(n){return c([r,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(r,e)}catch(r){u=[6,r];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-a9a95fae.system.js","./p-3bff5a9f.system.js","./p-18e5b741.system.js","./p-b6fdbbf4.system.js"],(function(r){"use strict";var n,e,t,o,i,a,u,c,s,l,d,f,v,p;return{setters:[function(r){n=r.z;e=r.c},function(r){t=r.F;o=r.f;i=r.e;a=r.z;u=r.r;c=r.x;s=r.k},function(r){l=r.h;d=r.l;f=r.b;v=r.j},function(r){p=r.t}],execute:function(){var w=this;
2
+ /*!
3
+ * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
+ * Copyright 2020-present, PayPal, Inc. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */function h(r,n){var e=document.querySelector('script[src="'.concat(r,'"]'));if(e===null)return null;var t=g(r,n);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(r){if(o.dataset[r]!==t.dataset[r]){i=false}}));return i?e:null}function y(r){var n=r.url,e=r.attributes,t=r.onSuccess,o=r.onError;var i=g(n,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function b(r){var n=r.environment;var e=n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete r.environment;if(r.sdkBaseUrl){e=r.sdkBaseUrl;delete r.sdkBaseUrl}var t=r;var o=Object.keys(t).filter((function(r){return typeof t[r]!=="undefined"&&t[r]!==null&&t[r]!==""})).reduce((function(r,n){var e=t[n].toString();n=_(n);if(n.substring(0,4)==="data"||n==="crossorigin"){r.attributes[n]=e}else{r.queryParams[n]=e}return r}),{queryParams:{},attributes:{}}),i=o.queryParams,a=o.attributes;if(i["merchant-id"]&&i["merchant-id"].indexOf(",")!==-1){a["data-merchant-id"]=i["merchant-id"];i["merchant-id"]="*"}return{url:"".concat(e,"?").concat(P(i)),attributes:a}}function _(r){var n=function(r,n){return(n?"-":"")+r.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,n)}function P(r){var n="";Object.keys(r).forEach((function(e){if(n.length!==0)n+="&";n+=e+"="+r[e]}));return n}function g(r,n){if(n===void 0){n={}}var e=document.createElement("script");e.src=r;Object.keys(n).forEach((function(r){e.setAttribute(r,n[r]);if(r==="data-csp-nonce"){e.setAttribute("nonce",n["data-csp-nonce"])}}));return e}function m(r,n){if(n===void 0){n=Promise}j(r,n);if(typeof document==="undefined")return n.resolve(null);var e=b(r),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=k(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(h(t,o)&&a){return n.resolve(a)}return E({url:t,attributes:o},n).then((function(){var r=k(i);if(r){return r}throw new Error("The window.".concat(i," global variable is not available."))}))}function E(r,n){if(n===void 0){n=Promise}j(r,n);var e=r.url,t=r.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new n((function(r,n){if(typeof document==="undefined")return r();y({url:e,attributes:t,onSuccess:function(){return r()},onError:function(){var r=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return n(r)}})}))}function k(r){return window[r]}function j(r,n){if(typeof r!=="object"||r===null){throw new Error("Expected an options object.")}var e=r.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof n!=="undefined"&&typeof n!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var A=function(r){return __awaiter(w,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId,i=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,l("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var S=function(r){return __awaiter(w,[r],void 0,(function(r){var n,e,t;var o=r.checkoutSessionId,i=r.intent;return __generator(this,(function(r){switch(r.label){case 0:return[4,l("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:i},method:"POST"})];case 1:n=r.sent(),e=n.errors,t=n.json;return[2,{errors:e,json:t}]}}))}))};var I=r("i",(function(r){var n=r.backgroundColor1,e=r.backgroundColor2;var t=p.readability(n,e);return t>2.5}));var x=r("s",(function(r){var e=n.checkoutSettings.analyticsProviders.find((function(r){return r.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){d("Zonos submits gtag event","log",r);window.gtag("event",r,{})}}));var O=e((function(){return{intent:"capture",orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),L=O.reset,T=O.state;r({c:L,b:T});var B=function(r){return __awaiter(w,[r],void 0,(function(r){var n,e,t,o,i,a,u;var c=r.checkoutSessionId;return __generator(this,(function(r){switch(r.label){case 0:t=T.intent.toUpperCase();return[4,S({checkoutSessionId:c,intent:t})];case 1:o=r.sent(),i=o.errors,a=o.json;u=(n=a===null||a===void 0?void 0:a.paypalOrderCreate)===null||n===void 0?void 0:n.paypalOrderId;if(i.length||!u){throw new Error(((e=i.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var C=function(r){return __awaiter(w,[r],void 0,(function(r){var n,e,t,o,i,a;var c=r.checkoutSessionId,s=r.paypalMockResponse;return __generator(this,(function(r){switch(r.label){case 0:return[4,A({checkoutSessionId:c,paypalMockResponse:s})];case 1:t=r.sent(),o=t.errors,i=t.json;a=(n=i===null||i===void 0?void 0:i.paypalOrderCapture.order)===null||n===void 0?void 0:n.id;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||u("An unexpected error occurred when processing PayPal order."))}return[2,a]}}))}))};var D=function(r){var n=r.error;var e;var t=v(n.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var i=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!i){T.paypalErrorMessage=u("An unexpected error occurred when processing PayPal order.")}var a=i[2]||u("An unexpected error occurred when processing PayPal order.");T.paypalErrorMessage=a};var z=function(r){var e=r.checkoutSessionId,l=r.onPaypalFail,d=r.onPaypalSessionDone,v=r.overrideBorderRaidus,p=r.overridePrimaryColor;var h=p||n.appearance.colorPrimary;var y="#ffc33a";var b=I({backgroundColor1:y,backgroundColor2:h||""});return{createOrder:function(){return __awaiter(w,void 0,void 0,(function(){var r,n,c,s,d;return __generator(this,(function(v){switch(v.label){case 0:return[4,t()];case 1:r=v.sent();if(!r.valid){T.paypalErrorMessage=r.errorMessage;o.hasPaymentError=false;o.customErrorMessage=null;l===null||l===void 0?void 0:l();return[2,""]}v.label=2;case 2:v.trys.push([2,8,,9]);T.paypalErrorMessage=null;i.inventoryCheckErrorMessage=null;v.label=3;case 3:v.trys.push([3,5,,6]);n=i;return[4,a()];case 4:n.inventoryCheckErrorMessage=v.sent();return[3,6];case 5:c=v.sent();i.inventoryCheckErrorMessage=u("Unable to check inventory. Please try again.");return[3,6];case 6:if(i.inventoryCheckErrorMessage){return[2,""]}return[4,B({checkoutSessionId:e})];case 7:s=v.sent();return[2,s];case 8:d=v.sent();f("Failed to create paypal order",d);T.paypalErrorMessage=u("Failed to create PayPal order. Please try again, or consider using an alternative method.");o.hasPaymentError=false;o.customErrorMessage=null;l===null||l===void 0?void 0:l();return[2,""];case 9:return[2]}}))}))},onApprove:function(r,n){return __awaiter(w,void 0,void 0,(function(){var r,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);T.paypalErrorMessage=null;x("zonos-checkout-payment-info");return[4,C({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:r=t.sent();T.orderIdCreated=r;d===null||d===void 0?void 0:d({orderId:r});c();s();return[3,3];case 2:n=t.sent();f("==== Failed to capture paypal order",n);if(n instanceof Error){return[2,D({error:n})]}l===null||l===void 0?void 0:l();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:v==="SHARP"?0:10,color:b?"gold":"blue",shape:"rect"}}};var F=function(){if(!T.paypalButtons.length){return}T.paypalButtons.forEach((function(r){return __awaiter(w,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,r.close()];case 1:n.sent();return[2]}}))}))}));T.paypalButtons=[]};var R=r("a",(function(r){return __awaiter(w,[r],void 0,(function(r){var e,t,o,i,a,u;var c=r.currency;return __generator(this,(function(r){switch(r.label){case 0:t=!!((e=n.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(r){return r.type==="PAYPAL"&&r.status==="ENABLED"})));if(!t){d("=== Paypal is disabled for this store","warn");return[2]}o=n.checkoutSettings.externalServiceTokens.find((function(r){return r.type==="PAYPAL_CLIENT_ID"}));if(!o){d("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=n.zonosMode==="production"&&n.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=n.checkoutSettings.captureDelay&&n.checkoutSettings.captureDelay>0;T.intent=a?"authorize":"capture";d("==== Paypal order intent","info",T.intent);u=window.Zonos;return[4,m({clientId:o.token,currency:c,environment:i,intent:T.intent})];case 1:u.paypal=r.sent();d("==== Paypal script loaded");return[2]}}))}))}));var M=r("d",(function(r){var n;var e=window.Zonos.paypal;if(!e){d("Paypal is not available");return null}var t=i.checkoutSessionId;if(!t){d("Paypal is not available due to checkoutSessionId is not available");return null}d("==== Loading Paypal buttons");F();var o=[(n=e.FUNDING)===null||n===void 0?void 0:n.PAYPAL].filter(Boolean);T.paypalButtons=o.map((function(n){var o;var i=null;try{i=((o=e.Buttons)===null||o===void 0?void 0:o.call(e,Object.assign(Object.assign({},z(Object.assign({checkoutSessionId:t,fundingSource:n},r))),{fundingSource:n})))||null}catch(r){d("===== Failed to load paypal's \"".concat(n,'" button'),"warn",r)}if(i===null||i===void 0?void 0:i.isEligible()){d("==== Paypal button ".concat(n," loaded"));return i}return null})).filter(Boolean);return T.paypalButtons}));var N=r("p",(function(){var r,e;var t=((e=(r=n.checkoutSettings.externalPaymentMethods)===null||r===void 0?void 0:r.find((function(r){return r.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!T.paypalButtons.length}))}}}));
@@ -1 +1 @@
1
- import{r as t,h as o,H as s,d as n,c as a}from"./p-ab68ad11.js";import{d as e}from"./p-dd999b44.js";import{c as i}from"./p-b4b7f705.js";import{g as r}from"./p-98e9c9cf.js";import{f as p}from"./p-c556ff98.js";import{b as h,l as c}from"./p-f0c8150e.js";import{d as l}from"./p-e97f9606.js";import"./p-672707ce.js";const y=class{constructor(o){t(this,o),this.emptyStateText=void 0,this.theme="LIGHT"}render(){return this.el.shadowRoot?(this.el.shadowRoot.innerHTML="DARK"===this.theme?'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n':'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n',o(s,{class:"zonos--elements",style:{"--zonos--font-family":e(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))):null}get el(){return n(this)}};y.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:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";const m=class{constructor(o){t(this,o),this.notificationArray=[]}async showNotification(t){const o=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:o,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(o)}),s.timeout)}updateTransitionClass({id:t,transitionClass:o}){this.notificationArray=this.notificationArray.map((s=>s.id===t?Object.assign(Object.assign({},s),{transitionClass:o}):s))}removeNotification(t){this.updateTransitionClass({id:t,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((o=>o.id!==t))}),300)}render(){return o(s,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:i(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":e()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((t=>o("div",{"aria-hidden":"true",class:i(["zonos--notification-item",t.type,t.transitionClass]),key:t.id,onClick:()=>{this.removeNotification(t.id)}},o("zonos-text",{textColor:"gray-0"},t.message))))))}};m.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:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const d=class{constructor(o){t(this,o),this.titleText=void 0,this.stripe=p.stripe,this.stripeElements=p.stripeElements}watchInitStripe(){if(!this.stripeElements)return;const t=p.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),o=this.el.querySelector(".zonos--payment-component");o?(t.mount(o),t.on("change",(t=>{p.stripePaymentEventData=t})),p.stripePaymentElement=t):h("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return o(s,{key:"2d664521944c4f02f34fe3130f8ebb853e562476",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"11f683a0f6094d801103a9f04054d038b405718f",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"0c962441697499b3a7eb279175ce025d76d4c0fa",class:"zonos--payment-component"}),o("div",{key:"a96af74f05521fcccc1912c0ec1dcbe64cfc1ae7",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}static get watchers(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};d.style=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";const f=class{constructor(o){t(this,o),this.paypalSessionDone=a(this,"paypalSessionDone",7),this.paypalSessionFail=a(this,"paypalSessionFail",7)}async loadPaypal(){if(!window.Zonos.paypal)return void c("Paypal is not available");const t=l({onPaypalFail:()=>{c("onPaypalFail"),this.paypalSessionFail.emit()},onPaypalSessionDone:({orderId:t})=>{c("onPaypalSessionDone","info",{orderId:t}),this.paypalSessionDone.emit({orderId:t})}});if(!(null==t?void 0:t.length))return void c("There are no paypal buttons available");const o=this.el.querySelector(".zonos--payment-paypal-container");o?t.forEach((async t=>{await t.render(o)})):c("Cannot find container element for paypal buttons")}componentDidLoad(){this.loadPaypal()}render(){return o(s,{key:"7be3c38f702c8fb105c54e652774f69fbbcfd34c",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}};f.style=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";export{y as zonos_empty_state_payment,m as zonos_notification,d as zonos_payment,f as zonos_paypal_payment}
1
+ import{r as t,h as o,H as s,d as n,c as a}from"./p-ab68ad11.js";import{d as e}from"./p-dd999b44.js";import{c as i}from"./p-b4b7f705.js";import{g as r}from"./p-98e9c9cf.js";import{f as p}from"./p-c556ff98.js";import{b as h,l as c}from"./p-f0c8150e.js";import{d as l}from"./p-b21c0d7f.js";import"./p-672707ce.js";const y=class{constructor(o){t(this,o),this.emptyStateText=void 0,this.theme="LIGHT"}render(){return this.el.shadowRoot?(this.el.shadowRoot.innerHTML="DARK"===this.theme?'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n':'<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n',o(s,{class:"zonos--elements",style:{"--zonos--font-family":e(),"--zonos--height":"100%","--zonos--width":"100%"}},o("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))):null}get el(){return n(this)}};y.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:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";const m=class{constructor(o){t(this,o),this.notificationArray=[]}async showNotification(t){const o=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:o,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(o)}),s.timeout)}updateTransitionClass({id:t,transitionClass:o}){this.notificationArray=this.notificationArray.map((s=>s.id===t?Object.assign(Object.assign({},s),{transitionClass:o}):s))}removeNotification(t){this.updateTransitionClass({id:t,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((o=>o.id!==t))}),300)}render(){return o(s,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:i(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":e()}},o("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((t=>o("div",{"aria-hidden":"true",class:i(["zonos--notification-item",t.type,t.transitionClass]),key:t.id,onClick:()=>{this.removeNotification(t.id)}},o("zonos-text",{textColor:"gray-0"},t.message))))))}};m.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:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";const d=class{constructor(o){t(this,o),this.titleText=void 0,this.stripe=p.stripe,this.stripeElements=p.stripeElements}watchInitStripe(){if(!this.stripeElements)return;const t=p.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),o=this.el.querySelector(".zonos--payment-component");o?(t.mount(o),t.on("change",(t=>{p.stripePaymentEventData=t})),p.stripePaymentElement=t):h("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return o(s,{key:"2d664521944c4f02f34fe3130f8ebb853e562476",class:"zonos--payment zonos--elements"},this.titleText&&o("zonos-text",{key:"11f683a0f6094d801103a9f04054d038b405718f",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"0c962441697499b3a7eb279175ce025d76d4c0fa",class:"zonos--payment-component"}),o("div",{key:"a96af74f05521fcccc1912c0ec1dcbe64cfc1ae7",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}static get watchers(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};d.style=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";const f=class{constructor(o){t(this,o),this.paypalSessionDone=a(this,"paypalSessionDone",7),this.paypalSessionFail=a(this,"paypalSessionFail",7)}async loadPaypal(){if(!window.Zonos.paypal)return void c("Paypal is not available");const t=l({onPaypalFail:()=>{c("onPaypalFail"),this.paypalSessionFail.emit()},onPaypalSessionDone:({orderId:t})=>{c("onPaypalSessionDone","info",{orderId:t}),this.paypalSessionDone.emit({orderId:t})}});if(!(null==t?void 0:t.length))return void c("There are no paypal buttons available");const o=this.el.querySelector(".zonos--payment-paypal-container");o?t.forEach((async t=>{await t.render(o)})):c("Cannot find container element for paypal buttons")}componentDidLoad(){this.loadPaypal()}render(){return o(s,{key:"7be3c38f702c8fb105c54e652774f69fbbcfd34c",class:"zonos--paypal-payment zonos--elements"},o("div",{key:"6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5",class:"zonos--payment-paypal-container"}))}get el(){return n(this)}};f.style=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";export{y as zonos_empty_state_payment,m as zonos_notification,d as zonos_payment,f as zonos_paypal_payment}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function r(o){try{a(n.next(o))}catch(o){i(o)}}function c(o){try{a(n["throw"](o))}catch(o){i(o)}}function a(o){o.done?t(o.value):s(o.value).then(r,c)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(o){return function(e){return a([o,e])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,c[0]&&(t=0)),t)try{if(n=1,s&&(i=c[0]&2?s["return"]:c[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,c[1])).done)return i;if(s=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;s=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(o,t)}catch(o){c=[6,o];s=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-3bff5a9f.system.js","./p-4a0d1e3c.system.js","./p-a9a95fae.system.js","./p-18e5b741.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-6658cc02.system.js","./p-b6fdbbf4.system.js","./p-1aa93d1e.system.js","./p-73a3e5bb.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,i,r,c,a,u,d,l,h,f,m,v,z,p,g,k,w,b,y,C,x,_,S,A,O,T,I,j,P,D,B,E,L,U,N,R,M,H,F,Z,G,K,V,W,q,Y,J,Q,X,$,oo,eo,to,no,so,io,ro,co;return{setters:[function(o){e=o.r;t=o.h;n=o.H;s=o.F},function(o){i=o.l;r=o.s;c=o.a;a=o.b;u=o.c;d=o.i;l=o.d;h=o.e;f=o.f;m=o.g;v=o.h;z=o.j;p=o.k;g=o.m;k=o.n;w=o.o;b=o.t;y=o.p;C=o.q;x=o.r;_=o.u;S=o.v;A=o.w;O=o.x;T=o.y;I=o.z;j=o.A;P=o.B;D=o.C;B=o.D;E=o.E},function(o){L=o.p;U=o.s;N=o.a;R=o.b},function(o){M=o.z;H=o.g;F=o.m},function(o){Z=o.h;G=o.l;K=o.b;V=o.s;W=o.c;q=o.d;Y=o.g;J=o.j;Q=o.a},function(o){X=o.i},function(o){$=o.c},function(o){oo=o.c},function(o){eo=o.g},function(o){to=o.i},function(o){no=o.s},function(o){so=o.c;io=o.s;ro=o.d},function(o){co=o.R}],execute:function(){var ao=this;var uo=function(o){var e=o.items.map((function(o){return{amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}}))||[];return{adjustments:o.adjustments,cartItems:e}};var lo=function(){return __awaiter(ao,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,Z("/api/zonos-elements/get-store-discount-enabled-status")];case 1:o=n.sent(),e=o.errors,t=o.json;if(e.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var ho=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return true}if(i.isDisabledCountry){if(o){G("Checkout: disabled country")}return true}return false};var fo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return false}if(!i.isShippableCountry){if(o){G("Checkout: not shippable country")}return false}return true};var mo=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(ao,void 0,void 0,(function(){var o,s,i,d,l;var h=this;return __generator(this,(function(f){o=document.querySelector(e);s=r();if(!o&&s){i=document.createElement("button");i.style.display="none";i.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(i);t===null||t===void 0?void 0:t(s);n.disconnect();return[2]}d=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!d||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(h,void 0,void 0,(function(){var e,t,n,s,i,r,l;return __generator(this,(function(h){n=d.value;if(!n){return[2]}c(n);if(!fo(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}i=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(e=i.get("shippingAddress.address1"))!==null&&e!==void 0?e:r&&r.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){K("One or more shipping address field is missing",Object.entries(l));void V({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:M.storeId}});return[2]}u({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var vo=function(){var o="connection"in window.navigator?window.navigator.connection:null;var e="mozConnection"in window.navigator?window.navigator.mozConnection:null;var t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;var n=o||e||t;return n};var zo=function(){var o="userAgentData"in window.navigator?window.navigator.userAgentData:null;var e=vo();return{connectionDownlink:e===null||e===void 0?void 0:e.downlink,connectionEffectiveType:e===null||e===void 0?void 0:e.effectiveType,connectionRtt:e===null||e===void 0?void 0:e.rtt,connectionSaveData:e===null||e===void 0?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}};var po=function(){return __awaiter(ao,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){o=W().elapsedTime;e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:q},zo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void Z("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var go='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var ko=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var wo=ko;var bo=90*60*1e3;var yo=6*60*60*1e3;var Co=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(i){switch(i.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||M.appearance.theme;return[4,d({overrideBorderRadius:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?s:undefined,paypalEnabled:L()})];case 1:i.sent();return[2]}}))}))};this.handleCartExpiredCheck=function(){var o;if(Y()){G("Not checking for cart expiration in test mode");return false}if(!M.checkoutSettings.defaultCartExpiration||!((o=window.Zonos.cartData)===null||o===void 0?void 0:o.createdAt)){return false}var e=new Date(window.Zonos.cartData.createdAt).getTime();var n=(new Date).getTime();var s=n-e;var i=Math.floor(s/1e3);G("Cart has been created for ".concat(i/60," minutes"));if(M.checkoutSettings.defaultCartExpiration){if(i>M.checkoutSettings.defaultCartExpiration){t.isCartExpired=true;return true}}return false};this.checkStripePaymentIntentStatus=function(o){return __awaiter(t,[o],void 0,(function(o){var e,t,n,s,i,r,c,a,u;var d=o.triggeredButton;return __generator(this,(function(o){switch(o.label){case 0:e=d===null||d===void 0?void 0:d.matches("#".concat(so));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;s=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!e){G("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}G("Payment intent exist, checking stripe payment intent status");if(!s){G("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,l({clientSecret:s})];case 1:r=o.sent(),c=r.error,a=r.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!c){G("Payment intent is succeeded or in a good state to move forward, show success screen")}else{G("Payment intent failed, show status from error")}this.open=true;h.checkoutSessionId=i;f.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}]}if(!t){G("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}G("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.formatDate=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleDateString()};this.formatTime=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var o=h.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.overrideStagingMode=undefined;this.defaultAddress=null;this.forceDialogOpen=false;this.defaultAddressParams=null;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=f.clientSecret}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void m({adjustments:h.adjustments,cartItems:e});return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;U("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&h.step==="finish"){v()}h.step="customer-info";z();p();(t=(e=M.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,s,r,c,a,s,u,c,a,a,d,l,c,f;return __generator(this,(function(v){switch(v.label){case 0:if(!(typeof M.checkoutSettings.createCartId==="function"))return[3,4];G('"createCartId" is provided, start building cart');return[4,M.checkoutSettings.createCartId()];case 1:o=v.sent();e=void 0;if(typeof o==="object"){G("object detected, use cartId and prefill address from createCartId");e=o.cartId;this.useShippingDataFromCreateCartId(o.shippingData)}else{e=o}window.Zonos.cartId=e;return[4,io(e)];case 2:t=v.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){K("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;s=this.handleCartExpiredCheck();if(s){return[2,false]}r=uo(n),c=r.adjustments,a=r.cartItems;return[4,m({adjustments:c,cartItems:a})];case 3:v.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];G("tempCartUUID is provided, start building cart");s=this.handleCartExpiredCheck();if(s){return[2,false]}u=uo(window.Zonos.cartData),c=u.adjustments,a=u.cartItems;return[4,m({adjustments:c,cartItems:a})];case 5:v.sent();return[3,9];case 6:if(!(M.checkoutSettings.buildCartDetail&&i.selectedCountryCode))return[3,9];G("build cart detail");return[4,M.checkoutSettings.buildCartDetail({countryCode:i.selectedCountryCode,currencyCode:i.targetCurrency})];case 7:a=v.sent();d=a.filter((function(o){return o.amount>=0}));l=a.filter((function(o){return o.amount<0}));c=l.map((function(o){return{amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"}}));return[4,m({adjustments:c,cartItems:d})];case 8:v.sent();v.label=9;case 9:if(!!h.checkoutSessionId)return[3,11];return[4,g()];case 10:f=v.sent();G("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}v.label=11;case 11:if(!h.isStagingMode){void k()}return[4,this.applyStripeTheme()];case 12:v.sent();this.isRedirectAfterOrder=M.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!h.externalConfirmationPageURL;return[2,true]}}))}))};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.handleOrderDuplication=function(){var o=J(localStorage.getItem("zonos--placed-order-info"));if(!o){localStorage.removeItem("zonos--placed-order-info");return}var e=Date.now()-o.time;G("=== Existing placed order info: ".concat(o.orderId," - ").concat(this.formatDate(o.time)," - elapsed in hh:ss format: ").concat(new Date(e).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||yo;if(e>t){G("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=o;G("=== Showing order duplication confirmation","warn")};o.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!h.checkoutSessionId){return}void Z("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})};o.prototype.handleCancelOrderDuplication=function(){var o;this.placedOrderInfo=null;if(this.isLegacyCheckout){var e=((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||M.onlineStoreSettings.url;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}void this.closeDialogHandler({confirmed:true})};o.prototype.attachCheckout=function(){var o=this;var e=M.checkoutSettings.placeOrderButtonSelector;G("attach checkout ".concat(e));if(!e&&!window.Zonos.cartData){return}var t=[e,"#".concat(ro),"#".concat(so)].filter(Boolean);var n=document.querySelectorAll(t.join(","));n.forEach((function(t){var n=t.getAttribute("data-zonos-checkout-attached");if(n){return}G("attached event to button ".concat(e),"info",{button:t});t.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t,n,s,i;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isLegacyCheckout&&(!fo()||ho())){return[2]}e.preventDefault();e.stopPropagation();G("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:e.target})];case 1:t=r.sent().shouldAllowOrder;if(!t){return[2]}f.isFetchingSession=true;this.open=true;r.label=2;case 2:r.trys.push([2,5,,6]);return[4,this.buildCartAndInit()];case 3:n=r.sent();if(this.isCartExpired){throw new Error("This shopping cart is expired")}if(!n){throw new Error("Error building cart")}w({isPreview:this.preview,sessionTimeout:bo});return[4,lo()];case 4:s=r.sent().enabled;h.shouldHideDiscountInput=!s;U("zonos-checkout-start");void b("checkout_open");this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void po()}return[3,6];case 5:i=r.sent();f.isFetchingSession=false;K(i);if(this.isCartExpired){return[2]}void V({endpoint:"Error creating Checkout",errors:[i instanceof Error?i.toString():"Unknown error"],metadata:{allLogs:q,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||M.onlineStoreSettings.url}});C({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")});return[3,6];case 6:return[2]}}))}))}),{capture:true,passive:false});if(!M.checkoutSettings.disablePlaceOrderButtonActivation){t.removeAttribute("disabled")}t.setAttribute("data-zonos-checkout-attached","true");if(t.matches(ro)){t.dispatchEvent(oo("click"));a();t.remove()}if(t.matches("#".concat(so))){t.dispatchEvent(oo("click"));t.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useShippingDataFromCreateCartId=function(o){if(!o){return}G("shipping data from createCartId result","info",Object.entries(o));var e=o.customerAddress1,t=o.customerAddress2,n=o.customerCity,s=o.customerCountry,r=o.customerEmail,c=o.customerName,a=o.customerPhone,u=o.customerState,d=o.customerZip;var l=new URLSearchParams(window.location.search);var h=s||_(l)||i.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:r,customerName:c,customerPhone:a,customerState:u,customerZip:d})};o.prototype.useLegacyQueryParams=function(){var o=new URLSearchParams(window.location.search);G("legacy urlParams","info",Object.fromEntries(o.entries()));var e=function(e){var t=o.get(e);if(!t||t==="undefined"){return null}return t};var t=_(o)||i.selectedCountryCode;var n=e("customerCity");var s=e("customerEmail");var r=e("customerAddress1");var c=e("customerAddress2");var a=e("customerName");var u=e("customerPhone");var d=e("customerZip");var l=e("customerState");this.applyPrefillAddress({customerAddress1:r,customerAddress2:c,customerCity:n,customerCountry:t,customerEmail:s,customerName:a,customerPhone:u,customerState:l,customerZip:d})};o.prototype.applyPrefillAddress=function(o){var e=o.customerAddress1||"";var t=o.customerCountry||"";var n=o.customerAddress2||"";var s=o.customerCity||"";var i=o.customerEmail||"";var r=o.customerName||"";var c=o.customerPhone||"";var a=o.customerZip||"";var u=o.customerState||"";var d=t==="UK"?"GB":t;if(!e||!r||!c||!t){G("Missing required query params so it can not be prefilled","info",[!e&&"line1",!r&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}this.defaultAddressParams={address:{city:s||"",country:d,line1:e,line2:n,postal_code:a,state:u},email:i,name:r,phone:c};G("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})};o.prototype.overrideStagingModeChanged=function(){h.isStagingMode=!!this.overrideStagingMode};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){f.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;h.isStagingMode=Q();if(typeof this.overrideStagingMode!=="undefined"){h.isStagingMode=this.overrideStagingMode}mo({domesticRedirectedBtnSelector:ro,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});if(window.Zonos){this.useLegacyQueryParams()}o=setInterval((function(){f.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){G("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}G("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){e.attachCheckout()}else if(window){e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){h.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.mockCheckoutSession=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){S(o);return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.submitLoading=true;return[4,A()];case 1:t.sent();o=setInterval((function(){if(h.landedCostData||!f.isFetchingLandedCost){if(h.landedCostData){void N({currency:h.currency});O()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){O();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogConfirm=function(){h.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};o.prototype.handleCartExpiredDialogConfirm=function(){var o;this.isCartExpired=false;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(i){switch(i.label){case 0:o=f.checkoutSettlementCurrency==="USD";if(o&&f.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;R.paypalErrorMessage=null;f.hasPaymentError=false;this.submitLoading=true;h.inventoryCheckErrorMessage=null;return[4,T()];case 1:e=i.sent();if(!e){f.hasPaymentError=true;f.customErrorMessage=x("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:f.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=h;return[4,I()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();h.inventoryCheckErrorMessage=x("Unable to check inventory. Please try again.");return[3,5];case 5:if(h.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,j()];case 7:i.sent();O();p();return[3,9];case 8:s=i.sent();K(s);U("zonos-checkout-payment-fail");f.hasPaymentError=true;if(f.shouldInventoryRefund){void P();f.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n;return __generator(this,(function(s){switch(s.label){case 0:D();if(!this.preview)return[3,2];h.step="customer-info";return[4,this.init()];case 1:s.sent();return[2];case 2:v();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){o=window.Zonos.cartData.storeBaseUrl||M.onlineStoreSettings.url;if(window.parent){window.parent.location.href=o}window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=X(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=X(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=H(this.appearanceSettingsOverride.theme)}};o.prototype.handleAddressChange=function(){D()};o.prototype.handleClientSecretChange=function(){G("=== Client secret changed","info",{clientSecret:f.clientSecret});void this.applyStripeTheme()};o.prototype.handleOpenChange=function(){var o="data-zonos-overflow-origin";var e=document.body;var t=document.documentElement;if(this.open){if(e.style.overflow){e.setAttribute(o,e.style.overflow)}e.style.overflow="hidden";if(t.style.overflow){t.setAttribute(o,t.style.overflow)}t.style.overflow="hidden"}else{var n=e.getAttribute(o);var s=t.getAttribute(o);if(n){e.removeAttribute(o);e.style.overflow=n}else{e.style.removeProperty("overflow")}if(s){t.removeAttribute(o);t.style.overflow=s}else{t.style.removeProperty("overflow")}}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=X(this.mobile);this.isIframed=window.self!==window.top;G("iframed: ".concat(this.isIframed));this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=B("selectedLocale",(function(){void o.applyStripeTheme()}));G("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){D();v();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e,r,c,a;this.clientSecret=f.clientSecret;var u=h.step!=="finish"&&h.step!=="error"&&!f.stripeElements||f.isFetchingSession;var d=F(M.appearance,this.appearanceSettingsOverride||null),l=d.colorPrimary,m=d.colorSecondary,v=d.logoUrl,z=d.style;var p=M.appearance.zonosAttribution==="ENABLED";var g=M.appearance.theme;var k=l&&to(l)?"DARK":"LIGHT";var w=this.isMobile?g:k;var b=!this.isMobile?m:undefined;var y=i.customMessages;var C=(e=y.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var _=this.getCurrentLocalePageEnum();var S=y.filter((function(o){return o.pageName===_}));var A=this.getBaseCurrencySettlementInfo();var O=function(){var e=o.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(M.organizationName," logo"),src:e}))};var T=Y();var I=function(){var e=new URLSearchParams(window.location.search);var n=e.get("zonosQaUrl");var s=e.get("zonosDebug");var i=e.get("zonosE2ETest");var r=o.overrideStagingMode||Q();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},O(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},x("Test mode")),r&&t("zonos-badge",{badgeColor:"red",size:"small"},x("Staging mode")),s==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),S.map((function(o){return t("zonos-custom-message",{icon:go,message:o.message})})))};var j=function(){if(h.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:x("Your checkout session has expired. Please reload the page to continue."),restStateTitle:x("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},x("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":eo({overrideBorderStyle:z})}},h.step!=="finish"&&h.step!=="error"&&t(s,null,t("div",{class:"zonos--left","data-theme":w,style:no({"--zonos--primary-color":!o.isMobile?l:undefined})},!o.isMobile&&I(),h.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress||o.defaultAddressParams,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:b}),h.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:b}),h.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,isMobile:o.isMobile,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))},submitBtnColor:b})),t("div",{class:"zonos--right","data-theme":g},o.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:co}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:b}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:go,message:C})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:go,message:C}))))),(h.step==="finish"||h.step==="error")&&t("div",{class:"zonos--done","data-theme":g},t("div",{class:"zonos--header"},O(),!o.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:co}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:g})),t("zonos-checkout-finish",{borderRadius:z,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:h.step==="error"&&!!h.error?Object.assign(Object.assign({},h.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":g,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(n,{class:$(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?j():t("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},j()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:x("Don't close"),dialogConfirmBtnText:x("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:x("Would you like to close checkout and return to the site?"),dialogTitle:x("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:x("Return to merchant site"),dialogConfirmBtnText:x("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((r=this.placedOrderInfo)===null||r===void 0?void 0:r.zonosOrderNumber)?x("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):x("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:x("Are you sure?"),dialogWidth:530,onCancelClicked:function(){o.handleCancelOrderDuplication()},onConfirmClicked:function(){o.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:x("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:x("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}),A&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:x("Cancel"),dialogConfirmBtnText:x("Pay [orderTotal]",{orderTotal:E({amount:A.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:x("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:x("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:x("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:x("You are being sent back to the shop to re-add items to your cart."),dialogTitle:x("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return o.handleCartExpiredDialogConfirm()}}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],clientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return o}());Co.style=wo}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function r(o){try{a(n.next(o))}catch(o){i(o)}}function c(o){try{a(n["throw"](o))}catch(o){i(o)}}function a(o){o.done?t(o.value):s(o.value).then(r,c)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(o){return function(e){return a([o,e])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,c[0]&&(t=0)),t)try{if(n=1,s&&(i=c[0]&2?s["return"]:c[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,c[1])).done)return i;if(s=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;s=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(o,t)}catch(o){c=[6,o];s=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-3bff5a9f.system.js","./p-7f69ad17.system.js","./p-a9a95fae.system.js","./p-18e5b741.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-6658cc02.system.js","./p-b6fdbbf4.system.js","./p-1aa93d1e.system.js","./p-73a3e5bb.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,i,r,c,a,u,d,l,h,f,m,v,z,p,g,k,w,b,y,C,x,_,S,A,O,T,I,j,P,D,B,E,L,U,N,R,M,H,F,Z,G,K,V,W,q,Y,J,Q,X,$,oo,eo,to,no,so,io,ro,co;return{setters:[function(o){e=o.r;t=o.h;n=o.H;s=o.F},function(o){i=o.l;r=o.s;c=o.a;a=o.b;u=o.c;d=o.i;l=o.d;h=o.e;f=o.f;m=o.g;v=o.h;z=o.j;p=o.k;g=o.m;k=o.n;w=o.o;b=o.t;y=o.p;C=o.q;x=o.r;_=o.u;S=o.v;A=o.w;O=o.x;T=o.y;I=o.z;j=o.A;P=o.B;D=o.C;B=o.D;E=o.E},function(o){L=o.p;U=o.s;N=o.a;R=o.b},function(o){M=o.z;H=o.g;F=o.m},function(o){Z=o.h;G=o.l;K=o.b;V=o.s;W=o.c;q=o.d;Y=o.g;J=o.j;Q=o.a},function(o){X=o.i},function(o){$=o.c},function(o){oo=o.c},function(o){eo=o.g},function(o){to=o.i},function(o){no=o.s},function(o){so=o.c;io=o.s;ro=o.d},function(o){co=o.R}],execute:function(){var ao=this;var uo=function(o){var e=o.items.map((function(o){return{amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}}))||[];return{adjustments:o.adjustments,cartItems:e}};var lo=function(){return __awaiter(ao,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,Z("/api/zonos-elements/get-store-discount-enabled-status")];case 1:o=n.sent(),e=o.errors,t=o.json;if(e.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var ho=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return true}if(i.isDisabledCountry){if(o){G("Checkout: disabled country")}return true}return false};var fo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return false}if(!i.isShippableCountry){if(o){G("Checkout: not shippable country")}return false}return true};var mo=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(ao,void 0,void 0,(function(){var o,s,i,d,l;var h=this;return __generator(this,(function(f){o=document.querySelector(e);s=r();if(!o&&s){i=document.createElement("button");i.style.display="none";i.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(i);t===null||t===void 0?void 0:t(s);n.disconnect();return[2]}d=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!d||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(h,void 0,void 0,(function(){var e,t,n,s,i,r,l;return __generator(this,(function(h){n=d.value;if(!n){return[2]}c(n);if(!fo(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}i=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(e=i.get("shippingAddress.address1"))!==null&&e!==void 0?e:r&&r.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){K("One or more shipping address field is missing",Object.entries(l));void V({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:M.storeId}});return[2]}u({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var vo=function(){var o="connection"in window.navigator?window.navigator.connection:null;var e="mozConnection"in window.navigator?window.navigator.mozConnection:null;var t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;var n=o||e||t;return n};var zo=function(){var o="userAgentData"in window.navigator?window.navigator.userAgentData:null;var e=vo();return{connectionDownlink:e===null||e===void 0?void 0:e.downlink,connectionEffectiveType:e===null||e===void 0?void 0:e.effectiveType,connectionRtt:e===null||e===void 0?void 0:e.rtt,connectionSaveData:e===null||e===void 0?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}};var po=function(){return __awaiter(ao,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){o=W().elapsedTime;e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:q},zo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void Z("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var go='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var ko=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var wo=ko;var bo=90*60*1e3;var yo=6*60*60*1e3;var Co=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(i){switch(i.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||M.appearance.theme;return[4,d({overrideBorderRadius:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?s:undefined,paypalEnabled:L()})];case 1:i.sent();return[2]}}))}))};this.handleCartExpiredCheck=function(){var o;if(Y()){G("Not checking for cart expiration in test mode");return false}if(!M.checkoutSettings.defaultCartExpiration||!((o=window.Zonos.cartData)===null||o===void 0?void 0:o.createdAt)){return false}var e=new Date(window.Zonos.cartData.createdAt).getTime();var n=(new Date).getTime();var s=n-e;var i=Math.floor(s/1e3);G("Cart has been created for ".concat(i/60," minutes"));if(M.checkoutSettings.defaultCartExpiration){if(i>M.checkoutSettings.defaultCartExpiration){t.isCartExpired=true;return true}}return false};this.checkStripePaymentIntentStatus=function(o){return __awaiter(t,[o],void 0,(function(o){var e,t,n,s,i,r,c,a,u;var d=o.triggeredButton;return __generator(this,(function(o){switch(o.label){case 0:e=d===null||d===void 0?void 0:d.matches("#".concat(so));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;s=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!e){G("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}G("Payment intent exist, checking stripe payment intent status");if(!s){G("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,l({clientSecret:s})];case 1:r=o.sent(),c=r.error,a=r.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!c){G("Payment intent is succeeded or in a good state to move forward, show success screen")}else{G("Payment intent failed, show status from error")}this.open=true;h.checkoutSessionId=i;f.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}]}if(!t){G("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}G("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.formatDate=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleDateString()};this.formatTime=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var o=h.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.overrideStagingMode=undefined;this.defaultAddress=null;this.forceDialogOpen=false;this.defaultAddressParams=null;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=f.clientSecret}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void m({adjustments:h.adjustments,cartItems:e});return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;U("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&h.step==="finish"){v()}h.step="customer-info";z();p();(t=(e=M.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,s,r,c,a,s,u,c,a,a,d,l,c,f;return __generator(this,(function(v){switch(v.label){case 0:if(!(typeof M.checkoutSettings.createCartId==="function"))return[3,4];G('"createCartId" is provided, start building cart');return[4,M.checkoutSettings.createCartId()];case 1:o=v.sent();e=void 0;if(typeof o==="object"){G("object detected, use cartId and prefill address from createCartId");e=o.cartId;this.useShippingDataFromCreateCartId(o.shippingData)}else{e=o}window.Zonos.cartId=e;return[4,io(e)];case 2:t=v.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){K("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;s=this.handleCartExpiredCheck();if(s){return[2,false]}r=uo(n),c=r.adjustments,a=r.cartItems;return[4,m({adjustments:c,cartItems:a})];case 3:v.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];G("tempCartUUID is provided, start building cart");s=this.handleCartExpiredCheck();if(s){return[2,false]}u=uo(window.Zonos.cartData),c=u.adjustments,a=u.cartItems;return[4,m({adjustments:c,cartItems:a})];case 5:v.sent();return[3,9];case 6:if(!(M.checkoutSettings.buildCartDetail&&i.selectedCountryCode))return[3,9];G("build cart detail");return[4,M.checkoutSettings.buildCartDetail({countryCode:i.selectedCountryCode,currencyCode:i.targetCurrency})];case 7:a=v.sent();d=a.filter((function(o){return o.amount>=0}));l=a.filter((function(o){return o.amount<0}));c=l.map((function(o){return{amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"}}));return[4,m({adjustments:c,cartItems:d})];case 8:v.sent();v.label=9;case 9:if(!!h.checkoutSessionId)return[3,11];return[4,g()];case 10:f=v.sent();G("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}v.label=11;case 11:if(!h.isStagingMode){void k()}return[4,this.applyStripeTheme()];case 12:v.sent();this.isRedirectAfterOrder=M.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!h.externalConfirmationPageURL;return[2,true]}}))}))};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.handleOrderDuplication=function(){var o=J(localStorage.getItem("zonos--placed-order-info"));if(!o){localStorage.removeItem("zonos--placed-order-info");return}var e=Date.now()-o.time;G("=== Existing placed order info: ".concat(o.orderId," - ").concat(this.formatDate(o.time)," - elapsed in hh:ss format: ").concat(new Date(e).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||yo;if(e>t){G("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=o;G("=== Showing order duplication confirmation","warn")};o.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!h.checkoutSessionId){return}void Z("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})};o.prototype.handleCancelOrderDuplication=function(){var o;this.placedOrderInfo=null;if(this.isLegacyCheckout){var e=((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||M.onlineStoreSettings.url;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}void this.closeDialogHandler({confirmed:true})};o.prototype.attachCheckout=function(){var o=this;var e=M.checkoutSettings.placeOrderButtonSelector;G("attach checkout ".concat(e));if(!e&&!window.Zonos.cartData){return}var t=[e,"#".concat(ro),"#".concat(so)].filter(Boolean);var n=document.querySelectorAll(t.join(","));n.forEach((function(t){var n=t.getAttribute("data-zonos-checkout-attached");if(n){return}G("attached event to button ".concat(e),"info",{button:t});t.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t,n,s,i;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isLegacyCheckout&&(!fo()||ho())){return[2]}e.preventDefault();e.stopPropagation();G("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:e.target})];case 1:t=r.sent().shouldAllowOrder;if(!t){return[2]}f.isFetchingSession=true;this.open=true;r.label=2;case 2:r.trys.push([2,5,,6]);return[4,this.buildCartAndInit()];case 3:n=r.sent();if(this.isCartExpired){throw new Error("This shopping cart is expired")}if(!n){throw new Error("Error building cart")}w({isPreview:this.preview,sessionTimeout:bo});return[4,lo()];case 4:s=r.sent().enabled;h.shouldHideDiscountInput=!s;U("zonos-checkout-start");void b("checkout_open");this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void po()}return[3,6];case 5:i=r.sent();f.isFetchingSession=false;K(i);if(this.isCartExpired){return[2]}void V({endpoint:"Error creating Checkout",errors:[i instanceof Error?i.toString():"Unknown error"],metadata:{allLogs:q,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:((o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl)||M.onlineStoreSettings.url}});C({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")});return[3,6];case 6:return[2]}}))}))}),{capture:true,passive:false});if(!M.checkoutSettings.disablePlaceOrderButtonActivation){t.removeAttribute("disabled")}t.setAttribute("data-zonos-checkout-attached","true");if(t.matches(ro)){t.dispatchEvent(oo("click"));a();t.remove()}if(t.matches("#".concat(so))){t.dispatchEvent(oo("click"));t.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useShippingDataFromCreateCartId=function(o){if(!o){return}G("shipping data from createCartId result","info",Object.entries(o));var e=o.customerAddress1,t=o.customerAddress2,n=o.customerCity,s=o.customerCountry,r=o.customerEmail,c=o.customerName,a=o.customerPhone,u=o.customerState,d=o.customerZip;var l=new URLSearchParams(window.location.search);var h=s||_(l)||i.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:r,customerName:c,customerPhone:a,customerState:u,customerZip:d})};o.prototype.useLegacyQueryParams=function(){var o=new URLSearchParams(window.location.search);G("legacy urlParams","info",Object.fromEntries(o.entries()));var e=function(e){var t=o.get(e);if(!t||t==="undefined"){return null}return t};var t=_(o)||i.selectedCountryCode;var n=e("customerCity");var s=e("customerEmail");var r=e("customerAddress1");var c=e("customerAddress2");var a=e("customerName");var u=e("customerPhone");var d=e("customerZip");var l=e("customerState");this.applyPrefillAddress({customerAddress1:r,customerAddress2:c,customerCity:n,customerCountry:t,customerEmail:s,customerName:a,customerPhone:u,customerState:l,customerZip:d})};o.prototype.applyPrefillAddress=function(o){var e=o.customerAddress1||"";var t=o.customerCountry||"";var n=o.customerAddress2||"";var s=o.customerCity||"";var i=o.customerEmail||"";var r=o.customerName||"";var c=o.customerPhone||"";var a=o.customerZip||"";var u=o.customerState||"";var d=t==="UK"?"GB":t;if(!e||!r||!c||!t){G("Missing required query params so it can not be prefilled","info",[!e&&"line1",!r&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}this.defaultAddressParams={address:{city:s||"",country:d,line1:e,line2:n,postal_code:a,state:u},email:i,name:r,phone:c};G("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})};o.prototype.overrideStagingModeChanged=function(){h.isStagingMode=!!this.overrideStagingMode};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){f.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;h.isStagingMode=Q();if(typeof this.overrideStagingMode!=="undefined"){h.isStagingMode=this.overrideStagingMode}mo({domesticRedirectedBtnSelector:ro,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});if(window.Zonos){this.useLegacyQueryParams()}o=setInterval((function(){f.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){G("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}G("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){e.attachCheckout()}else if(window){e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){h.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.mockCheckoutSession=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){S(o);return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.submitLoading=true;return[4,A()];case 1:t.sent();o=setInterval((function(){if(h.landedCostData||!f.isFetchingLandedCost){if(h.landedCostData){void N({currency:h.currency});O()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){O();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogConfirm=function(){h.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};o.prototype.handleCartExpiredDialogConfirm=function(){var o;this.isCartExpired=false;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(i){switch(i.label){case 0:o=f.checkoutSettlementCurrency==="USD";if(o&&f.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;R.paypalErrorMessage=null;f.hasPaymentError=false;this.submitLoading=true;h.inventoryCheckErrorMessage=null;return[4,T()];case 1:e=i.sent();if(!e){f.hasPaymentError=true;f.customErrorMessage=x("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:f.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=h;return[4,I()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();h.inventoryCheckErrorMessage=x("Unable to check inventory. Please try again.");return[3,5];case 5:if(h.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,j()];case 7:i.sent();O();p();return[3,9];case 8:s=i.sent();K(s);U("zonos-checkout-payment-fail");f.hasPaymentError=true;if(f.shouldInventoryRefund){void P();f.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n;return __generator(this,(function(s){switch(s.label){case 0:D();if(!this.preview)return[3,2];h.step="customer-info";return[4,this.init()];case 1:s.sent();return[2];case 2:v();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){o=window.Zonos.cartData.storeBaseUrl||M.onlineStoreSettings.url;if(window.parent){window.parent.location.href=o}window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=X(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=X(this.mobile);void this.applyStripeTheme();G("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=H(this.appearanceSettingsOverride.theme)}};o.prototype.handleAddressChange=function(){D()};o.prototype.handleClientSecretChange=function(){G("=== Client secret changed","info",{clientSecret:f.clientSecret});void this.applyStripeTheme()};o.prototype.handleOpenChange=function(){var o="data-zonos-overflow-origin";var e=document.body;var t=document.documentElement;if(this.open){if(e.style.overflow){e.setAttribute(o,e.style.overflow)}e.style.overflow="hidden";if(t.style.overflow){t.setAttribute(o,t.style.overflow)}t.style.overflow="hidden"}else{var n=e.getAttribute(o);var s=t.getAttribute(o);if(n){e.removeAttribute(o);e.style.overflow=n}else{e.style.removeProperty("overflow")}if(s){t.removeAttribute(o);t.style.overflow=s}else{t.style.removeProperty("overflow")}}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=X(this.mobile);this.isIframed=window.self!==window.top;G("iframed: ".concat(this.isIframed));this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=B("selectedLocale",(function(){void o.applyStripeTheme()}));G("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){D();v();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e,r,c,a;this.clientSecret=f.clientSecret;var u=h.step!=="finish"&&h.step!=="error"&&!f.stripeElements||f.isFetchingSession;var d=F(M.appearance,this.appearanceSettingsOverride||null),l=d.colorPrimary,m=d.colorSecondary,v=d.logoUrl,z=d.style;var p=M.appearance.zonosAttribution==="ENABLED";var g=M.appearance.theme;var k=l&&to(l)?"DARK":"LIGHT";var w=this.isMobile?g:k;var b=!this.isMobile?m:undefined;var y=i.customMessages;var C=(e=y.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var _=this.getCurrentLocalePageEnum();var S=y.filter((function(o){return o.pageName===_}));var A=this.getBaseCurrencySettlementInfo();var O=function(){var e=o.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(M.organizationName," logo"),src:e}))};var T=Y();var I=function(){var e=new URLSearchParams(window.location.search);var n=e.get("zonosQaUrl");var s=e.get("zonosDebug");var i=e.get("zonosE2ETest");var r=o.overrideStagingMode||Q();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},O(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},x("Test mode")),r&&t("zonos-badge",{badgeColor:"red",size:"small"},x("Staging mode")),s==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),S.map((function(o){return t("zonos-custom-message",{icon:go,message:o.message})})))};var j=function(){if(h.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:x("Your checkout session has expired. Please reload the page to continue."),restStateTitle:x("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},x("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":eo({overrideBorderStyle:z})}},h.step!=="finish"&&h.step!=="error"&&t(s,null,t("div",{class:"zonos--left","data-theme":w,style:no({"--zonos--primary-color":!o.isMobile?l:undefined})},!o.isMobile&&I(),h.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress||o.defaultAddressParams,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:b}),h.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:b}),h.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,isMobile:o.isMobile,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))},submitBtnColor:b})),t("div",{class:"zonos--right","data-theme":g},o.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:co}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:b}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:go,message:C})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:go,message:C}))))),(h.step==="finish"||h.step==="error")&&t("div",{class:"zonos--done","data-theme":g},t("div",{class:"zonos--header"},O(),!o.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:co}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:g})),t("zonos-checkout-finish",{borderRadius:z,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:h.step==="error"&&!!h.error?Object.assign(Object.assign({},h.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":g,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(n,{class:$(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?j():t("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},j()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:x("Don't close"),dialogConfirmBtnText:x("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:x("Would you like to close checkout and return to the site?"),dialogTitle:x("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:x("Return to merchant site"),dialogConfirmBtnText:x("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((r=this.placedOrderInfo)===null||r===void 0?void 0:r.zonosOrderNumber)?x("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):x("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:x("Are you sure?"),dialogWidth:530,onCancelClicked:function(){o.handleCancelOrderDuplication()},onConfirmClicked:function(){o.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:x("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:x("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}),A&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:x("Cancel"),dialogConfirmBtnText:x("Pay [orderTotal]",{orderTotal:E({amount:A.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:x("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:x("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:x("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:x("You are being sent back to the shop to re-add items to your cart."),dialogTitle:x("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return o.handleCartExpiredDialogConfirm()}}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],clientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return o}());Co.style=wo}}}));