@zonos/elements 1.3.233 → 1.3.234

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 (413) hide show
  1. package/dist/cjs/{cart-bc615014.js → cart-22ced7cc.js} +33 -29
  2. package/dist/cjs/{shouldRenderTaxIdInput-9b8a8de1.js → containsNonLatinChars-2be5129b.js} +0 -23
  3. package/dist/cjs/{hasInclusivePrice-84145546.js → hasInclusivePrice-ca85cabd.js} +1 -1
  4. package/dist/cjs/index.cjs.js +11 -7
  5. package/dist/cjs/invoice-8fd4242c.js +151 -0
  6. package/dist/cjs/{renderFallback-c2576fbe.js → isCollectMobileTablet-7962c57f.js} +2 -11
  7. package/dist/cjs/isInvoiceMobileTablet-dde41e4e.js +15 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{translationStore-08d3ff9c.js → localization-8ef6250a.js} +1059 -1
  10. package/dist/cjs/{paypal-1d6f1a71.js → paypal-4a086f84.js} +7 -8
  11. package/dist/cjs/placeTestOrder-f25d08ee.js +45 -0
  12. package/dist/cjs/{placeTestOrder-a5469e40.js → renderCheckoutCurrency-5494e45b.js} +2 -42
  13. package/dist/cjs/renderFallback-78b54537.js +12 -0
  14. package/dist/cjs/shouldRenderTaxIdInput-eda13ef8.js +25 -0
  15. package/dist/cjs/throttle-7dd64984.js +76 -0
  16. package/dist/cjs/{zonos-address_11.cjs.entry.js → zonos-address-display_9.cjs.entry.js} +62 -668
  17. package/dist/cjs/zonos-address_4.cjs.entry.js +715 -0
  18. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  19. package/dist/cjs/{zonos-banner_2.cjs.entry.js → zonos-banner.cjs.entry.js} +0 -40
  20. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  21. package/dist/cjs/{zonos-empty-state-payment_4.cjs.entry.js → zonos-card_5.cjs.entry.js} +44 -6
  22. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +75 -92
  23. package/dist/cjs/zonos-checkout.cjs.entry.js +20 -21
  24. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -6
  26. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +66 -65
  27. package/dist/cjs/zonos-collect.cjs.entry.js +25 -25
  28. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-controller.cjs.entry.js +39 -10
  30. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -2
  31. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -11
  32. package/dist/cjs/zonos-elements.cjs.js +1 -1
  33. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +30 -31
  34. package/dist/cjs/zonos-hello.cjs.entry.js +7 -8
  35. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +94 -0
  37. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +686 -0
  38. package/dist/cjs/zonos-invoice.cjs.entry.js +466 -0
  39. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -6
  40. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  41. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  42. package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
  43. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  45. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  46. package/dist/collection/collection-manifest.json +8 -0
  47. package/dist/collection/components/checkout/zonos-invoice/assets/ChevronDownIcon.svg +1 -0
  48. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
  49. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
  54. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
  55. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
  56. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
  57. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
  58. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
  59. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
  60. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
  66. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
  67. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
  68. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
  69. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
  70. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
  71. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
  72. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
  73. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
  74. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
  75. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +545 -0
  76. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  77. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  78. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  79. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  80. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  81. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  82. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  83. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  84. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  85. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  86. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  87. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  88. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  89. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  90. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  91. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  92. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  93. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  94. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  95. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
  96. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  97. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  98. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  99. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  100. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  101. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  102. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  103. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  104. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  105. package/dist/collection/components/main/zonos-controller.js +45 -4
  106. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  107. package/dist/collection/components/store/checkout/invoice.js +148 -0
  108. package/dist/collection/components/store/checkout/stripe.js +8 -3
  109. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  110. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  111. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  112. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  113. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  114. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  115. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  116. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  117. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  118. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  119. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  120. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  121. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  122. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  123. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  124. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  125. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  126. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  127. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  128. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  129. package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
  130. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  131. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  132. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  133. package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
  134. package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
  135. package/dist/collection/scripts/_zonosBase.js +4 -0
  136. package/dist/esm/{cart-14f305b3.js → cart-66aecbb3.js} +9 -5
  137. package/dist/esm/{shouldRenderTaxIdInput-8bc112bb.js → containsNonLatinChars-2d8810c3.js} +1 -23
  138. package/dist/esm/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  139. package/dist/esm/index.js +11 -7
  140. package/dist/esm/invoice-c7452847.js +146 -0
  141. package/dist/esm/{renderFallback-dbf1e3ae.js → isCollectMobileTablet-921002b0.js} +3 -11
  142. package/dist/esm/isInvoiceMobileTablet-1f7b614e.js +12 -0
  143. package/dist/esm/loader.js +1 -1
  144. package/dist/esm/{translationStore-690c4e04.js → localization-04b05867.js} +1041 -2
  145. package/dist/esm/{paypal-fded8844.js → paypal-56564874.js} +2 -3
  146. package/dist/esm/placeTestOrder-6b9eda9e.js +43 -0
  147. package/dist/esm/{placeTestOrder-2250f719.js → renderCheckoutCurrency-cb808110.js} +3 -42
  148. package/dist/esm/renderFallback-3f010b48.js +10 -0
  149. package/dist/esm/shouldRenderTaxIdInput-d45ceeb4.js +23 -0
  150. package/dist/esm/throttle-ce2432ab.js +74 -0
  151. package/dist/esm/{zonos-address_11.entry.js → zonos-address-display_9.entry.js} +32 -636
  152. package/dist/esm/zonos-address_4.entry.js +708 -0
  153. package/dist/esm/zonos-badge.entry.js +3 -3
  154. package/dist/esm/{zonos-banner_2.entry.js → zonos-banner.entry.js} +1 -40
  155. package/dist/esm/zonos-button_3.entry.js +3 -3
  156. package/dist/esm/{zonos-empty-state-payment_4.entry.js → zonos-card_5.entry.js} +44 -7
  157. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_12.entry.js} +15 -31
  158. package/dist/esm/zonos-checkout.entry.js +3 -4
  159. package/dist/esm/zonos-collapse.entry.js +2 -2
  160. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -6
  161. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  162. package/dist/esm/zonos-collect.entry.js +5 -5
  163. package/dist/esm/zonos-component.entry.js +1 -1
  164. package/dist/esm/zonos-controller.entry.js +39 -10
  165. package/dist/esm/zonos-country-flag.entry.js +1 -2
  166. package/dist/esm/zonos-country-select_4.entry.js +10 -11
  167. package/dist/esm/zonos-elements.js +1 -1
  168. package/dist/esm/zonos-hello-dialog.entry.js +6 -7
  169. package/dist/esm/zonos-hello.entry.js +1 -2
  170. package/dist/esm/zonos-input.entry.js +4 -4
  171. package/dist/esm/zonos-invoice-cart-items_2.entry.js +89 -0
  172. package/dist/esm/zonos-invoice-finish_5.entry.js +678 -0
  173. package/dist/esm/zonos-invoice.entry.js +462 -0
  174. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  175. package/dist/esm/zonos-link.entry.js +20 -0
  176. package/dist/esm/zonos-logo.entry.js +2 -2
  177. package/dist/esm/zonos-stripe-input.entry.js +5 -5
  178. package/dist/esm/zonos-toggle.entry.js +2 -2
  179. package/dist/esm/zonos-tooltip.entry.js +2 -2
  180. package/dist/esm/zonos-v-stack.entry.js +2 -2
  181. package/dist/esm-es5/cart-66aecbb3.js +1 -0
  182. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  183. package/dist/esm-es5/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  184. package/dist/esm-es5/index.js +1 -1
  185. package/dist/esm-es5/invoice-c7452847.js +1 -0
  186. package/dist/esm-es5/isCollectMobileTablet-921002b0.js +1 -0
  187. package/dist/esm-es5/isInvoiceMobileTablet-1f7b614e.js +1 -0
  188. package/dist/esm-es5/loader.js +1 -1
  189. package/dist/esm-es5/localization-04b05867.js +1 -0
  190. package/dist/esm-es5/{paypal-fded8844.js → paypal-56564874.js} +1 -1
  191. package/dist/esm-es5/placeTestOrder-6b9eda9e.js +1 -0
  192. package/dist/esm-es5/renderCheckoutCurrency-cb808110.js +1 -0
  193. package/dist/esm-es5/renderFallback-3f010b48.js +1 -0
  194. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +1 -0
  195. package/dist/esm-es5/throttle-ce2432ab.js +1 -0
  196. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -0
  197. package/dist/esm-es5/zonos-address_4.entry.js +1 -0
  198. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  199. package/dist/esm-es5/zonos-banner.entry.js +1 -0
  200. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  201. package/dist/esm-es5/zonos-card_5.entry.js +1 -0
  202. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  203. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  204. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  205. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  206. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  207. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  208. package/dist/esm-es5/zonos-component.entry.js +1 -1
  209. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  210. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  211. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  212. package/dist/esm-es5/zonos-elements.js +1 -1
  213. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  214. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  215. package/dist/esm-es5/zonos-input.entry.js +1 -1
  216. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -0
  217. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -0
  218. package/dist/esm-es5/zonos-invoice.entry.js +1 -0
  219. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  220. package/dist/esm-es5/zonos-link.entry.js +1 -0
  221. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  222. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  223. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  224. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  225. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  226. package/dist/scripts/index.d.ts +356 -0
  227. package/dist/scripts/index.js +1 -1
  228. package/dist/scripts/loadZonos.js +1 -1
  229. package/dist/scripts/zonos.js +1 -1
  230. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.d.ts +10 -0
  231. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.d.ts +50 -0
  232. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.d.ts +25 -0
  233. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.d.ts +28 -0
  234. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.d.ts +62 -0
  235. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.d.ts +22 -0
  236. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.d.ts +7 -0
  237. package/dist/types/components/checkout/zonos-invoice/zonos-invoice.d.ts +86 -0
  238. package/dist/types/components/main/zonos-controller.d.ts +4 -0
  239. package/dist/types/components/store/checkout/invoice.d.ts +19 -0
  240. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  241. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  242. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  243. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  244. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  245. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  246. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  247. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  248. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  249. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  250. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  251. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  252. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  253. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  254. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  255. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  256. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  257. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  258. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  259. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  260. package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
  261. package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
  262. package/dist/types/components.d.ts +351 -0
  263. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  264. package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
  265. package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
  266. package/dist/zonos-elements/index.esm.js +1 -1
  267. package/dist/zonos-elements/p-00719e49.entry.js +1 -0
  268. package/dist/zonos-elements/p-01b0a2e2.js +1 -0
  269. package/dist/zonos-elements/p-01dada4e.js +1 -0
  270. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  271. package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
  272. package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
  273. package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
  274. package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
  276. package/dist/zonos-elements/p-170314a3.js +1 -0
  277. package/dist/zonos-elements/p-17a09191.entry.js +1 -0
  278. package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
  279. package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
  280. package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
  281. package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
  282. package/dist/zonos-elements/p-1f3549c6.js +1 -0
  283. package/dist/zonos-elements/p-2250e585.entry.js +1 -0
  284. package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
  285. package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
  286. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  287. package/dist/zonos-elements/p-27f6930b.js +1 -0
  288. package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
  289. package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
  290. package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
  291. package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
  292. package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
  293. package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
  294. package/dist/zonos-elements/p-44b50260.entry.js +1 -0
  295. package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
  296. package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
  297. package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
  298. package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
  299. package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
  301. package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
  302. package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
  303. package/dist/zonos-elements/p-5e9b45f7.entry.js +1 -0
  304. package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
  305. package/dist/zonos-elements/p-6688473e.entry.js +1 -0
  306. package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
  307. package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
  308. package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
  309. package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
  310. package/dist/zonos-elements/p-7e17667d.js +1 -0
  311. package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
  312. package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
  313. package/dist/zonos-elements/p-81e3eb5b.js +1 -0
  314. package/dist/zonos-elements/p-82febf70.system.js +1 -0
  315. package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
  317. package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
  318. package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
  319. package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
  320. package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
  321. package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
  322. package/dist/zonos-elements/p-8af188f8.system.js +1 -0
  323. package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
  324. package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
  325. package/dist/zonos-elements/p-944d00da.entry.js +1 -0
  326. package/dist/zonos-elements/p-9479f155.system.js +1 -0
  327. package/dist/zonos-elements/p-95dc475b.system.js +1 -0
  328. package/dist/zonos-elements/p-976afc17.system.js +1 -0
  329. package/dist/zonos-elements/p-97d56c21.system.entry.js +1 -0
  330. package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
  331. package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
  332. package/dist/zonos-elements/p-9fa32fdf.js +1 -0
  333. package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
  334. package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
  335. package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
  336. package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
  337. package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
  338. package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
  339. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  340. package/dist/zonos-elements/p-dc5fb21c.js +1 -0
  341. package/dist/zonos-elements/p-dc94d7eb.js +1 -0
  342. package/dist/zonos-elements/p-e5e64e16.system.js +1 -0
  343. package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
  344. package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
  345. package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
  346. package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
  347. package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
  348. package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
  349. package/dist/zonos-elements/p-f513b231.entry.js +1 -0
  350. package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
  351. package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
  352. package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
  353. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  354. package/package.json +1 -1
  355. package/dist/cjs/localization-39516612.js +0 -884
  356. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
  357. package/dist/esm/localization-c5029ffc.js +0 -863
  358. package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
  359. package/dist/esm-es5/cart-14f305b3.js +0 -1
  360. package/dist/esm-es5/localization-c5029ffc.js +0 -1
  361. package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
  362. package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
  363. package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
  364. package/dist/esm-es5/translationStore-690c4e04.js +0 -1
  365. package/dist/esm-es5/zonos-address_11.entry.js +0 -1
  366. package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
  367. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  368. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
  369. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
  370. package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
  371. package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
  372. package/dist/zonos-elements/p-143d706b.entry.js +0 -1
  373. package/dist/zonos-elements/p-14d7489d.js +0 -1
  374. package/dist/zonos-elements/p-1bfae137.entry.js +0 -1
  375. package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
  376. package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
  377. package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
  378. package/dist/zonos-elements/p-2557b96b.js +0 -1
  379. package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
  380. package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
  381. package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
  382. package/dist/zonos-elements/p-3185968f.entry.js +0 -1
  383. package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
  384. package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
  385. package/dist/zonos-elements/p-561be3a2.system.js +0 -1
  386. package/dist/zonos-elements/p-5c680f72.js +0 -1
  387. package/dist/zonos-elements/p-5f77d19e.js +0 -1
  388. package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
  389. package/dist/zonos-elements/p-767a31a8.system.js +0 -1
  390. package/dist/zonos-elements/p-78a6e775.system.js +0 -1
  391. package/dist/zonos-elements/p-7c705c76.system.js +0 -1
  392. package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
  393. package/dist/zonos-elements/p-84078c57.system.js +0 -1
  394. package/dist/zonos-elements/p-8a23bbf5.js +0 -1
  395. package/dist/zonos-elements/p-905d2490.entry.js +0 -1
  396. package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
  397. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
  398. package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
  399. package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
  400. package/dist/zonos-elements/p-ae940a99.js +0 -1
  401. package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
  402. package/dist/zonos-elements/p-c0c458f7.system.entry.js +0 -1
  403. package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
  404. package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
  405. package/dist/zonos-elements/p-cf765af3.system.js +0 -1
  406. package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
  407. package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
  408. package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
  409. package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
  410. package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
  411. package/dist/zonos-elements/p-eeb1081e.js +0 -1
  412. package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
  413. package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
