@zonos/elements 1.3.233 → 1.3.235

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 (420) hide show
  1. package/dist/cjs/{cart-bc615014.js → cart-22ced7cc.js} +33 -29
  2. package/dist/cjs/{shouldRenderTaxIdInput-9b8a8de1.js → containsNonLatinChars-2be5129b.js} +0 -23
  3. package/dist/cjs/{hasInclusivePrice-84145546.js → hasInclusivePrice-ca85cabd.js} +1 -1
  4. package/dist/cjs/index.cjs.js +11 -7
  5. package/dist/cjs/invoice-8fd4242c.js +151 -0
  6. package/dist/cjs/{renderFallback-c2576fbe.js → isCollectMobileTablet-7962c57f.js} +2 -11
  7. package/dist/cjs/isInvoiceMobileTablet-dde41e4e.js +15 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{translationStore-08d3ff9c.js → localization-8ef6250a.js} +1059 -1
  10. package/dist/cjs/{paypal-1d6f1a71.js → paypal-4a086f84.js} +7 -8
  11. package/dist/cjs/placeTestOrder-f25d08ee.js +45 -0
  12. package/dist/cjs/{placeTestOrder-a5469e40.js → renderCheckoutCurrency-5494e45b.js} +2 -42
  13. package/dist/cjs/renderFallback-78b54537.js +12 -0
  14. package/dist/cjs/shouldRenderTaxIdInput-eda13ef8.js +25 -0
  15. package/dist/cjs/throttle-7dd64984.js +76 -0
  16. package/dist/cjs/{zonos-address_11.cjs.entry.js → zonos-address-display_9.cjs.entry.js} +62 -668
  17. package/dist/cjs/zonos-address_4.cjs.entry.js +715 -0
  18. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  19. package/dist/cjs/{zonos-banner_2.cjs.entry.js → zonos-banner.cjs.entry.js} +0 -40
  20. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  21. package/dist/cjs/{zonos-empty-state-payment_4.cjs.entry.js → zonos-card_5.cjs.entry.js} +44 -6
  22. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +75 -92
  23. package/dist/cjs/zonos-checkout.cjs.entry.js +20 -21
  24. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -6
  26. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +66 -65
  27. package/dist/cjs/zonos-collect.cjs.entry.js +25 -25
  28. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-controller.cjs.entry.js +39 -10
  30. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -2
  31. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -11
  32. package/dist/cjs/zonos-elements.cjs.js +1 -1
  33. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +30 -31
  34. package/dist/cjs/zonos-hello.cjs.entry.js +7 -8
  35. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +94 -0
  37. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +686 -0
  38. package/dist/cjs/zonos-invoice.cjs.entry.js +468 -0
  39. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -6
  40. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  41. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  42. package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
  43. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  45. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  46. package/dist/collection/collection-manifest.json +8 -0
  47. package/dist/collection/components/checkout/zonos-invoice/assets/ChevronDownIcon.svg +1 -0
  48. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
  49. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
  54. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
  55. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
  56. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
  57. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
  58. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
  59. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
  60. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
  66. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
  67. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
  68. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
  69. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
  70. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
  71. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
  72. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
  73. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
  74. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
  75. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +547 -0
  76. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  77. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  78. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  79. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  80. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  81. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  82. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  83. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  84. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  85. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  86. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  87. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  88. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  89. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  90. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  91. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  92. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  93. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  94. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  95. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
  96. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  97. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  98. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  99. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  100. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  101. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  102. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  103. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  104. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  105. package/dist/collection/components/main/zonos-controller.js +45 -4
  106. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  107. package/dist/collection/components/store/checkout/invoice.js +148 -0
  108. package/dist/collection/components/store/checkout/stripe.js +8 -3
  109. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  110. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  111. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  112. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  113. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  114. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  115. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  116. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  117. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  118. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  119. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  120. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  121. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  122. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  123. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  124. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  125. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  126. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  127. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  128. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  129. package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
  130. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  131. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  132. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  133. package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
  134. package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
  135. package/dist/collection/scripts/_zonosBase.js +4 -0
  136. package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
  137. package/dist/collection/types/generated/graphql.internal.types.js +239 -5
  138. package/dist/esm/{cart-14f305b3.js → cart-66aecbb3.js} +9 -5
  139. package/dist/esm/{shouldRenderTaxIdInput-8bc112bb.js → containsNonLatinChars-2d8810c3.js} +1 -23
  140. package/dist/esm/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  141. package/dist/esm/index.js +11 -7
  142. package/dist/esm/invoice-c7452847.js +146 -0
  143. package/dist/esm/{renderFallback-dbf1e3ae.js → isCollectMobileTablet-921002b0.js} +3 -11
  144. package/dist/esm/isInvoiceMobileTablet-1f7b614e.js +12 -0
  145. package/dist/esm/loader.js +1 -1
  146. package/dist/esm/{translationStore-690c4e04.js → localization-04b05867.js} +1041 -2
  147. package/dist/esm/{paypal-fded8844.js → paypal-56564874.js} +2 -3
  148. package/dist/esm/placeTestOrder-6b9eda9e.js +43 -0
  149. package/dist/esm/{placeTestOrder-2250f719.js → renderCheckoutCurrency-cb808110.js} +3 -42
  150. package/dist/esm/renderFallback-3f010b48.js +10 -0
  151. package/dist/esm/shouldRenderTaxIdInput-d45ceeb4.js +23 -0
  152. package/dist/esm/throttle-ce2432ab.js +74 -0
  153. package/dist/esm/{zonos-address_11.entry.js → zonos-address-display_9.entry.js} +32 -636
  154. package/dist/esm/zonos-address_4.entry.js +708 -0
  155. package/dist/esm/zonos-badge.entry.js +3 -3
  156. package/dist/esm/{zonos-banner_2.entry.js → zonos-banner.entry.js} +1 -40
  157. package/dist/esm/zonos-button_3.entry.js +3 -3
  158. package/dist/esm/{zonos-empty-state-payment_4.entry.js → zonos-card_5.entry.js} +44 -7
  159. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_12.entry.js} +15 -31
  160. package/dist/esm/zonos-checkout.entry.js +3 -4
  161. package/dist/esm/zonos-collapse.entry.js +2 -2
  162. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -6
  163. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  164. package/dist/esm/zonos-collect.entry.js +5 -5
  165. package/dist/esm/zonos-component.entry.js +1 -1
  166. package/dist/esm/zonos-controller.entry.js +39 -10
  167. package/dist/esm/zonos-country-flag.entry.js +1 -2
  168. package/dist/esm/zonos-country-select_4.entry.js +10 -11
  169. package/dist/esm/zonos-elements.js +1 -1
  170. package/dist/esm/zonos-hello-dialog.entry.js +6 -7
  171. package/dist/esm/zonos-hello.entry.js +1 -2
  172. package/dist/esm/zonos-input.entry.js +4 -4
  173. package/dist/esm/zonos-invoice-cart-items_2.entry.js +89 -0
  174. package/dist/esm/zonos-invoice-finish_5.entry.js +678 -0
  175. package/dist/esm/zonos-invoice.entry.js +464 -0
  176. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  177. package/dist/esm/zonos-link.entry.js +20 -0
  178. package/dist/esm/zonos-logo.entry.js +2 -2
  179. package/dist/esm/zonos-stripe-input.entry.js +5 -5
  180. package/dist/esm/zonos-toggle.entry.js +2 -2
  181. package/dist/esm/zonos-tooltip.entry.js +2 -2
  182. package/dist/esm/zonos-v-stack.entry.js +2 -2
  183. package/dist/esm-es5/cart-66aecbb3.js +1 -0
  184. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  185. package/dist/esm-es5/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  186. package/dist/esm-es5/index.js +1 -1
  187. package/dist/esm-es5/invoice-c7452847.js +1 -0
  188. package/dist/esm-es5/isCollectMobileTablet-921002b0.js +1 -0
  189. package/dist/esm-es5/isInvoiceMobileTablet-1f7b614e.js +1 -0
  190. package/dist/esm-es5/loader.js +1 -1
  191. package/dist/esm-es5/localization-04b05867.js +1 -0
  192. package/dist/esm-es5/{paypal-fded8844.js → paypal-56564874.js} +1 -1
  193. package/dist/esm-es5/placeTestOrder-6b9eda9e.js +1 -0
  194. package/dist/esm-es5/renderCheckoutCurrency-cb808110.js +1 -0
  195. package/dist/esm-es5/renderFallback-3f010b48.js +1 -0
  196. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +1 -0
  197. package/dist/esm-es5/throttle-ce2432ab.js +1 -0
  198. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -0
  199. package/dist/esm-es5/zonos-address_4.entry.js +1 -0
  200. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  201. package/dist/esm-es5/zonos-banner.entry.js +1 -0
  202. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  203. package/dist/esm-es5/zonos-card_5.entry.js +1 -0
  204. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  205. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  206. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  207. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  209. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  210. package/dist/esm-es5/zonos-component.entry.js +1 -1
  211. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  212. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  213. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  214. package/dist/esm-es5/zonos-elements.js +1 -1
  215. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  216. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  217. package/dist/esm-es5/zonos-input.entry.js +1 -1
  218. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -0
  219. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -0
  220. package/dist/esm-es5/zonos-invoice.entry.js +1 -0
  221. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  222. package/dist/esm-es5/zonos-link.entry.js +1 -0
  223. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  224. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  225. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  226. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  227. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  228. package/dist/scripts/index.d.ts +356 -0
  229. package/dist/scripts/index.js +1 -1
  230. package/dist/scripts/loadZonos.js +1 -1
  231. package/dist/scripts/zonos.js +1 -1
  232. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.d.ts +10 -0
  233. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.d.ts +50 -0
  234. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.d.ts +25 -0
  235. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.d.ts +28 -0
  236. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.d.ts +62 -0
  237. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.d.ts +22 -0
  238. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.d.ts +7 -0
  239. package/dist/types/components/checkout/zonos-invoice/zonos-invoice.d.ts +86 -0
  240. package/dist/types/components/main/zonos-controller.d.ts +4 -0
  241. package/dist/types/components/store/checkout/invoice.d.ts +19 -0
  242. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  243. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  244. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  245. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  246. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  247. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  248. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  249. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  250. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  251. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  252. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  253. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  254. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  255. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  256. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  257. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  258. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  259. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  260. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  261. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  262. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  263. package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
  264. package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
  265. package/dist/types/components.d.ts +351 -0
  266. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  267. package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
  268. package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
  269. package/dist/types/types/generated/graphql.frontend.types.d.ts +5 -1
  270. package/dist/types/types/generated/graphql.frontend.types.ts +5 -1
  271. package/dist/types/types/generated/graphql.internal.types.d.ts +285 -8
  272. package/dist/types/types/generated/graphql.internal.types.ts +367 -10
  273. package/dist/zonos-elements/index.esm.js +1 -1
  274. package/dist/zonos-elements/p-00719e49.entry.js +1 -0
  275. package/dist/zonos-elements/p-01b0a2e2.js +1 -0
  276. package/dist/zonos-elements/p-01dada4e.js +1 -0
  277. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  278. package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
  279. package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
  280. package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
  281. package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
  283. package/dist/zonos-elements/p-170314a3.js +1 -0
  284. package/dist/zonos-elements/p-17a09191.entry.js +1 -0
  285. package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
  286. package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
  287. package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
  288. package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
  289. package/dist/zonos-elements/p-1f3549c6.js +1 -0
  290. package/dist/zonos-elements/p-2250e585.entry.js +1 -0
  291. package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
  292. package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
  293. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  294. package/dist/zonos-elements/p-27f6930b.js +1 -0
  295. package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
  296. package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
  297. package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
  298. package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
  299. package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
  300. package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
  301. package/dist/zonos-elements/p-44b50260.entry.js +1 -0
  302. package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
  304. package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
  305. package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
  306. package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
  307. package/dist/zonos-elements/p-50f31c12.system.entry.js +1 -0
  308. package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
  309. package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
  310. package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
  312. package/dist/zonos-elements/p-6688473e.entry.js +1 -0
  313. package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
  314. package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
  315. package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
  316. package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
  317. package/dist/zonos-elements/p-7e17667d.js +1 -0
  318. package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
  319. package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
  320. package/dist/zonos-elements/p-81e3eb5b.js +1 -0
  321. package/dist/zonos-elements/p-82febf70.system.js +1 -0
  322. package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
  323. package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
  324. package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
  325. package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
  326. package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
  327. package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
  328. package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
  329. package/dist/zonos-elements/p-8af188f8.system.js +1 -0
  330. package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
  331. package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
  332. package/dist/zonos-elements/p-944d00da.entry.js +1 -0
  333. package/dist/zonos-elements/p-9479f155.system.js +1 -0
  334. package/dist/zonos-elements/p-95dc475b.system.js +1 -0
  335. package/dist/zonos-elements/p-976afc17.system.js +1 -0
  336. package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
  337. package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
  338. package/dist/zonos-elements/p-9fa32fdf.js +1 -0
  339. package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
  340. package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
  341. package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
  342. package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
  343. package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
  344. package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
  345. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  346. package/dist/zonos-elements/p-c8cc20d9.system.js +1 -0
  347. package/dist/zonos-elements/p-dc5fb21c.js +1 -0
  348. package/dist/zonos-elements/p-dc94d7eb.js +1 -0
  349. package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
  350. package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
  351. package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
  352. package/dist/zonos-elements/p-f1d4d6da.entry.js +1 -0
  353. package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
  354. package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
  355. package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
  356. package/dist/zonos-elements/p-f513b231.entry.js +1 -0
  357. package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
  358. package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
  359. package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
  360. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  361. package/package.json +1 -1
  362. package/dist/cjs/localization-39516612.js +0 -884
  363. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
  364. package/dist/esm/localization-c5029ffc.js +0 -863
  365. package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
  366. package/dist/esm-es5/cart-14f305b3.js +0 -1
  367. package/dist/esm-es5/localization-c5029ffc.js +0 -1
  368. package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
  369. package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
  370. package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
  371. package/dist/esm-es5/translationStore-690c4e04.js +0 -1
  372. package/dist/esm-es5/zonos-address_11.entry.js +0 -1
  373. package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
  374. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  375. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
  376. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
  377. package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
  378. package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
  379. package/dist/zonos-elements/p-143d706b.entry.js +0 -1
  380. package/dist/zonos-elements/p-14d7489d.js +0 -1
  381. package/dist/zonos-elements/p-1bfae137.entry.js +0 -1
  382. package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
  383. package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
  384. package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
  385. package/dist/zonos-elements/p-2557b96b.js +0 -1
  386. package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
  387. package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
  388. package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
  389. package/dist/zonos-elements/p-3185968f.entry.js +0 -1
  390. package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
  391. package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
  392. package/dist/zonos-elements/p-561be3a2.system.js +0 -1
  393. package/dist/zonos-elements/p-5c680f72.js +0 -1
  394. package/dist/zonos-elements/p-5f77d19e.js +0 -1
  395. package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
  396. package/dist/zonos-elements/p-767a31a8.system.js +0 -1
  397. package/dist/zonos-elements/p-78a6e775.system.js +0 -1
  398. package/dist/zonos-elements/p-7c705c76.system.js +0 -1
  399. package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
  400. package/dist/zonos-elements/p-84078c57.system.js +0 -1
  401. package/dist/zonos-elements/p-8a23bbf5.js +0 -1
  402. package/dist/zonos-elements/p-905d2490.entry.js +0 -1
  403. package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
  404. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
  405. package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
  406. package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
  407. package/dist/zonos-elements/p-ae940a99.js +0 -1
  408. package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
  409. package/dist/zonos-elements/p-c0c458f7.system.entry.js +0 -1
  410. package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
  411. package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
  412. package/dist/zonos-elements/p-cf765af3.system.js +0 -1
  413. package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
  414. package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
  415. package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
  416. package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
  417. package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
  418. package/dist/zonos-elements/p-eeb1081e.js +0 -1
  419. package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
  420. package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
