@zonos/elements 1.3.279 → 1.3.281

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 (243) hide show
  1. package/dist/cjs/{TaxId-12acedde.js → TaxId-cd9d490e.js} +1 -1
  2. package/dist/cjs/{cart-e8bc11a3.js → cart-3313cb0c.js} +2 -2
  3. package/dist/cjs/{collect-e6485168.js → collect-2659c5af.js} +2 -2
  4. package/dist/cjs/formatStringWithLinks-c25b4018.js +24 -0
  5. package/dist/cjs/{hasInclusivePrice-798ce42d.js → hasInclusivePrice-d132daaa.js} +1 -1
  6. package/dist/cjs/index.cjs.js +8 -8
  7. package/dist/cjs/{invoice-dff7ec81.js → invoice-26f52c07.js} +2 -2
  8. package/dist/cjs/isSameHostCheckoutLink-6148cabb.js +28 -0
  9. package/dist/cjs/{localization-90650d7d.js → localization-6189080f.js} +120 -120
  10. package/dist/cjs/{paypal-77bd640c.js → paypal-f6a256b5.js} +2 -2
  11. package/dist/cjs/{placeTestOrder-7767d119.js → placeTestOrder-695f2b32.js} +2 -2
  12. package/dist/cjs/{renderCheckoutCurrency-66377cf5.js → renderCheckoutCurrency-fe56094f.js} +2 -2
  13. package/dist/cjs/{shouldRenderTaxIdInput-b8abf6de.js → shouldRenderTaxIdInput-7d19556c.js} +1 -1
  14. package/dist/cjs/zonos-address-display_8.cjs.entry.js +4 -4
  15. package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +27 -12
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +190 -14
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
  22. package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -2
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -4
  27. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
  29. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
  30. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -5
  31. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  32. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +13 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +36 -2
  35. package/dist/collection/components/store/translationStore/strings.arabic.js +6 -6
  36. package/dist/collection/components/store/translationStore/strings.base.js +6 -6
  37. package/dist/collection/components/store/translationStore/strings.chinese.js +6 -6
  38. package/dist/collection/components/store/translationStore/strings.danish.js +6 -6
  39. package/dist/collection/components/store/translationStore/strings.dutch.js +6 -6
  40. package/dist/collection/components/store/translationStore/strings.french.js +6 -6
  41. package/dist/collection/components/store/translationStore/strings.german.js +6 -6
  42. package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -6
  43. package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -6
  44. package/dist/collection/components/store/translationStore/strings.italian.js +6 -6
  45. package/dist/collection/components/store/translationStore/strings.japanese.js +6 -6
  46. package/dist/collection/components/store/translationStore/strings.korean.js +6 -6
  47. package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -6
  48. package/dist/collection/components/store/translationStore/strings.polish.js +6 -6
  49. package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -6
  50. package/dist/collection/components/store/translationStore/strings.russian.js +6 -6
  51. package/dist/collection/components/store/translationStore/strings.spanish.js +6 -6
  52. package/dist/collection/components/store/translationStore/strings.swedish.js +6 -6
  53. package/dist/collection/components/store/translationStore/strings.turkish.js +6 -6
  54. package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -6
  55. package/dist/collection/components/utils/checkout/buildBigcommerceRedirectUrl.js +6 -1
  56. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +144 -7
  57. package/dist/collection/components/utils/formatStringWithLinks.js +12 -6
  58. package/dist/collection/components/utils/isSameHostCheckoutLink.js +24 -0
  59. package/dist/collection/components/utils/taxIdValidationResult.js +6 -3
  60. package/dist/collection/types/checkout/TaxId.js +1 -1
  61. package/dist/collection/types/generated/graphql.internal.types.js +84 -0
  62. package/dist/esm/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
  63. package/dist/esm/{cart-8b8dc79f.js → cart-c66ec17e.js} +3 -3
  64. package/dist/esm/{collect-f4965586.js → collect-915fd59d.js} +2 -2
  65. package/dist/esm/formatStringWithLinks-0d48f183.js +22 -0
  66. package/dist/esm/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-6fd935f3.js} +1 -1
  67. package/dist/esm/index.js +8 -8
  68. package/dist/esm/{invoice-b7a1fb14.js → invoice-2a17c93c.js} +2 -2
  69. package/dist/esm/isSameHostCheckoutLink-c1b88ab7.js +26 -0
  70. package/dist/esm/{localization-d49867ed.js → localization-6d36209f.js} +120 -120
  71. package/dist/esm/{paypal-da551105.js → paypal-cae1d404.js} +2 -2
  72. package/dist/esm/{placeTestOrder-4309b170.js → placeTestOrder-955269d2.js} +2 -2
  73. package/dist/esm/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-951386a5.js} +2 -2
  74. package/dist/esm/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
  75. package/dist/esm/zonos-address-display_8.entry.js +4 -4
  76. package/dist/esm/zonos-address_4.entry.js +4 -4
  77. package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
  78. package/dist/esm/zonos-card_5.entry.js +4 -4
  79. package/dist/esm/zonos-cart-items_12.entry.js +27 -12
  80. package/dist/esm/zonos-checkout.entry.js +190 -14
  81. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  82. package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
  83. package/dist/esm/zonos-collect.entry.js +5 -5
  84. package/dist/esm/zonos-controller.entry.js +3 -3
  85. package/dist/esm/zonos-country-flag.entry.js +1 -1
  86. package/dist/esm/zonos-country-select_4.entry.js +3 -2
  87. package/dist/esm/zonos-hello-dialog.entry.js +5 -4
  88. package/dist/esm/zonos-hello.entry.js +1 -1
  89. package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
  90. package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
  91. package/dist/esm/zonos-invoice.entry.js +5 -5
  92. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  93. package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
  94. package/dist/esm-es5/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
  95. package/dist/esm-es5/{cart-8b8dc79f.js → cart-c66ec17e.js} +1 -1
  96. package/dist/esm-es5/{collect-f4965586.js → collect-915fd59d.js} +1 -1
  97. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +1 -0
  98. package/dist/esm-es5/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-6fd935f3.js} +1 -1
  99. package/dist/esm-es5/index.js +1 -1
  100. package/dist/esm-es5/{invoice-b7a1fb14.js → invoice-2a17c93c.js} +1 -1
  101. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +1 -0
  102. package/dist/esm-es5/localization-6d36209f.js +1 -0
  103. package/dist/esm-es5/{paypal-da551105.js → paypal-cae1d404.js} +1 -1
  104. package/dist/esm-es5/{placeTestOrder-4309b170.js → placeTestOrder-955269d2.js} +1 -1
  105. package/dist/esm-es5/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-951386a5.js} +1 -1
  106. package/dist/esm-es5/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
  107. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  108. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  109. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  110. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  111. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  112. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  113. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  114. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  115. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  116. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  117. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  118. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  119. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  120. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  121. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  122. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  123. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  124. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  126. package/dist/scripts/index.d.ts +3 -3
  127. package/dist/scripts/index.js +1 -1
  128. package/dist/scripts/loadZonos.js +1 -1
  129. package/dist/scripts/zonos.js +1 -1
  130. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -3
  131. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -3
  132. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -3
  133. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -3
  134. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -3
  135. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -3
  136. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -3
  137. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -3
  138. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -3
  139. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -3
  140. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -3
  141. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -3
  142. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -3
  143. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -3
  144. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -3
  145. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -3
  146. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -3
  147. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -3
  148. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -3
  149. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -3
  150. package/dist/types/components/utils/isSameHostCheckoutLink.d.ts +14 -0
  151. package/dist/types/components/utils/taxIdValidationResult.d.ts +1 -1
  152. package/dist/types/types/checkout/TaxId.d.ts +1 -1
  153. package/dist/types/types/generated/graphql.internal.types.d.ts +84 -0
  154. package/dist/types/types/generated/graphql.internal.types.ts +85 -0
  155. package/dist/zonos-elements/index.esm.js +1 -1
  156. package/dist/zonos-elements/{p-d5945ddc.entry.js → p-03fda4a8.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-43815edd.system.entry.js → p-060c521b.system.entry.js} +1 -1
  158. package/dist/zonos-elements/{p-8bd37d3b.entry.js → p-09da3c76.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-5e09c22d.system.js → p-0ac1aa87.system.js} +1 -1
  160. package/dist/zonos-elements/p-0d2f81ce.system.js +1 -0
  161. package/dist/zonos-elements/p-11206fe2.js +1 -0
  162. package/dist/zonos-elements/{p-5c76ef2a.js → p-156891c5.js} +1 -1
  163. package/dist/zonos-elements/p-1577a739.js +1 -0
  164. package/dist/zonos-elements/{p-4e6e9a3c.system.entry.js → p-179caaea.system.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-5827c868.entry.js → p-1ee5f392.entry.js} +1 -1
  166. package/dist/zonos-elements/p-26ca8ce7.js +1 -0
  167. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  168. package/dist/zonos-elements/p-2b97f7ed.js +1 -0
  169. package/dist/zonos-elements/{p-b36205f4.entry.js → p-30067eed.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-a8c79850.js → p-3246d120.js} +1 -1
  171. package/dist/zonos-elements/{p-2aecc055.entry.js → p-38879af9.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-647438d6.system.js → p-39695a8b.system.js} +1 -1
  173. package/dist/zonos-elements/p-3e6bbf0b.system.entry.js +1 -0
  174. package/dist/zonos-elements/{p-12a08423.system.entry.js → p-3f6fe80a.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-998f9df5.system.entry.js → p-40b96482.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-8d87e748.entry.js → p-4441c451.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-7614ea6f.system.entry.js → p-4c3f5fda.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-5bc43687.system.entry.js → p-54a8d4cf.system.entry.js} +1 -1
  179. package/dist/zonos-elements/p-5677d31f.entry.js +1 -0
  180. package/dist/zonos-elements/p-56fc3210.js +1 -0
  181. package/dist/zonos-elements/{p-ed676ad1.system.entry.js → p-5a61c301.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-73d3fa61.entry.js → p-5e1aad7d.entry.js} +1 -1
  183. package/dist/zonos-elements/p-67426156.system.js +1 -0
  184. package/dist/zonos-elements/{p-0402af0d.entry.js → p-683ec0bf.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-8b42245d.entry.js → p-6df034d6.entry.js} +1 -1
  186. package/dist/zonos-elements/p-6df6cb8a.entry.js +1 -0
  187. package/dist/zonos-elements/{p-02065a08.system.js → p-717cbe90.system.js} +1 -1
  188. package/dist/zonos-elements/{p-7e8aba66.system.entry.js → p-71cb16da.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-9beb2624.entry.js → p-727387ed.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-77fa437c.entry.js → p-746bdebe.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-48d55793.system.js → p-7ac8846c.system.js} +1 -1
  192. package/dist/zonos-elements/{p-32278945.system.js → p-8005e102.system.js} +1 -1
  193. package/dist/zonos-elements/{p-2654556b.js → p-8051403a.js} +1 -1
  194. package/dist/zonos-elements/{p-d7cb9ef6.system.entry.js → p-8308f7d6.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-6fae9835.system.entry.js → p-86d6961c.system.entry.js} +1 -1
  196. package/dist/zonos-elements/p-9448d960.js +1 -0
  197. package/dist/zonos-elements/{p-2b8345d8.system.js → p-989cb22b.system.js} +1 -1
  198. package/dist/zonos-elements/{p-5afea02c.system.entry.js → p-a23d3b3f.system.entry.js} +1 -1
  199. package/dist/zonos-elements/p-a34269b1.system.entry.js +1 -0
  200. package/dist/zonos-elements/p-a553e132.js +1 -0
  201. package/dist/zonos-elements/{p-74ebd766.js → p-a5f8dc19.js} +1 -1
  202. package/dist/zonos-elements/p-a6535773.system.entry.js +1 -0
  203. package/dist/zonos-elements/{p-ee434a71.entry.js → p-a6773627.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-cd41b16b.system.entry.js → p-ae30e6c0.system.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-0745e440.entry.js → p-b406bb39.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-6b361d2b.js → p-bcf5cffb.js} +1 -1
  207. package/dist/zonos-elements/{p-e6165cc2.system.js → p-bf942ef0.system.js} +1 -1
  208. package/dist/zonos-elements/p-c345d1f5.system.js +1 -0
  209. package/dist/zonos-elements/p-d4337686.entry.js +1 -0
  210. package/dist/zonos-elements/{p-1b963905.system.js → p-ddf68916.system.js} +1 -1
  211. package/dist/zonos-elements/p-df8b8827.entry.js +1 -0
  212. package/dist/zonos-elements/{p-abf61f6f.system.entry.js → p-e0ec0aa3.system.entry.js} +1 -1
  213. package/dist/zonos-elements/p-e210edd9.system.js +1 -0
  214. package/dist/zonos-elements/{p-f44a3338.entry.js → p-e7a45f6c.entry.js} +1 -1
  215. package/dist/zonos-elements/p-edf613ea.entry.js +1 -0
  216. package/dist/zonos-elements/p-ee3c7b11.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-293183c1.system.entry.js → p-f156e2e5.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-3f380c8f.system.js → p-f314217a.system.js} +1 -1
  219. package/dist/zonos-elements/{p-ac59f5c1.system.entry.js → p-f3e1a6a7.system.entry.js} +1 -1
  220. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  221. package/package.json +3 -3
  222. package/dist/cjs/formatStringWithLinks-52341fc7.js +0 -17
  223. package/dist/esm/formatStringWithLinks-9e819405.js +0 -15
  224. package/dist/esm-es5/formatStringWithLinks-9e819405.js +0 -1
  225. package/dist/esm-es5/localization-d49867ed.js +0 -1
  226. package/dist/zonos-elements/p-21d925d7.entry.js +0 -1
  227. package/dist/zonos-elements/p-2d6557ee.system.js +0 -1
  228. package/dist/zonos-elements/p-32704baa.js +0 -1
  229. package/dist/zonos-elements/p-3cf22558.entry.js +0 -1
  230. package/dist/zonos-elements/p-45e1c33b.entry.js +0 -1
  231. package/dist/zonos-elements/p-5d3ea491.system.entry.js +0 -1
  232. package/dist/zonos-elements/p-63a383f4.js +0 -1
  233. package/dist/zonos-elements/p-6b4ef7e0.entry.js +0 -1
  234. package/dist/zonos-elements/p-7365e22c.system.js +0 -1
  235. package/dist/zonos-elements/p-7522ec43.js +0 -1
  236. package/dist/zonos-elements/p-9fab45aa.system.js +0 -1
  237. package/dist/zonos-elements/p-a87561b8.js +0 -1
  238. package/dist/zonos-elements/p-c209e36d.js +0 -1
  239. package/dist/zonos-elements/p-d7bda14d.js +0 -1
  240. package/dist/zonos-elements/p-d93991c3.system.entry.js +0 -1
  241. package/dist/zonos-elements/p-eb9369b9.system.entry.js +0 -1
  242. package/dist/zonos-elements/p-f3a73132.entry.js +0 -1
  243. package/dist/zonos-elements/p-ffbf87c8.system.entry.js +0 -1