@@ -3,415 +3,21 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const debounce$1 = require('./debounce-815d1517.js');
7
- const zonosStore = require('./zonosStore-37a4b4f4.js');
8
- const cart = require('./cart-bc615014.js');
9
- const localization = require('./localization-39516612.js');
10
- const translationStore = require('./translationStore-08d3ff9c.js');
11
- const handleFetch = require('./handleFetch-954f30e1.js');
12
- const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
6
+ const localization = require('./localization-8ef6250a.js');
7
+ const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
8
+ const cart = require('./cart-22ced7cc.js');
13
9
  const classes = require('./classes-b7918f56.js');
14
- const VarianceTest = require('./VarianceTest-bec00ea8.js');
15
- const TaxId = require('./TaxId-12acedde.js');
16
10
  const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
11
+ const zonosStore = require('./zonosStore-37a4b4f4.js');
17
12
  const RemoveIcon$2 = require('./RemoveIcon-081ac073.js');
18
13
  const isDarkColor = require('./isDarkColor-878e600e.js');
14
+ const throttle = require('./throttle-7dd64984.js');
15
+ const handleFetch = require('./handleFetch-954f30e1.js');
16
+ const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-eda13ef8.js');
17
+ const VarianceTest = require('./VarianceTest-bec00ea8.js');
18
+ const TaxId = require('./TaxId-12acedde.js');
19
19
  const helpers = require('./helpers-5bdbb68c.js');