@@ -0,0 +1,468 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-69fa8852.js');
6
+ const cart = require('./cart-22ced7cc.js');
7
+ const invoice = require('./invoice-8fd4242c.js');
8
+ const paypal = require('./paypal-4a086f84.js');
9
+ const localization = require('./localization-8ef6250a.js');
10
+ const zonosStore = require('./zonosStore-37a4b4f4.js');
11
+ const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
+ const handleFetch = require('./handleFetch-954f30e1.js');
13
+ const isInvoiceMobileTablet = require('./isInvoiceMobileTablet-dde41e4e.js');
14
+ const classes = require('./classes-b7918f56.js');
15
+ const VarianceTest = require('./VarianceTest-bec00ea8.js');
16
+ const ILanguage = require('./ILanguage-98b04442.js');
17
+ require('./isDarkColor-878e600e.js');
18
+ require('./getBorderRadius-2ef1170d.js');
19
+
20
+ const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
21
+
22
+ const zonosInvoiceCss = ".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:hidden}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
23
+ const ZonosInvoiceStyle0 = zonosInvoiceCss;
24
+
25
+ const ZonosInvoice = class {
26
+ constructor(hostRef) {
27
+ index.registerInstance(this, hostRef);
28
+ this.storeUnsubscribeList = [];
29
+ /**
30
+ * Listener for locale change in localization store
31
+ */
32
+ this.onChangeLocaleListener = () => { };
33
+ /**
34
+ * Flag to determine if the checkout is on mobile
35
+ */
36
+ this.mobile = false;
37
+ /**
38
+ * Whether or not the component is being rendered with tablet styles
39
+ */
40
+ this.tablet = false;
41
+ /**
42
+ * The stripe instance
43
+ */
44
+ this.stripe = window.Zonos.stripe;
45
+ /**
46
+ * Whether or not the language dialog is open
47
+ */
48
+ this.showLanguageDialogMobile = false;
49
+ /**
50
+ * Whether or not the submit button is loading in `step` component
51
+ */
52
+ this.submitLoading = false;
53
+ // default to collapse the review
54
+ this.collapseReviewMobile = true;
55
+ this.isMobile = false;
56
+ this.isTablet = false;
57
+ // @State() isCollect = window.Zonos.isCollect;
58
+ this.isOverlayLoading = true;
59
+ /**
60
+ * Confirm dialog open state
61
+ */
62
+ this.isCartCollected = false;
63
+ /**
64
+ * Cart expired state to show the cart expired dialog
65
+ */
66
+ this.isCartExpired = false;
67
+ /**
68
+ * Pay in USD confirm dialog open state
69
+ */
70
+ this.payInUsdConfirmDialogOpen = false;
71
+ /**
72
+ * Error message from onInventoryCheck callback
73
+ */
74
+ this.inventoryCheckErrorMessage = null;
75
+ /**
76
+ * Confirmation id for invoice finish component
77
+ */
78
+ this.confirmationId = null;
79
+ /**
80
+ * Client secret value
81
+ */
82
+ this.clientSecret = cart.stripeStore.clientSecret;
83
+ /**
84
+ * Client secret value of customer session (use to load saved payment method and render saved consent)
85
+ */
86
+ this.stripeCustomerSessionClientSecret = cart.stripeStore.stripeCustomerSessionClientSecret;
87
+ this.getBaseCurrencySettlementInfo = () => {
88
+ const selectedLandedCost = cart.cartStore.selectedLandedCost;
89
+ if (!selectedLandedCost) {
90
+ return null;
91
+ }
92
+ const { landedCost: { amountSubtotals }, } = selectedLandedCost;
93
+ if (!amountSubtotals) {
94
+ return null;
95
+ }
96
+ const total = (amountSubtotals.discounts || 0) +
97
+ amountSubtotals.items +
98
+ amountSubtotals.landedCostTotal +
99
+ amountSubtotals.shipping;
100
+ return {
101
+ settlementAmount: total,
102
+ };
103
+ };
104
+ this.applyStripeTheme = async () => {
105
+ const theme = zonosStore.zonosStore.appearance.theme;
106
+ await cart.initStripeElements({
107
+ // only override theme or theme from appearance if it's mobile
108
+ overrideTheme: this.isMobile ? theme : undefined,
109
+ paypalEnabled: paypal.paypalStoreHasPaypalEnabled(),
110
+ });
111
+ };
112
+ this.fetchCheckoutSession = async (checkoutSessionId) => {
113
+ const { json } = await handleFetch.handleFetch(`/api/zonos-elements/collect/get-checkout-session`, {
114
+ body: {
115
+ checkoutSessionId,
116
+ },
117
+ method: 'POST',
118
+ });
119
+ return json;
120
+ };
121
+ /**
122
+ * Check if stripe payment intent is succeeded or in a good state to move forward
123
+ */
124
+ this.checkStripePaymentIntentStatus = async () => {
125
+ var _a;
126
+ const isCartDataAvailable = !!window.Zonos.cartData;
127
+ const searchParams = new URL(window.location.href).searchParams;
128
+ const stripeClientSecret = searchParams.get('payment_intent_client_secret');
129
+ const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
130
+ VarianceTest.log('Payment intent exist, checking stripe payment intent status');
131
+ // Allow to proceed to order if there's no stripe client secret and cart data is available
132
+ if (!stripeClientSecret) {
133
+ VarianceTest.log('No stripe client secret found in the URL, proceed to order if cart data is available');
134
+ return { shouldAllowOrder: isCartDataAvailable };
135
+ }
136
+ const { error, status } = await cart.stripeStoreRetrievePayment({
137
+ clientSecret: stripeClientSecret,
138
+ });
139
+ // check if this is redirect after order
140
+ const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
141
+ // If just redirected from Payment provider, show the success screen or error screen based on the status
142
+ if (isJustRedirected && zonosCheckoutSessionId) {
143
+ if (!error) {
144
+ VarianceTest.log('Payment intent is succeeded or in a good state to move forward, show success screen');
145
+ }
146
+ else {
147
+ VarianceTest.log('Payment intent failed, show status from error');
148
+ }
149
+ // Attempt to retrieve the checkout session
150
+ const json = await this.fetchCheckoutSession(zonosCheckoutSessionId);
151
+ this.confirmationId = ((_a = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
152
+ localization.storageStore.checkoutSessionId = zonosCheckoutSessionId;
153
+ cart.stripeStore.clientSecret = stripeClientSecret;
154
+ void this.setToFinishStep(status);
155
+ return { shouldAllowOrder: false };
156
+ }
157
+ if (!isCartDataAvailable) {
158
+ VarianceTest.log('Cart data is not available, only check payment intent status, skip order.');
159
+ return { shouldAllowOrder: false };
160
+ }
161
+ VarianceTest.log('Payment intent is not succeeded, proceed to order');
162
+ return { shouldAllowOrder: true };
163
+ };
164
+ }
165
+ /**
166
+ * Listen to resize event to update the isMobile state
167
+ */
168
+ resizeListener() {
169
+ this.isMobile = isInvoiceMobileTablet.isInvoiceMobile(this.mobile);
170
+ this.isTablet = isInvoiceMobileTablet.isInvoiceTablet(this.tablet);
171
+ }
172
+ /**
173
+ * For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
174
+ */
175
+ async setToFinishStep(forcePaymentStatus) {
176
+ cart.stripeStore.stripe = window.Zonos.stripe;
177
+ cart.cartStore.step = 'finish';
178
+ this.storybookPaymentStatusOverride = forcePaymentStatus;
179
+ this.isOverlayLoading = false;
180
+ }
181
+ async initInvoiceCart() {
182
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
183
+ // Should not happen since we will throw error way earlier if cartData is not available
184
+ if (!window.Zonos.cartData) {
185
+ return;
186
+ }
187
+ // change currency to the currency of the cart
188
+ const cartCurrency = (_b = (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
189
+ if (cartCurrency) {
190
+ cart.cartStore.currency = cartCurrency;
191
+ }
192
+ const cartCheckoutSessionId = (_d = (_c = window.Zonos.cartData) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.checkoutSessionId;
193
+ const cartLandedCostId = (_f = (_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.references) === null || _f === void 0 ? void 0 : _f.landedCostId;
194
+ if (!cartLandedCostId) {
195
+ cart.cartStoreUpdateToErrorState({
196
+ messages: [
197
+ localization.translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
198
+ organizationName: zonosStore.zonosStore.organizationName,
199
+ }),
200
+ ],
201
+ title: localization.translate('Invalid session'),
202
+ });
203
+ return;
204
+ }
205
+ // Override checkout session id for invoice if we found one in the cart reference
206
+ if (cartCheckoutSessionId) {
207
+ VarianceTest.log('Setting checkout session id from cart reference', 'info', cartCheckoutSessionId);
208
+ localization.storageStore.checkoutSessionId = cartCheckoutSessionId;
209
+ }
210
+ else {
211
+ VarianceTest.log('Clear checkout session id from storage so we start from a fresh session for the invoice cart');
212
+ localization.storageStore.checkoutSessionId = null;
213
+ }
214
+ const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus();
215
+ if (!shouldAllowOrder) {
216
+ return;
217
+ }
218
+ try {
219
+ const { adjustments, cartItems } = buildCartItemsByTempCart.buildCartItemsByTempCart(window.Zonos.cartData);
220
+ await cart.cartStoreUpdateItems({
221
+ adjustments,
222
+ cartItems,
223
+ landedCostId: cartLandedCostId,
224
+ // No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
225
+ shouldInitSessionOnFailure: false,
226
+ });
227
+ // if checkoutSessionId is not available, request a new one, only if no checkout session id is found in cart references
228
+ if (!localization.storageStore.checkoutSessionId && !cartCheckoutSessionId) {
229
+ const success = await cart.stripeStoreInitCheckoutSession();
230
+ VarianceTest.log(`stripeStoreInitCheckoutSession: ${success}`);
231
+ if (!success) {
232
+ throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential');
233
+ }
234
+ }
235
+ // If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / invalid landed cost
236
+ if ((!cart.cartStore.checkoutSession ||
237
+ ((_g = cart.cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
238
+ cartCheckoutSessionId) {
239
+ // Attempt to retrieve the checkout session
240
+ const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
241
+ // Some merchants use landed cost id as the confirmation id
242
+ this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
243
+ // If checkout session is already completed, set to finish step
244
+ if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt) &&
245
+ // For invoice that's set to expired, we set completedAt but no order attached. In that case should not set to finish step
246
+ !!json.checkoutSession.order) {
247
+ void this.setToFinishStep('succeeded');
248
+ return;
249
+ }
250
+ if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
251
+ const { status } = await cart.stripeStoreRetrievePayment({
252
+ clientSecret: json.checkoutSession.clientSecret,
253
+ });
254
+ // If payment intent is still processing or succeeded, set to finish step
255
+ if (status === 'processing' || status === 'succeeded') {
256
+ void this.setToFinishStep(status);
257
+ return;
258
+ }
259
+ }
260
+ void handleFetch.sendErrorLog({
261
+ endpoint: 'INVALID_INVOICE_CHECKOUT_SESSION',
262
+ errors: [
263
+ 'Invalid checkout session, can not retrieve the checkout session after failing to update it',
264
+ ],
265
+ metadata: {
266
+ cartCheckoutSessionId,
267
+ cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
268
+ cartLandedCostId,
269
+ },
270
+ });
271
+ throw new Error('Invalid checkout session, can not retrieve the checkout session after failing to update it');
272
+ }
273
+ if (!cart.cartStore.checkoutSession) {
274
+ void handleFetch.sendErrorLog({
275
+ endpoint: 'FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION',
276
+ errors: [
277
+ 'Could not update/create checkout session for this invoice cart',
278
+ ],
279
+ metadata: {
280
+ cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
281
+ cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
282
+ cartLandedCostId: cartLandedCostId || 'N/A',
283
+ },
284
+ });
285
+ throw new Error('Could not update/create checkout session for this invoice cart');
286
+ }
287
+ // const checkoutSessionId = storageStore.checkoutSessionId;
288
+ void cart.stripeStoreGetPaymentIntent();
289
+ const landedCost = (_l = cart.cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
290
+ if (!landedCost) {
291
+ throw new Error('Landed cost could not be found in checkout session after creating/updating them');
292
+ }
293
+ await invoice.invoiceStoreUpdateSelectedShippingOption(Object.assign(Object.assign({}, cart.cartStore.checkoutSession), { id: localization.storageStore.checkoutSessionId || '' }));
294
+ void invoice.invoiceStoreInitShippingInfo({
295
+ landedCostId: landedCost.id,
296
+ });
297
+ void this.applyStripeTheme();
298
+ }
299
+ catch (err) {
300
+ handleFetch.logError(err);
301
+ cart.cartStoreUpdateToErrorState({
302
+ messages: [
303
+ localization.translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
304
+ organizationName: zonosStore.zonosStore.organizationName,
305
+ }),
306
+ ],
307
+ title: localization.translate('Invalid session'),
308
+ });
309
+ }
310
+ this.isOverlayLoading = false;
311
+ }
312
+ toggleLanguageDialog() {
313
+ this.showLanguageDialogMobile = !this.showLanguageDialogMobile;
314
+ }
315
+ async handleStripePaymentContinue() {
316
+ var _a, _b, _c, _d;
317
+ // Attempt to get the value of the billing address element to validate the form
318
+ void ((_a = cart.stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
319
+ // If the email is not complete, scroll to the link authentication section
320
+ if (!((_b = cart.stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete)) {
321
+ // Scroll to the billing section
322
+ const linkAuthentication = document.querySelector('zonos-link-authentication');
323
+ linkAuthentication === null || linkAuthentication === void 0 ? void 0 : linkAuthentication.scrollIntoView({ behavior: 'smooth' });
324
+ return;
325
+ }
326
+ if (!((_c = cart.stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.complete)) {
327
+ // Scroll to the billing section
328
+ const billingSection = document.querySelector('.zonos--billing-address');
329
+ billingSection === null || billingSection === void 0 ? void 0 : billingSection.scrollIntoView({ behavior: 'smooth' });
330
+ return;
331
+ }
332
+ const shouldConfirmPayInUsd = cart.stripeStore.checkoutSettlementCurrency === 'USD';
333
+ // open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
334
+ if (shouldConfirmPayInUsd &&
335
+ cart.stripeStore.shouldRenderPayInUsdButton &&
336
+ !this.payInUsdConfirmDialogOpen) {
337
+ this.payInUsdConfirmDialogOpen = true;
338
+ return;
339
+ }
340
+ // Close the dialog after the user confirms to proceed with the payment in USD
341
+ this.payInUsdConfirmDialogOpen = false;
342
+ // reset paypal error message
343
+ paypal.paypalStore.paypalErrorMessage = null;
344
+ // reset error state
345
+ cart.stripeStore.hasPaymentError = false;
346
+ this.submitLoading = true;
347
+ // reset inventory check message
348
+ cart.cartStore.inventoryCheckErrorMessage = null;
349
+ // Attempt to change settlement currency to USD
350
+ const baseCurrencyUpdateSuccess = await cart.stripeStoreUpdateCheckoutSessionBaseCurrency();
351
+ // Should not proceed to confirm payment if base currency update failed
352
+ if (!baseCurrencyUpdateSuccess) {
353
+ cart.stripeStore.hasPaymentError = true;
354
+ cart.stripeStore.customErrorMessage = localization.translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
355
+ currency: cart.stripeStore.checkoutSettlementCurrency,
356
+ });
357
+ this.submitLoading = false;
358
+ return;
359
+ }
360
+ // Update the billing party id to the checkout session
361
+ await invoice.invoiceStoreAsyncAddressUpdate();
362
+ try {
363
+ await cart.stripeStoreConfirmPayment({
364
+ noLandedCostCheck: true,
365
+ });
366
+ cart.cartStore.step = 'finish';
367
+ // Some merchants use landed cost id as the confirmation id
368
+ this.confirmationId =
369
+ invoice.invoiceStore.landedCostShortId ||
370
+ ((_d = cart.cartStore.selectedLandedCost) === null || _d === void 0 ? void 0 : _d.landedCostId) ||
371
+ null;
372
+ return;
373
+ }
374
+ catch (err) {
375
+ handleFetch.logError(err);
376
+ cart.stripeStore.hasPaymentError = true;
377
+ }
378
+ this.submitLoading = false;
379
+ }
380
+ componentWillLoad() {
381
+ cart.stripeStore.stripe = window.Zonos.stripe;
382
+ // Set the step to payment
383
+ cart.cartStore.step = 'payment';
384
+ void this.initInvoiceCart();
385
+ this.resizeListener();
386
+ this.storeUnsubscribeList = [
387
+ cart.stripeStoreOnChange('clientSecret', () => {
388
+ void this.applyStripeTheme();
389
+ }),
390
+ localization.localizationStoreOnChange('selectedLocale', () => {
391
+ void this.applyStripeTheme();
392
+ }),
393
+ ];
394
+ VarianceTest.log(`mobile: ${this.isMobile}`);
395
+ }
396
+ // do clean up when component is unmounted
397
+ disconnectedCallback() {
398
+ // reset stripe store
399
+ cart.stripeStoreReset();
400
+ // reset cart store
401
+ cart.cartStoreReset();
402
+ // cleanup onChange listener
403
+ this.onChangeLocaleListener();
404
+ this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
405
+ }
406
+ render() {
407
+ // Set client secret so that we can add this to @Watch listener
408
+ this.clientSecret = cart.stripeStore.clientSecret;
409
+ // Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
410
+ if (cart.stripeStore.stripeCustomerSessionClientSecret) {
411
+ // Set stripe customer session client secret so that we can add this to @Watch listener
412
+ this.stripeCustomerSessionClientSecret =
413
+ cart.stripeStore.stripeCustomerSessionClientSecret;
414
+ }
415
+ const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
416
+ const { logoUrl, theme } = zonosStore.zonosStore.appearance;
417
+ const renderLogo = () => {
418
+ // add timestamp to logo url so browser won't cache it on the dashboard setting
419
+ const logo = `${logoUrl}?timestamp=${Date.now()}`;
420
+ return (index.h("div", { class: "zonos--logo" }, logo && (index.h("img", { alt: `${zonosStore.zonosStore.organizationName} logo`, src: logo }))));
421
+ };
422
+ const isTestMode = handleFetch.getIsTestMode();
423
+ const renderTopHeader = () => {
424
+ var _a;
425
+ const urlParams = new URLSearchParams(window.location.search);
426
+ const zonosQaUrl = urlParams.get('zonosQaUrl');
427
+ const zonosDebug = urlParams.get('zonosDebug');
428
+ const languageLabel = (_a = ILanguage.languages.find(x => x.code === localization.localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
429
+ return (index.h(index.Fragment, null, index.h("zonos-h-stack", { class: "zonos--header-wrapper", spacing: 16 }, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, localization.translate('Test mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), index.h("div", { class: "zonos--header-right" }, index.h("zonos-button", { backgroundColor: 'gray-0', class: "zonos--header-right-button", onClick: () => this.toggleLanguageDialog(), variant: "outline" }, languageLabel, index.h("zonos-icon", { "aria-label": "Language select", content: ChevronDownIcon, iconColor: "gray-1200" })), index.h("div", { class: classes.classes([
430
+ 'zonos--invoice-language-dialog',
431
+ this.showLanguageDialogMobile &&
432
+ 'zonos--invoice-language-dialog-open',
433
+ ]) }, index.h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() }))))));
434
+ };
435
+ const renderContent = () => {
436
+ if (this.isOverlayLoading || cart.stripeStore.isFetchingSession) {
437
+ return null;
438
+ }
439
+ return (index.h("div", { class: 'zonos--content' }, cart.cartStore.step !== 'finish' && cart.cartStore.step !== 'error' && (index.h(index.Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), index.h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Billing info')), index.h("zonos-v-stack", { spacing: 16 }, index.h("zonos-link-authentication", { titleText: "" }), index.h("zonos-address", { titleText: "", type: "billing" })), index.h("zonos-invoice-payment", { class: classes.classes(['zonos--invoice-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
440
+ await this.handleStripePaymentContinue();
441
+ } })), index.h("div", { class: "zonos--right", "data-theme": theme }, !this.isMobile && (index.h("zonos-invoice-review", { mobile: this.isMobile, tablet: this.isTablet })), index.h("div", { class: "zonos--order-details-container" }, !this.isMobile && (index.h("zonos-invoice-cart-items", null)), this.isMobile && (index.h("zonos-invoice-order-details", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onCollapseClicked: () => {
442
+ this.collapseReviewMobile = !this.collapseReviewMobile;
443
+ } }))), index.h("div", { class: "flex--wrapper" }, !this.isMobile && (index.h("zonos-v-stack", { spacing: 16 }, index.h("zonos-invoice-subtotal", null))), !this.isMobile && !this.isTablet && (index.h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet })))))), (cart.cartStore.step === 'finish' || cart.cartStore.step === 'error') && (index.h("div", { class: "zonos--done", "data-theme": theme }, index.h("div", { class: "zonos--header" }, renderLogo()), index.h("zonos-invoice-finish", { confirmationId: this.confirmationId, overrideNotification: cart.cartStore.step === 'error' && !!cart.cartStore.error
444
+ ? Object.assign(Object.assign({}, cart.cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), (this.isMobile ||
445
+ this.isTablet ||
446
+ cart.cartStore.step === 'finish' ||
447
+ cart.cartStore.step === 'error') && (index.h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet }))));
448
+ };
449
+ return (index.h(index.Host, { class: classes.classes([
450
+ 'zonos--invoice zonos--elements',
451
+ this.isMobile && 'mobile',
452
+ this.isTablet && 'tablet',
453
+ ]), "data-theme": theme }, renderContent(), baseCurrencySettlementInfo && (index.h("zonos-confirm-dialog", { class: "zonos--pay-in-usd-dialog", dialogCancelBtnText: localization.translate('Cancel'), dialogConfirmBtnText: localization.translate('Pay [orderTotal]', {
454
+ orderTotal: localization.currencyFormat({
455
+ amount: baseCurrencySettlementInfo.settlementAmount,
456
+ currency: 'USD',
457
+ }),
458
+ }), dialogIntent: "warn", dialogOpen: this.payInUsdConfirmDialogOpen, dialogSubtitle: localization.translate('By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level.'), dialogTitle: localization.translate('Pay in USD (United States Dollar)?'), dialogType: "confirm", dialogWidth: 480, onCancelClicked: () => {
459
+ this.payInUsdConfirmDialogOpen = false;
460
+ },
461
+ // Mark user selected confirm to continue with payment
462
+ onConfirmClicked: () => this.handleStripePaymentContinue() })), index.h("zonos-loading-overlay", { open: this.isOverlayLoading })));
463
+ }
464
+ static get assetsDirs() { return ["assets"]; }
465
+ };
466
+ ZonosInvoice.style = ZonosInvoiceStyle0;
467
+
468
+ exports.zonos_invoice = ZonosInvoice;
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const localization = require('./localization-39516612.js');
7
- const translationStore = require('./translationStore-08d3ff9c.js');
6
+ const localization = require('./localization-8ef6250a.js');
8
7
  const zonosStore = require('./zonosStore-37a4b4f4.js');
