@zonos/elements 1.3.286 → 1.3.288

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 (657) hide show
  1. package/README.md +9 -1
  2. package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
  3. package/dist/cjs/{cart-0cf8897b.js → cart-CV4buPlT.js} +17 -27
  4. package/dist/cjs/{collect-79131e52.js → collect-jzWKzrV7.js} +17 -113
  5. package/dist/cjs/debounce-5sZmmlCI.js +9 -0
  6. package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
  7. package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
  8. package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
  9. package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
  10. package/dist/cjs/{getMissingRequiredShippingFields-a8f04267.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
  11. package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
  12. package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
  13. package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
  14. package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
  15. package/dist/cjs/index.cjs.js +17 -21
  16. package/dist/cjs/{invoice-254ae23b.js → invoice-CHw-mJdS.js} +6 -6
  17. package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
  18. package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
  19. package/dist/cjs/loader.cjs.js +3 -5
  20. package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
  21. package/dist/cjs/{paypal-8ca67278.js → paypal-BLuHeOJH.js} +10 -9
  22. package/dist/cjs/{placeTestOrder-12b63822.js → placeTestOrder-VK_CMeq0.js} +3 -3
  23. package/dist/cjs/{renderCheckoutCurrency-a1f71587.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
  24. package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
  25. package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
  26. package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
  27. package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
  28. package/dist/cjs/throttle-BcxGntLr.js +87 -0
  29. package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
  30. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
  31. package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
  32. package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
  33. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
  34. package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
  35. package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
  36. package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
  37. package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
  38. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +85 -83
  39. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
  40. package/dist/cjs/zonos-checkout.cjs.entry.js +50 -34
  41. package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
  42. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
  43. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
  44. package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
  45. package/dist/cjs/zonos-component.cjs.entry.js +3 -6
  46. package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
  47. package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
  48. package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
  49. package/dist/cjs/zonos-elements.cjs.js +7 -7
  50. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
  51. package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
  52. package/dist/cjs/zonos-input.cjs.entry.js +10 -11
  53. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
  54. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
  55. package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
  56. package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
  57. package/dist/cjs/zonos-link.cjs.entry.js +3 -6
  58. package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
  59. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
  60. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
  61. package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
  62. package/dist/cjs/zonos-text.cjs.entry.js +8 -11
  63. package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
  64. package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
  65. package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
  66. package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
  69. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
  70. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
  71. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
  72. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
  73. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -4
  74. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
  75. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
  76. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
  77. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
  78. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
  79. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +18 -14
  80. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
  81. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
  82. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
  83. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
  84. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
  85. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
  86. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
  87. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  88. package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +7 -4
  89. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
  90. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
  91. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
  92. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
  93. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
  94. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
  95. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  96. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
  97. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
  98. package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
  99. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
  100. package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
  101. package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
  102. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
  103. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
  104. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  105. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
  106. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
  107. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  108. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
  109. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
  110. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
  111. package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
  112. package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
  113. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
  114. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
  115. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
  116. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
  117. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
  118. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
  119. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
  120. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
  121. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
  122. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
  123. package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
  124. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
  125. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  126. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
  127. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
  128. package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
  129. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
  130. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
  131. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
  132. package/dist/collection/components/main/zonos-controller.js +18 -10
  133. package/dist/collection/components/store/checkout/stripe.js +1 -1
  134. package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
  135. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
  136. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
  137. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
  138. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
  139. package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
  140. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
  141. package/dist/collection/scripts/cart/_setupCartData.js +2 -2
  142. package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
  143. package/dist/collection/types/generated/graphql.internal.types.js +5 -0
  144. package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
  145. package/dist/esm/{cart-d04742f5.js → cart-ekBk_gxV.js} +18 -28
  146. package/dist/esm/{collect-4c310a16.js → collect-33rMINDo.js} +17 -113
  147. package/dist/esm/debounce-D4ko2kvZ.js +403 -0
  148. package/dist/esm/debounce-DWPsxJsW.js +7 -0
  149. package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
  150. package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
  151. package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
  152. package/dist/esm/{getMissingRequiredShippingFields-f0878e32.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
  153. package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
  154. package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
  155. package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
  156. package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
  157. package/dist/esm/index.js +20 -22
  158. package/dist/esm/{invoice-86487dac.js → invoice-BNDWuVsD.js} +6 -6
  159. package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
  160. package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
  161. package/dist/esm/loader.js +4 -4
  162. package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
  163. package/dist/esm/{paypal-997935ab.js → paypal-CW1D2XqZ.js} +10 -9
  164. package/dist/esm/{placeTestOrder-a53f2056.js → placeTestOrder-nhmsLLOA.js} +3 -3
  165. package/dist/esm/{renderCheckoutCurrency-e0e16eb7.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
  166. package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  167. package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
  168. package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
  169. package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
  170. package/dist/esm/throttle-D5GyA3yr.js +85 -0
  171. package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
  172. package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
  173. package/dist/esm/zonos-address-display_2.entry.js +13 -15
  174. package/dist/esm/zonos-address_4.entry.js +50 -38
  175. package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
  176. package/dist/esm/zonos-badge.entry.js +7 -8
  177. package/dist/esm/zonos-banner.entry.js +6 -7
  178. package/dist/esm/zonos-button_3.entry.js +18 -19
  179. package/dist/esm/zonos-card_5.entry.js +34 -33
  180. package/dist/esm/zonos-cart-items_12.entry.js +85 -81
  181. package/dist/esm/zonos-checkbox_2.entry.js +10 -12
  182. package/dist/esm/zonos-checkout.entry.js +50 -32
  183. package/dist/esm/zonos-collapse.entry.js +5 -6
  184. package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
  185. package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
  186. package/dist/esm/zonos-collect.entry.js +20 -21
  187. package/dist/esm/zonos-component.entry.js +3 -4
  188. package/dist/esm/zonos-controller.entry.js +13 -14
  189. package/dist/esm/zonos-country-flag.entry.js +8 -9
  190. package/dist/esm/zonos-country-select_4.entry.js +68 -55
  191. package/dist/esm/zonos-elements.js +6 -5
  192. package/dist/esm/zonos-hello-dialog.entry.js +22 -21
  193. package/dist/esm/zonos-hello.entry.js +19 -15
  194. package/dist/esm/zonos-input.entry.js +10 -9
  195. package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
  196. package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
  197. package/dist/esm/zonos-invoice.entry.js +19 -20
  198. package/dist/esm/zonos-language-select_2.entry.js +11 -13
  199. package/dist/esm/zonos-link.entry.js +3 -4
  200. package/dist/esm/zonos-logo.entry.js +6 -7
  201. package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
  202. package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
  203. package/dist/esm/zonos-stripe-input.entry.js +15 -12
  204. package/dist/esm/zonos-text.entry.js +8 -9
  205. package/dist/esm/zonos-tooltip.entry.js +4 -5
  206. package/dist/esm/zonos-v-stack.entry.js +6 -7
  207. package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
  208. package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
  209. package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
  210. package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
  211. package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
  212. package/dist/esm-es5/classes-BJHSB96f.js +10 -0
  213. package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
  214. package/dist/esm-es5/collect-33rMINDo.js +241 -0
  215. package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
  216. package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
  217. package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
  218. package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
  219. package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
  220. package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
  221. package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
  222. package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
  223. package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
  224. package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
  225. package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
  226. package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
  227. package/dist/esm-es5/index-_lt63o7c.js +162 -0
  228. package/dist/esm-es5/index.js +227 -1
  229. package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
  230. package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
  231. package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
  232. package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
  233. package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
  234. package/dist/esm-es5/loader.js +1 -1
  235. package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
  236. package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
  237. package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
  238. package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
  239. package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  240. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
  241. package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
  242. package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
  243. package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
  244. package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
  245. package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
  246. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
  247. package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
  248. package/dist/esm-es5/zonos-address_4.entry.js +179 -1
  249. package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
  250. package/dist/esm-es5/zonos-badge.entry.js +25 -1
  251. package/dist/esm-es5/zonos-banner.entry.js +7 -1
  252. package/dist/esm-es5/zonos-button_3.entry.js +116 -1
  253. package/dist/esm-es5/zonos-card_5.entry.js +33 -1
  254. package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
  255. package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
  256. package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
  257. package/dist/esm-es5/zonos-collapse.entry.js +15 -1
  258. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
  259. package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
  260. package/dist/esm-es5/zonos-collect.entry.js +171 -1
  261. package/dist/esm-es5/zonos-component.entry.js +10 -1
  262. package/dist/esm-es5/zonos-controller.entry.js +198 -1
  263. package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
  264. package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
  265. package/dist/esm-es5/zonos-elements.js +4 -1
  266. package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
  267. package/dist/esm-es5/zonos-hello.entry.js +121 -1
  268. package/dist/esm-es5/zonos-input.entry.js +16 -1
  269. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
  270. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
  271. package/dist/esm-es5/zonos-invoice.entry.js +115 -1
  272. package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
  273. package/dist/esm-es5/zonos-link.entry.js +4 -1
  274. package/dist/esm-es5/zonos-logo.entry.js +7 -1
  275. package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
  276. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
  277. package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
  278. package/dist/esm-es5/zonos-text.entry.js +24 -1
  279. package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
  280. package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
  281. package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
  282. package/dist/scripts/index.d.ts +1171 -521
  283. package/dist/scripts/index.js +1 -1
  284. package/dist/scripts/loadZonos.js +1 -1
  285. package/dist/scripts/zonos.js +1 -1
  286. package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
  287. package/dist/types/__tests__/vitest-globals.d.ts +1 -0
  288. package/dist/types/components/store/checkout/cart.d.ts +9 -9
  289. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
  290. package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
  291. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
  292. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
  293. package/dist/types/components.d.ts +797 -147
  294. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +127 -127
  295. package/dist/types/stencil-public-runtime.d.ts +205 -12
  296. package/dist/types/types/generated/graphql.frontend.types.d.ts +60 -60
  297. package/dist/types/types/generated/graphql.frontend.types.ts +55 -55
  298. package/dist/types/types/generated/graphql.internal.types.d.ts +1290 -1285
  299. package/dist/types/types/generated/graphql.internal.types.ts +1113 -1108
  300. package/dist/zonos-elements/index.esm.js +1 -1
  301. package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
  302. package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
  303. package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
  304. package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
  305. package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
  306. package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
  307. package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
  308. package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
  309. package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
  310. package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
  311. package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
  312. package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
  313. package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
  314. package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
  315. package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
  316. package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
  317. package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
  318. package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
  319. package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
  320. package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
  321. package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
  322. package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
  323. package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
  325. package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
  326. package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
  327. package/dist/zonos-elements/p-6f742021.entry.js +1 -0
  328. package/dist/zonos-elements/p-7681798d.entry.js +1 -0
  329. package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
  330. package/dist/zonos-elements/{p-6de2f9c9.entry.js → p-7ae48e31.entry.js} +1 -1
  331. package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
  332. package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
  333. package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
  334. package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
  335. package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
  336. package/dist/zonos-elements/p-9818f823.entry.js +1 -0
  337. package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
  338. package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
  339. package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
  340. package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
  341. package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
  342. package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
  343. package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
  344. package/dist/zonos-elements/p-BJufDgh3.js +1 -0
  345. package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
  346. package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
  347. package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
  348. package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
  349. package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
  350. package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
  351. package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
  352. package/dist/zonos-elements/p-BtMauqj_.system.js +227 -0
  353. package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
  354. package/dist/zonos-elements/p-C19J2XSh.js +1 -0
  355. package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
  356. package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
  357. package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
  358. package/dist/zonos-elements/p-CICjAi70.js +1 -0
  359. package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
  360. package/dist/zonos-elements/{p-344a6278.js → p-CJCoACvU.js} +2 -2
  361. package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
  362. package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
  363. package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
  364. package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
  365. package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
  366. package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
  367. package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
  368. package/dist/zonos-elements/p-CaAod213.system.js +8 -0
  369. package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
  370. package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
  371. package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
  372. package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
  373. package/dist/zonos-elements/p-D0erXw7p.js +1 -0
  374. package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
  375. package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
  376. package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
  377. package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
  378. package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
  379. package/dist/zonos-elements/{p-a4c7ee17.js → p-DHwpNxG9.js} +1 -1
  380. package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
  381. package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
  382. package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
  383. package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
  384. package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
  385. package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
  386. package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
  387. package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
  388. package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
  389. package/dist/zonos-elements/p-LypTHRUC.js +1 -0
  390. package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
  391. package/dist/zonos-elements/p-YdrG78th.js +1 -0
  392. package/dist/zonos-elements/p-_lt63o7c.js +3 -0
  393. package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
  394. package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
  395. package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
  396. package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
  397. package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
  398. package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
  399. package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
  400. package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
  401. package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
  402. package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
  403. package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
  404. package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
  405. package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
  406. package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
  407. package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
  408. package/dist/zonos-elements/{p-5d110c2b.entry.js → p-d4c4a00e.entry.js} +1 -1
  409. package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
  410. package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
  411. package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
  412. package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
  413. package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
  414. package/dist/zonos-elements/{p-5227aa69.entry.js → p-e9320825.entry.js} +1 -1
  415. package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
  416. package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
  417. package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
  418. package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
  419. package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
  420. package/dist/zonos-elements/p-f6ba59f6.system.entry.js +171 -0
  421. package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
  422. package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
  423. package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
  424. package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
  425. package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
  426. package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
  427. package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
  428. package/dist/zonos-elements/p-pfIceXbY.js +1 -0
  429. package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
  430. package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
  431. package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
  432. package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
  433. package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
  434. package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
  435. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  436. package/dist/zonos-elements/zonos-elements.js +1 -1
  437. package/loader/index.d.ts +1 -1
  438. package/package.json +28 -32
  439. package/dist/cjs/RemoveIcon-081ac073.js +0 -5
  440. package/dist/cjs/debounce-7ca3c878.js +0 -357
  441. package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
  442. package/dist/cjs/throttle-366c204b.js +0 -76
  443. package/dist/cjs/zonosStore-0af0b937.js +0 -3030
  444. package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
  445. package/dist/esm/debounce-84ade9c2.js +0 -355
  446. package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
  447. package/dist/esm/throttle-c4c24e86.js +0 -74
  448. package/dist/esm/zonosStore-eca1e364.js +0 -3017
  449. package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
  450. package/dist/esm-es5/cart-d04742f5.js +0 -1
  451. package/dist/esm-es5/classes-0d95c529.js +0 -1
  452. package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
  453. package/dist/esm-es5/collect-4c310a16.js +0 -1
  454. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
  455. package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
  456. package/dist/esm-es5/debounce-84ade9c2.js +0 -1
  457. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
  458. package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
  459. package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
  460. package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
  461. package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +0 -1
  462. package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
  463. package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
  464. package/dist/esm-es5/helpers-2f6955b1.js +0 -1
  465. package/dist/esm-es5/index-cfd394c8.js +0 -13
  466. package/dist/esm-es5/invoice-86487dac.js +0 -1
  467. package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
  468. package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
  469. package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
  470. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
  471. package/dist/esm-es5/localization-36a4dc22.js +0 -1
  472. package/dist/esm-es5/paypal-997935ab.js +0 -17
  473. package/dist/esm-es5/placeTestOrder-a53f2056.js +0 -1
  474. package/dist/esm-es5/renderCheckoutCurrency-e0e16eb7.js +0 -1
  475. package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
  476. package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
  477. package/dist/esm-es5/styles-6fc2fad9.js +0 -1
  478. package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
  479. package/dist/esm-es5/throttle-c4c24e86.js +0 -1
  480. package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
  481. package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
  482. package/dist/zonos-elements/p-01174496.system.js +0 -1
  483. package/dist/zonos-elements/p-06f798ee.system.js +0 -1
  484. package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
  485. package/dist/zonos-elements/p-08e7107d.js +0 -1
  486. package/dist/zonos-elements/p-0b29169b.js +0 -1
  487. package/dist/zonos-elements/p-0c327a57.system.entry.js +0 -1
  488. package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
  489. package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
  490. package/dist/zonos-elements/p-0ff845ec.js +0 -1
  491. package/dist/zonos-elements/p-117953db.system.entry.js +0 -1
  492. package/dist/zonos-elements/p-14afffa8.system.js +0 -1
  493. package/dist/zonos-elements/p-1834f486.js +0 -1
  494. package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
  495. package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
  496. package/dist/zonos-elements/p-1b8771bb.js +0 -1
  497. package/dist/zonos-elements/p-1cdd27ec.js +0 -1
  498. package/dist/zonos-elements/p-1cfb5c2a.system.entry.js +0 -1
  499. package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
  500. package/dist/zonos-elements/p-23e7c655.system.js +0 -1
  501. package/dist/zonos-elements/p-2670438c.system.js +0 -1
  502. package/dist/zonos-elements/p-27660512.js +0 -1
  503. package/dist/zonos-elements/p-277b77e3.js +0 -1
  504. package/dist/zonos-elements/p-278abdcf.entry.js +0 -1
  505. package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
  506. package/dist/zonos-elements/p-2b97f7ed.js +0 -1
  507. package/dist/zonos-elements/p-2bbe9d91.js +0 -1
  508. package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
  509. package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
  510. package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
  511. package/dist/zonos-elements/p-398d9022.system.js +0 -1
  512. package/dist/zonos-elements/p-3a26e5e7.system.entry.js +0 -1
  513. package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
  514. package/dist/zonos-elements/p-40af92a1.system.entry.js +0 -1
  515. package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
  516. package/dist/zonos-elements/p-41f1697a.system.entry.js +0 -1
  517. package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
  518. package/dist/zonos-elements/p-490d7fec.system.entry.js +0 -1
  519. package/dist/zonos-elements/p-4941c096.system.entry.js +0 -1
  520. package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
  521. package/dist/zonos-elements/p-502d6eeb.js +0 -1
  522. package/dist/zonos-elements/p-50d088f7.system.entry.js +0 -1
  523. package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
  524. package/dist/zonos-elements/p-551fa762.system.js +0 -1
  525. package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
  526. package/dist/zonos-elements/p-60832726.system.js +0 -1
  527. package/dist/zonos-elements/p-67426156.system.js +0 -1
  528. package/dist/zonos-elements/p-6890e060.system.js +0 -1
  529. package/dist/zonos-elements/p-6eaf7c9e.system.entry.js +0 -1
  530. package/dist/zonos-elements/p-7176f582.entry.js +0 -1
  531. package/dist/zonos-elements/p-7261e245.system.js +0 -13
  532. package/dist/zonos-elements/p-7352abe9.js +0 -1
  533. package/dist/zonos-elements/p-74230da8.system.js +0 -1
  534. package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
  535. package/dist/zonos-elements/p-77993ba1.entry.js +0 -1
  536. package/dist/zonos-elements/p-78f8e594.entry.js +0 -1
  537. package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
  538. package/dist/zonos-elements/p-7b525c75.system.js +0 -1
  539. package/dist/zonos-elements/p-7f688485.system.entry.js +0 -1
  540. package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
  541. package/dist/zonos-elements/p-8861d47e.js +0 -1
  542. package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
  543. package/dist/zonos-elements/p-8a6c4017.js +0 -1
  544. package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
  545. package/dist/zonos-elements/p-8d14cb66.entry.js +0 -1
  546. package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
  547. package/dist/zonos-elements/p-916228fb.system.js +0 -1
  548. package/dist/zonos-elements/p-944c1fb3.entry.js +0 -1
  549. package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
  550. package/dist/zonos-elements/p-96ab529e.entry.js +0 -1
  551. package/dist/zonos-elements/p-998975a3.system.js +0 -18
  552. package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
  553. package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
  554. package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
  555. package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
  556. package/dist/zonos-elements/p-a553e132.js +0 -1
  557. package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
  558. package/dist/zonos-elements/p-af19722c.system.js +0 -1
  559. package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
  560. package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
  561. package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
  562. package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
  563. package/dist/zonos-elements/p-c0af11fe.system.js +0 -1
  564. package/dist/zonos-elements/p-c112fa12.system.entry.js +0 -1
  565. package/dist/zonos-elements/p-c4321a1a.system.js +0 -1
  566. package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
  567. package/dist/zonos-elements/p-c7329333.entry.js +0 -1
  568. package/dist/zonos-elements/p-c756a59d.system.js +0 -1
  569. package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
  570. package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
  571. package/dist/zonos-elements/p-ce75b047.js +0 -2
  572. package/dist/zonos-elements/p-d1a51fac.js +0 -1
  573. package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
  574. package/dist/zonos-elements/p-d75726e5.system.entry.js +0 -1
  575. package/dist/zonos-elements/p-d938f42f.system.js +0 -1
  576. package/dist/zonos-elements/p-dd866ca3.system.entry.js +0 -1
  577. package/dist/zonos-elements/p-dd8a7bf4.entry.js +0 -1
  578. package/dist/zonos-elements/p-de58684b.system.js +0 -1
  579. package/dist/zonos-elements/p-e160b75f.js +0 -1
  580. package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
  581. package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
  582. package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
  583. package/dist/zonos-elements/p-e4dc24e1.system.js +0 -1
  584. package/dist/zonos-elements/p-e5865ad9.system.js +0 -1
  585. package/dist/zonos-elements/p-e7d7afda.entry.js +0 -1
  586. package/dist/zonos-elements/p-ebbda085.system.js +0 -1
  587. package/dist/zonos-elements/p-f4720b0a.js +0 -1
  588. package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
  589. package/dist/zonos-elements/p-f9346f1c.entry.js +0 -1
  590. package/dist/zonos-elements/p-fc5f6113.js +0 -1
  591. package/dist/zonos-elements/p-fe28dbe6.entry.js +0 -1
  592. package/loader/package.json +0 -11
  593. /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
  594. /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
  595. /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
  596. /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
  597. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  598. /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
  599. /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
  600. /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
  601. /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
  602. /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
  603. /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
  604. /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
  605. /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
  606. /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
  607. /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
  608. /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
  609. /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
  610. /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
  611. /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  612. /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  613. /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
  614. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  615. /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
  616. /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
  617. /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
  618. /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
  619. /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
  620. /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
  621. /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  622. /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  623. /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
  624. /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  625. /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
  626. /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
  627. /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
  628. /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  629. /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  630. /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  631. /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  632. /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  633. /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  634. /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
  635. /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
  636. /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
  637. /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
  638. /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
  639. /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
  640. /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
  641. /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
  642. /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
  643. /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
  644. /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
  645. /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
  646. /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
  647. /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
  648. /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
  649. /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
  650. /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
  651. /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  652. /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
  653. /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
  654. /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
  655. /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
  656. /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
  657. /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
@@ -0,0 +1,192 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-DrIOAz4M.js";import{x as cartStoreNextStep,j as cartStoreClearCheckoutInterval,t as trackConversionEvent,y as isPolicyConsentRequired,G as policyConsentStore,C as validateCheckoutSession,b as stripeStore,d as cartStore,n as stripeStoreHandleInventoryCheck,A as storeCreditStoreApplyCredit,T as stripeStoreRecordPolicyConsent,B as storeCreditStoreCoversFullAmount,D as storeCreditStoreCreateOrder,K as storeCreditStoreGetEffectiveAmount}from"./cart-ekBk_gxV.js";import{s as storageStore,t as translate}from"./localization-AOqYXGdP.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isContrastColor}from"./isContrastColor-CWLU13s9.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{i as isAnalyticsRelayInIframe,a as enqueueRelayEvent,s as submitGtag}from"./submitGtag-CCGQS060.js";
2
+ /*!
3
+ * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
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
+ */
18
+ /******************************************************************************
19
+ Copyright (c) Microsoft Corporation.
20
+
21
+ Permission to use, copy, modify, and/or distribute this software for any
22
+ purpose with or without fee is hereby granted.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
25
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
27
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
29
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
30
+ PERFORMANCE OF THIS SOFTWARE.
31
+ ***************************************************************************** */
32
+ /* global Reflect, Promise, SuppressedError, Symbol */function __rest$1(e,r){var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0)t[n]=e[n];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++){if(r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o]))t[n[o]]=e[n[o]]}return t}typeof SuppressedError==="function"?SuppressedError:function(e,r,t){var n=new Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function findScript(e,r){var t=document.querySelector('script[src="'.concat(e,'"]'));if(t===null)return null;var n=createScriptElement(e,r);
33
+ // ignore the data-uid-auto attribute that gets auto-assigned to every script tag
34
+ var o=t.cloneNode();delete o.dataset.uidAuto;
35
+ // check if the new script has the same number of data attributes
36
+ if(Object.keys(o.dataset).length!==Object.keys(n.dataset).length){return null}var a=true;
37
+ // check if the data attribute values are the same
38
+ Object.keys(o.dataset).forEach((function(e){if(o.dataset[e]!==n.dataset[e]){a=false}}));return a?t:null}function insertScriptElement(e){var r=e.url,t=e.attributes,n=e.onSuccess,o=e.onError;var a=createScriptElement(r,t);a.onerror=o;a.onload=n;document.head.insertBefore(a,document.head.firstElementChild)}function processOptions(e){var r=e.sdkBaseUrl,t=e.environment,n=__rest$1(e,["sdkBaseUrl","environment"]);var o=r||processSdkBaseUrl(t);var a=n;var i=Object.keys(a).filter((function(e){return typeof a[e]!=="undefined"&&a[e]!==null&&a[e]!==""})).reduce((function(e,r){var t=a[r].toString();r=camelCaseToKebabCase(r);if(r.substring(0,4)==="data"||r==="crossorigin"){e.attributes[r]=t}else{e.queryParams[r]=t}return e}),{queryParams:{},attributes:{}}),u=i.queryParams,s=i.attributes;if(u["merchant-id"]&&u["merchant-id"].indexOf(",")!==-1){s["data-merchant-id"]=u["merchant-id"];u["merchant-id"]="*"}return{url:"".concat(o,"?").concat(objectToQueryString(u)),attributes:s}}function camelCaseToKebabCase(e){var r=function(e,r){return(r?"-":"")+e.toLowerCase()};return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)}function objectToQueryString(e){var r="";Object.keys(e).forEach((function(t){if(r.length!==0)r+="&";r+=t+"="+e[t]}));return r}function processSdkBaseUrl(e){
39
+ // Keeping production as default to maintain backward compatibility.
40
+ // In the future this logic needs to be changed to use sandbox domain as default instead of production.
41
+ return e==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function createScriptElement(e,r){if(r===void 0){r={}}var t=document.createElement("script");t.src=e;Object.keys(r).forEach((function(e){t.setAttribute(e,r[e]);if(e==="data-csp-nonce"){t.setAttribute("nonce",r["data-csp-nonce"])}}));return t}
42
+ /**
43
+ * Load the Paypal JS SDK script asynchronously.
44
+ *
45
+ * @param {Object} options - used to configure query parameters and data attributes for the JS SDK.
46
+ * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.
47
+ * @return {Promise<Object>} paypalObject - reference to the global window PayPal object.
48
+ */function loadScript(e,r){if(r===void 0){r=Promise}validateArguments(e,r);
49
+ // resolve with null when running in Node or Deno
50
+ if(typeof document==="undefined")return r.resolve(null);var t=processOptions(e),n=t.url,o=t.attributes;var a=o["data-namespace"]||"paypal";var i=getPayPalWindowNamespace(a);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}
51
+ // resolve with the existing global paypal namespace when a script with the same params already exists
52
+ if(findScript(n,o)&&i){return r.resolve(i)}return loadCustomScript({url:n,attributes:o},r).then((function(){var e=getPayPalWindowNamespace(a);if(e){return e}throw new Error("The window.".concat(a," global variable is not available."))}))}
53
+ /**
54
+ * Load a custom script asynchronously.
55
+ *
56
+ * @param {Object} options - used to set the script url and attributes.
57
+ * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.
58
+ * @return {Promise<void>} returns a promise to indicate if the script was successfully loaded.
59
+ */function loadCustomScript(e,r){if(r===void 0){r=Promise}validateArguments(e,r);var t=e.url,n=e.attributes;if(typeof t!=="string"||t.length===0){throw new Error("Invalid url.")}if(typeof n!=="undefined"&&typeof n!=="object"){throw new Error("Expected attributes to be an object.")}return new r((function(e,r){
60
+ // resolve with undefined when running in Node or Deno
61
+ if(typeof document==="undefined")return e();insertScriptElement({url:t,attributes:n,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(t,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return r(e)}})}))}function getPayPalWindowNamespace(e){
62
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
63
+ return window[e]}function validateArguments(e,r){if(typeof e!=="object"||e===null){throw new Error("Expected an options object.")}var t=e.environment;if(t&&t!=="production"&&t!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof r!=="undefined"&&typeof r!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var paypalCaptureOrder=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,n;var o=e.checkoutSessionId,a=e.paypalMockResponse;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,handleFetch("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:a},method:"POST"})];case 1:r=e.sent(),t=r.errors,n=r.json;return[2/*return*/,{errors:t,json:n}]}}))}))};var paypalCreateOrder=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,n;var o=e.checkoutSessionId,a=e.intent;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,handleFetch("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:a},method:"POST"})];case 1:r=e.sent(),t=r.errors,n=r.json;return[2/*return*/,{errors:t,json:n}]}}))}))};var __rest=undefined&&undefined.__rest||function(e,r){var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0)t[n]=e[n];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++){if(r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o]))t[n[o]]=e[n[o]]}return t};
64
+ /**
65
+ * Mapping from our internal event names (GA-style) to Facebook Pixel standard event names.
66
+ * @see https://developers.facebook.com/docs/meta-pixel/reference#standard-events
67
+ *
68
+ * Events without an entry have no FB standard equivalent — they are still fired as a custom event
69
+ * via `fbq('trackCustom', ...)` so merchants can target them.
70
+ */var FB_STANDARD_EVENT_BY_INTERNAL_EVENT={purchase:"Purchase","zonos-checkout-payment-info":"AddPaymentInfo","zonos-checkout-start":"InitiateCheckout"};var getFbStandardEventName=function(e){var r;return(r=FB_STANDARD_EVENT_BY_INTERNAL_EVENT[e])!==null&&r!==void 0?r:null};var isPurchaseMetadata=function(e){if(!e)return false;return Array.isArray(e.items)};
71
+ /**
72
+ * Convert a GA-style event payload into a Facebook Pixel parameter object.
73
+ *
74
+ * GA `items: [{ item_id, item_name, price, quantity }]` is converted into FB's
75
+ * `contents: [{ id, quantity, item_price }]` with derived `content_ids`, `num_items`,
76
+ * and `content_type: 'product'`. Other primitive params (e.g. `checkoutSessionId`,
77
+ * `paymentMethod`, `serviceLevelId`) are forwarded as-is so merchants can build
78
+ * custom audiences on them.
79
+ */var buildFbqParams=function(e){if(!e)return{};if(!isPurchaseMetadata(e)){
80
+ // Forward primitive metadata as-is for custom events
81
+ return Object.assign({},e)}var r=e.currency,t=e.items,n=e.transaction_id,o=e.value,a=__rest(e,["currency","items","transaction_id","value"]);var i=t.map((function(e){return{id:e.item_id,item_price:e.price,quantity:e.quantity}}));var u=t.map((function(e){return e.item_id}));var s=t.reduce((function(e,r){return e+r.quantity}),0);var c=Object.assign(Object.assign({},a),{content_ids:u,content_type:"product",contents:i,num_items:s});if(n){c.order_id=n}if(r!==undefined){c.currency=r}if(o!==undefined){c.value=o}return c};var isFacebookPixelEnabled=function(){var e=zonosStore.checkoutSettings.analyticsProviders.find((function(e){return e.type==="FACEBOOK_PIXEL"}));return!!e&&e.status==="ENABLED"};var fireFbq=function(e,r,t){if(isAnalyticsRelayInIframe()){
82
+ // fbq does not work in the iframe (Facebook Pixel must be on the parent for proper attribution).
83
+ // Relay to parent which will call fbq() once the FB Pixel script is ready.
84
+ enqueueRelayEvent({event:r,fbqMode:e,payload:t,provider:"fbq"});return}if(typeof window.fbq==="function"){log("Zonos submits fbq event","log","".concat(e,":").concat(r));window.fbq(e,r,t)}};
85
+ /**
86
+ * Submit a Facebook Pixel event matching the gtag event payload shape.
87
+ *
88
+ * Behavior:
89
+ * - Always fires `fbq('trackCustom', event, params)` so merchants see `zonos-xxx` events.
90
+ * - If the event has a Facebook standard equivalent (e.g. `purchase` → `Purchase`,
91
+ * `zonos-checkout-start` → `InitiateCheckout`, `zonos-checkout-payment-info` →
92
+ * `AddPaymentInfo`), additionally fires `fbq('track', standardEvent, params)` with
93
+ * FB-formatted parameters.
94
+ *
95
+ * @see https://developers.facebook.com/docs/meta-pixel/reference
96
+ */var submitFbq=function(e){var r=e.event,t=e.metadata;if(!isFacebookPixelEnabled()){return}var n=getIsTestMode();var o=buildFbqParams(t);var a=Object.assign(Object.assign({},o),n&&{isTestMode:true});
97
+ // filter null values
98
+ var i=Object.fromEntries(Object.entries(a).filter((function(e){var r=e[0],t=e[1];return t!==null})));
99
+ // 1) Always emit the original event as a custom event so merchants can target zonos-xxx names.
100
+ fireFbq("trackCustom",r,i);
101
+ // 2) Emit FB standard equivalent if one exists. Skipped when the event itself is the standard
102
+ // name to avoid double-firing (e.g. 'purchase' -> 'Purchase').
103
+ var u=getFbStandardEventName(r);if(u&&u!==r){fireFbq("track",u,i)}};
104
+ /**
105
+ * Fan out an analytics event to every enabled provider.
106
+ *
107
+ * - Calls `submitGtag` (Google Analytics) — always sends the original event name.
108
+ * - Calls `submitFbq` (Facebook Pixel) — sends the original event name as a custom event,
109
+ * and additionally fires the matching FB standard event when one exists
110
+ * (e.g. `purchase` → `Purchase`, `zonos-checkout-start` → `InitiateCheckout`).
111
+ *
112
+ * Each submitter no-ops when its provider is disabled in `analyticsProviders` settings.
113
+ */var submitAnalytics=function(e){submitGtag(e);submitFbq(e)};var _c=createStore((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),paypalStoreOnChange=_c.onChange,paypalStoreReset=_c.reset,paypalStore=_c.state;var paypalStoreCreaterOrder=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,n,o,a,i,u;var s=e.checkoutSessionId;return __generator(this,(function(e){switch(e.label){case 0:n=paypalStore.intent.toUpperCase();return[4/*yield*/,paypalCreateOrder({checkoutSessionId:s,intent:n})];case 1:o=e.sent(),a=o.errors,i=o.json;u=(r=i===null||i===void 0?void 0:i.paypalOrderCreate)===null||r===void 0?void 0:r.paypalOrderId;if(a.length||!u){throw new Error(((t=a.find(Boolean))===null||t===void 0?void 0:t.message)||"An unexpected error occurred when creating paypal order.")}return[2/*return*/,u]}}))}))};var paypalStoreCaptureOrder=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,n,o,a,i;var u=e.checkoutSessionId,s=e.paypalMockResponse;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,paypalCaptureOrder({checkoutSessionId:u,paypalMockResponse:s})];case 1:n=e.sent(),o=n.errors,a=n.json;i=(r=a===null||a===void 0?void 0:a.paypalOrderCapture.order)===null||r===void 0?void 0:r.id;if(o.length||!i){throw new Error(((t=o.find(Boolean))===null||t===void 0?void 0:t.message)||translate("An unexpected error occurred when processing PayPal order."))}return[2/*return*/,i]}}))}))};var paypalErrorHandler=function(e){var r=e.error;var t;var n=jsonParse(r.message);var o=(t=n===null||n===void 0?void 0:n.errors.find(Boolean))===null||t===void 0?void 0:t.message;var a=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!a){paypalStore.paypalErrorMessage=translate("An unexpected error occurred when processing PayPal order.")}var i=a[2]||translate("An unexpected error occurred when processing PayPal order.");
114
+ // show the error message
115
+ paypalStore.paypalErrorMessage=i};
116
+ /**
117
+ * This function generates the options for the PayPal button component.
118
+ * It first retrieves the primary color from the store and checks if it contrasts with PayPal's gold color.
119
+ * It then returns an object with the createOrder function and the style for the PayPal button.
120
+ * The createOrder function makes a call to the PayPal API to create an order and returns the order ID.
121
+ * The style object sets the border radius, color, and shape of the PayPal button.
122
+ */var paypalButtonOptions=function(e){var r=e.checkoutSessionId,t=e.onPaypalFail,n=e.onPaypalSessionDone,o=e.overrideBorderRaidus,a=e.overridePrimaryColor;var i=a||zonosStore.appearance.colorPrimary;
123
+ // Paypal gold color
124
+ var u="#ffc33a";
125
+ // check if the paypal gold color is contrast to the background
126
+ var s=isContrastColor({backgroundColor1:u,backgroundColor2:i||""});return{createOrder:function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o,a,i,u,s,c,l,d,p,f;return __generator(this,(function(v){switch(v.label){case 0:
127
+ // Clicking on the paypal button should trigger the paymentInfoCompleted event
128
+ void trackConversionEvent({checkoutSessionId:r,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});
129
+ // Block PayPal submit when the merchant requires policy consent and the
130
+ // buyer hasn't accepted. Mirrors the Pay-button gate so both flows enforce
131
+ // the same legal contract.
132
+ if(isPolicyConsentRequired()&&!policyConsentStore.accepted){policyConsentStore.showError=true;(e=document.querySelector("zonos-policy-consent"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"});t===null||t===void 0?void 0:t();return[2/*return*/,""]}o=isPolicyConsentRequired();if(o){policyConsentStore.locked=true}a=false;v.label=1;case 1:v.trys.push([1,13,14,15]);return[4/*yield*/,validateCheckoutSession()];case 2:i=v.sent();if(!i.valid){paypalStore.paypalErrorMessage=i.errorMessage;
133
+ // reset stripe error message
134
+ stripeStore.hasPaymentError=false;stripeStore.customErrorMessage=null;submitAnalytics({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:r}});t===null||t===void 0?void 0:t();return[2/*return*/,""]}
135
+ // reset paypal error banner
136
+ paypalStore.paypalErrorMessage=null;
137
+ // reset inventory check error message
138
+ cartStore.inventoryCheckErrorMessage=null;v.label=3;case 3:v.trys.push([3,5,,6]);
139
+ // check inventory before proceeding to payment
140
+ u=cartStore;return[4/*yield*/,stripeStoreHandleInventoryCheck()];case 4:
141
+ // check inventory before proceeding to payment
142
+ u.inventoryCheckErrorMessage=v.sent();return[3/*break*/,6];case 5:s=v.sent();
143
+ // If user provide callback and it throw an exception, default to this message and stop the payment.
144
+ cartStore.inventoryCheckErrorMessage=translate("Unable to check inventory. Please try again.");return[3/*break*/,6];case 6:
145
+ // Don't proceed to payment if there's an error message
146
+ if(cartStore.inventoryCheckErrorMessage){return[2/*return*/,""]}c=storeCreditStoreGetEffectiveAmount();if(!(c>0))return[3/*break*/,8];return[4/*yield*/,storeCreditStoreApplyCredit()];case 7:l=v.sent();if(!l.success){paypalStore.paypalErrorMessage=l.error||translate("Unable to apply store credit. Please try again.");t===null||t===void 0?void 0:t();return[2/*return*/,""]}v.label=8;case 8:
147
+ // Persist consent into the checkout session metadata BEFORE either
148
+ // branch creates the order — both the store-credit-only path and the
149
+ // real PayPal path need the consent recorded. A transient failure here
150
+ // is logged (via `logError` inside the helper) but does NOT block the
151
+ // order: blocking on a flaky network would gate buyers from paying,
152
+ // and the buyer's consent intent is already captured client-side.
153
+ return[4/*yield*/,stripeStoreRecordPolicyConsent()];case 9:
154
+ // Persist consent into the checkout session metadata BEFORE either
155
+ // branch creates the order — both the store-credit-only path and the
156
+ // real PayPal path need the consent recorded. A transient failure here
157
+ // is logged (via `logError` inside the helper) but does NOT block the
158
+ // order: blocking on a flaky network would gate buyers from paying,
159
+ // and the buyer's consent intent is already captured client-side.
160
+ v.sent();if(!storeCreditStoreCoversFullAmount())return[3/*break*/,11];return[4/*yield*/,storeCreditStoreCreateOrder()];case 10:d=v.sent();if(!d.success){paypalStore.paypalErrorMessage=d.error||translate("Unable to place order with store credit. Please try again.");t===null||t===void 0?void 0:t();return[2/*return*/,""]}n===null||n===void 0?void 0:n({orderId:d.orderId||""});cartStoreNextStep();cartStoreClearCheckoutInterval();
161
+ // Store-credit-only success: the cart advances to the next step
162
+ // and the store reset on close will handle the lock cleanup.
163
+ a=true;return[2/*return*/,""];case 11:return[4/*yield*/,paypalStoreCreaterOrder({checkoutSessionId:r})];case 12:p=v.sent();
164
+ // Successful hand-off to PayPal — the popup opens next and onApprove
165
+ // will fire on completion. Keep the lock set so closes/resets later
166
+ // clean up; an empty ID falls through to the unlock in `finally`.
167
+ a=!!p;return[2/*return*/,p];case 13:f=v.sent();logError("Failed to create paypal order",f);paypalStore.paypalErrorMessage=translate("Failed to create PayPal order. Please try again, or consider using an alternative method.");
168
+ // reset stripe error message
169
+ stripeStore.hasPaymentError=false;stripeStore.customErrorMessage=null;submitAnalytics({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:r}});
170
+ // trigger fail event
171
+ t===null||t===void 0?void 0:t();return[2/*return*/,""];case 14:
172
+ // Clear the lock unless we successfully handed off the order — on
173
+ // failures the buyer needs to be able to uncheck and retry.
174
+ if(o&&!a){policyConsentStore.locked=false}return[7/*endfinally*/];case 15:return[2/*return*/]}}))}))},onApprove:function(e,o){return __awaiter(void 0,void 0,void 0,(function(){var e,o;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);
175
+ // reset paypal error banner
176
+ paypalStore.paypalErrorMessage=null;
177
+ // submit google tag when the form is complete
178
+ submitAnalytics({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:r,paymentMethod:"paypal"}});return[4/*yield*/,paypalStoreCaptureOrder({checkoutSessionId:r,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:e=a.sent();paypalStore.orderIdCreated=e;n===null||n===void 0?void 0:n({orderId:e});cartStoreNextStep();
179
+ // clear the checkout session timeout timer when purchase is complete
180
+ cartStoreClearCheckoutInterval();return[3/*break*/,3];case 2:o=a.sent();logError("==== Failed to capture paypal order",o);if(o instanceof Error){return[2/*return*/,paypalErrorHandler({error:o})]}t===null||t===void 0?void 0:t();return[3/*break*/,3];case 3:return[2/*return*/]}}))}))},style:{
181
+ // @ts-ignore
182
+ borderRadius:o==="SHARP"?0:10,color:s?"gold":"blue",shape:"rect"}}};var paypalStoreResetButtons=function(){if(!paypalStore.paypalButtons.length){
183
+ // Do nothing if the buttons array is already empty
184
+ return}
185
+ // Close all paypal buttons so we can re-init them
186
+ paypalStore.paypalButtons.forEach((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4/*yield*/,e.close()];case 1:r.sent();return[2/*return*/]}}))}))}));
187
+ // clean up the buttons
188
+ paypalStore.paypalButtons=[]};var paypalInitScript=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,n,o,a,i;var u=e.currency;return __generator(this,(function(e){switch(e.label){case 0:t=!!((r=zonosStore.checkoutSettings.externalPaymentMethods)===null||r===void 0?void 0:r.find((function(e){return e.type==="PAYPAL"&&e.status==="ENABLED"})));if(!t){log("=== Paypal is disabled for this store","warn");return[2/*return*/]}n=zonosStore.checkoutSettings.externalServiceTokens.find((function(e){return e.type==="PAYPAL_CLIENT_ID"}));if(!n){log("Failed to load paypal -- missing paypal publishable key","warn");return[2/*return*/]}o=(!zonosStore.zonosMode||zonosStore.zonosMode==="production")&&zonosStore.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=zonosStore.checkoutSettings.captureDelay&&zonosStore.checkoutSettings.captureDelay>0;paypalStore.intent=a?"authorize":"capture";log("==== Paypal order intent","info",paypalStore.intent);
189
+ // send paypal publishable key out to load paypal
190
+ i=window.Zonos;return[4/*yield*/,loadScript({clientId:n.token,currency:u,environment:o,intent:paypalStore.intent})];case 1:
191
+ // send paypal publishable key out to load paypal
192
+ i.paypal=e.sent();paypalStore.paypal=window.Zonos.paypal;log("==== Paypal script loaded");return[2/*return*/]}}))}))};var paypalStoreInitButtons=function(e){var r;var t=window.Zonos.paypal;if(!t){log("Paypal is not available");return null}var n=storageStore.checkoutSessionId;if(!n){log("Paypal is not available due to checkoutSessionId is not available");return null}log("==== Loading Paypal buttons");paypalStoreResetButtons();var o=[(r=t.FUNDING)===null||r===void 0?void 0:r.PAYPAL].filter(Boolean);paypalStore.paypalButtons=o.map((function(r){var o;var a=null;try{a=((o=t.Buttons)===null||o===void 0?void 0:o.call(t,Object.assign(Object.assign({},paypalButtonOptions(Object.assign({checkoutSessionId:n,fundingSource:r},e))),{fundingSource:r})))||null}catch(e){log("===== Failed to load paypal's \"".concat(r,'" button'),"warn",e)}if(a===null||a===void 0?void 0:a.isEligible()){log("==== Paypal button ".concat(r," loaded"));return a}return null})).filter(Boolean);return paypalStore.paypalButtons};var paypalStoreHasPaypalEnabled=function(){var e,r;var t=((r=(e=zonosStore.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(e){return e.type==="PAYPAL"})))===null||r===void 0?void 0:r.status)==="ENABLED";return t||!!paypalStore.paypalButtons.length};export{paypalStore as a,paypalInitScript as b,paypalStoreReset as c,paypalStoreInitButtons as d,paypalStoreOnChange as e,paypalStoreHasPaypalEnabled as p,submitAnalytics as s};
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-ekBk_gxV.js";import{s as storageStore}from"./localization-AOqYXGdP.js";import{l as logError,h as handleFetch}from"./handleFetch-D5GYDF-O.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2/*return*/,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4/*yield*/,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2/*return*/,{errors:c.map((function(r){return r.message})),json:null}]}return[2/*return*/,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
@@ -0,0 +1,13 @@
1
+ import{d as cartStore}from"./cart-ekBk_gxV.js";import{A as applyInclusiveEffectiveRate,h as currencyFormat}from"./localization-AOqYXGdP.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};
2
+ /**
3
+ * Unified currency rendering for checkout amounts.
4
+ * @note This is only to display, not for calculations.
5
+ */var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;
6
+ // If the amount already in foreign currency, no need to apply the inclusive effective rate since it's already has the inclusive effective rate applied
7
+ var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;
8
+ // If the item currency is the same as the presentment currency, we can just return the amount in the presentment currency in the same format
9
+ if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){
10
+ // Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
11
+ var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}
12
+ // Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
13
+ var d=i?n:n*o;return currencyFormat({amount:d,currency:l})};export{renderCheckoutCurrency as r};
@@ -1 +1 @@
1
- import{h}from"./index-cfd394c8.js";var renderFallback=function(e){var r=e.content,n=e.isLoading,t=e.skeletonHeight,o=e.skeletonWidth;if(n){return h("zonos-skeleton",{skeletonHeight:t,skeletonWidth:o})}return r};export{renderFallback as r};
1
+ import{h}from"./index-_lt63o7c.js";var renderFallback=function(e){var r=e.content,n=e.isLoading,t=e.skeletonHeight,o=e.skeletonWidth;if(n){return h("zonos-skeleton",{skeletonHeight:t,skeletonWidth:o})}return r};export{renderFallback as r};
@@ -0,0 +1,17 @@
1
+ import{c as countryRequireShortAddressCode}from"./ShortAddressCode-nJ6oI8-n.js";import{e as euCountryCodes,c as countryRequireTaxId}from"./TaxId-Cye-evFK.js";var isInShortAddressCodeCountry=function(r){return countryRequireShortAddressCode.includes(r)};
2
+ /**
3
+ * Checks if the short address code input should be rendered based on the country code.
4
+ */var shouldRenderShortAddressCodeInput=function(r){var e=r.countryCode;
5
+ // If country require short address code, show the input
6
+ var o=isInShortAddressCodeCountry(e);if(o){return true}
7
+ // If country doesn't require short address code, no need to show the input
8
+ return false};var isInTaxIdCountry=function(r){return countryRequireTaxId.includes(r)};
9
+ /**
10
+ * Checks if the tax ID input should be rendered based on the company name and country code.
11
+ */var shouldRenderTaxIdInput=function(r){var e=r.companyName,o=r.countryCode;
12
+ // Only show the tax ID input if the country is in the EU and the company name is provided
13
+ if(euCountryCodes.includes(o)){return e.trim().length>0}
14
+ // If country require tax id, show the input
15
+ var n=isInTaxIdCountry(o);if(n){return true}
16
+ // If country doesn't require tax ID, no need to show the input
17
+ return false};export{shouldRenderTaxIdInput as a,shouldRenderShortAddressCodeInput as s};
@@ -0,0 +1,7 @@
1
+ import{z as getSupportedLanguages}from"./localization-AOqYXGdP.js";
2
+ /**
3
+ * Whether to offer the language selector. Hidden when the merchant has narrowed
4
+ * `appearanceSettings.supportedLocales` to a single language — there is nothing to pick, so the
5
+ * trigger would only open a one-item dialog. Checkout and Hello both gate their footer trigger on
6
+ * this so the two surfaces stay in lockstep.
7
+ */var shouldShowLanguageSelect=function(){return getSupportedLanguages().length>1};export{shouldShowLanguageSelect as s};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Filter out all of the undefined values from the object so we don't have undefined css variable values
3
+ */
4
+ var styles=function(t){
5
+ // loop through the object and filter out all of the underfined values
6
+ return Object.entries(t).reduce((function(t,r){var e=r[0],n=r[1];if(n){t[e]=n}return t}),{})};export{styles as s};
@@ -0,0 +1,45 @@
1
+ import{z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{g as getIsTestMode}from"./handleFetch-D5GYDF-O.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";
2
+ /** Message type for zonos-analytic events sent from iframe to parent. */var ZONOS_ANALYTIC_TYPE="zonos-analytic";
3
+ /** Ping sent by iframe to configure parent's analytics relay (e.g. GA, FB Pixel) and get ready signal. */var RELAY_PING_TYPE="zonos-analytics-relay-ping";
4
+ /** Response from parent when an analytics relay (e.g. gtag, fbq) is ready. */var RELAY_READY_TYPE="zonos-analytics-relay-ready";var providerReady={fbq:false,gtag:false};var queue=[];var listenerAdded=false;var isInIframe=function(){return typeof window!=="undefined"&&window.parent!==window};var flushQueue=function(){
5
+ // Walk a copy and rebuild to keep events whose provider isn't ready yet
6
+ var e=[];while(queue.length>0){var n=queue.shift();if(!providerReady[n.provider]){e.push(n);continue}try{window.parent.postMessage({event:n.event,fbqMode:n.fbqMode,metadata:n.payload,provider:n.provider,type:ZONOS_ANALYTIC_TYPE},"*")}catch(e){
7
+ // Ignore postMessage failures
8
+ }}queue.push.apply(queue,e)};var ensureListener=function(){if(listenerAdded)return;listenerAdded=true;window.addEventListener("message",(function(e){var n;if(((n=e.data)===null||n===void 0?void 0:n.type)!==RELAY_READY_TYPE)return;
9
+ // Older parent scripts may omit `provider`; treat as gtag for backward compatibility.
10
+ var r=e.data.provider||"gtag";providerReady[r]=true;if(typeof window.Zonos!=="undefined"){if(r==="gtag"){window.Zonos.googleAnalyticReady=true}else{window.Zonos.facebookPixelReady=true}}flushQueue()}))};
11
+ /**
12
+ * Send a ping to the parent so it can inject/configure analytics relays for the providers we care about.
13
+ * Picks up `googleAnalyticId` and `facebookPixelId` from `window.Zonos`, both of which may be set by `customHTML`.
14
+ */var sendRelayPing=function(){if(!isInIframe())return;ensureListener();try{var e=typeof window.Zonos!=="undefined"?window.Zonos:undefined;window.parent.postMessage({facebookPixelId:e===null||e===void 0?void 0:e.facebookPixelId,googleAnalyticId:e===null||e===void 0?void 0:e.googleAnalyticId,type:RELAY_PING_TYPE},"*")}catch(e){
15
+ // Ignore postMessage failures
16
+ }};
17
+ /**
18
+ * Sends ping to parent so it can inject/configure analytics relays and respond with ready.
19
+ * Call after customHTML or custom script sets `window.Zonos.googleAnalyticId` / `window.Zonos.facebookPixelId`.
20
+ */var ensureAnalyticsRelayPing$1=function(){if(!isInIframe())return;
21
+ // If both providers are already ready, no need to ping again
22
+ if(providerReady.gtag&&providerReady.fbq)return;sendRelayPing()};
23
+ /**
24
+ * Queue an analytic event for relay to parent. If the provider's relay is already ready,
25
+ * the event is forwarded immediately; otherwise it waits for the ready signal.
26
+ */var enqueueRelayEvent=function(e){ensureListener();if(providerReady[e.provider]){try{window.parent.postMessage({event:e.event,fbqMode:e.fbqMode,metadata:e.payload,provider:e.provider,type:ZONOS_ANALYTIC_TYPE},"*")}catch(e){
27
+ // Ignore postMessage failures
28
+ }return}queue.push(e);
29
+ // Re-ping in case the parent hasn't received the ID yet (e.g. customHTML set it after init)
30
+ sendRelayPing()};var isAnalyticsRelayInIframe=isInIframe;
31
+ /**
32
+ * Re-export of the shared relay ping helper. Kept here for backward compatibility with
33
+ * existing import paths (e.g. `zonos-controller`).
34
+ */var ensureAnalyticsRelayPing=ensureAnalyticsRelayPing$1;var isGoogleAnalyticsEnabled=function(){var e=zonosStore.checkoutSettings.analyticsProviders.find((function(e){return e.type==="GOOGLE_ANALYTICS"}));return!!e&&e.status==="ENABLED"};
35
+ /**
36
+ * Submit a gtag event if the gtag function is available.
37
+ * When running inside an iframe, only posts to parent after the parent has
38
+ * confirmed (via analyticsRelayOnInit) that gtag is available.
39
+ */var submitGtag=function(e){var n=e.event,r=e.metadata;if(!isGoogleAnalyticsEnabled()){return}var a=getIsTestMode();var i=Object.assign(Object.assign({},r),a&&{isTestMode:true});
40
+ // filter null key
41
+ var t=Object.fromEntries(Object.entries(i).filter((function(e){var n=e[0],r=e[1];return r!==null})));if(isAnalyticsRelayInIframe()){
42
+ // gtag does not work in iframe; must relay to parent via postMessage
43
+ enqueueRelayEvent({event:n,payload:t,provider:"gtag"});return}
44
+ // Not in iframe: call gtag directly
45
+ if(typeof window.gtag==="function"){log("Zonos submits gtag event","log",n);window.gtag("event",n,t)}};export{enqueueRelayEvent as a,ensureAnalyticsRelayPing as e,isAnalyticsRelayInIframe as i,submitGtag as s};
@@ -0,0 +1,46 @@
1
+ import{r as requireIsObject,e as getDefaultExportFromCjs}from"./zonosStore-DrIOAz4M.js";import{r as requireDebounce}from"./debounce-D4ko2kvZ.js";var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var r=requireDebounce(),t=requireIsObject();
2
+ /** Error message constants. */var e="Expected a function";
3
+ /**
4
+ * Creates a throttled function that only invokes `func` at most once per
5
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
6
+ * method to cancel delayed `func` invocations and a `flush` method to
7
+ * immediately invoke them. Provide `options` to indicate whether `func`
8
+ * should be invoked on the leading and/or trailing edge of the `wait`
9
+ * timeout. The `func` is invoked with the last arguments provided to the
10
+ * throttled function. Subsequent calls to the throttled function return the
11
+ * result of the last `func` invocation.
12
+ *
13
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
14
+ * invoked on the trailing edge of the timeout only if the throttled function
15
+ * is invoked more than once during the `wait` timeout.
16
+ *
17
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
18
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
19
+ *
20
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
21
+ * for details over the differences between `_.throttle` and `_.debounce`.
22
+ *
23
+ * @static
24
+ * @memberOf _
25
+ * @since 0.1.0
26
+ * @category Function
27
+ * @param {Function} func The function to throttle.
28
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
29
+ * @param {Object} [options={}] The options object.
30
+ * @param {boolean} [options.leading=true]
31
+ * Specify invoking on the leading edge of the timeout.
32
+ * @param {boolean} [options.trailing=true]
33
+ * Specify invoking on the trailing edge of the timeout.
34
+ * @returns {Function} Returns the new throttled function.
35
+ * @example
36
+ *
37
+ * // Avoid excessively updating the position while scrolling.
38
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
39
+ *
40
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
41
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
42
+ * jQuery(element).on('click', throttled);
43
+ *
44
+ * // Cancel the trailing throttled invocation.
45
+ * jQuery(window).on('popstate', throttled.cancel);
46
+ */function o(o,i,a){var u=true,n=true;if(typeof o!="function"){throw new TypeError(e)}if(t(a)){u="leading"in a?!!a.leading:u;n="trailing"in a?!!a.trailing:n}return r(o,i,{leading:u,maxWait:i,trailing:n})}throttle_1=o;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);export{throttle as t};
@@ -0,0 +1,8 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r["throw"](t))}catch(t){i(t)}}function c(t){t.done?n(t.value):o(t.value).then(u,a)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return u.next=a(0),u["throw"]=a(1),u["return"]=a(2),typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(t){return function(e){return c([t,e])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(n=0)),n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(t){a=[6,t];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{d as debounce}from"./debounce-DWPsxJsW.js";import{h as handleFetch,l as logError}from"./handleFetch-D5GYDF-O.js";var attributesToUpdate={};
2
+ // Store debounced functions per session to ensure proper debouncing
3
+ var debouncedFunctions={};var createDebouncedFetch=function(t){return debounce((function(){return __awaiter(void 0,void 0,void 0,(function(){var e,n,r,o,i,u;return __generator(this,(function(a){switch(a.label){case 0:r=Array.from(((e=attributesToUpdate[t])===null||e===void 0?void 0:e.entries())||[]).map((function(t){var e=t[0],n=t[1];return{key:e,value:n}}));return[4/*yield*/,handleFetch("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:r,id:t},method:"POST"})];case 1:o=a.sent(),i=o.errors,u=o.json;if(i.length){logError("Error updating checkout session attributes",i);return[2/*return*/,{success:false}]}(n=attributesToUpdate[t])===null||n===void 0?void 0:n.clear();return[2/*return*/,{success:!!(u===null||u===void 0?void 0:u.success)}]}}))}))}),1e3,{maxWait:5e3})};var updateCheckoutSessionAttributes=function(t){return __awaiter(void 0,[t],void 0,(function(t){var e=t.attributes,n=t.checkoutSessionId;return __generator(this,(function(t){
4
+ // Merge the new attributes with the attributes in the list, if key exist, override it
5
+ // init the map if not exist
6
+ attributesToUpdate[n]||(attributesToUpdate[n]=new Map);e.forEach((function(t){var e;if(t.value){(e=attributesToUpdate[n])===null||e===void 0?void 0:e.set(t.key,t.value)}}));if(!e.length){return[2/*return*/]}
7
+ // Get or create the debounced function for this session
8
+ if(!debouncedFunctions[n]){debouncedFunctions[n]=createDebouncedFetch(n)}return[2/*return*/,debouncedFunctions[n]()]}))}))};export{updateCheckoutSessionAttributes as u};