20
-
21
- var debounce = debounce$1.debounce_1,
22
- isObject$1 = zonosStore.isObject_1;
23
-
24
- /** Error message constants. */
25
- var FUNC_ERROR_TEXT = 'Expected a function';
26
-
27
- /**
28
- * Creates a throttled function that only invokes `func` at most once per
29
- * every `wait` milliseconds. The throttled function comes with a `cancel`
30
- * method to cancel delayed `func` invocations and a `flush` method to
31
- * immediately invoke them. Provide `options` to indicate whether `func`
32
- * should be invoked on the leading and/or trailing edge of the `wait`
33
- * timeout. The `func` is invoked with the last arguments provided to the
34
- * throttled function. Subsequent calls to the throttled function return the
35
- * result of the last `func` invocation.
36
- *
37
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
38
- * invoked on the trailing edge of the timeout only if the throttled function
39
- * is invoked more than once during the `wait` timeout.
40
- *
41
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
42
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
43
- *
44
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
45
- * for details over the differences between `_.throttle` and `_.debounce`.
46
- *
47
- * @static
48
- * @memberOf _
49
- * @since 0.1.0
50
- * @category Function
51
- * @param {Function} func The function to throttle.
52
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
53
- * @param {Object} [options={}] The options object.
54
- * @param {boolean} [options.leading=true]
55
- * Specify invoking on the leading edge of the timeout.
56
- * @param {boolean} [options.trailing=true]
57
- * Specify invoking on the trailing edge of the timeout.
58
- * @returns {Function} Returns the new throttled function.
59
- * @example
60
- *
61
- * // Avoid excessively updating the position while scrolling.
62
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
63
- *
64
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
65
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
66
- * jQuery(element).on('click', throttled);
67
- *
68
- * // Cancel the trailing throttled invocation.
69
- * jQuery(window).on('popstate', throttled.cancel);
70
- */
71
- function throttle(func, wait, options) {
72
- var leading = true,
73
- trailing = true;
74
-
75
- if (typeof func != 'function') {
76
- throw new TypeError(FUNC_ERROR_TEXT);
77
- }
78
- if (isObject$1(options)) {
79
- leading = 'leading' in options ? !!options.leading : leading;
80
- trailing = 'trailing' in options ? !!options.trailing : trailing;
81
- }
82
- return debounce(func, wait, {
83
- 'leading': leading,
84
- 'maxWait': wait,
85
- 'trailing': trailing
86
- });
87
- }
88
-
89
- var throttle_1 = throttle;
90
-
91
- const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
92
- const ZonosAddressStyle0 = zonosAddressCss;
93
-
94
- const ZonosAddress$1 = class {
95
- constructor(hostRef) {
96
- index.registerInstance(this, hostRef);
97
- this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
98
- this.taxIdChanged = index.createEvent(this, "taxIdChanged", 7);
99
- this.storeUnsubscribeList = [];
100
- /**
101
- * Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
102
- */
103
- this.isAutoCompleteAdjusted = false;
104
- /**
105
- * Default address for stripe
106
- */
107
- this.defaultAddress = [];
108
- /**
109
- * Error message for tax id input
110
- */
111
- this.taxIdErrorMessage = '';
112
- this.stripe = window.Zonos.stripe;
113
- /**
114
- * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
115
- */
116
- this.isDirtyAddress = false;
117
- /**
118
- * Local address event for stripe address element
119
- */
120
- this.isAddressFilled = false;
121
- /**
122
- * Local checkout session id to check if the address is filled after checkout is loaded
123
- */
124
- this.checkoutSessionId = localization.storageStore.checkoutSessionId;
125
- /**
126
- * Track previous country and postal code to detect changes
127
- */
128
- this.prevCountry = null;
129
- this.prevPostalCode = null;
130
- /**
131
- * Check if the tracking event is sent
132
- */
133
- this.trackingSent = false;
134
- this.prefetchLandedCost = throttle_1(cart.stripeStorePrefetchLandedCost, 1000);
135
- }
136
- getStripeAddressInstance() {
137
- if (this.type === 'billing') {
138
- return {
139
- stripeAddressElement: cart.stripeStore.stripeBillingAddressElement,
140
- stripeAddressEventData: cart.stripeStore.stripeBillingAddressEventData,
141
- stripeElements: cart.stripeStore.stripeElementsForBillingAddress,
142
- };
143
- }
144
- return {
145
- stripeAddressElement: cart.stripeStore.stripeAddressElement,
146
- stripeAddressEventData: cart.stripeStore.stripeAddressEventData,
147
- stripeElements: cart.stripeStore.stripeElements,
148
- };
149
- }
150
- updateAddressEventData({ event, type, }) {
151
- switch (type) {
152
- case 'billing':
153
- cart.stripeStore.stripeBillingAddressEventData = event;
154
- break;
155
- default: {
156
- cart.stripeStore.stripeAddressEventData = event;
157
- break;
158
- }
159
- }
160
- // Only trigger landed cost prefetch for shipping address
161
- if (type === 'shipping') {
162
- // if line 1 has something, trigger prefetch
163
- if (event.value.address.line1.length) {
164
- void this.prefetchLandedCost();
165
- }
166
- }
167
- }
168
- isAddressFilledChanged() {
169
- // Sometimes address elements is loaded with prefilled data before checkout is loaded, need to not send the event if checkout session id is not available, and send the event after checkout is loaded
170
- if (!localization.storageStore.checkoutSessionId) {
171
- return;
172
- }
173
- // Only need to track the event if the shipping address is filled
174
- if (this.isAddressFilled &&
175
- !this.trackingSent &&
176
- this.type === 'shipping') {
177
- this.trackingSent = true;
178
- const checkoutSessionId = localization.storageStore.checkoutSessionId;
179
- void cart.trackConversionEvent({
180
- checkoutSessionId,
181
- eventName: 'checkout_customerInfoFilled',
182
- });
183
- }
184
- }
185
- updateAddressElement({ stripeAddressElement, type, }) {
186
- if (type === 'shipping') {
187
- cart.stripeStore.stripeAddressElement = stripeAddressElement;
188
- return;
189
- }
190
- cart.stripeStore.stripeBillingAddressElement = stripeAddressElement;
191
- }
192
- async watchInitStripe() {
193
- this.stripe = window.Zonos.stripe;
194
- const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
195
- if (!this.stripe || !stripeElements) {
196
- handleFetch.logError("Stripe is not initialized. Couldn't load stripe element.");
197
- return;
198
- }
199
- // remove phone from default address if it's not provided, stripe
200
- // will throw error if key phone exist and its value is empty or 'undefined'.
201
- const defaultAddress = this.defaultAddress.map(address => (Object.assign(Object.assign({}, address), { name: address.name, phone: address.phone || undefined })));
202
- const shippableCountries = localization.localizationStore.shippingZoneCountries;
203
- const shippingZone = shippableCountries
204
- ? Object.values(shippableCountries).map(country => country.code)
205
- : [];
206
- // Show all countries in checkout if the query param is present
207
- const checkoutAllCountries = new URLSearchParams(window.location.search).has('zonosCheckoutAllCountries');
208
- const allowedCountries = this.type === 'shipping' ? shippingZone : [];
209
- const defaultAddressCountry = (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
210
- localization.getFallbackDefaultCountryCode(allowedCountries);
211
- VarianceTest.log(`Stripe country code: ${defaultAddressCountry}`, 'info');
212
- const addressElement = stripeElements.create('address', {
213
- allowedCountries: checkoutAllCountries ? [] : allowedCountries,
214
- // only show the default address if stripeAddressEventData is not provided
215
- contacts: defaultAddress.length && !stripeAddressEventData
216
- ? this.defaultAddress
217
- : [],
218
- defaultValues: {
219
- address: Object.assign(Object.assign({}, stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address), { country: defaultAddressCountry }),
220
- firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
221
- lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
222
- phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
223
- },
224
- display: {
225
- name: 'split',
226
- },
227
- fields: {
228
- phone: 'always',
229
- },
230
- mode: this.type,
231
- validation: {
232
- phone: {
233
- required: 'always',
234
- },
235
- },
236
- });
237
- addressElement.mount(this.el.querySelector('.zonos--address-component'));
238
- // Initialize previous values if address data exists
239
- if (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address) {
240
- this.prevCountry = stripeAddressEventData.value.address.country;
241
- this.prevPostalCode = stripeAddressEventData.value.address.postal_code;
242
- }
243
- addressElement.on('change', event => {
244
- const eventValue = event.value;
245
- if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
246
- this.isDirtyAddress = true;
247
- if (!this.isAutoCompleteAdjusted) {
248
- const googleAutoComplete = this.el.querySelector('iframe[src*="autocomplete-suggestions"]');
249
- if (googleAutoComplete) {
250
- googleAutoComplete.style.zIndex = '3';
251
- }
252
- this.isAutoCompleteAdjusted = true;
253
- }
254
- // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
255
- setTimeout(() => {
256
- // scroll directly into view if it's mobile
257
- if (handleFetch.isCheckoutMobile()) {
258
- this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
259
- }
260
- else {
261
- // scroll into the end of the page so the address placeholder won't be hidden
262
- const yOffset = this.type === 'shipping' ? 100 : 600;
263
- const parentWrapper = this.el.closest('.zonos--group');
264
- const y = this.el.getBoundingClientRect().top + yOffset;
265
- parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
266
- }
267
- }, 600);
268
- }
269
- const { firstName, lastName } = cart.extractName({
270
- firstName: eventValue.firstName,
271
- lastName: eventValue.lastName,
272
- name: eventValue.name,
273
- });
274
- this.updateAddressEventData({
275
- event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName,
276
- lastName }) }),
277
- type: this.type,
278
- });
279
- });
280
- this.updateAddressElement({
281
- stripeAddressElement: addressElement,
282
- type: this.type,
283
- });
284
- }
285
- defaultAddressChanged(newAddress, oldAddress) {
286
- // check if stringified json of oldAddress is different from newAddress
287
- const oldAddressString = JSON.stringify(oldAddress);
288
- const newAddressString = JSON.stringify(newAddress);
289
- // No need to reset address element if the default address is the same
290
- if (oldAddressString === newAddressString) {
291
- return;
292
- }
293
- VarianceTest.log('Reset address element when default address property is changed', 'info', {
294
- defaultAddress: this.defaultAddress,
295
- });
296
- const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
297
- stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.clear();
298
- stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
299
- // Reset stripe address event data
300
- if (this.type === 'shipping') {
301
- cart.stripeStore.stripeAddressEventData = null;
302
- }
303
- else {
304
- cart.stripeStore.stripeBillingAddressEventData = null;
305
- }
306
- void this.watchInitStripe();
307
- }
308
- isInTaxIdCountry(countryCode) {
309
- return TaxId.countryRequireTaxId.includes(countryCode);
310
- }
311
- /**
312
- * Render tax id input based on ship to country code
313
- */
314
- renderTaxIdInput() {
315
- var _a;
316
- // No need to render tax id input for billing address
317
- if (this.type === 'billing') {
318
- return null;
319
- }
320
- const countryCode = (_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
321
- // Don't render tax id input if the country is not provided
322
- if (!countryCode) {
323
- return null;
324
- }
325
- // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
326
- if (!this.isInTaxIdCountry(countryCode)) {
327
- return null;
328
- }
329
- const taxIdInputRendered = shouldRenderTaxIdInput.shouldRenderTaxIdInput({
330
- companyName: cart.stripeStore.companyName,
331
- countryCode,
332
- });
333
- // Don't render tax id input if the country doesn't require tax id
334
- if (!taxIdInputRendered) {
335
- return null;
336
- }
337
- const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
338
- return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel: translationStore.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
339
- cart.stripeStore.taxId = event.detail;
340
- this.taxIdChanged.emit(event.detail);
341
- } }), this.taxIdErrorMessage && (index.h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
342
- }
343
- renderCompanyNameInput() {
344
- // No need to render company name for billing address (only allow for Collect)
345
- if (this.type === 'billing' && !window.Zonos.isCollect) {
346
- return null;
347
- }
348
- // only render the company input if the setting is enabled or the cart is collect
349
- const isCompanyNameEnabled = zonosStore.zonosStore.checkoutSettings.companyFieldsStatus === 'ENABLED' ||
350
- !!window.Zonos.isCollect;
351
- // No need to render company name for billing address (only allow for Collect)
352
- if (!isCompanyNameEnabled) {
353
- return null;
354
- }
355
- return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: translationStore.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
356
- cart.stripeStore.companyName = event.detail;
357
- } }));
358
- }
359
- disconnectedCallback() {
360
- // destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
361
- const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
362
- stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
363
- // unsubscribe from store subscriptions
364
- try {
365
- this.storeUnsubscribeList.forEach(subscription => subscription());
366
- }
367
- catch (_a) { }
368
- }
369
- componentDidLoad() {
370
- const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
371
- this.isDirtyAddress =
372
- !!stripeAddressEventData &&
373
- stripeAddressEventData.value.address.line1.length > 0;
374
- // @Watch doesn't get trigger on initial load
375
- void this.watchInitStripe();
376
- this.checkoutSessionId = localization.storageStore.checkoutSessionId;
377
- this.storeUnsubscribeList = [
378
- localization.storageStoreOnChange('checkoutSessionId', () => {
379
- this.checkoutSessionId = localization.storageStore.checkoutSessionId;
380
- }),
381
- cart.stripeStoreOnChange('stripeElements', () => {
382
- if (this.type === 'shipping') {
383
- void this.watchInitStripe();
384
- }
385
- }),
386
- cart.stripeStoreOnChange('stripeElementsForBillingAddress', () => {
387
- if (this.type === 'billing') {
388
- void this.watchInitStripe();
389
- }
390
- }),
391
- ];
392
- }
393
- render() {
394
- var _a;
395
- this.checkoutSessionId = localization.storageStore.checkoutSessionId;
396
- if ((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) {
397
- this.isAddressFilled = true;
398
- }
399
- // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
400
- return (index.h(index.Host, { key: '15928518601e48825589ce4de4580263fec6a745', class: classes.classes([
401
- 'zonos--address',
402
- 'zonos--elements',
403
- `zonos--${this.type}-address`,
404
- ]) }, this.titleText && (index.h("zonos-text", { key: '2e666ed81597ac95d3de575a2d901d083e9100cc', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("slot", { key: '8ca6987aa7d70093c078e3afca20ac0b1484bd77', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '23345f2b61e387c57a363be8df8aa54ab6461a88', class: "zonos--address-component" })));
405
- }
406
- get el() { return index.getElement(this); }
407
- static get watchers() { return {
408
- "checkoutSessionId": ["isAddressFilledChanged"],
409
- "isAddressFilled": ["isAddressFilledChanged"],
410
- "stripe": ["watchInitStripe"],
411
- "defaultAddress": ["defaultAddressChanged"]
412
- }; }
413
- };
414
- ZonosAddress$1.style = ZonosAddressStyle0;
20
+ require('./debounce-815d1517.js');
415
21
 
416
22
  const zonosAddressDisplayCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
417
23
  const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
@@ -425,14 +31,14 @@ const ZonosAddressDisplay = class {
425
31
  const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
426
32
  const shippingZoneCountry = (_a = localization.localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
427
33
  const renderEnteredInfoText = ({ bold, content, }) => {
428
- const textColor = shouldRenderTaxIdInput.isTextContainsNonLatinChars(content)
34
+ const textColor = containsNonLatinChars.isTextContainsNonLatinChars(content)
429
35
  ? 'red-600'
430
36
  : 'gray-1000';
431
37
  return (index.h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
432
38
  };
433
39
  return (index.h(index.Host, { class: "zonos--address-form zonos--elements" }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
434
- ? translationStore.translate('Shipping')
435
- : translationStore.translate('Billing'))), index.h("div", { class: "zonos--address-group" }, name && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), index.h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (index.h("div", { class: "zonos--address-line" }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
40
+ ? localization.translate('Shipping')
41
+ : localization.translate('Billing'))), index.h("div", { class: "zonos--address-group" }, name && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), index.h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (index.h("div", { class: "zonos--address-line" }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
436
42
  content: shippingZoneCountry.displayName,
437
43
  }))))));
438
44
  }