9
8
  const ILanguage = require('./ILanguage-98b04442.js');
10
9
  require('./handleFetch-954f30e1.js');
@@ -35,9 +34,9 @@ const ZonosLanguageSelect = class {
35
34
  }
36
35
  render() {
37
36
  const { selectedLocale } = localization.localizationStore;
38
- return (index.h(index.Host, { key: '232674c6f35113c6ad3f1094e6e6d4128b4d4c02', class: "zonos--elements", style: {
37
+ return (index.h(index.Host, { key: '04271d51489c89ffa0e4fda90ed28392ae725ebe', class: "zonos--elements", style: {
39
38
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
40
- } }, index.h("div", { key: '014d1364e165e4ee4e9cf304791fc10fdfb6d87c', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '65b454467b033cd061ab08693e857eed75c76511', handleOnClose: () => this.handleOnClose(), label: translationStore.translate('Select a language') }), index.h("div", { key: '6ea8fca0b44ada24b9b2b84e22584ba1a7459dc4', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
39
+ } }, index.h("div", { key: 'cebffa5e46a4403f6aa4753648ee8097c7b4375d', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '9aa75712883c069a0dc21f0cdd91484211f688d1', handleOnClose: () => this.handleOnClose(), label: localization.translate('Select a language') }), index.h("div", { key: '637cff9d4a5ff4ebac0e42ef4db6b49006e4f77e', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
41
40
  }
42
41
  };
43
42
  ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
@@ -61,9 +60,9 @@ const ZonosSelectDialogHeader = class {
61
60
  this.label = '';
62
61
  }
63
62
  render() {
64
- return (index.h(index.Host, { key: 'cc65559ef7867bbd8e7990556b50434faa0a905c', class: "zonos--elements", style: {
63
+ return (index.h(index.Host, { key: 'f962d21f191040edf5b6e9fe2c4276bca67fde67', class: "zonos--elements", style: {
65
64
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
66
- } }, index.h("zonos-v-stack", { key: '77c280b12744520b4a172193f88798aa53d33eb7', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: 'eaba9d1e50f71f23e330e989521d2156a617b22d', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: 'ddddc6b5bca87cf44cbc7428d402f44c67422cb6', type: "boldLabel" }, this.label), index.h("zonos-button", { key: '313e3955ba8bafc9a1b36b4c1c8f99e975fb8dd3', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: '9af2821c22f3e37d52b6f03bf544fcaca1c0ed7b' }))));
65
+ } }, index.h("zonos-v-stack", { key: '1d55415843a60fe2dfccc5fe4c51cf3024f0de2c', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: '0f9e6aad9194160e171b70e835e100ddcda264a5', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: '15680cb57b7f8fe3b0f8bb763f437c85ab100d1c', type: "boldLabel" }, this.label), index.h("zonos-button", { key: '8baa1075d7138c14306dc7a1c666f577bba2d128', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: '96384e5eb53e731e2061339fd24bcec4194b1274' }))));
67
66
  }
68
67
  };
69
68
  ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-69fa8852.js');
6
+
7
+ const zonosLinkCss = ":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}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";
8
+ const ZonosLinkStyle0 = zonosLinkCss;
9
+
10
+ const ZonosLink = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /**
14
+ * The href for the link
15
+ */
16
+ this.href = '';
17
+ }
18
+ render() {
19
+ return (index.h(index.Host, { key: '999242ee8fc2e78a52fac1251a2cd554ed2e20ea', class: "zonos--elements" }, index.h("a", { key: '9ebee9ad8262ebd42f511dda6afadb54a2e7c813', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: '1c460154708dfc89d1b5132d3905c107ce333fd8' }))));
20
+ }
21
+ };
22
+ ZonosLink.style = ZonosLinkStyle0;
23
+
24
+ exports.zonos_link = ZonosLink;
@@ -26,11 +26,11 @@ const ZonosLogo = class {
26
26
  const filterColor = this.theme === 'DARK'
27
27
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
28
28
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
29
- return (index.h(index.Host, { key: '0f0fe90d3ef58b5a7b934361567e92b03630b46a', class: classes.classes(['zonos--elements zonos--logo']), style: {
29
+ return (index.h(index.Host, { key: '2277b893624a5e87fcda0f86e96a50d0bc309bac', class: classes.classes(['zonos--elements zonos--logo']), style: {
30
30
  '--zonos--filter-color': filterColor,
31
31
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
32
32
  '--zonos--width': this.width,
33
- } }, index.h("img", { key: 'ec026a1a596d985aa50c18f8ebffc8683e62cc05', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
33
+ } }, index.h("img", { key: '3406330adec18a2faea63a91e0113d30d70deff5', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
34
34
  }
35
35
  static get assetsDirs() { return ["assets"]; }
36
36
  };
@@ -73,11 +73,11 @@ const ZonosStripeInput = class {
73
73
  const primaryColor = this.overridePrimaryColor || zonosStore.zonosStore.appearance.colorPrimary;
74
74
  const secondaryColor = this.overrideSecondaryColor || zonosStore.zonosStore.appearance.colorSecondary;
75
75
  // Always use theme from appearance settings if it's collect
76
- const isDark = window.Zonos.isCollect
76
+ const isDark = window.Zonos.isCollect || window.Zonos.isInvoice
77
77
  ? zonosStore.zonosStore.appearance.theme === 'DARK'
78
78
  : primaryColor && isDarkColor.isDarkColor(primaryColor);
79
79
  const fontSize = zonosStore.zonosStore.appearance.fontSizeInputValue || 16;
80
- return (index.h(index.Host, { key: '0bed90e63595e6036b9342e15c999bb7e7971240', class: classes.classes([
80
+ return (index.h(index.Host, { key: '8beb2c15857313a9b2709a7c51e82c25c1d1ba47', class: classes.classes([
81
81
  'zonos--input zonos--elements',
82
82
  isDark && 'dark',
83
83
  (this.isError || !!this.error) && 'has-error',
@@ -86,10 +86,10 @@ const ZonosStripeInput = class {
86
86
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
87
87
  '--zonos--font-size': `${fontSize}px`,
88
88
  '--zonos--primary-color': secondaryColor,
89
- } }, index.h("div", { key: '00e5c3a220aaeee221c5cc104d2463f5468067cf', class: classes.classes([
89
+ } }, index.h("div", { key: '01ca3ae37198c97c33c7af3c9aca688c697d24ad', class: classes.classes([
90
90
  'zonos--label-wrapper',
91
91
  this.isDisabled && 'disabled',
92
- ]) }, index.h("input", Object.assign({ key: '25459f6bc07647962676edd724630cd7726bb680' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
92
+ ]) }, index.h("input", Object.assign({ key: '2f5ec49912242a06372045abb157524d8e28b2bf' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
93
93
  'zonos--floated-input',
94
94
  !!this.inputLabel && 'has-label',
95
95
  this.internalValue && 'has-content',
@@ -99,7 +99,7 @@ const ZonosStripeInput = class {
99
99
  this.inputChange.emit(input.value);
100
100
  this.el.inputValue = input.value;
101
101
  this.el.dispatchEvent(new Event('change'));
102
- }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), index.h("div", { key: '145634dac24ef37cd206847537bea2f641f3b5a0', class: "zonos--floated-label" }, index.h("label", { key: '70eabcab7a30e851086a2b79107968f9a999c67e', htmlFor: this.inputId }, this.inputLabel))), this.error && (index.h("zonos-text", { key: '55ab6d14b5e6c98c665f41a1c4c1dd70523ee91f', textColor: "red-600", type: "caption" }, this.error))));
102
+ }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), index.h("div", { key: '2af905542b374f49eec85a9e626ee44f5818664f', class: "zonos--floated-label" }, index.h("label", { key: 'c8822e3610c25ec2135a28b9ce655cada68691dc', htmlFor: this.inputId }, this.inputLabel))), this.error && (index.h("zonos-text", { key: '4915281aa2ec9e3cb58fd159e647f1ee16fb16c6', textColor: "red-600", type: "caption" }, this.error))));
103
103
  }
104
104
  get el() { return index.getElement(this); }
105
105
  static get watchers() { return {
@@ -20,9 +20,9 @@ const ZonosToggle = class {
20
20
  this.options = [];
21
21
  }
22
22
  render() {
23
- return (index.h(index.Host, { key: '1b844d11272181b9c81c2bfb03a13a1ad412cb9f', class: classes.classes(['zonos--elements zonos--toggle']), style: {
23
+ return (index.h(index.Host, { key: '12d0931ba2738021291cd7a00e7c12df502409cd', class: classes.classes(['zonos--elements zonos--toggle']), style: {
24
24
  '--zonos--font-family': zonosStore.zonosStoreFontFamily(),
25
- } }, index.h("div", { key: 'f5991e19ea02a82ae1f6e7529bb3bb77e66b7165', class: "wrapper" }, this.options.map(option => {
25
+ } }, index.h("div", { key: '6455e748d3547273d3c8cb7517ee512912d31644', class: "wrapper" }, this.options.map(option => {
26
26
  const selected = option.value === this.value;
27
27
  return (index.h("button", { class: classes.classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
28
28
  this.toggleChanged.emit(option.value);