@zonos/elements 1.3.31 → 1.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-62ff7ee7.js → cart-11b47252.js} +463 -43
- package/dist/cjs/index.cjs.js +12 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a5f8eaab.js → submitGtag-3a1d091e.js} +4 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +11 -11
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -3
- package/dist/cjs/zonos-card.cjs.entry.js +47 -0
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +53 -36
- package/dist/cjs/zonos-checkout.cjs.entry.js +21 -11
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-card_2.cjs.entry.js → zonos-language-select_2.cjs.entry.js} +23 -29
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_2.cjs.entry.js +123 -0
- package/dist/cjs/zonos-v-stack.cjs.entry.js +25 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +15 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +16 -15
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +20 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +9 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +20 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +10 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +6 -6
- package/dist/collection/components/common/zonos-button/zonos-button.js +28 -4
- package/dist/collection/components/common/zonos-card/zonos-card.css +3 -1
- package/dist/collection/components/common/zonos-card/zonos-card.js +61 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +1 -1
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +2 -1
- package/dist/collection/components/store/checkout/stripe.js +0 -1
- package/dist/collection/components/store/hello/localization.js +3 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +23 -2
- package/dist/collection/components/store/translationStore/strings.base.js +23 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +23 -2
- package/dist/collection/components/store/translationStore/strings.french.js +23 -2
- package/dist/collection/components/store/translationStore/strings.german.js +23 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +23 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/getIsTestMode.js +1 -0
- package/dist/collection/scripts/_zonosBase.js +8 -1
- package/dist/esm/{cart-b96aaa4f.js → cart-22ba08ec.js} +463 -43
- package/dist/esm/index.js +12 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-6e271d76.js → submitGtag-1435eec8.js} +4 -2
- package/dist/esm/zonos-address_8.entry.js +11 -11
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-button_3.entry.js +6 -3
- package/dist/esm/zonos-card.entry.js +43 -0
- package/dist/esm/zonos-cart-items_12.entry.js +53 -36
- package/dist/esm/zonos-checkout.entry.js +21 -11
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +7 -7
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +56 -0
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_2.entry.js +118 -0
- package/dist/esm/zonos-v-stack.entry.js +21 -0
- package/dist/esm-es5/cart-22ba08ec.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-1435eec8.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -0
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -0
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_2.entry.js +1 -0
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -0
- package/dist/scripts/index.d.ts +39 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +2 -2
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +6 -1
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +10 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -0
- package/dist/types/components.d.ts +36 -6
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-11672829.js +1 -0
- package/dist/zonos-elements/p-22882fd6.entry.js +1 -0
- package/dist/zonos-elements/{p-b208fec6.system.entry.js → p-28e6963b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2a45c837.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c4e38b85.entry.js → p-3523c3b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-692816a7.entry.js → p-35604380.entry.js} +1 -1
- package/dist/zonos-elements/{p-78a839b8.entry.js → p-36bb4360.entry.js} +1 -1
- package/dist/zonos-elements/p-3b95a9a3.entry.js +1 -0
- package/dist/zonos-elements/p-450eb8ff.system.js +1 -0
- package/dist/zonos-elements/p-478357b0.system.entry.js +1 -0
- package/dist/zonos-elements/p-56152835.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6cb9812b.entry.js → p-63a27875.entry.js} +1 -1
- package/dist/zonos-elements/p-6c3390b7.entry.js +1 -0
- package/dist/zonos-elements/{p-9c32b924.entry.js → p-6f589755.entry.js} +1 -1
- package/dist/zonos-elements/{p-a90393e0.system.entry.js → p-71882ac9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-74bd6150.entry.js +1 -0
- package/dist/zonos-elements/{p-9b0aa65c.system.js → p-7624013b.system.js} +1 -1
- package/dist/zonos-elements/p-84997f2e.js +1 -0
- package/dist/zonos-elements/{p-2cb880e7.system.entry.js → p-88129ef9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-95d52a24.system.entry.js +1 -0
- package/dist/zonos-elements/{p-dda78e8e.system.entry.js → p-966ab4e7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3dc59d89.system.entry.js → p-9de374a7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-666d1605.system.entry.js → p-a0b17e0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7664dec5.entry.js → p-b5825bb7.entry.js} +1 -1
- package/dist/zonos-elements/p-b8a4b345.system.entry.js +1 -0
- package/dist/zonos-elements/{p-13454044.system.entry.js → p-b903af96.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c21802e9.entry.js +1 -0
- package/dist/zonos-elements/{p-d4724ac8.entry.js → p-c3619b3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cdfb51b.system.entry.js → p-cdb53aaf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-941a01be.system.entry.js → p-d2992457.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2701e08c.entry.js → p-d8c1eb99.entry.js} +1 -1
- package/dist/zonos-elements/p-da2e5289.system.entry.js +1 -0
- package/dist/zonos-elements/p-dafa2b79.system.js +1 -0
- package/dist/zonos-elements/p-ddb1cfe2.entry.js +1 -0
- package/dist/zonos-elements/{p-d8027710.system.entry.js → p-dec21ca2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e09df465.entry.js +1 -0
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/p-e3c014ae.entry.js +1 -0
- package/dist/zonos-elements/{p-10b9a681.system.entry.js → p-eb566457.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ed333de6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-725c2d57.entry.js → p-fa7e2a01.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a0cf47b.entry.js → p-fe296307.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +0 -72
- package/dist/cjs/zonos-payment.cjs.entry.js +0 -58
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +0 -45
- package/dist/esm/zonos-card_2.entry.js +0 -62
- package/dist/esm/zonos-notification.entry.js +0 -68
- package/dist/esm/zonos-payment.entry.js +0 -54
- package/dist/esm/zonos-select-dialog-header_2.entry.js +0 -40
- package/dist/esm-es5/cart-b96aaa4f.js +0 -1
- package/dist/esm-es5/submitGtag-6e271d76.js +0 -1
- package/dist/esm-es5/zonos-card_2.entry.js +0 -1
- package/dist/esm-es5/zonos-notification.entry.js +0 -1
- package/dist/esm-es5/zonos-payment.entry.js +0 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +0 -1
- package/dist/zonos-elements/p-087c83a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1a40aaf4.system.js +0 -1
- package/dist/zonos-elements/p-2613b5d3.system.entry.js +0 -1
- package/dist/zonos-elements/p-27d648c3.system.entry.js +0 -1
- package/dist/zonos-elements/p-4e01d1ab.system.entry.js +0 -1
- package/dist/zonos-elements/p-5441b729.entry.js +0 -1
- package/dist/zonos-elements/p-5857ad65.entry.js +0 -1
- package/dist/zonos-elements/p-5d53f9a4.js +0 -1
- package/dist/zonos-elements/p-75ba695c.entry.js +0 -1
- package/dist/zonos-elements/p-89664e49.system.js +0 -1
- package/dist/zonos-elements/p-8c9e7980.entry.js +0 -1
- package/dist/zonos-elements/p-8f8baabf.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f7c0472.entry.js +0 -1
- package/dist/zonos-elements/p-acfb9be6.system.entry.js +0 -1
- package/dist/zonos-elements/p-b468f941.js +0 -1
- package/dist/zonos-elements/p-bb5a9eaa.entry.js +0 -1
- package/dist/zonos-elements/p-be2b32f5.entry.js +0 -1
- package/dist/zonos-elements/p-c63a7dde.entry.js +0 -1
- package/dist/zonos-elements/p-f38fd0d9.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,H as t}from"./p-ce347974.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-5821856c.js";import{r as d,l as c,u as m,t as p,w as u,x as f,y as g,z,A as w,B as b}from"./p-5d53f9a4.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";var C=s,L=/\s/,T=/^\s+/,E=i,S=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&L.test(o.charAt(e)););return e}(o)+1).replace(T,""):o},j=r,I=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,A=/^0o[0-7]+$/i,B=parseInt,X=r,N=function(){return C.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||S(o)&&"[object Symbol]"==E(o)}(o))return NaN;if(j(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=j(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=O.test(o);return t||A.test(o)?B(o.slice(2),t?2:8):I.test(o)?NaN:+o},P=Math.max,R=Math.min,M=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function u(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function f(){var o=N();if(u(o))return g(o);l=setTimeout(f,function(o){var t=e-(o-a);return c?R(t,n-(o-h)):t}(o))}function g(o){return l=void 0,m&&s?p(o):(s=i=void 0,r)}function z(){var o=N(),t=u(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(f,e),d?p(o):r}(a);if(c)return clearTimeout(l),l=setTimeout(f,e),p(a)}return void 0===l&&(l=setTimeout(f,e)),r}return e=H(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?P(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:g(N())},z};const F=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},$=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&m(i)&&document.querySelectorAll(i)||[],a=s&&m(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&m(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=M((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&u(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=l.helloSettings;return F(o)?"cart":F(t)?"productDetail":F(s)?"productList":F(e)?"home":""})();const e=new URL(window.location.href);if(!u(e.searchParams))return void f(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!c.localizationLoaded)return!1;const{showForCountries:e}=l.helloSettings;return o&&(c.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?c.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(c.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(c.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){M(this.render.bind(this),500)}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||c.selectedCountryCode&&"function"==typeof l.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=l.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=c,r=this.mobileLocationOverride||l.helloSettings.mobileLocation,a=window.innerWidth<768,d=this.animateFromLeftOverride||a&&r.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,m=r.includes("TOP"),p=h(l.appearance,this.appearanceSettingsOverride),{theme:u}=p,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":u},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:p,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}
|
|
1
|
+
import{r as o,h as e,H as t}from"./p-ce347974.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-5821856c.js";import{r as d,l as c,u as m,t as p,w as u,x as f,y as g,z,A as w,B as b}from"./p-84997f2e.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";var C=s,L=/\s/,T=/^\s+/,E=i,S=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&L.test(o.charAt(e)););return e}(o)+1).replace(T,""):o},j=r,I=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,A=/^0o[0-7]+$/i,B=parseInt,X=r,N=function(){return C.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||S(o)&&"[object Symbol]"==E(o)}(o))return NaN;if(j(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=j(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=O.test(o);return t||A.test(o)?B(o.slice(2),t?2:8):I.test(o)?NaN:+o},P=Math.max,R=Math.min,M=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function u(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function f(){var o=N();if(u(o))return g(o);l=setTimeout(f,function(o){var t=e-(o-a);return c?R(t,n-(o-h)):t}(o))}function g(o){return l=void 0,m&&s?p(o):(s=i=void 0,r)}function z(){var o=N(),t=u(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(f,e),d?p(o):r}(a);if(c)return clearTimeout(l),l=setTimeout(f,e),p(a)}return void 0===l&&(l=setTimeout(f,e)),r}return e=H(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?P(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:g(N())},z};const F=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},$=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&m(i)&&document.querySelectorAll(i)||[],a=s&&m(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&m(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=M((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&u(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=l.helloSettings;return F(o)?"cart":F(t)?"productDetail":F(s)?"productList":F(e)?"home":""})();const e=new URL(window.location.href);if(!u(e.searchParams))return void f(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!c.localizationLoaded)return!1;const{showForCountries:e}=l.helloSettings;return o&&(c.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?c.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(c.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(c.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){M(this.render.bind(this),500)}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||c.selectedCountryCode&&"function"==typeof l.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=l.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=c,r=this.mobileLocationOverride||l.helloSettings.mobileLocation,a=window.innerWidth<768,d=this.animateFromLeftOverride||a&&r.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,m=r.includes("TOP"),p=h(l.appearance,this.appearanceSettingsOverride),{theme:u}=p,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":u},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:p,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,e,
|
|
1
|
+
System.register(["./p-d99232c5.system.js","./p-0b538ed4.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,o,e,i,n,r;return{setters:[function(t){s=t.r;o=t.h;e=t.a;i=t.H},function(t){n=t.d},function(t){r=t.c}],execute:function(){var a=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var h=a;var f=t("zonos_logo",function(){function t(t){s(this,t);this.theme="LIGHT";this.width="auto"}t.prototype.render=function(){var t=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return o(i,{key:"08ef20244bc204125a7a308efed42cd7fc86c885",class:r(["zonos--elements zonos--logo"]),style:{"--filter-color":t,"--font-family":n(),"--width":this.width}},o("img",{key:"9202f0619fa3874a19ca3050477719b19592d82a",alt:"Zonos Logo",src:e("./assets/ZonosLogo.png")}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());f.style=h}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,H as s,d as n}from"./p-ce347974.js";import{d as e}from"./p-5821856c.js";import{c as i}from"./p-b4b7f705.js";import{h as a}from"./p-84997f2e.js";import{a as c}from"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const r=class{constructor(t){o(this,t),this.notificationArray=[]}async showNotification(o){const t=`id-${Math.random().toString(36).substring(2,9)}`,s=Object.assign(Object.assign({},o),{id:t,timeout:o.timeout||5e3,transitionClass:"",type:o.type||"success"});this.notificationArray=[...this.notificationArray,s],setTimeout((()=>{this.updateTransitionClass({id:t,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(t)}),s.timeout)}updateTransitionClass({id:o,transitionClass:t}){this.notificationArray=this.notificationArray.map((s=>s.id===o?Object.assign(Object.assign({},s),{transitionClass:t}):s))}removeNotification(o){this.updateTransitionClass({id:o,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((t=>t.id!==o))}),300)}render(){return t(s,{key:"17c08c90c6c1dfade4e43451c196127a0f53429e",class:i(["zonos--elements zonos--notification"]),style:{"--font-family":e()}},t("div",{key:"6624419d86a5c7518539069dbc5c9d7c08262c75",class:"zonos--notification-items"},this.notificationArray.map((o=>t("div",{"aria-hidden":"true",class:i(["zonos--notification-item",o.type,o.transitionClass]),key:o.id,onClick:()=>{this.removeNotification(o.id)}},t("zonos-text",{textColor:"gray-0"},o.message))))))}};r.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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(--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 m=class{constructor(t){o(this,t),this.titleText=void 0,this.stripe=a.stripe,this.stripeElements=a.stripeElements}watchInitStripe(){if(!this.stripeElements)return;const o=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"}),t=this.el.querySelector(".zonos--payment-component");t?(o.mount(t),o.on("change",(o=>{a.stripePaymentEventData=o})),a.stripePaymentElement=o):c("Cannot find container element for paymentElement")}componentDidLoad(){this.watchInitStripe()}render(){return t(s,{key:"870d7a4cb6132332368d356488c5eedd1dea16f3",class:"zonos--payment zonos--elements"},this.titleText&&t("zonos-text",{key:"7aef62f6daae0c5b59caa685c4255fb78eebc1be",class:"zonos--title",type:"semiBoldLabel"},this.titleText),t("div",{key:"073976bceadf5f8efa78d0b1f6098e94bfa3d1a6",class:"zonos--payment-component"}))}get el(){return n(this)}static get watchers(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}}};m.style=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--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}";export{r as zonos_notification,m as zonos_payment}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(o.next(n))}catch(n){i(n)}}function a(n){try{c(o["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):r(n.value).then(u,a)}c((o=o.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(o.next(n))}catch(n){i(n)}}function a(n){try{c(o["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):r(n.value).then(u,a)}c((o=o.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-dafa2b79.system.js","./p-0b538ed4.system.js","./p-63db40b9.system.js"],(function(n){"use strict";var t,e,o,r,i;return{setters:[function(n){t=n.r;e=n.d;o=n.l},function(n){r=n.z},function(n){i=n.l}],execute:function(){var u=this;var a=n("t",(function(n,i){return __awaiter(u,void 0,void 0,(function(){var u,a,c,s,f,d,v,w;return __generator(this,(function(l){switch(l.label){case 0:c=window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||!!((u=window.Zonos)===null||u===void 0?void 0:u.zonosQaUrl)||!!((a=window.Zonos)===null||a===void 0?void 0:a.debug);if(c&&!window.Zonos.zonosConversionTest){return[2]}s="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");f=o.selectedCountryCode;d=r.organizationId;v=e.checkoutSessionId;if(!v){return[2]}w={checkoutSessionId:v,countryCode:f,eventName:n,metadata:i,organizationId:d};return[4,t(s,{body:w,method:"POST"})];case 1:l.sent();return[2]}}))}))}));var c=n("g",(function(){var n;return(n=window.Zonos.zonosApiKey)===null||n===void 0?void 0:n.includes("test")}));var s=n("c",(function(n,t){return new CustomEvent(n,{detail:t})}));var f=n("s",(function(n){return __awaiter(u,[n],void 0,(function(n){var e,o;var r=n.endpoint,i=n.errors,u=n.metadata;return __generator(this,(function(n){e="userAgentData"in window.navigator?window.navigator.userAgentData:null;o={endpoint:r,errors:i,metadata:Object.assign({href:window.location.href,userAgent:e&&e.brands.length>0?e:window.navigator.userAgent},u)};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:o,method:"POST"});return[2]}))}))}));var d=n("a",(function(n){var t=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!t||(t===null||t===void 0?void 0:t.status)==="DISABLED"){return}if(typeof window.gtag==="function"){i("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));
|