@@ -470,14 +76,14 @@ const ZonosAddressForm = class {
470
76
  name,
471
77
  });
472
78
  return (index.h(index.Host, { key: '22d085e462e69a4100a8cb1763367f53b933ed1d', class: "zonos--address-form zonos--elements" }, index.h("div", { key: '17d6c92370343ffbd1b4a85b3c49055a5a7f9d72', class: "zonos--title" }, index.h("zonos-text", { key: 'a4cb01bd8fed154567e0b7ade87777a1552ea815', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
473
- ? translationStore.translate('Shipping')
474
- : translationStore.translate('Billing'))), index.h("div", { key: '4a1dddabc011e465d295b5c2994fda3a2531c96e', class: "zonos--address-group" }, index.h("div", { key: '60df882b5717b2f557a5051f492b2c838f938cd9', class: "zonos--contact" }, index.h("zonos-text", { key: '90b6613ccf1b2a445baae5f700f392d195924688', type: "label" }, translationStore.translate('Contact')), index.h("zonos-input", { key: '125815769a366e113b61d5581578ef6ecbdffa79', class: "zonos--form-email", inputLabel: translationStore.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'd0d331fb33f40243ce23824db5ba9551fd5636f8', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '46323db8f305e491215df03ef2092e76eec38355', class: "zonos--form-first-name", inputLabel: translationStore.translate('First name'), inputValue: firstName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
79
+ ? localization.translate('Shipping')
80
+ : localization.translate('Billing'))), index.h("div", { key: '4a1dddabc011e465d295b5c2994fda3a2531c96e', class: "zonos--address-group" }, index.h("div", { key: '60df882b5717b2f557a5051f492b2c838f938cd9', class: "zonos--contact" }, index.h("zonos-text", { key: '90b6613ccf1b2a445baae5f700f392d195924688', type: "label" }, localization.translate('Contact')), index.h("zonos-input", { key: '125815769a366e113b61d5581578ef6ecbdffa79', class: "zonos--form-email", inputLabel: localization.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'd0d331fb33f40243ce23824db5ba9551fd5636f8', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '46323db8f305e491215df03ef2092e76eec38355', class: "zonos--form-first-name", inputLabel: localization.translate('First name'), inputValue: firstName, isError: containsNonLatinChars.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
475
81
  key: 'name',
476
82
  value: `${e.detail} ${lastName}`,
477
- }) }), index.h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel: translationStore.translate('Last name'), inputValue: lastName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
83
+ }) }), index.h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel: localization.translate('Last name'), inputValue: lastName, isError: containsNonLatinChars.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
478
84
  key: 'name',
479
85
  value: `${firstName} ${e.detail}`,
480
- }) }))), index.h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, index.h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" }, translationStore.translate('Address')), index.h("zonos-input", { key: 'f0efe937603a38761643af1486b53359a19593e5', class: "zonos--form-country", inputLabel: translationStore.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: '8360a4ae65c8963e886a3fb8322e0e539d121142', class: "zonos--form-line1", inputLabel: translationStore.translate('Address line 1'), inputValue: line1, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '2c9374917b705c2c9306d3d4d7fc4b4043c2b73b', class: "zonos--form-line2", inputLabel: translationStore.translate('Address line 2'), inputValue: line2, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'fd067074070cadba3d895503f35c344ff817fec2', class: "zonos--address-row" }, index.h("zonos-input", { key: 'a565bee68e2498403df2801eb90005e8cb2d6f44', class: "zonos--form-city", inputLabel: translationStore.translate('City'), inputValue: city, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: '89bae75b691aacdd62b624f65eee303bfb3fc811', class: "zonos--form-state", inputLabel: translationStore.translate('State/Province'), inputValue: state, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: '9a851b9f449ed135859b7b828bf362168caf76fb', class: "zonos--form-postal-code", inputLabel: translationStore.translate('Postal code'), inputValue: postal_code, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: 'a51b8ba1e22d5a12eac9021abe83fdc20f8eb1a6', class: "zonos--form-phone", inputLabel: translationStore.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
86
+ }) }))), index.h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, index.h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" }, localization.translate('Address')), index.h("zonos-input", { key: 'f0efe937603a38761643af1486b53359a19593e5', class: "zonos--form-country", inputLabel: localization.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: '8360a4ae65c8963e886a3fb8322e0e539d121142', class: "zonos--form-line1", inputLabel: localization.translate('Address line 1'), inputValue: line1, isError: containsNonLatinChars.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '2c9374917b705c2c9306d3d4d7fc4b4043c2b73b', class: "zonos--form-line2", inputLabel: localization.translate('Address line 2'), inputValue: line2, isError: containsNonLatinChars.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'fd067074070cadba3d895503f35c344ff817fec2', class: "zonos--address-row" }, index.h("zonos-input", { key: 'a565bee68e2498403df2801eb90005e8cb2d6f44', class: "zonos--form-city", inputLabel: localization.translate('City'), inputValue: city, isError: containsNonLatinChars.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: '89bae75b691aacdd62b624f65eee303bfb3fc811', class: "zonos--form-state", inputLabel: localization.translate('State/Province'), inputValue: state, isError: containsNonLatinChars.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: '9a851b9f449ed135859b7b828bf362168caf76fb', class: "zonos--form-postal-code", inputLabel: localization.translate('Postal code'), inputValue: postal_code, isError: containsNonLatinChars.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: 'a51b8ba1e22d5a12eac9021abe83fdc20f8eb1a6', class: "zonos--form-phone", inputLabel: localization.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
481
87
  }