@@ -308,7 +308,7 @@ export declare const stringsSwedish: {
308
308
  'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).': {
309
309
  value: string;
310
310
  };
311
- 'Invalid RFC format. Must be 12\u201313 uppercase letters and numbers only.': {
311
+ 'Invalid RFC or CURP format. Must be a 12\u201313 character RFC or an 18 character CURP, uppercase letters and numbers only.': {
312
312
  value: string;
313
313
  };
314
314
  'Invalid promo code': {
@@ -512,7 +512,7 @@ export declare const stringsSwedish: {
512
512
  Quantity: {
513
513
  value: string;
514
514
  };
515
- 'RFC number': {
515
+ 'RFC or CURP number': {
516
516
  value: string;
517
517
  };
518
518
  'Refund policy': {
@@ -818,7 +818,7 @@ export declare const stringsSwedish: {
818
818
  'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
819
819
  value: string;
820
820
  };
821
- 'Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
821
+ 'Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
822
822
  value: string;
823
823
  };
824
824
  'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
@@ -308,7 +308,7 @@ export declare const stringsTurkish: {
308
308
  'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).': {
309
309
  value: string;
310
310
  };
311
- 'Invalid RFC format. Must be 12\u201313 uppercase letters and numbers only.': {
311
+ 'Invalid RFC or CURP format. Must be a 12\u201313 character RFC or an 18 character CURP, uppercase letters and numbers only.': {
312
312
  value: string;
313
313
  };
314
314
  'Invalid promo code': {
@@ -512,7 +512,7 @@ export declare const stringsTurkish: {
512
512
  Quantity: {
513
513
  value: string;
514
514
  };
515
- 'RFC number': {
515
+ 'RFC or CURP number': {
516
516
  value: string;
517
517
  };
518
518
  'Refund policy': {
@@ -818,7 +818,7 @@ export declare const stringsTurkish: {
818
818
  'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
819
819
  value: string;
820
820
  };
821
- 'Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
821
+ 'Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
822
822
  value: string;
823
823
  };
824
824
  'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
@@ -308,7 +308,7 @@ export declare const stringsVietnamese: {
308
308
  'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).': {
309
309
  value: string;
310
310
  };
311
- 'Invalid RFC format. Must be 12\u201313 uppercase letters and numbers only.': {
311
+ 'Invalid RFC or CURP format. Must be a 12\u201313 character RFC or an 18 character CURP, uppercase letters and numbers only.': {
312
312
  value: string;
313
313
  };
314
314
  'Invalid promo code': {
@@ -512,7 +512,7 @@ export declare const stringsVietnamese: {
512
512
  Quantity: {
513
513
  value: string;
514
514
  };
515
- 'RFC number': {
515
+ 'RFC or CURP number': {
516
516
  value: string;
517
517
  };
518
518
  'Refund policy': {
@@ -818,7 +818,7 @@ export declare const stringsVietnamese: {
818
818
  'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
819
819
  value: string;
820
820
  };
821
- 'Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
821
+ 'Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?': {
822
822
  value: string;
823
823
  };
824
824
  'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Whether a link points at the same-origin native `/checkout` page.
3
+ *
4
+ * Merchant custom messages in the international checkout can contain a link
5
+ * like "click here to complete checkout" that targets the store's native
6
+ * BigCommerce checkout. When that link is same-host `/checkout`, we want it to
7
+ * navigate the current tab instead of opening a new one — so the Zonos checkout
8
+ * unloads and the native checkout opens in its place rather than leaving two
9
+ * checkouts open at once (05CHECK-887).
10
+ *
11
+ * Returns `false` for cross-origin links, non-`/checkout` paths, or unparsable
12
+ * hrefs (which should keep their default new-tab behavior).
13
+ */
14
+ export declare const isSameHostCheckoutLink: (href: string) => boolean;
@@ -1,5 +1,5 @@
1
1
  type TaxIdValidationResult = {
2
- error: 'Tax id is required' | 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.' | 'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).';
2
+ error: 'Tax id is required' | 'Invalid RFC or CURP format. Must be a 12–13 character RFC or an 18 character CURP, uppercase letters and numbers only.' | 'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).';
3
3
  valid: false;
4
4
  } | {
5
5
  error: null;
@@ -104,7 +104,7 @@ export declare const shipToTaxIdLabels: {
104
104
  readonly placeholder: "DE123456789";
105
105
  };
106
106
  readonly MX: {
107
- readonly friendlyName: "RFC number";
107
+ readonly friendlyName: "RFC or CURP number";
108
108
  readonly placeholder: "XAXX010101000";
109
109
  };
110
110
  readonly NL: {
@@ -96,6 +96,7 @@ export declare const accountingFeeType: {
96
96
  readonly Adjustment: "ADJUSTMENT";
97
97
  readonly Advancement: "ADVANCEMENT";
98
98
  readonly AirlineRecoveryFee: "AIRLINE_RECOVERY_FEE";
99
+ readonly AirwallexTransferFee: "AIRWALLEX_TRANSFER_FEE";
99
100
  readonly AnnualPlatformFee: "ANNUAL_PLATFORM_FEE";
100
101
  readonly ApiCrossDocking: "API_CROSS_DOCKING";
101
102
  readonly ApiGuaranteeOrder: "API_GUARANTEE_ORDER";
@@ -181,6 +182,9 @@ export declare const accountingFeeType: {
181
182
  readonly CyprusPrepayFee: "CYPRUS_PREPAY_FEE";
182
183
  readonly CyprusPrepayPercent: "CYPRUS_PREPAY_PERCENT";
183
184
  readonly CyprusPrepayPhotoDiscount: "CYPRUS_PREPAY_PHOTO_DISCOUNT";
185
+ readonly CzechDisbursementFee: "CZECH_DISBURSEMENT_FEE";
186
+ readonly CzechGuaranteeOrder: "CZECH_GUARANTEE_ORDER";
187
+ readonly CzechRemittanceFee: "CZECH_REMITTANCE_FEE";
184
188
  readonly DashboardLite: "DASHBOARD_LITE";
185
189
  readonly DdpServiceFee: "DDP_SERVICE_FEE";
186
190
  readonly DdpServiceFeeBuffer: "DDP_SERVICE_FEE_BUFFER";
@@ -193,7 +197,43 @@ export declare const accountingFeeType: {
193
197
  readonly DutyBrokerageUs: "DUTY_BROKERAGE_US";
194
198
  readonly DutyFx: "DUTY_FX";
195
199
  readonly DutyRemittance: "DUTY_REMITTANCE";
200
+ readonly DutyRemittanceAt: "DUTY_REMITTANCE_AT";
201
+ readonly DutyRemittanceAx: "DUTY_REMITTANCE_AX";
202
+ readonly DutyRemittanceBe: "DUTY_REMITTANCE_BE";
203
+ readonly DutyRemittanceBg: "DUTY_REMITTANCE_BG";
204
+ readonly DutyRemittanceCy: "DUTY_REMITTANCE_CY";
205
+ readonly DutyRemittanceCz: "DUTY_REMITTANCE_CZ";
206
+ readonly DutyRemittanceDe: "DUTY_REMITTANCE_DE";
207
+ readonly DutyRemittanceDk: "DUTY_REMITTANCE_DK";
208
+ readonly DutyRemittanceEe: "DUTY_REMITTANCE_EE";
209
+ readonly DutyRemittanceEs: "DUTY_REMITTANCE_ES";
210
+ readonly DutyRemittanceFi: "DUTY_REMITTANCE_FI";
211
+ readonly DutyRemittanceFr: "DUTY_REMITTANCE_FR";
212
+ readonly DutyRemittanceGb: "DUTY_REMITTANCE_GB";
213
+ readonly DutyRemittanceGf: "DUTY_REMITTANCE_GF";
214
+ readonly DutyRemittanceGp: "DUTY_REMITTANCE_GP";
215
+ readonly DutyRemittanceGr: "DUTY_REMITTANCE_GR";
216
+ readonly DutyRemittanceHr: "DUTY_REMITTANCE_HR";
217
+ readonly DutyRemittanceHu: "DUTY_REMITTANCE_HU";
218
+ readonly DutyRemittanceIc: "DUTY_REMITTANCE_IC";
219
+ readonly DutyRemittanceIe: "DUTY_REMITTANCE_IE";
220
+ readonly DutyRemittanceIt: "DUTY_REMITTANCE_IT";
221
+ readonly DutyRemittanceLt: "DUTY_REMITTANCE_LT";
222
+ readonly DutyRemittanceLu: "DUTY_REMITTANCE_LU";
223
+ readonly DutyRemittanceLv: "DUTY_REMITTANCE_LV";
224
+ readonly DutyRemittanceMc: "DUTY_REMITTANCE_MC";
225
+ readonly DutyRemittanceMq: "DUTY_REMITTANCE_MQ";
226
+ readonly DutyRemittanceMt: "DUTY_REMITTANCE_MT";
227
+ readonly DutyRemittanceNl: "DUTY_REMITTANCE_NL";
228
+ readonly DutyRemittancePl: "DUTY_REMITTANCE_PL";
229
+ readonly DutyRemittancePt: "DUTY_REMITTANCE_PT";
230
+ readonly DutyRemittanceRe: "DUTY_REMITTANCE_RE";
231
+ readonly DutyRemittanceRo: "DUTY_REMITTANCE_RO";
232
+ readonly DutyRemittanceSe: "DUTY_REMITTANCE_SE";
233
+ readonly DutyRemittanceSi: "DUTY_REMITTANCE_SI";
234
+ readonly DutyRemittanceSk: "DUTY_REMITTANCE_SK";
196
235
  readonly DutyRemittanceUs: "DUTY_REMITTANCE_US";
236
+ readonly DutyRemittanceYt: "DUTY_REMITTANCE_YT";
197
237
  readonly DutyTax: "DUTY_TAX";
198
238
  readonly DutyTaxBuffer: "DUTY_TAX_BUFFER";
199
239
  readonly DutyTaxFee: "DUTY_TAX_FEE";
@@ -226,9 +266,11 @@ export declare const accountingFeeType: {
226
266
  readonly IsraelRemittanceFee: "ISRAEL_REMITTANCE_FEE";
227
267
  readonly ItalianeRemittanceFee: "ITALIANE_REMITTANCE_FEE";
228
268
  readonly Item: "ITEM";
269
+ readonly JapanDisbursementFee: "JAPAN_DISBURSEMENT_FEE";
229
270
  readonly JapanPrepayFee: "JAPAN_PREPAY_FEE";
230
271
  readonly JapanPrepayPercent: "JAPAN_PREPAY_PERCENT";
231
272
  readonly JapanPrepayPhotoDiscount: "JAPAN_PREPAY_PHOTO_DISCOUNT";
273
+ readonly JapanRemittanceFee: "JAPAN_REMITTANCE_FEE";
232
274
  readonly KazpostDisbursementFee: "KAZPOST_DISBURSEMENT_FEE";
233
275
  readonly KazpostPrepayFee: "KAZPOST_PREPAY_FEE";
234
276
  readonly KazpostPrepayPercent: "KAZPOST_PREPAY_PERCENT";
@@ -3149,6 +3191,7 @@ export declare const invoiceDetailCategoryInputType: {
3149
3191
  readonly Adjustment: "ADJUSTMENT";
3150
3192
  readonly Advancement: "ADVANCEMENT";
3151
3193
  readonly AirlineRecoveryFee: "AIRLINE_RECOVERY_FEE";
3194
+ readonly AirwallexTransferFee: "AIRWALLEX_TRANSFER_FEE";
3152
3195
  readonly AnnualPlatformFee: "ANNUAL_PLATFORM_FEE";
3153
3196
  readonly ApiAnnualFlat: "API_ANNUAL_FLAT";
3154
3197
  readonly ApiAnnualMonthlyFlat: "API_ANNUAL_MONTHLY_FLAT";
@@ -3248,6 +3291,9 @@ export declare const invoiceDetailCategoryInputType: {
3248
3291
  readonly CyprusPrepayPercent: "CYPRUS_PREPAY_PERCENT";
3249
3292
  readonly CyprusPrepayPhotoDiscount: "CYPRUS_PREPAY_PHOTO_DISCOUNT";
3250
3293
  readonly CyprusRemittanceFee: "CYPRUS_REMITTANCE_FEE";
3294
+ readonly CzechDisbursementFee: "CZECH_DISBURSEMENT_FEE";
3295
+ readonly CzechGuaranteeOrder: "CZECH_GUARANTEE_ORDER";
3296
+ readonly CzechRemittanceFee: "CZECH_REMITTANCE_FEE";
3251
3297
  readonly DashboardLite: "DASHBOARD_LITE";
3252
3298
  readonly DdpServiceFee: "DDP_SERVICE_FEE";
3253
3299
  readonly DdpServiceFeeBuffer: "DDP_SERVICE_FEE_BUFFER";
@@ -3260,7 +3306,43 @@ export declare const invoiceDetailCategoryInputType: {
3260
3306
  readonly DutyBrokerageUs: "DUTY_BROKERAGE_US";
3261
3307
  readonly DutyFx: "DUTY_FX";
3262
3308
  readonly DutyRemittance: "DUTY_REMITTANCE";
3309
+ readonly DutyRemittanceAt: "DUTY_REMITTANCE_AT";
3310
+ readonly DutyRemittanceAx: "DUTY_REMITTANCE_AX";
3311
+ readonly DutyRemittanceBe: "DUTY_REMITTANCE_BE";
3312
+ readonly DutyRemittanceBg: "DUTY_REMITTANCE_BG";
3313
+ readonly DutyRemittanceCy: "DUTY_REMITTANCE_CY";
3314
+ readonly DutyRemittanceCz: "DUTY_REMITTANCE_CZ";
3315
+ readonly DutyRemittanceDe: "DUTY_REMITTANCE_DE";
3316
+ readonly DutyRemittanceDk: "DUTY_REMITTANCE_DK";
3317
+ readonly DutyRemittanceEe: "DUTY_REMITTANCE_EE";
3318
+ readonly DutyRemittanceEs: "DUTY_REMITTANCE_ES";
3319
+ readonly DutyRemittanceFi: "DUTY_REMITTANCE_FI";
3320
+ readonly DutyRemittanceFr: "DUTY_REMITTANCE_FR";
3321
+ readonly DutyRemittanceGb: "DUTY_REMITTANCE_GB";
3322
+ readonly DutyRemittanceGf: "DUTY_REMITTANCE_GF";
3323
+ readonly DutyRemittanceGp: "DUTY_REMITTANCE_GP";
3324
+ readonly DutyRemittanceGr: "DUTY_REMITTANCE_GR";
3325
+ readonly DutyRemittanceHr: "DUTY_REMITTANCE_HR";
3326
+ readonly DutyRemittanceHu: "DUTY_REMITTANCE_HU";
3327
+ readonly DutyRemittanceIc: "DUTY_REMITTANCE_IC";
3328
+ readonly DutyRemittanceIe: "DUTY_REMITTANCE_IE";
3329
+ readonly DutyRemittanceIt: "DUTY_REMITTANCE_IT";
3330
+ readonly DutyRemittanceLt: "DUTY_REMITTANCE_LT";
3331
+ readonly DutyRemittanceLu: "DUTY_REMITTANCE_LU";
3332
+ readonly DutyRemittanceLv: "DUTY_REMITTANCE_LV";
3333
+ readonly DutyRemittanceMc: "DUTY_REMITTANCE_MC";
3334
+ readonly DutyRemittanceMq: "DUTY_REMITTANCE_MQ";
3335
+ readonly DutyRemittanceMt: "DUTY_REMITTANCE_MT";
3336
+ readonly DutyRemittanceNl: "DUTY_REMITTANCE_NL";
3337
+ readonly DutyRemittancePl: "DUTY_REMITTANCE_PL";
3338
+ readonly DutyRemittancePt: "DUTY_REMITTANCE_PT";
3339
+ readonly DutyRemittanceRe: "DUTY_REMITTANCE_RE";
3340
+ readonly DutyRemittanceRo: "DUTY_REMITTANCE_RO";
3341
+ readonly DutyRemittanceSe: "DUTY_REMITTANCE_SE";
3342
+ readonly DutyRemittanceSi: "DUTY_REMITTANCE_SI";
3343
+ readonly DutyRemittanceSk: "DUTY_REMITTANCE_SK";
3263
3344
  readonly DutyRemittanceUs: "DUTY_REMITTANCE_US";
3345
+ readonly DutyRemittanceYt: "DUTY_REMITTANCE_YT";
3264
3346
  readonly DutyTaxBuffer: "DUTY_TAX_BUFFER";
3265
3347
  readonly DutyTaxFee: "DUTY_TAX_FEE";
3266
3348
  readonly EmiratesDisbursementFee: "EMIRATES_DISBURSEMENT_FEE";
@@ -3289,9 +3371,11 @@ export declare const invoiceDetailCategoryInputType: {
3289
3371
  readonly IsraelRemittanceFee: "ISRAEL_REMITTANCE_FEE";
3290
3372
  readonly ItalianeRemittanceFee: "ITALIANE_REMITTANCE_FEE";
3291
3373
  readonly Item: "ITEM";
3374
+ readonly JapanDisbursementFee: "JAPAN_DISBURSEMENT_FEE";
3292
3375
  readonly JapanPrepayFee: "JAPAN_PREPAY_FEE";
3293
3376
  readonly JapanPrepayPercent: "JAPAN_PREPAY_PERCENT";
3294
3377
  readonly JapanPrepayPhotoDiscount: "JAPAN_PREPAY_PHOTO_DISCOUNT";
3378
+ readonly JapanRemittanceFee: "JAPAN_REMITTANCE_FEE";
3295
3379
  readonly KazpostDisbursementFee: "KAZPOST_DISBURSEMENT_FEE";
3296
3380
  readonly KazpostPrepayFee: "KAZPOST_PREPAY_FEE";
3297
3381
  readonly KazpostPrepayPercent: "KAZPOST_PREPAY_PERCENT";
@@ -77,6 +77,7 @@ export const accountingFeeType = {
77
77
  Adjustment: 'ADJUSTMENT',
78
78
  Advancement: 'ADVANCEMENT',
79
79
  AirlineRecoveryFee: 'AIRLINE_RECOVERY_FEE',
80
+ AirwallexTransferFee: 'AIRWALLEX_TRANSFER_FEE',
80
81
  AnnualPlatformFee: 'ANNUAL_PLATFORM_FEE',
81
82
  ApiCrossDocking: 'API_CROSS_DOCKING',
82
83
  ApiGuaranteeOrder: 'API_GUARANTEE_ORDER',
@@ -167,6 +168,9 @@ export const accountingFeeType = {
167
168
  CyprusPrepayFee: 'CYPRUS_PREPAY_FEE',
168
169
  CyprusPrepayPercent: 'CYPRUS_PREPAY_PERCENT',
169
170
  CyprusPrepayPhotoDiscount: 'CYPRUS_PREPAY_PHOTO_DISCOUNT',
171
+ CzechDisbursementFee: 'CZECH_DISBURSEMENT_FEE',
172
+ CzechGuaranteeOrder: 'CZECH_GUARANTEE_ORDER',
173
+ CzechRemittanceFee: 'CZECH_REMITTANCE_FEE',
170
174
  DashboardLite: 'DASHBOARD_LITE',
171
175
  DdpServiceFee: 'DDP_SERVICE_FEE',
172
176
  DdpServiceFeeBuffer: 'DDP_SERVICE_FEE_BUFFER',
@@ -179,7 +183,43 @@ export const accountingFeeType = {
179
183
  DutyBrokerageUs: 'DUTY_BROKERAGE_US',
180
184
  DutyFx: 'DUTY_FX',
181
185
  DutyRemittance: 'DUTY_REMITTANCE',
186
+ DutyRemittanceAt: 'DUTY_REMITTANCE_AT',
187
+ DutyRemittanceAx: 'DUTY_REMITTANCE_AX',
188
+ DutyRemittanceBe: 'DUTY_REMITTANCE_BE',
189
+ DutyRemittanceBg: 'DUTY_REMITTANCE_BG',
190
+ DutyRemittanceCy: 'DUTY_REMITTANCE_CY',
191
+ DutyRemittanceCz: 'DUTY_REMITTANCE_CZ',
192
+ DutyRemittanceDe: 'DUTY_REMITTANCE_DE',
193
+ DutyRemittanceDk: 'DUTY_REMITTANCE_DK',
194
+ DutyRemittanceEe: 'DUTY_REMITTANCE_EE',
195
+ DutyRemittanceEs: 'DUTY_REMITTANCE_ES',
196
+ DutyRemittanceFi: 'DUTY_REMITTANCE_FI',
197
+ DutyRemittanceFr: 'DUTY_REMITTANCE_FR',
198
+ DutyRemittanceGb: 'DUTY_REMITTANCE_GB',
199
+ DutyRemittanceGf: 'DUTY_REMITTANCE_GF',
200
+ DutyRemittanceGp: 'DUTY_REMITTANCE_GP',
201
+ DutyRemittanceGr: 'DUTY_REMITTANCE_GR',
202
+ DutyRemittanceHr: 'DUTY_REMITTANCE_HR',
203
+ DutyRemittanceHu: 'DUTY_REMITTANCE_HU',
204
+ DutyRemittanceIc: 'DUTY_REMITTANCE_IC',
205
+ DutyRemittanceIe: 'DUTY_REMITTANCE_IE',
206
+ DutyRemittanceIt: 'DUTY_REMITTANCE_IT',
207
+ DutyRemittanceLt: 'DUTY_REMITTANCE_LT',
208
+ DutyRemittanceLu: 'DUTY_REMITTANCE_LU',
209
+ DutyRemittanceLv: 'DUTY_REMITTANCE_LV',
210
+ DutyRemittanceMc: 'DUTY_REMITTANCE_MC',
211
+ DutyRemittanceMq: 'DUTY_REMITTANCE_MQ',
212
+ DutyRemittanceMt: 'DUTY_REMITTANCE_MT',
213
+ DutyRemittanceNl: 'DUTY_REMITTANCE_NL',
214
+ DutyRemittancePl: 'DUTY_REMITTANCE_PL',
215
+ DutyRemittancePt: 'DUTY_REMITTANCE_PT',
216
+ DutyRemittanceRe: 'DUTY_REMITTANCE_RE',
217
+ DutyRemittanceRo: 'DUTY_REMITTANCE_RO',
218
+ DutyRemittanceSe: 'DUTY_REMITTANCE_SE',
219
+ DutyRemittanceSi: 'DUTY_REMITTANCE_SI',
220
+ DutyRemittanceSk: 'DUTY_REMITTANCE_SK',
182
221
  DutyRemittanceUs: 'DUTY_REMITTANCE_US',
222
+ DutyRemittanceYt: 'DUTY_REMITTANCE_YT',
183
223
  DutyTax: 'DUTY_TAX',
184
224
  DutyTaxBuffer: 'DUTY_TAX_BUFFER',
185
225
  DutyTaxFee: 'DUTY_TAX_FEE',
@@ -212,9 +252,11 @@ export const accountingFeeType = {
212
252
  IsraelRemittanceFee: 'ISRAEL_REMITTANCE_FEE',
213
253
  ItalianeRemittanceFee: 'ITALIANE_REMITTANCE_FEE',
214
254
  Item: 'ITEM',
255
+ JapanDisbursementFee: 'JAPAN_DISBURSEMENT_FEE',
215
256
  JapanPrepayFee: 'JAPAN_PREPAY_FEE',
216
257
  JapanPrepayPercent: 'JAPAN_PREPAY_PERCENT',
217
258
  JapanPrepayPhotoDiscount: 'JAPAN_PREPAY_PHOTO_DISCOUNT',
259
+ JapanRemittanceFee: 'JAPAN_REMITTANCE_FEE',
218
260
  KazpostDisbursementFee: 'KAZPOST_DISBURSEMENT_FEE',
219
261
  KazpostPrepayFee: 'KAZPOST_PREPAY_FEE',
220
262
  KazpostPrepayPercent: 'KAZPOST_PREPAY_PERCENT',
@@ -3204,6 +3246,7 @@ export const epaDisclaimCode = {
3204
3246
 
3205
3247
  export type EpaDisclaimCode =
3206
3248
  (typeof epaDisclaimCode)[keyof typeof epaDisclaimCode];
3249
+
3207
3250
  export const epaProgram = {
3208
3251
  Hfc: 'HFC',
3209
3252
  Ods: 'ODS',
@@ -3811,6 +3854,7 @@ export const invoiceDetailCategoryInputType = {
3811
3854
  Adjustment: 'ADJUSTMENT',
3812
3855
  Advancement: 'ADVANCEMENT',
3813
3856
  AirlineRecoveryFee: 'AIRLINE_RECOVERY_FEE',
3857
+ AirwallexTransferFee: 'AIRWALLEX_TRANSFER_FEE',
3814
3858
  AnnualPlatformFee: 'ANNUAL_PLATFORM_FEE',
3815
3859
  ApiAnnualFlat: 'API_ANNUAL_FLAT',
3816
3860
  ApiAnnualMonthlyFlat: 'API_ANNUAL_MONTHLY_FLAT',
@@ -3915,6 +3959,9 @@ export const invoiceDetailCategoryInputType = {
3915
3959
  CyprusPrepayPercent: 'CYPRUS_PREPAY_PERCENT',
3916
3960
  CyprusPrepayPhotoDiscount: 'CYPRUS_PREPAY_PHOTO_DISCOUNT',
3917
3961
  CyprusRemittanceFee: 'CYPRUS_REMITTANCE_FEE',
3962
+ CzechDisbursementFee: 'CZECH_DISBURSEMENT_FEE',
3963
+ CzechGuaranteeOrder: 'CZECH_GUARANTEE_ORDER',
3964
+ CzechRemittanceFee: 'CZECH_REMITTANCE_FEE',
3918
3965
  DashboardLite: 'DASHBOARD_LITE',
3919
3966
  DdpServiceFee: 'DDP_SERVICE_FEE',
3920
3967
  DdpServiceFeeBuffer: 'DDP_SERVICE_FEE_BUFFER',
@@ -3927,7 +3974,43 @@ export const invoiceDetailCategoryInputType = {
3927
3974
  DutyBrokerageUs: 'DUTY_BROKERAGE_US',
3928
3975
  DutyFx: 'DUTY_FX',
3929
3976
  DutyRemittance: 'DUTY_REMITTANCE',
3977
+ DutyRemittanceAt: 'DUTY_REMITTANCE_AT',
3978
+ DutyRemittanceAx: 'DUTY_REMITTANCE_AX',
3979
+ DutyRemittanceBe: 'DUTY_REMITTANCE_BE',
3980
+ DutyRemittanceBg: 'DUTY_REMITTANCE_BG',
3981
+ DutyRemittanceCy: 'DUTY_REMITTANCE_CY',
3982
+ DutyRemittanceCz: 'DUTY_REMITTANCE_CZ',
3983
+ DutyRemittanceDe: 'DUTY_REMITTANCE_DE',
3984
+ DutyRemittanceDk: 'DUTY_REMITTANCE_DK',
3985
+ DutyRemittanceEe: 'DUTY_REMITTANCE_EE',
3986
+ DutyRemittanceEs: 'DUTY_REMITTANCE_ES',
3987
+ DutyRemittanceFi: 'DUTY_REMITTANCE_FI',
3988
+ DutyRemittanceFr: 'DUTY_REMITTANCE_FR',
3989
+ DutyRemittanceGb: 'DUTY_REMITTANCE_GB',
3990
+ DutyRemittanceGf: 'DUTY_REMITTANCE_GF',
3991
+ DutyRemittanceGp: 'DUTY_REMITTANCE_GP',
3992
+ DutyRemittanceGr: 'DUTY_REMITTANCE_GR',
3993
+ DutyRemittanceHr: 'DUTY_REMITTANCE_HR',
3994
+ DutyRemittanceHu: 'DUTY_REMITTANCE_HU',
3995
+ DutyRemittanceIc: 'DUTY_REMITTANCE_IC',
3996
+ DutyRemittanceIe: 'DUTY_REMITTANCE_IE',
3997
+ DutyRemittanceIt: 'DUTY_REMITTANCE_IT',
3998
+ DutyRemittanceLt: 'DUTY_REMITTANCE_LT',
3999
+ DutyRemittanceLu: 'DUTY_REMITTANCE_LU',
4000
+ DutyRemittanceLv: 'DUTY_REMITTANCE_LV',
4001
+ DutyRemittanceMc: 'DUTY_REMITTANCE_MC',
4002
+ DutyRemittanceMq: 'DUTY_REMITTANCE_MQ',
4003
+ DutyRemittanceMt: 'DUTY_REMITTANCE_MT',
4004
+ DutyRemittanceNl: 'DUTY_REMITTANCE_NL',
4005
+ DutyRemittancePl: 'DUTY_REMITTANCE_PL',
4006
+ DutyRemittancePt: 'DUTY_REMITTANCE_PT',
4007
+ DutyRemittanceRe: 'DUTY_REMITTANCE_RE',
4008
+ DutyRemittanceRo: 'DUTY_REMITTANCE_RO',
4009
+ DutyRemittanceSe: 'DUTY_REMITTANCE_SE',
4010
+ DutyRemittanceSi: 'DUTY_REMITTANCE_SI',
4011
+ DutyRemittanceSk: 'DUTY_REMITTANCE_SK',
3930
4012
  DutyRemittanceUs: 'DUTY_REMITTANCE_US',
4013
+ DutyRemittanceYt: 'DUTY_REMITTANCE_YT',
3931
4014
  DutyTaxBuffer: 'DUTY_TAX_BUFFER',
3932
4015
  DutyTaxFee: 'DUTY_TAX_FEE',
3933
4016
  EmiratesDisbursementFee: 'EMIRATES_DISBURSEMENT_FEE',
@@ -3956,9 +4039,11 @@ export const invoiceDetailCategoryInputType = {
3956
4039
  IsraelRemittanceFee: 'ISRAEL_REMITTANCE_FEE',
3957
4040
  ItalianeRemittanceFee: 'ITALIANE_REMITTANCE_FEE',
3958
4041
  Item: 'ITEM',
4042
+ JapanDisbursementFee: 'JAPAN_DISBURSEMENT_FEE',
3959
4043
  JapanPrepayFee: 'JAPAN_PREPAY_FEE',
3960
4044
  JapanPrepayPercent: 'JAPAN_PREPAY_PERCENT',
3961
4045
  JapanPrepayPhotoDiscount: 'JAPAN_PREPAY_PHOTO_DISCOUNT',
4046
+ JapanRemittanceFee: 'JAPAN_REMITTANCE_FEE',
3962
4047
  KazpostDisbursementFee: 'KAZPOST_DISBURSEMENT_FEE',
3963
4048
  KazpostPrepayFee: 'KAZPOST_PREPAY_FEE',
3964
4049
  KazpostPrepayPercent: 'KAZPOST_PREPAY_PERCENT',
@@ -1 +1 @@
1
- import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as v}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],h="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.279.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=e=>(null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b),I=Promise.resolve().then((()=>(()=>{var e,n;return"undefined"!=typeof window&&("function"==typeof(null===(e=window.Zonos)||void 0===e?void 0:e.createCartId)||"function"==typeof(null===(n=window.Zonos)||void 0===n?void 0:n.buildCartDetail))})()?N(null):null));let k=!1;I.catch((e=>{k||console.warn(e)}));const R=async({cartId:e,retries:n})=>{const t=i(),s=o(),d=p()||void 0,c=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&c.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${c.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:d,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),R({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const $=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),Z=Date.now(),A="https://v1.3.279.js.zonos.com",L=$||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.279",U="https://fonts.googleapis.com",C=/^https:\/\/fonts\.googleapis\.com/;class E{}T=E,E.doneInit=!1,E.cartSettings=null,E.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),E.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),E._paypalMockResponse=null,E.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,E.isBigCommerce=!1,E.releaseDate="1783027606083",E.isLegacyCheckout=!1,E.googleAnalyticId=null,E.googleAnalyticReady=!1,E.facebookPixelId=null,E.facebookPixelReady=!1,E.startLoadTime=Z,E.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",E.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),E.overrideUseCustomAddressForm=!1,E.isCollect=!1,E.isInvoice=!1,E.isNpm=!0,E.zonosQaUrl=null,E.zonosQaUrlApi=null,E.trackEventLogs=[],E.version="v1.3.279",E.modeAlerted=!1,E.cartData=null,E.paypal=null,E.zonosMode=null,E.IframeService=t,E.getCurrentTimestamp=()=>(new Date).getTime(),E.zonosController=null,E.loadTimeApiInfoList=[],E.logIntervalId=null,E.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:d,overrideCurrencyFormat:c,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.createCartId=null==o?void 0:o.createCartId,T.buildCartDetail=null==o?void 0:o.buildCartDetail,T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,"undefined"!=typeof window&&window.parent===window&&(T.googleAnalyticReady=!0,T.facebookPixelReady=!0),T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await R({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||v){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:d,overrideCurrencyFormat:c}}),T.doneInit=!0},E.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${v}`)){const e=document.createElement("button");e.id=v,e.style.display="none",document.body.appendChild(e)}},E.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},E.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},E.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${v}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},E.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},E.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},E.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},E.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},E.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},E.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{var n;k=!0;const o=Date.now();return((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(null!==(n=await I)&&void 0!==n?n:await N(null),e,o)})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},E.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},E.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.279";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.279";case"vercel":return A}};return T.isNpm&&S()||n()},E.injectZonosCdn=()=>{T.injectScript({cdnType:h,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:h,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},E.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},E.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:h,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},E.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!C.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},E.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},E.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const P=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],F=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],D=[...P,...F];export{E as Zonos,D as checkoutSessionAttributeKeys,F as checkoutSessionImmutableAttributeKeys,P as checkoutSessionMutableAttributeKeys}
1
+ import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as v}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-bcf5cffb.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],h="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.281.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=e=>(null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b),I=Promise.resolve().then((()=>(()=>{var e,n;return"undefined"!=typeof window&&("function"==typeof(null===(e=window.Zonos)||void 0===e?void 0:e.createCartId)||"function"==typeof(null===(n=window.Zonos)||void 0===n?void 0:n.buildCartDetail))})()?N(null):null));let k=!1;I.catch((e=>{k||console.warn(e)}));const R=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),R({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const $=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),Z=Date.now(),A="https://v1.3.281.js.zonos.com",L=$||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.281",U="https://fonts.googleapis.com",C=/^https:\/\/fonts\.googleapis\.com/;class E{}T=E,E.doneInit=!1,E.cartSettings=null,E.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),E.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),E._paypalMockResponse=null,E.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,E.isBigCommerce=!1,E.releaseDate="1784328589757",E.isLegacyCheckout=!1,E.googleAnalyticId=null,E.googleAnalyticReady=!1,E.facebookPixelId=null,E.facebookPixelReady=!1,E.startLoadTime=Z,E.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",E.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),E.overrideUseCustomAddressForm=!1,E.isCollect=!1,E.isInvoice=!1,E.isNpm=!0,E.zonosQaUrl=null,E.zonosQaUrlApi=null,E.trackEventLogs=[],E.version="v1.3.281",E.modeAlerted=!1,E.cartData=null,E.paypal=null,E.zonosMode=null,E.IframeService=t,E.getCurrentTimestamp=()=>(new Date).getTime(),E.zonosController=null,E.loadTimeApiInfoList=[],E.logIntervalId=null,E.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.createCartId=null==o?void 0:o.createCartId,T.buildCartDetail=null==o?void 0:o.buildCartDetail,T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,"undefined"!=typeof window&&window.parent===window&&(T.googleAnalyticReady=!0,T.facebookPixelReady=!0),T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await R({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||v){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},E.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${v}`)){const e=document.createElement("button");e.id=v,e.style.display="none",document.body.appendChild(e)}},E.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},E.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},E.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${v}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},E.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},E.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},E.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},E.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},E.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},E.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{var n;k=!0;const o=Date.now();return((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(null!==(n=await I)&&void 0!==n?n:await N(null),e,o)})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},E.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},E.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.281";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.281";case"vercel":return A}};return T.isNpm&&S()||n()},E.injectZonosCdn=()=>{T.injectScript({cdnType:h,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:h,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},E.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},E.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:h,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},E.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!C.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},E.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},E.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const P=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],F=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],D=[...P,...F];export{E as Zonos,D as checkoutSessionAttributeKeys,F as checkoutSessionImmutableAttributeKeys,P as checkoutSessionMutableAttributeKeys}
@@ -1 +1 @@
1
- import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as l}from"./p-7bdce9d4.js";import{l as i,k as n,t as r,g as h,n as a,o as d,p as c,q as m,h as z,r as g}from"./p-d7bda14d.js";import{z as p,g as w,m as f}from"./p-9a417eeb.js";import{c as b}from"./p-b4b7f705.js";import{h as u,l as v}from"./p-41dd1cb8.js";import{g as x}from"./p-5883217a.js";import{l as y}from"./p-0a377722.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},L=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:i}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&n(l)&&document.querySelectorAll(l)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===i,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=h[t];if(s&&l){const i={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(i)}}return c},C=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=i;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:i,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return i.length||!n?(v(`Error fetching item restrictions: ${null===(s=i.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=L();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=L();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==i.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(i.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return i.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(i.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||i.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||p.helloSettings.mobileLocation,e=this.desktopLocationOverride||p.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!!this.desktopLocationOverride||!p.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop()),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:n}=i,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(p.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const z=g()&&!!l;z&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:n});const w=null==(u=p.helloSettings.widgetSize)||!Number.isFinite(u)||u<=0?18:Math.min(64,Math.max(18,u));var u;return e(t,{class:"zonos--hello zonos--elements","data-theme":c,style:{"--zonos-elements-hello-widget-size":`${w}px`}},z&&e("div",{class:b(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:r,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};C.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{C as zonos_hello}
1
+ import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as l}from"./p-7bdce9d4.js";import{l as i,k as n,t as r,g as h,n as a,o as d,p as c,q as m,h as z,r as g}from"./p-9448d960.js";import{z as p,g as w,m as f}from"./p-9a417eeb.js";import{c as b}from"./p-b4b7f705.js";import{h as u,l as v}from"./p-41dd1cb8.js";import{g as x}from"./p-5883217a.js";import{l as y}from"./p-0a377722.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},L=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:i}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&n(l)&&document.querySelectorAll(l)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===i,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=h[t];if(s&&l){const i={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(i)}}return c},C=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=i;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:i,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return i.length||!n?(v(`Error fetching item restrictions: ${null===(s=i.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=L();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=L();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==i.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(i.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return i.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(i.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||i.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||p.helloSettings.mobileLocation,e=this.desktopLocationOverride||p.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!!this.desktopLocationOverride||!p.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop()),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:n}=i,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(p.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const z=g()&&!!l;z&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:n});const w=null==(u=p.helloSettings.widgetSize)||!Number.isFinite(u)||u<=0?18:Math.min(64,Math.max(18,u));var u;return e(t,{class:"zonos--hello zonos--elements","data-theme":c,style:{"--zonos-elements-hello-widget-size":`${w}px`}},z&&e("div",{class:b(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:r,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};C.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{C as zonos_hello}