482
88
  static get watchers() { return {
483
89
  "translatedAddress": ["watchCurrentAddress"]
@@ -563,9 +169,9 @@ const ZonosAddressSuggestions = class {
563
169
  return segments;
564
170
  }
565
171
  render() {
566
- return (index.h(index.Host, { key: '466084b61818244ec8b18aecad34cdf1c3ce07d0', class: "zonos--address-suggestions", role: "group", style: {
172
+ return (index.h(index.Host, { key: '7ab44ba24fdcc22c2f3dd06985d1d6e8e3c64cbc', class: "zonos--address-suggestions", role: "group", style: {
567
173
  '--zonos--border-radius': getBorderRadius.getBorderRadius(),
568
- } }, index.h("ul", { key: '6d683213f5a4ffe06ba1292234753060a75ddf55', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: '10765017862170072ec33afae156f87c63bab39b', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: '8660904e473b17ae5643aacab3d0fba3858c6632', class: "powered-by-container" }, index.h("zonos-text", { key: 'a310c0e5014e061470eee2c1ce17df59d5cb3cbd', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: 'a156fa8d30df760a3c87d6519a630ee5c7224525', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: '634f7ea46f1f210ecd8b11711eb29e100ae95d76', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
174
+ } }, index.h("ul", { key: 'e23aa07baa70336a9f37752d0de3725580684c88', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: 'd2208ef720bdff1d57937394266046edd7ef9e3b', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: '4f834a0f3e8fa8c378e824894a51171543b61339', class: "powered-by-container" }, index.h("zonos-text", { key: '8f92d8f3e4421048881036ba3e43de25e9cfe005', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: 'efe2dcb973a7fd34a76d107dca1f7a6ac4d7112b', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: '8f59caa99bec12c4ac4c42e5b4108443f6e90446', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
569
175
  this.localSuggestions = [];
570
176
  } }))), this.localSuggestions.map(suggestion => (
571
177
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
@@ -663,11 +269,11 @@ const ZonosAddressUpdateDialog = class {
663
269
  translatedAddress: this.translatedShippingAddressState,
664
270
  });
665
271
  // check to see if there are still non-latin characters in the translated address
666
- const shippingNonlatinChars = shouldRenderTaxIdInput.containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
272
+ const shippingNonlatinChars = containsNonLatinChars.containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
667
273
  // get list of non-latin characters field in the billing address
668
274
  const billingNonLatinChars = translatedBillingAddress &&
669
275
  this.billingAddress &&
670
- shouldRenderTaxIdInput.containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
276
+ containsNonLatinChars.containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
671
277
  const shippingHasNonLatinChars = !!Object.keys(shippingNonlatinChars)
672
278
  .length;
673
279
  const billingHasNonLatinChars = !!billingNonLatinChars && !!Object.keys(billingNonLatinChars).length;
@@ -748,7 +354,7 @@ const ZonosAddressUpdateDialog = class {
748
354
  return (index.h(index.Host, { key: '655845cef04f4af526b1a1c4e49243c4f2b4c7f6', class: classes.classes([
749
355
  'zonos--address-update-dialog zonos--elements',
750
356
  this.isMobile && 'mobile',
751
- ]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" }, translationStore.translate('Update your address')), index.h("zonos-button", { key: '474cc2421cd3150daa46bfe215da6ae7df9c6087', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon$2.RemoveIcon }), noBackground: true, onClick: () => this.closeUpdateDialogHandler(), title: "Close checkout dialog" })), index.h("zonos-text", { key: '6d019250cce57e8b30dd790a184df7273bdb234f' }, translationStore.translate('To ensure delivery all address details must be in Latin characters.'))), index.h("div", { key: '80ee681844f4f4f43fce69d977b634b1fbc3d5f5', class: "zonos--group" }, index.h("zonos-text", { key: '940e510eceec156a74f32de84cf58ffebd796435', class: "zonos--what-you-entered", type: "semiBoldLabel" }, translationStore.translate('What you entered')), index.h("div", { key: 'f626127f5c399c29ab1022deb66aaee8f8a49601', class: "zonos--address-display-group" }, index.h("zonos-address-display", { key: '9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f', addressType: "shipping", currentAddress: shipping }), billing && (index.h("zonos-address-display", { key: 'fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9', addressType: "billing", currentAddress: billing }))), index.h("div", { key: '5a82195018ff8cdfd1126f4424062a26c25ee757', class: "zonos--address-form-section" }, index.h("zonos-text", { key: 'f694dfad166697e4c034cea51057133b69b1c144', type: "semiBoldLabel" }, translationStore.translate('Translated address')), index.h("zonos-address-form", { key: '4a99c841cf4800de43c612cce3d56d956d02c22f', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
357
+ ]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" }, localization.translate('Update your address')), index.h("zonos-button", { key: '474cc2421cd3150daa46bfe215da6ae7df9c6087', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon$2.RemoveIcon }), noBackground: true, onClick: () => this.closeUpdateDialogHandler(), title: "Close checkout dialog" })), index.h("zonos-text", { key: '6d019250cce57e8b30dd790a184df7273bdb234f' }, localization.translate('To ensure delivery all address details must be in Latin characters.'))), index.h("div", { key: '80ee681844f4f4f43fce69d977b634b1fbc3d5f5', class: "zonos--group" }, index.h("zonos-text", { key: '940e510eceec156a74f32de84cf58ffebd796435', class: "zonos--what-you-entered", type: "semiBoldLabel" }, localization.translate('What you entered')), index.h("div", { key: 'f626127f5c399c29ab1022deb66aaee8f8a49601', class: "zonos--address-display-group" }, index.h("zonos-address-display", { key: '9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f', addressType: "shipping", currentAddress: shipping }), billing && (index.h("zonos-address-display", { key: 'fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9', addressType: "billing", currentAddress: billing }))), index.h("div", { key: '5a82195018ff8cdfd1126f4424062a26c25ee757', class: "zonos--address-form-section" }, index.h("zonos-text", { key: 'f694dfad166697e4c034cea51057133b69b1c144', type: "semiBoldLabel" }, localization.translate('Translated address')), index.h("zonos-address-form", { key: '4a99c841cf4800de43c612cce3d56d956d02c22f', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
752
358
  const address = e.detail;
753
359
  this.translatedShippingAddressState =
754
360
  this.buildTranslateAddressState({
@@ -762,7 +368,7 @@ const ZonosAddressUpdateDialog = class {
762
368
  currentAddress: billing,
763
369
  translatedAddress: address,
764
370
  });
765
- }, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" }, translationStore.translate('Cancel')), index.h("zonos-button", { key: '8fd08bc79b60eb9a0064c06ff9d840b1ecb09123', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, translationStore.translate('Update address'))))))));
371
+ }, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" }, localization.translate('Cancel')), index.h("zonos-button", { key: '8fd08bc79b60eb9a0064c06ff9d840b1ecb09123', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, localization.translate('Update address'))))))));
766
372
  }
767
373
  get el() { return index.getElement(this); }
768
374
  static get watchers() { return {
@@ -835,14 +441,14 @@ const ZonosCheckbox = class {
835
441
  customRoundRadius: '4px',
836
442
  overrideBorderStyle: this.borderStyle,
837
443
  });
838
- return (index.h(index.Host, { key: 'bef392ce775e35da3f0640dcbb8271437995daa7', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
444
+ return (index.h(index.Host, { key: 'c2a9023becafd6d19ad769d449383924c85c641f', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
839
445
  '--zonos--background-color': backgroundColor,
840
446
  '--zonos--border-radius': borderStyle,
841
447
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
842
448
  '--zonos--size': `${this.size}px`,
843
- } }, index.h("label", { key: '059e2eabc4825738a6607cd307694b252ba55905', class: classes.classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, index.h("input", { key: 'a35c086ae478d5ac932608859e6b3250738c870f', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
449
+ } }, index.h("label", { key: '352e8bda93f1ac9a7a55ba7038e922626c3a9594', class: classes.classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, index.h("input", { key: '71d664f9d83345ad4c143f71209bdb0a2cb16745', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
844
450
  this.checkboxSelected.emit(e.target.checked);
845
- }, type: "checkbox" }), index.h("span", { key: '2482799b470a2ef5050709b6de36469ec8321b04', class: "checkmark-container" }, index.h("svg", { key: '1034db2d054e98fe06688b602346097b3e7c7d9d', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'b926b486910470ea3180a904e8ec5ca2cf8e452f', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (index.h("zonos-text", { key: '5a31f075fb462c7419597f0d15b5e4a2f4e40148', size: this.fontSize }, this.label)))));
451
+ }, type: "checkbox" }), index.h("span", { key: 'c772c4e8dbbbef8035874616a0254fb4114a97c8', class: "checkmark-container" }, index.h("svg", { key: 'd497191975edeca268cc014431535f4befdd7b2c', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '15b26fdf72a058e81d4472d0c757a725c04e3f47', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (index.h("zonos-text", { key: '2d6015d16eda08dc39eff677f4858d2aed620891', size: this.fontSize }, this.label)))));
846
452
  }
847
453
  };
848
454
  ZonosCheckbox.style = ZonosCheckboxStyle0;
@@ -974,7 +580,7 @@ const ZonosAddress = class {
974
580
  */
975
581
  this.isAutoCompleteAdjusted = false;
976
582
  // Create a single throttled instance that persists
977
- this.throttledGetAddressSuggestions = throttle_1(() => {
583
+ this.throttledGetAddressSuggestions = throttle.throttle_1(() => {
978
584
  if (zonosStore.zonosStore.checkoutAddressService) {
979
585
  zonosStore.zonosStore.checkoutAddressService.getAddressSuggestions({
980
586
  country: this.country,
@@ -1036,7 +642,7 @@ const ZonosAddress = class {
1036
642
  (((_b = this.countryField) === null || _b === void 0 ? void 0 : _b.cityRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
1037
643
  customErrors.city = '';
1038
644
  if (!isValid) {
1039
- customErrors.city = translationStore.translate('The field is incomplete');
645
+ customErrors.city = localization.translate('The field is incomplete');
1040
646
  }
1041
647
  break;
1042
648
  }
@@ -1045,7 +651,7 @@ const ZonosAddress = class {
1045
651
  (((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.stateRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
1046
652
  customErrors.state = '';
1047
653
  if (!isValid) {
1048
- customErrors.state = translationStore.translate('The field is incomplete');
654
+ customErrors.state = localization.translate('The field is incomplete');
1049
655
  }
1050
656
  break;
1051
657
  }
@@ -1056,7 +662,7 @@ const ZonosAddress = class {
1056
662
  });
1057
663
  customErrors.postalCode = '';
1058
664
  if (!isValid) {
1059
- customErrors.postalCode = translationStore.translate('Your [zipLabel] is invalid', {
665
+ customErrors.postalCode = localization.translate('Your [zipLabel] is invalid', {
1060
666
  zipLabel: ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.zipLabel) || 'ZIP',
1061
667
  });
1062
668
  }
@@ -1066,7 +672,7 @@ const ZonosAddress = class {
1066
672
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
1067
673
  customErrors.firstName = '';
1068
674
  if (!isValid) {
1069
- customErrors.firstName = translationStore.translate('Please provide your first name.');
675
+ customErrors.firstName = localization.translate('Please provide your first name.');
1070
676
  }
1071
677
  break;
1072
678
  }
@@ -1074,7 +680,7 @@ const ZonosAddress = class {
1074
680
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
1075
681
  customErrors.lastName = '';
1076
682
  if (!isValid) {
1077
- customErrors.lastName = translationStore.translate('Please provide your last name.');
683
+ customErrors.lastName = localization.translate('Please provide your last name.');
1078
684
  }
1079
685
  break;
1080
686
  }
@@ -1082,7 +688,7 @@ const ZonosAddress = class {
1082
688
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
1083
689
  customErrors.line1 = '';
1084
690
  if (!isValid) {
1085
- customErrors.line1 = translationStore.translate('The field is incomplete');
691
+ customErrors.line1 = localization.translate('The field is incomplete');
1086
692
  }
1087
693
  break;
1088
694
  }
@@ -1092,17 +698,17 @@ const ZonosAddress = class {
1092
698
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
1093
699
  customErrors.phone = '';
1094
700
  if (!isValid) {
1095
- customErrors.phone = translationStore.translate('Please provide a mobile phone number.');
701
+ customErrors.phone = localization.translate('Please provide a mobile phone number.');
1096
702
  }
1097
703
  }
1098
704
  else {
1099
705
  customErrors.phone = '';
1100
706
  // If the phone number is empty, set the error message
1101
707
  if (phoneValidateInfo.isEmpty) {
1102
- customErrors.phone = translationStore.translate('Please provide a mobile phone number.');
708
+ customErrors.phone = localization.translate('Please provide a mobile phone number.');
1103
709
  }
1104
710
  else if (phoneValidateInfo.wrongFormat) {
1105
- customErrors.phone = translationStore.translate('Your mobile phone number is incomplete.');
711
+ customErrors.phone = localization.translate('Your mobile phone number is incomplete.');
1106
712
  }
1107
713
  }
1108
714
  break;
@@ -1227,7 +833,7 @@ const ZonosAddress = class {
1227
833
  return null;
1228
834
  }
1229
835
  const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
1230
- return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: translationStore.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
836
+ return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: localization.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
1231
837
  cart.stripeStore.taxId = event.detail;
1232
838
  } })));
1233
839
  }
@@ -1241,7 +847,7 @@ const ZonosAddress = class {
1241
847
  if (!isCompanyNameEnabled) {
1242
848
  return null;
1243
849
  }
1244
- return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: translationStore.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
850
+ return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: localization.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
1245
851
  cart.stripeStore.companyName = event.detail;
1246
852
  } }));
1247
853
  }
@@ -1548,7 +1154,7 @@ const ZonosAddress = class {
1548
1154
  value: region.interpayCode,
1549
1155
  }))
1550
1156
  .sort((a, b) => a.label.localeCompare(b.label));
1551
- return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel: translationStore.translate('First name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName, onInputChange: (event) => {
1157
+ return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel: localization.translate('First name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName, onInputChange: (event) => {
1552
1158
  this.validate({
1553
1159
  type: this.type,
1554
1160
  value: event.detail,
@@ -1562,7 +1168,7 @@ const ZonosAddress = class {
1562
1168
  * Therefore, we must update the value after validation to ensure correct error state
1563
1169
  */
1564
1170
  this.firstName = event.detail;
1565
- }, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel: translationStore.translate('Last name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName, onInputChange: (event) => {
1171
+ }, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel: localization.translate('Last name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName, onInputChange: (event) => {
1566
1172
  this.validate({
1567
1173
  type: this.type,
1568
1174
  value: event.detail,
@@ -1605,9 +1211,9 @@ const ZonosAddress = class {
1605
1211
  this.city = '';
1606
1212
  this.state = '';
1607
1213
  this.postalCode = '';
1608
- }, options: this.shipToCountries || [], required: true, selectLabel: translationStore.translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
1214
+ }, options: this.shipToCountries || [], required: true, selectLabel: localization.translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
1609
1215
  localization.localizationStore.selectedCountryCode ||
1610
- (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: translationStore.translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
1216
+ (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: localization.translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
1611
1217
  this.validate({
1612
1218
  type: this.type,
1613
1219
  value: event.detail,
@@ -1638,9 +1244,9 @@ const ZonosAddress = class {
1638
1244
  }, suggestions: this.addressSuggestions, type: this.type })), index.h("div", { "aria-label": "Additional address details", class: classes.classes([
1639
1245
  'zonos--custom-address-form-additional-fields',
1640
1246
  countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
1641
- ]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: translationStore.translate(((_c = this.countryField) === null || _c === void 0 ? void 0 : _c.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
1247
+ ]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: localization.translate(((_c = this.countryField) === null || _c === void 0 ? void 0 : _c.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
1642
1248
  this.line2 = event.detail;
1643
- } }), ((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: translationStore.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
1249
+ } }), ((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: localization.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
1644
1250
  this.validate({
1645
1251
  type: this.type,
1646
1252
  value: event.detail,
@@ -1668,9 +1274,9 @@ const ZonosAddress = class {
1668
1274
  * Therefore, we must update the value after validation to ensure correct error state
1669
1275
  */
1670
1276
  this.state = event.detail;
1671
- }, options: stateOptions, required: (_k = this.countryField) === null || _k === void 0 ? void 0 : _k.stateRequired, selectLabel: translationStore.translate(((_l = this.countryField) === null || _l === void 0 ? void 0 : _l.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_m = this.countryField) === null || _m === void 0 ? void 0 : _m.zipShow) && (index.h("zonos-stripe-input", { "aria-describedby": ((_o = this.countryField) === null || _o === void 0 ? void 0 : _o.zipFormat)
1277
+ }, options: stateOptions, required: (_k = this.countryField) === null || _k === void 0 ? void 0 : _k.stateRequired, selectLabel: localization.translate(((_l = this.countryField) === null || _l === void 0 ? void 0 : _l.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_m = this.countryField) === null || _m === void 0 ? void 0 : _m.zipShow) && (index.h("zonos-stripe-input", { "aria-describedby": ((_o = this.countryField) === null || _o === void 0 ? void 0 : _o.zipFormat)
1672
1278
  ? `zip-format-${this.type}`
1673
- : undefined, "aria-required": ((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: translationStore.translate(((_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', name: "postalCode", onInputChange: (event) => {
1279
+ : undefined, "aria-required": ((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: localization.translate(((_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', name: "postalCode", onInputChange: (event) => {
1674
1280
  this.validate({
1675
1281
  type: this.type,
1676
1282
  value: event.detail,
@@ -1684,7 +1290,7 @@ const ZonosAddress = class {
1684
1290
  * Therefore, we must update the value after validation to ensure correct error state
1685
1291
  */
1686
1292
  this.postalCode = event.detail;
1687
- }, required: (_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipRequired, title: `${this.type} zip code` }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_s = zonosStore.zonosStore.genericSettings) === null || _s === void 0 ? void 0 : _s.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: translationStore.translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
1293
+ }, required: (_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipRequired, title: `${this.type} zip code` }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_s = zonosStore.zonosStore.genericSettings) === null || _s === void 0 ? void 0 : _s.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: localization.translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
1688
1294
  const { isEmpty, phoneNumber, valid, wrongFormat } = event.detail;
1689
1295
  // Validate the phone number
1690
1296
  this.validate({
@@ -1755,10 +1361,10 @@ const ZonosAddress = class {
1755
1361
  this.country = localization.localizationStore.selectedCountryCode;
1756
1362
  }
1757
1363
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1758
- return (index.h(index.Host, { key: 'fed5a2350a7c3f3d83e21d4538c2ab1fc41fb397', class: classes.classes([
1364
+ return (index.h(index.Host, { key: 'dc41846f9f8cb0b10e4148ad5523f26186970888', class: classes.classes([
1759
1365
  'zonos--address zonos--elements',
1760
1366
  `zonos--${this.type}-address`,
1761
- ]) }, index.h("zonos-text", { key: '08a95944a1cc34b50fc7f1c3356e7853a8eb83b0', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("slot", { key: '7275e2aa1fe566e43fb223f68257ec0df9fbf5af', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
1367
+ ]) }, index.h("zonos-text", { key: '38e4bc053824f1f7f6c15bb3ade74b16e0f977e1', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("slot", { key: 'e7b702568f26e4cff082ba88a3f68bc9d32d6bd2', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
1762
1368
  }
1763
1369
  get el() { return index.getElement(this); }
1764
1370
  static get watchers() { return {
@@ -1868,7 +1474,7 @@ const ZonosDialog = class {
1868
1474
  const borderStyle = getBorderRadius.getBorderRadius({
1869
1475
  overrideBorderStyle: this.borderStyle,
1870
1476
  });
1871
- return (index.h(index.Host, { key: '6e673f681a3111d8e33c8cf4e8ab0c8f27c75d48', class: classes.classes([
1477
+ return (index.h(index.Host, { key: '1b53109e3598536674ab0a2cac4c5fa52c2e501d', class: classes.classes([
1872
1478
  'zonos--elements',
1873
1479
  this.open && 'open',
1874
1480
  this.isLoading && 'is-loading',
@@ -1880,225 +1486,15 @@ const ZonosDialog = class {
1880
1486
  '--zonos--height': this.height || 'initial',
1881
1487
  '--zonos--min-height': this.minHeight || '500px',
1882
1488
  '--zonos--width': this.width,
1883
- } }, index.h("div", { key: 'f245de30fb680fd673bd8531f3982b73ed506308', class: "zonos--backdrop" }), index.h("div", { key: 'ee75ecd48e28f38be08b5db9078c0b3b28b9bd9f', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'ce7d2273f358001b5899ba7a6ea8d5bd91ab55cb', class: "zonos--dialog" }, this.isLoading && (index.h("div", { key: 'e2cd0f877ed4f8b78b549a4aaedf1e67a234b0f7', class: "zonos--loading" }, index.h("zonos-spinner", { key: 'e0507e5fea599494979287fc4f13a7da08be758b', size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { key: '8d6cac393a445febf36cc6fb1811c00223518481', class: "zonos--header" }, this.headerText && (index.h("h3", { key: 'cb634d14db0a14144a370d66e3d5aa9147914038', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { key: 'd11ff8473046b201bad444c9b81a0566dd400829', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, title: "Close dialog", variant: "subtle" })))), index.h("div", { key: '356588fe85cce5298e4c2e862c31dab3018602a5', class: classes.classes([
1489
+ } }, index.h("div", { key: '3fcaf891d98fad2a7bb0b0eb7285c991a9df7610', class: "zonos--backdrop" }), index.h("div", { key: '16fe5c3ad017d19c52e85cf18eec31fe3960f61d', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, index.h("div", { key: '1fae701967b41b2d96e709078f6958867a7ef1c0', class: "zonos--dialog" }, this.isLoading && (index.h("div", { key: 'ba0bc9a7bf0f8fd097e874b371fc563ee9fab255', class: "zonos--loading" }, index.h("zonos-spinner", { key: 'c4599e9093de3e0ee56f094fc9bbe33d474cf966', size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { key: '827ff1f3a08f9efe7e1cb10315e62b68ed634087', class: "zonos--header" }, this.headerText && (index.h("h3", { key: 'd6e000b787d758080aa9283f59a3b577ef9d9bde', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { key: '8efcb22ad294f4feab8f1a89e893a4f3d8a48d05', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, title: "Close dialog", variant: "subtle" })))), index.h("div", { key: '2bf643dcdcd2fdffdaccba0169386cd0a5a4ccd6', class: classes.classes([
1884
1490
  'zonos--body',
1885
1491
  this.noBodyPadding && 'zonos--no-body-padding',
1886
- ]) }, index.h("slot", { key: 'd525f4fab2449a219d42ccb45b4497076b5973c9' })), index.h("slot", { key: 'febb4e4ab0cb950b3a346052d60fa70ec8346be4', name: "dialog-footer" })))));
1492
+ ]) }, index.h("slot", { key: '1b8886abbfac00704f004c6ca14d96fdbe87e751' })), index.h("slot", { key: '85c94e23f5686e4f91af598bffb14e38a09855a4', name: "dialog-footer" })))));
1887
1493
  }
1888
1494
  static get assetsDirs() { return ["assets"]; }
1889
1495
  };
1890
1496
  ZonosDialog.style = ZonosDialogStyle0;
1891
1497
 
1892
- const validateEmailValue = (value) => {
1893
- const emailRegex = /^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;
1894
- return emailRegex.test(value);
1895
- };
1896
-
1897
- const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";
1898
- const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
1899
-
1900
- const MAX_RETRIES_INITIALIZE_LINK = 51;
1901
- const ZonosLinkAuthentication = class {
1902
- constructor(hostRef) {
1903
- index.registerInstance(this, hostRef);
1904
- this.linkAuthenticationChange = index.createEvent(this, "linkAuthenticationChange", 7);
1905
- this.storeUnsubscribeList = [];
1906
- /**
1907
- * Default email for stripe
1908
- */
1909
- this.defaultEmail = null;
1910
- /**
1911
- * Email error text to dispaly
1912
- */
1913
- this.isEmailError = false;
1914
- this.stripe = cart.stripeStore.stripe;
1915
- this.isStagingMode = cart.cartStore.isStagingMode;
1916
- this.clientSecret = cart.stripeStore.clientSecret;
1917
- this.retriesInitializeLink = 0;
1918
- this.setCustomEmailInputToLinkEvent = (emailValue) => {
1919
- // check if the email is valid
1920
- const isValid = validateEmailValue(emailValue);
1921
- const simulateLinkEvent = {
1922
- complete: !!isValid,
1923
- elementType: 'linkAuthentication',
1924
- empty: !emailValue,
1925
- value: {
1926
- email: emailValue,
1927
- },
1928
- };
1929
- cart.stripeStore.stripeLinkEventData = simulateLinkEvent;
1930
- };
1931
- this.handleNormalEmailInput = (event) => {
1932
- var _a;
1933
- const inputValue = event.detail;
1934
- this.setCustomEmailInputToLinkEvent(inputValue);
1935
- (_a = this.linkAuthenticationChange) === null || _a === void 0 ? void 0 : _a.emit();
1936
- };
1937
- }
1938
- watchIsStagingMode() {
1939
- // Wait for the DOM to be ready before re-initializing Link element
1940
- setTimeout(() => {
1941
- void this.watchInitStripe();
1942
- }, 0);
1943
- }
1944
- async watchInitStripe() {
1945
- if (!this.stripe || !cart.stripeStore.stripeElements) {
1946
- return;
1947
- }
1948
- // No need to initialize link if this is staging mode since we will render the email input field
1949
- if (cart.cartStore.isStagingMode || !this.clientSecret) {
1950
- return;
1951
- }
1952
- const defaultValues = this.defaultEmail
1953
- ? {
1954
- email: this.defaultEmail,
1955
- }
1956
- : undefined;
1957
- try {
1958
- // Create and mount the Authentication Element in ${type} mode
1959
- const linkAuthenticationElement = cart.stripeStore.stripeLinkElement ||
1960
- cart.stripeStore.stripeElements.create('linkAuthentication', {
1961
- defaultValues: defaultValues,
1962
- });
1963
- const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
1964
- if (!linkAuthenticationElementContainer) {
1965
- handleFetch.logError('Cannot find container element for linkAuthenticationElement');
1966
- return;
1967
- }
1968
- linkAuthenticationElement.mount(linkAuthenticationElementContainer);
1969
- linkAuthenticationElement.on('change', event => {
1970
- var _a;
1971
- cart.stripeStore.stripeLinkEventData = event;
1972
- (_a = this.linkAuthenticationChange) === null || _a === void 0 ? void 0 : _a.emit();
1973
- });
1974
- cart.stripeStore.stripeLinkElement = linkAuthenticationElement;
1975
- this.retriesInitializeLink = 0;
1976
- // 10 seconds
1977
- if (this.retriesInitializeLink > 11) {
1978
- VarianceTest.log('Stripe link element initialized', 'info', {
1979
- retriesInitializeLink: this.retriesInitializeLink,
1980
- stripe: this.stripe,
1981
- });
1982
- void handleFetch.sendErrorLog({
1983
- endpoint: 'stripe-link-authentication-init-long-running',
1984
- errors: [
1985
- 'Stripe link element initialized after 20 retries - 10 seconds',
1986
- ],
1987
- metadata: {
1988
- retriesInitializeLink: this.retriesInitializeLink,
1989
- },
1990
- });
1991
- }
1992
- }
1993
- catch (error) {
1994
- if (error instanceof Error) {
1995
- // Wait for the stripe elements to be ready with the new client secret
1996
- this.retriesInitializeLink++;
1997
- if (this.retriesInitializeLink < MAX_RETRIES_INITIALIZE_LINK) {
1998
- await new Promise(resolve => setTimeout(resolve, 500));
1999
- void this.watchInitStripe();
2000
- }
2001
- if (this.retriesInitializeLink === MAX_RETRIES_INITIALIZE_LINK) {
2002
- void handleFetch.sendErrorLog({
2003
- endpoint: 'stripe-link-authentication-init-error',
2004
- errors: [error.message],
2005
- metadata: {
2006
- retriesInitializeLink: this.retriesInitializeLink,
2007
- },
2008
- });
2009
- }
2010
- }
2011
- }
2012
- }
2013
- watchDefaultEmail(newDefaultEmail, oldDefaultEmail) {
2014
- var _a, _b;
2015
- VarianceTest.log('Default email is changed', 'info', {
2016
- newDefaultEmail,
2017
- oldDefaultEmail,
2018
- });
2019
- if (oldDefaultEmail === newDefaultEmail) {
2020
- return;
2021
- }
2022
- if (!newDefaultEmail) {
2023
- cart.stripeStore.stripeLinkEventData = null;
2024
- }
2025
- // Only set value for Stripe input input to stripeLinkEventData when checkout is in staging mode
2026
- if (cart.cartStore.isStagingMode) {
2027
- this.setCustomEmailInputToLinkEvent(newDefaultEmail || '');
2028
- return;
2029
- }
2030
- (_a = cart.stripeStore.stripeLinkElement) === null || _a === void 0 ? void 0 : _a.clear();
2031
- (_b = cart.stripeStore.stripeLinkElement) === null || _b === void 0 ? void 0 : _b.destroy();
2032
- cart.stripeStore.stripeLinkElement = null;
2033
- cart.stripeStore.stripeLinkEventData = null;
2034
- VarianceTest.log('Reset stripe link element when default email is changed', 'info', {
2035
- defaultEmail: newDefaultEmail,
2036
- });
2037
- void this.watchInitStripe();
2038
- }
2039
- disconnectedCallback() {
2040
- // unsubscribe from store subscriptions
2041
- try {
2042
- this.storeUnsubscribeList.forEach(subscription => subscription());
2043
- }
2044
- catch (_a) { }
2045
- }
2046
- componentDidLoad() {
2047
- this.storeUnsubscribeList = [
2048
- cart.stripeStoreOnChange('stripeElements', async () => {
2049
- void this.watchInitStripe();
2050
- }),
2051
- cart.stripeStoreOnChange('clientSecret', async () => {
2052
- this.clientSecret = cart.stripeStore.clientSecret;
2053
- }),
2054
- cart.stripeStoreOnChange('stripe', async () => {
2055
- this.stripe = cart.stripeStore.stripe;
2056
- }),
2057
- ];
2058
- // @Watch doesn't get trigger on initial load
2059
- void this.watchInitStripe();
2060
- if (!this.defaultEmail) {
2061
- return;
2062
- }
2063
- // set default email value to stripeLinkEventData if default email is provided
2064
- this.setCustomEmailInputToLinkEvent(this.defaultEmail);
2065
- }
2066
- render() {
2067
- this.isStagingMode = cart.cartStore.isStagingMode;
2068
- this.clientSecret = cart.stripeStore.clientSecret;
2069
- const renderEmailAddress = () => {
2070
- var _a;
2071
- if (cart.cartStore.isStagingMode) {
2072
- return (index.h("zonos-stripe-input", { inputLabel: translationStore.translate('Email'), inputValue: this.defaultEmail ||
2073
- ((_a = cart.stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) ||
2074
- '', isError: this.isEmailError, onBlur: () => {
2075
- var _a;
2076
- const emailValue = ((_a = cart.stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) || '';
2077
- if (!emailValue) {
2078
- return;
2079
- }
2080
- // check if the email is valid
2081
- const isValid = validateEmailValue(emailValue);
2082
- this.isEmailError = !isValid;
2083
- }, onInputChange: this.handleNormalEmailInput }));
2084
- }
2085
- return (index.h("div", { class: `zonos--link-authentication-component ${this.isEmailError && 'zonos--input-invalid'}` }));
2086
- };
2087
- // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
2088
- return (index.h(index.Host, { class: "zonos--link-authentication zonos--elements", style: {
2089
- '--zonos--border-radius': getBorderRadius.getBorderRadius(),
2090
- } }, this.titleText && (index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), renderEmailAddress(), this.isEmailError && (index.h("zonos-text", { textColor: "red-600" }, translationStore.translate('Please enter a valid email address.')))));
2091
- }
2092
- get el() { return index.getElement(this); }
2093
- static get watchers() { return {
2094
- "isStagingMode": ["watchIsStagingMode"],
2095
- "stripe": ["watchInitStripe"],
2096
- "clientSecret": ["watchInitStripe"],
2097
- "defaultEmail": ["watchDefaultEmail"]
2098
- }; }
2099
- };
2100
- ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
2101
-
2102
1498
  // This file is a workaround for a bug in web browsers' "native"
2103
1499
  // ES6 importing system which is uncapable of importing "*.json" files.
2104
1500
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
@@ -8123,24 +7519,24 @@ const ZonosStripePhoneInput = class {
8123
7519
  .filter(Boolean)
8124
7520
  .sort((a, b) => a.displayName.localeCompare(b.displayName))
8125
7521
  : [];
8126
- return (index.h(index.Host, { key: 'ed5b02d0f617b0611ecba382cf8447570c3cee76', class: classes.classes([
7522
+ return (index.h(index.Host, { key: '93c761af05a92758af8d5b76c3c9630a8c45c46a', class: classes.classes([
8127
7523
  'zonos--phone-input zonos--elements',
8128
7524
  isDark && 'dark',
8129
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '8644eb1a24b4a2cdf491a8176f70e2fa35389fa6', class: classes.classes([
7525
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '0c814da4f10b83027d2a91429c44aae0b2ae851f', class: classes.classes([
8130
7526
  'zonos--label-wrapper',
8131
7527
  this.disabled && 'disabled',
8132
7528
  this.isFocused && 'focused',
8133
7529
  hasContent && 'has-content',
8134
7530
  this.error && 'has-error',
8135
7531
  this.inputLabel && 'has-label',
8136
- ]) }, index.h("select", { key: '747109b80d3d02778ded01392d853a050f675114', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
7532
+ ]) }, index.h("select", { key: 'f18e02540fc979f090ec9e8445a9c24a726bd3c5', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
8137
7533
  var _a;
8138
7534
  return (index.h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
8139
- })), index.h("div", { key: '399beecaead5791d81ffd1db679f5b235c056769', class: "zonos--input-group" }, index.h("div", { key: '599a287f610935762e3229577bf35cfaee8ffe7f', class: "zonos--select-wrapper" }, index.h("div", { key: 'a1402a12ffa599e4dd42523696121d0a1cec60b6', class: "zonos--country-select" }, index.h("div", { key: 'a798cf4e8f4f5cfef5554404c578076f507d0dd2', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: '6a0313b6cd969a095002b18830fcbbd104e42570', class: "zonos--country-select-selected" }, index.h("div", { key: 'b6d2403854632f40dfd23d15b1eb8ef5625e1059', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: '60397bbbbc9c6083064de1427cedeb148f36a35d', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: 'effc1b9bc5fa1cd832e686b6e87ccac87e41ffb8', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: '8e5aa3603dc4a869ce7335c2903a15903d5e61d4', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '8b9ea89b5234a345d556d06649add11401baa184', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: '21514d3e3f66095b79eb53e47fff6a98fbf12fba', class: classes.classes([
7535
+ })), index.h("div", { key: 'c0bc6f60fede12a27057b64c699701dc311a3c2b', class: "zonos--input-group" }, index.h("div", { key: '3329b43c5ff8b267d01dfc6611736f8fda70d30e', class: "zonos--select-wrapper" }, index.h("div", { key: 'f43b2ba959ef2f7e616b3930df5eba5bf73ab0c6', class: "zonos--country-select" }, index.h("div", { key: '357bcd7ec8d96df1e115820f26444422ef683a86', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: '050444251b375b60ab7de9cf8220b6270a1e7681', class: "zonos--country-select-selected" }, index.h("div", { key: '37653be1e802cf065827bde91b46a4a650ab153e', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: '2d1cde80d3b5a8248a2b824e5cacb438026d3d6f', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: 'c75d6600d1ba864b7e8e8b3ae60faaa459d7578f', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: 'da61185205072f591ab0f21e1f09e6ba87f3b49d', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '6f9fd827cba11e442ec96d9706efb939aa3164e3', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: '795d59db0eb10fa4ab31b9939a9f0522004c71b1', class: classes.classes([
8140
7536
  'zonos--input-container',
8141
7537
  this.inputLabel && 'has-label',
8142
7538
  hasContent && 'has-content',
8143
- ]) }, index.h("input", Object.assign({ key: '50421e7a8343203ee623a4e61f957abd115d0495' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: '5025154c17fc9145b1b2bf2036ec7796287094ea', class: "zonos--floated-label" }, index.h("label", { key: '9af81cc3320de319ea84637bbb923c4b81a506d1', htmlFor: this.inputId }, this.inputLabel || translationStore.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: '523df8b2d650663ac43516d8ae9954ffd208c5e8', textColor: "red-600" }, this.error))));
7539
+ ]) }, index.h("input", Object.assign({ key: '64aa071d2e28691bf12493703b32657c45d9d9ae' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: 'd543673e6cbc526ffcebf6eca0cf8ab2edda644b', class: "zonos--floated-label" }, index.h("label", { key: '432a710de6b9af0c97bc6c50f57079e12806f62d', htmlFor: this.inputId }, this.inputLabel || localization.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: '719f193ea85683b50d1fa7a7855bae22241b0693', textColor: "red-600" }, this.error))));
8144
7540
  }
8145
7541
  get el() { return index.getElement(this); }
8146
7542
  static get watchers() { return {
@@ -8256,14 +7652,14 @@ const ZonosStripeSelect = class {
8256
7652
  const fontSize = zonosStore.zonosStore.appearance.fontSizeInputValue || 16;
8257
7653
  const hasContent = this.internalValue || this.selectPlaceholder;
8258
7654
  const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
8259
- return (index.h(index.Host, { key: 'e781d691f1f1f72ceed06c488af7f427ed4f82d0', class: classes.classes([
7655
+ return (index.h(index.Host, { key: 'c43f75cfc3d57e8d31f7ec06fb66eff71a5c87b9', class: classes.classes([
8260
7656
  'zonos--select zonos--elements',
8261
7657
  isDark && 'dark',
8262
7658
  this.isError && 'has-error',
8263
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '4df83fa9bcb12e94e2d4bba3d6f31a4f56006097', class: classes.classes([
7659
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '818e99e207482930dcccc26e55fcda5a283e366f', class: classes.classes([
8264
7660
  'zonos--label-wrapper',
8265
7661
  this.isDisabled && 'disabled',
8266
- ]) }, index.h("select", Object.assign({ key: '31daa88fdaeb8a35055b97ade6aa10bbd234568a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
7662
+ ]) }, index.h("select", Object.assign({ key: 'c67ba73746f8cfd05801033a6620b25c82b86069' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
8267
7663
  'zonos--floated-select',
8268
7664
  !!this.selectLabel && 'has-label',
8269
7665
  hasContent && 'has-content',
@@ -8273,9 +7669,9 @@ const ZonosStripeSelect = class {
8273
7669
  this.selectChange.emit(select.value);
8274
7670
  this.selectedValue = select.value;
8275
7671
  this.el.dispatchEvent(new Event('change'));
8276
- }, required: this.required }), index.h("option", { key: '4c5c09493d0e9d38bc56860682c092017dc927ff', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translationStore.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
7672
+ }, required: this.required }), index.h("option", { key: 'f7969953300914c34ad3d76c69586e30e12c3117', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || localization.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
8277
7673
  // Sometimes google returns the label not the code for some countries
8278
- this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: 'abe6ea181a207b8b85232226078c92ab1a8b6618', class: "zonos--floated-label" }, index.h("label", { key: 'c079f2f21289e5ba06906fd7e29b3c8216c6ae01', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '3cad61609828a9b38a4a38625629481c9fb5411e', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: 'f24323bdbd652cff52bec827f3a93a2e343e35c4', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: 'e8fe204b510477855de4dfee29d1200f30c50933', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: 'f071765d705d67b741f9381bbe96e2e8beb0968d', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: '7425ced4032df77a7f1219f9c03caedcd1a55841', textColor: "red-600" }, this.error))));
7674
+ this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: 'c093e68c826469ec22e69f154d5edfb342047d94', class: "zonos--floated-label" }, index.h("label", { key: 'b04836cba30a354efaf1a367cd7f5c629bc5ddc2', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '0a1bf1ce6b64f3a0c37495d8ad716078bceb757b', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: '3e690372f4df9d21754a2903819b17186d26654f', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: '9f761f5e9b416356ec7c4681d144adcf01fb8149', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: 'f5594d827dcb7f9812df7479bb8d199e2fcc4a1a', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: '79dce6ac5a8183ad68eaf1a6e60b15864df65d25', textColor: "red-600" }, this.error))));
8279
7675
  }
8280
7676
  get el() { return index.getElement(this); }
8281
7677
  static get watchers() { return {
@@ -8286,7 +7682,6 @@ const ZonosStripeSelect = class {
8286
7682
  };
8287
7683
  ZonosStripeSelect.style = ZonosStripeSelectStyle0;
8288
7684
 
8289
- exports.zonos_address = ZonosAddress$1;
8290
7685
  exports.zonos_address_display = ZonosAddressDisplay;
8291
7686
  exports.zonos_address_form = ZonosAddressForm;
8292
7687
  exports.zonos_address_suggestions = ZonosAddressSuggestions;
@@ -8294,6 +7689,5 @@ exports.zonos_address_update_dialog = ZonosAddressUpdateDialog;
8294
7689
  exports.zonos_checkbox = ZonosCheckbox;
8295
7690
  exports.zonos_custom_address = ZonosAddress;
8296
7691
  exports.zonos_dialog = ZonosDialog;
8297
- exports.zonos_link_authentication = ZonosLinkAuthentication;
8298
7692
  exports.zonos_stripe_phone_input = ZonosStripePhoneInput;
8299
7693
  exports.zonos_stripe_select = ZonosStripeSelect;