@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 @@
1
+ import{r as o,h as e,F as t,H as s}from"./p-ab41bab5.js";import{s as n,a as i,b as c,c as r,i as a,d,e as l,f as h,g as u,h as m,j as p,k as g,l as z,m as f,t as k,n as w,o as v,p as y,q as b,r as C,u as x,v as S,w as T,x as A,y as I,z as O}from"./p-a2a0bf4e.js";import{p as _,s as N,a as E,b as P}from"./p-73c737aa.js";import{f as j,l as D,a as L,g as U,s as R,V as $,b as B,t as F,c as K,d as M}from"./p-170314a3.js";import{z as H,g as Z,m as V}from"./p-b2a0ab4a.js";import{b as G}from"./p-83666056.js";import{h as W,l as q,s as Y,b as Q,g as J,j as X,a as oo,i as eo}from"./p-41dd1cb8.js";import{u as to}from"./p-fc776473.js";import{_ as so,c as no,a as io,d as co,g as ro}from"./p-b2d81c98.js";import{l as ao,g as lo,b as ho}from"./p-0a377722.js";import{c as uo}from"./p-b4b7f705.js";import{c as mo}from"./p-595f5dd2.js";import{g as po}from"./p-1f894984.js";import{i as go}from"./p-57fa64d7.js";import{s as zo}from"./p-96d77739.js";import{R as fo}from"./p-08e7107d.js";import"./p-5762e217.js";const ko=(o=!0)=>!(!D.localizationLoaded||!D.isShippableCountry&&(o&&ao("Checkout: not shippable country"),1));let wo=0;const vo=o=>{var e;const t=null===(e=R.enabledVariantTestKeys)||void 0===e?void 0:e.find((e=>e.testKey===o));return(null==t?void 0:t.selectedVariantKey)||null},yo=async({cartId:o,retries:e})=>{const t=J(),{errors:s,json:n}=await W("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(ao("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),yo({cartId:o,retries:e-1})):i?null:n},bo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',Co=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.isRedirectAfterOrder=!1,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.isOverlayLoading=!1,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.shouldShowFedexShippingConsentDialog=!1,this.clientSecret=r.clientSecret,this.stripeCustomerSessionClientSecret=r.stripeCustomerSessionClientSecret,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||H.appearance.theme;await a({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:_()})},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${no}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return ao("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(ao("Payment intent exist, checking stripe payment intent status"),!n)return ao("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:c,status:a}=await d({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(ao(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,R.checkoutSessionId=i,r.clientSecret=n,this.setToFinishStep(a),{shouldAllowOrder:!1}):t?(ao("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(ao("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.initializeTestKeys=()=>{var o;R.enabledVariantTestKeys=(null==(o=R.enabledVariantTestKeys||[])?void 0:o.filter((o=>!(o.expiresAt&&o.expiresAt<Date.now()||!o.expiresAt))))||[];const e=H.enabledVariantTestKeys.map((o=>{var e;const t=null===(e=R.enabledVariantTestKeys)||void 0===e?void 0:e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+$,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}}));return B(e),{allSelected:!1}},this.shouldAllowHostedVsNativeTest=()=>"function"==typeof H.checkoutSettings.createCartId&&!!H.enabledVariantTestKeys.includes("hosted_vs_native"),this.registerTestHostedVsNative=async()=>{if(!this.shouldAllowHostedVsNativeTest())return;ao("[TEST] - Registering hosted vs native test");const o=vo("hosted_vs_native");if(o)return void ao(`[TEST] - Hosted vs native test already has variant selected: ${o}`);const e=await(async({testKeys:o})=>{if(0===o.length)return null;const{errors:e,json:t}=await W("/api/zonos-elements/select-variance-test",{body:{testKeys:o},method:"POST"});return e.length||!t?null:j(t)})({testKeys:["hosted_vs_native"]});if(!e)return void ao("[TEST] - Failed to get selection for hosted vs native test");const t=(({baseTestObj:o,mergeTestObj:e})=>o.map((({testKey:o})=>{const t=e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+$,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}})))({baseTestObj:R.enabledVariantTestKeys||[],mergeTestObj:e});B(t)},this.handleHostedVsNative=async()=>{var o;if(!this.shouldAllowHostedVsNativeTest())return{redirected:!1};const e=vo("hosted_vs_native");if(ao(`[TEST] - hosted_vs_native: ${e}`),"function"!=typeof H.checkoutSettings.createCartId)return ao("[TEST] - createCartId is not provided, skipping hosted vs native test"),{redirected:!1};if("hosted"!==e)return ao("[TEST] - Hosted vs native test is enabled for native, skipping"),{redirected:!1};if(!(null===(o=H.genericSettings)||void 0===o?void 0:o.hostedCheckoutUrl))return ao("[TEST] - Hosted checkout URL is not provided"),{redirected:!1};ao('"createCartId" is provided, start building cart');const t=await H.checkoutSettings.createCartId();let s,n=null;"object"==typeof t?(s=t.cartId,n=t.shippingData||null):s=t;const i=(()=>{const o=new URLSearchParams(window.location.search);ao("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:""},t=U(o)||D.selectedCountryCode||"US",s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerPhone"),d=e("customerZip"),l=e("customerState");return{customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:e("customerFirstName"),customerLastName:e("customerLastName"),customerName:r,customerPhone:a,customerState:l,customerZip:d}})(),c=(({cartId:o,checkoutSessionId:e,customerAddress1:t,customerAddress2:s,customerCity:n,customerCountry:i,customerEmail:c,customerFirstName:r,customerLastName:a,customerPhone:d,customerState:l,customerZip:h,hostedCheckoutUrl:u,isTestMode:m,isVariantTest:p})=>{const g=new URLSearchParams;return g.set("tempCartUUID",o),r&&g.set("customerFirstName",r),a&&g.set("customerLastName",a),c&&g.set("customerEmail",c),d&&g.set("customerPhone",d),h&&g.set("customerZip",h),n&&g.set("customerCity",n),l&&g.set("customerState",l),i&&g.set("zCountry",i),t&&g.set("customerAddress1",t),s&&g.set("customerAddress2",s),m&&g.set("zonosTestMode","1"),e&&g.set("zonosCheckoutSessionId",e),p&&g.set("zonosVariantTest","1"),`${u}?${g.toString()}`})(Object.assign(Object.assign({cartId:s,checkoutSessionId:R.checkoutSessionId||void 0,hostedCheckoutUrl:H.genericSettings.hostedCheckoutUrl,isTestMode:J(),isVariantTest:!0},i),n));return ao(`[TEST] - Redirecting to: ${c}`),window.open(c,"_blank"),{redirected:!0}},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=l.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.handleHostedOpenWindowCallback=o=>{var e;const t=null===(e=H.genericSettings)||void 0===e?void 0:e.hostedCheckoutUrl;if(!origin)return;const s=["dev.checkout.elements.zonos.com"].some((e=>o.origin.includes(e)));o.origin!==t&&!s||"zonos-checkout-session-update"!==o.data.type||(R.checkoutSessionId=o.data.checkoutSessionId)},this.captureParamsRedirectedForVariantTest=()=>{const o=new URL(window.location.href);if("1"!==o.searchParams.get("zonosVariantTest"))return;const e=o.searchParams.get("zonosCheckoutSessionId");e&&(R.checkoutSessionId=e);const t=R.enabledVariantTestKeys||[];window.Zonos.isLegacyCheckout&&(vo("hosted_vs_native")?B(t.map((o=>"hosted_vs_native"===o.testKey?Object.assign(Object.assign({},o),{selectedVariantKey:"hosted"}):o))):(t.push({expiresAt:Date.now()+$,selectedVariantKey:"hosted",testKey:"hosted_vs_native"}),B(t))),o.searchParams.delete("zonosCheckoutSessionId"),o.searchParams.delete("zonosVariantTest"),window.history.replaceState({},"",o.toString())}}async initCartInfoHandler(o){h({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,N("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||u(),l.step="customer-info",m(),p(),null===(t=(e=H.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof H.checkoutSettings.createCartId){ao('"createCartId" is provided, start building cart');const o=await H.checkoutSettings.createCartId();let e;"object"==typeof o?(ao("object detected, use cartId and prefill address from createCartId","info",o),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),l.customerAuthenticationToken=o.customerAuthenticationToken||null):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=so(o);if(!t&&!e)return q("[ZONOS - loadZonos] invalid cart id"),null;const s=await yo({cartId:o,retries:5});return ao("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(q("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return q("Failed to build cart, please try again."),!1;window.Zonos.cartData=s;const{adjustments:n,cartItems:i}=G(s);await h({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){ao("tempCartUUID is provided, start building cart");const{adjustments:o,cartItems:e}=G(window.Zonos.cartData);await h({adjustments:o,cartItems:e})}else if(H.checkoutSettings.buildCartDetail&&D.selectedCountryCode){ao("build cart detail");const o=await H.checkoutSettings.buildCartDetail({countryCode:D.selectedCountryCode,currencyCode:D.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0));ao("cartItems","info",{cartItems:o});const s=t.map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await h({adjustments:s,cartItems:e})}if(!R.checkoutSessionId){const o=await g();if(ao(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return l.isStagingMode||z(),await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===H.checkoutSettings.successBehavior||!!l.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=X(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;ao(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return ao(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,ao("=== Showing order duplication confirmation","warn")}recordCheckoutInfo(){R.checkoutSessionId&&to({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:R.checkoutSessionId})}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,R.checkoutSessionId&&to({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:R.checkoutSessionId})}markTheSessionAsAbandonedCart(){R.checkoutSessionId&&to({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:R.checkoutSessionId})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||H.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=H.checkoutSettings.placeOrderButtonSelector,e=H.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;if(ao(`attach checkout ${o}`),ao(`attach checkout to always trigger international checkout selector: ${e}`),!o&&!e&&!window.Zonos.cartData)return;const t=[o,e,`#${co}`,`#${no}`,`#${io}`].filter(Boolean);document.querySelectorAll(t.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(ao(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s,n;const i=performance.now(),c=e&&t.matches(e),a=t.matches(`#${io}`),d=t.matches(`#${co}`)||t.matches(`#${no}`);if(!window.Zonos.isLegacyCheckout&&(!ko()||((o=!0)=>!D.localizationLoaded||!!D.isDisabledCountry&&(o&&ao("Checkout: disabled country"),!0))())&&!c&&!a&&!d)return;o.preventDefault(),o.stopPropagation(),ao("zonos checkout button clicked");const{shouldAllowOrder:h}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(h){if(window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;ao("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await W("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),wo++,wo>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),H.enabledVariantTestKeys.includes("hosted_vs_native")){this.isOverlayLoading=!0,await this.registerTestHostedVsNative();const{redirected:o}=await this.handleHostedVsNative();if(this.isOverlayLoading=!1,o)return}r.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");null===(s=window.opener)||void 0===s||s.postMessage({checkoutSessionId:R.checkoutSessionId,type:"zonos-checkout-session-update"},"*"),f({isPreview:this.preview,sessionTimeout:54e5}),N("zonos-checkout-start"),k({checkoutSessionId:R.checkoutSessionId,eventName:"checkout_open"});const{enabled:o}=await(async()=>{const{errors:o,json:e}=await W("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(l.shouldHideDiscountInput=!o,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=lo(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:ho},Q()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};W("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:ho},Q()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};W("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}this.recordCheckoutInfo(),ro()&&this.markTheSessionAsAbandonedCart()}catch(o){if(o instanceof Error&&"Cart is expired."===o.message&&(this.isCartExpired=!0),r.isFetchingSession=!1,q(o),this.isCartExpired)return void(r.isFetchingSession=!0);Y({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:ho,cartId:window.Zonos.cartId,checkoutSessionBody:w(),href:window.location.href,storeBaseUrl:(null===(n=window.Zonos.cartData)||void 0===n?void 0:n.storeBaseUrl)||H.onlineStoreSettings.url}}),v({messages:[F("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:F("Error creating Checkout")})}}}),{capture:!0,passive:!1}),H.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${co}`)&&(t.dispatchEvent(mo("click")),i(),t.remove()),t.matches(`#${no}`)&&(t.dispatchEvent(mo("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;ao("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:n,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:h}=o,u=new URLSearchParams(window.location.search),m=n||U(u)||D.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:m,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:h})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);ao("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=U(o)||D.selectedCountryCode,s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerFirstName"),d=e("customerLastName"),l=e("customerPhone"),h=e("customerZip"),u=e("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:a,customerLastName:d,customerName:r,customerPhone:l,customerState:u,customerZip:h})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",n=o.customerCity||"",i=o.customerEmail||"",c=o.customerFirstName&&o.customerLastName?`${o.customerFirstName} ${o.customerLastName}`:o.customerName||"",r=o.customerPhone||"",a=o.customerZip||"",d=o.customerState||"";e&&c&&r&&t?t&&D.shippingZoneCountries&&!(t in D.shippingZoneCountries)?ao(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:n||"",country:t,line1:e,line2:s,postal_code:a,state:d},email:i,name:c,phone:r}],ao("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):ao("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!r&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){l.isStagingMode=!!this.overrideStagingMode}async init(){r.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,l.isStagingMode=oo(),void 0!==this.overrideStagingMode&&(l.isStagingMode=this.overrideStagingMode),(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const t=new MutationObserver((async()=>{const s=document.querySelector(o),r=n();if(!s&&r){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(r),void t.disconnect()}const a=document.querySelector('select[name="shippingAddress.countryCode"]'),d=document.querySelector("#checkout-shipping-continue");a&&d&&(t.disconnect(),d.addEventListener("click",(async o=>{var e,t;const s=a.value;if(!s)return;if(L({isInitializing:!1,newSelectedCountryCode:s}),!ko(!1))return void i();const n=document.querySelector("form");if(!n)return;const r=new FormData(n),d=document.querySelector("input#addressLine1Input"),l={address1:null!==(e=r.get("shippingAddress.address1"))&&void 0!==e?e:d&&d.value,address2:r.get("shippingAddress.address2"),city:r.get("shippingAddress.city"),countryCode:r.get("shippingAddress.countryCode"),firstName:r.get("shippingAddress.firstName"),lastName:r.get("shippingAddress.lastName"),phone:r.get("shippingAddress.phone"),postalCode:r.get("shippingAddress.postalCode"),stateOrProvince:null!==(t=r.get("shippingAddress.stateOrProvince"))&&void 0!==t?t:r.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return q("One or more shipping address field is missing",Object.entries(l)),void Y({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:H.storeId}});c({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));t.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:co,onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{r.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(ao("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):ao("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){y(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${io}`);o&&o.dispatchEvent(mo("click"))}async handleCustomerInfoContinue(){var o,e,t,s;N("zonos-checkout-customer-info"),k({checkoutSessionId:R.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0;const{isRequestNotReady:n}=await b();n&&"stripe"===l.addressFormRenderType&&Y({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:null===(e=null===(o=r.stripeAddressEventData)||void 0===o?void 0:o.value)||void 0===e?void 0:e.address,billingAddress:null===(s=null===(t=r.stripeBillingAddressEventData)||void 0===t?void 0:t.value)||void 0===s?void 0:s.address,cartId:window.Zonos.cartId}});const i=o=>{"customer-info"===l.step?r.isFetchingLandedCost||(l.landedCostData&&(P({currency:l.currency}),C()),this.submitLoading=!1,o&&clearInterval(o)):clearInterval(o)};i();const c=setInterval((()=>{i(c)}),20);setTimeout((()=>{clearInterval(c)}),1e4)}async handleShippingContinue(){C()}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"!==r.checkoutSettlementCurrency||!r.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,E.paypalErrorMessage=null,r.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null,!await x())return r.hasPaymentError=!0,r.customErrorMessage=F("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:r.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{l.inventoryCheckErrorMessage=await S()}catch(o){l.inventoryCheckErrorMessage=F("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await T(),C(),p()}catch(o){q(o),N("zonos-checkout-payment-fail"),r.hasPaymentError=!0,r.shouldInventoryRefund&&(A(),r.shouldInventoryRefund=!1)}this.submitLoading=!1}}else this.payInUsdConfirmDialogOpen=!0}async handleFinishClick(){if(I(),this.preview)return l.step="customer-info",void await this.init();if(u(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||H.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=eo(this.mobile),this.applyStripeTheme(),ao(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=eo(this.mobile),this.applyStripeTheme(),ao(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=Z(this.appearanceSettingsOverride.theme))}handleAddressChange(){I()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return ao("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);ao("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=r.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=r.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){ao("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)window.Zonos.openHelloDialog(!1),e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=eo(this.mobile),this.isIframed=window.self!==window.top,ao(`iframed: ${this.isIframed}`),window.Zonos.isLegacyCheckout&&this.captureParamsRedirectedForVariantTest(),this.handleAppearanceSettingsOverrideChange(),this.storeUnsubscribeList=[K("selectedLocale",(()=>{this.applyStripeTheme()})),O("selectedShippingOption",(()=>{var o,e,t,s;const n=l.selectedShippingOption;(null===(o=H.genericSettings)||void 0===o?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&(null===(t=null===(e=null==n?void 0:n.shippingProfile)||void 0===e?void 0:e.serviceLevel.code)||void 0===t?void 0:t.toLowerCase().startsWith("fedex."))&&"CA"===(null===(s=r.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)&&(this.shouldShowFedexShippingConsentDialog=!0)}))],this.initializeTestKeys(),window.addEventListener("message",this.handleHostedOpenWindowCallback),ao(`mobile: ${this.isMobile}`)}disconnectedCallback(){I(),u(),this.storeUnsubscribeList.forEach((o=>o())),window.removeEventListener("message",this.handleHostedOpenWindowCallback)}render(){var o,n,i,c;this.customerProfile=r.customerProfile,this.clientSecret=r.clientSecret,r.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=r.stripeCustomerSessionClientSecret);const a="finish"!==l.step&&"error"!==l.step&&!r.stripeElements||r.isFetchingSession,{colorPrimary:d,colorSecondary:h,logoUrl:u,style:m}=V(H.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===H.appearance.zonosAttribution,g=H.appearance.theme,z=d&&go(d)?"DARK":"LIGHT",f=this.isMobile?g:z,k=this.isMobile?void 0:h,{customMessages:w}=D,v=null===(o=w.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,y=this.getCurrentLocalePageEnum(),b=w.filter((o=>o.pageName===y)),C=this.getBaseCurrencySettlementInfo(),x=()=>{const o=this.preview?`${u}?timestamp=${Date.now()}`:u;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${H.organizationName} logo`,src:o}))},S=J(),T=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||oo();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},x(),S&&e("zonos-badge",{badgeColor:"orange",size:"small"},F("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},F("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),b.map((o=>e("zonos-custom-message",{icon:bo,message:o.message}))))},A=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:F("Your checkout session has expired. Please reload the page to continue."),restStateTitle:F("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},F("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":po({overrideBorderStyle:m})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":f,style:zo({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&T(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:k})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&T(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:fo}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:k}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:bo,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:bo,message:v}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},x(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:fo}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:m,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:uo(["zonos--checkout zonos--elements","payment"===l.step&&"zonos--processing-payment",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():e("zonos-dialog",{borderStyle:m,"data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},A()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:F("Don't close"),dialogConfirmBtnText:F("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:F("Would you like to close checkout and return to the site?"),dialogTitle:F("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:F("Return to merchant site"),dialogConfirmBtnText:F("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(n=this.placedOrderInfo)||void 0===n?void 0:n.zonosOrderNumber)?F("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):F("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(i=this.placedOrderInfo)||void 0===i?void 0:i.time)||null),time:this.formatTime((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null)}),dialogTitle:F("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:F("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:e(t,null,F("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),e("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},F("View GAA Form."))),dialogTitle:F("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:()=>this.shouldShowFedexShippingConsentDialog=!1}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:F("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:F("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),C&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:F("Cancel"),dialogConfirmBtnText:F("Pay [orderTotal]",{orderTotal:M({amount:C.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:F("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:F("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:F("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:F("You are being sent back to the shop to re-add items to your cart."),dialogTitle:F("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};Co.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-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-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{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-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{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-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";export{Co as zonos_checkout}
@@ -0,0 +1 @@
1
+ import{r as o,h as s,H as t,a}from"./p-ab41bab5.js";import{l as i}from"./p-170314a3.js";import{f as n}from"./p-b2a0ab4a.js";import{c as e}from"./p-b4b7f705.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const h=class{constructor(s){o(this,s),this.countryCode=i.selectedCountryCode}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const o=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,a=n();return s(t,{class:"zonos--elements",style:this.size?{"--zonos--font-family":a,height:`${this.size}px`,width:`${this.size}px`}:{"--zonos--font-family":a}},s("div",{class:e(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${o})`}})))}get el(){return a(this)}};h.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:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n instanceof e?n:new e((function(r){r(n)}))}return new(e||(e=Promise))((function(e,i){function a(n){try{c(t.next(n))}catch(n){i(n)}}function u(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,u)}c((t=t.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(r){return c([n,r])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=r.call(n,e)}catch(n){u=[6,n];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-d45285aa.system.js","./p-7c705c76.system.js","./p-561be3a2.system.js","./p-1d5aa016.system.js","./p-01174496.system.js","./p-909e2bc3.system.js","./p-d938f42f.system.js"],(function(n){"use strict";var r,e,t,o,i,a,u,c,s,l,d,f,v,p,y,w;return{setters:[function(n){r=n.z;e=n.c},function(n){t=n.t;o=n.A;i=n.c;a=n.e;u=n.v;c=n.r;s=n.j},function(n){l=n.s},function(n){d=n.t},function(n){f=n.h;v=n.l;p=n.j},function(n){y=n.t},function(n){w=n.l}],execute:function(){var h=this;
1
+ var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n instanceof e?n:new e((function(r){r(n)}))}return new(e||(e=Promise))((function(e,i){function a(n){try{c(t.next(n))}catch(n){i(n)}}function u(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,u)}c((t=t.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(r){return c([n,r])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=r.call(n,e)}catch(n){u=[6,n];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-d45285aa.system.js","./p-34bf7bbe.system.js","./p-9479f155.system.js","./p-01174496.system.js","./p-909e2bc3.system.js","./p-d938f42f.system.js"],(function(n){"use strict";var r,e,t,o,i,a,u,c,s,l,d,f,v,p,w,y;return{setters:[function(n){r=n.z;e=n.c},function(n){t=n.t;o=n.A;i=n.c;a=n.e;u=n.v;c=n.r;s=n.j},function(n){l=n.t;d=n.s},function(n){f=n.h;v=n.l;p=n.j},function(n){w=n.t},function(n){y=n.l}],execute:function(){var h=this;
2
2
  /*!
3
3
  * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -14,4 +14,4 @@ var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n ins
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */function b(n,r){var e=document.querySelector('script[src="'.concat(n,'"]'));if(e===null)return null;var t=j(n,r);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(n){if(o.dataset[n]!==t.dataset[n]){i=false}}));return i?e:null}function m(n){var r=n.url,e=n.attributes,t=n.onSuccess,o=n.onError;var i=j(r,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function _(n){var r=n.environment;var e=r==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete n.environment;if(n.sdkBaseUrl){e=n.sdkBaseUrl;delete n.sdkBaseUrl}var t=n;var o=Object.keys(t).filter((function(n){return typeof t[n]!=="undefined"&&t[n]!==null&&t[n]!==""})).reduce((function(n,r){var e=t[r].toString();r=P(r);if(r.substring(0,4)==="data"||r==="crossorigin"){n.attributes[r]=e}else{n.queryParams[r]=e}return n}),{queryParams:{},attributes:{}}),i=o.queryParams,a=o.attributes;if(i["merchant-id"]&&i["merchant-id"].indexOf(",")!==-1){a["data-merchant-id"]=i["merchant-id"];i["merchant-id"]="*"}return{url:"".concat(e,"?").concat(g(i)),attributes:a}}function P(n){var r=function(n,r){return(r?"-":"")+n.toLowerCase()};return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)}function g(n){var r="";Object.keys(n).forEach((function(e){if(r.length!==0)r+="&";r+=e+"="+n[e]}));return r}function j(n,r){if(r===void 0){r={}}var e=document.createElement("script");e.src=n;Object.keys(r).forEach((function(n){e.setAttribute(n,r[n]);if(n==="data-csp-nonce"){e.setAttribute("nonce",r["data-csp-nonce"])}}));return e}function k(n,r){if(r===void 0){r=Promise}S(n,r);if(typeof document==="undefined")return r.resolve(null);var e=_(n),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=I(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(b(t,o)&&a){return r.resolve(a)}return E({url:t,attributes:o},r).then((function(){var n=I(i);if(n){return n}throw new Error("The window.".concat(i," global variable is not available."))}))}function E(n,r){if(r===void 0){r=Promise}S(n,r);var e=n.url,t=n.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new r((function(n,r){if(typeof document==="undefined")return n();m({url:e,attributes:t,onSuccess:function(){return n()},onError:function(){var n=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return r(n)}})}))}function I(n){return window[n]}function S(n,r){if(typeof n!=="object"||n===null){throw new Error("Expected an options object.")}var e=n.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof r!=="undefined"&&typeof r!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var A=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,f("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var x=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.intent;return __generator(this,(function(n){switch(n.label){case 0:return[4,f("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var O=n("i",(function(n){var r=n.backgroundColor1,e=n.backgroundColor2;var t=y.readability(r,e);return t>2.5}));var L=n("s",(function(n){var e=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){w("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}));var T=e((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),B=T.onChange,C=T.reset,D=T.state;n({e:B,c:C,a:D});var z=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t,o,i,a,u;var c=n.checkoutSessionId;return __generator(this,(function(n){switch(n.label){case 0:t=D.intent.toUpperCase();return[4,x({checkoutSessionId:c,intent:t})];case 1:o=n.sent(),i=o.errors,a=o.json;u=(r=a===null||a===void 0?void 0:a.paypalOrderCreate)===null||r===void 0?void 0:r.paypalOrderId;if(i.length||!u){throw new Error(((e=i.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var F=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t,o,i,a;var u=n.checkoutSessionId,c=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,A({checkoutSessionId:u,paypalMockResponse:c})];case 1:t=n.sent(),o=t.errors,i=t.json;a=(r=i===null||i===void 0?void 0:i.paypalOrderCapture.order)===null||r===void 0?void 0:r.id;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||d("An unexpected error occurred when processing PayPal order."))}return[2,a]}}))}))};var M=function(n){var r=n.error;var e;var t=p(r.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var i=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!i){D.paypalErrorMessage=d("An unexpected error occurred when processing PayPal order.")}var a=i[2]||d("An unexpected error occurred when processing PayPal order.");D.paypalErrorMessage=a};var N=function(n){var e=n.checkoutSessionId,l=n.onPaypalFail,f=n.onPaypalSessionDone,p=n.overrideBorderRaidus,y=n.overridePrimaryColor;var w=y||r.appearance.colorPrimary;var b="#ffc33a";var m=O({backgroundColor1:b,backgroundColor2:w||""});return{createOrder:function(){return __awaiter(h,void 0,void 0,(function(){var n,r,c,s,f;return __generator(this,(function(p){switch(p.label){case 0:void t({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});return[4,o()];case 1:n=p.sent();if(!n.valid){D.paypalErrorMessage=n.errorMessage;i.hasPaymentError=false;i.customErrorMessage=null;l===null||l===void 0?void 0:l();return[2,""]}p.label=2;case 2:p.trys.push([2,8,,9]);D.paypalErrorMessage=null;a.inventoryCheckErrorMessage=null;p.label=3;case 3:p.trys.push([3,5,,6]);r=a;return[4,u()];case 4:r.inventoryCheckErrorMessage=p.sent();return[3,6];case 5:c=p.sent();a.inventoryCheckErrorMessage=d("Unable to check inventory. Please try again.");return[3,6];case 6:if(a.inventoryCheckErrorMessage){return[2,""]}return[4,z({checkoutSessionId:e})];case 7:s=p.sent();return[2,s];case 8:f=p.sent();v("Failed to create paypal order",f);D.paypalErrorMessage=d("Failed to create PayPal order. Please try again, or consider using an alternative method.");i.hasPaymentError=false;i.customErrorMessage=null;l===null||l===void 0?void 0:l();return[2,""];case 9:return[2]}}))}))},onApprove:function(n,r){return __awaiter(h,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);D.paypalErrorMessage=null;L("zonos-checkout-payment-info");return[4,F({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:n=t.sent();D.orderIdCreated=n;f===null||f===void 0?void 0:f({orderId:n});c();s();return[3,3];case 2:r=t.sent();v("==== Failed to capture paypal order",r);if(r instanceof Error){return[2,M({error:r})]}l===null||l===void 0?void 0:l();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:p==="SHARP"?0:10,color:m?"gold":"blue",shape:"rect"}}};var R=function(){if(!D.paypalButtons.length){return}D.paypalButtons.forEach((function(n){return __awaiter(h,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,n.close()];case 1:r.sent();return[2]}}))}))}));D.paypalButtons=[]};var Y=n("b",(function(n){return __awaiter(h,[n],void 0,(function(n){var e,t,o,i,a,u;var c=n.currency;return __generator(this,(function(n){switch(n.label){case 0:t=!!((e=r.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(n){return n.type==="PAYPAL"&&n.status==="ENABLED"})));if(!t){w("=== Paypal is disabled for this store","warn");return[2]}o=r.checkoutSettings.externalServiceTokens.find((function(n){return n.type==="PAYPAL_CLIENT_ID"}));if(!o){w("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=(!r.zonosMode||r.zonosMode==="production")&&r.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=r.checkoutSettings.captureDelay&&r.checkoutSettings.captureDelay>0;D.intent=a?"authorize":"capture";w("==== Paypal order intent","info",D.intent);u=window.Zonos;return[4,k({clientId:o.token,currency:c,environment:i,intent:D.intent})];case 1:u.paypal=n.sent();D.paypal=window.Zonos.paypal;w("==== Paypal script loaded");return[2]}}))}))}));var G=n("d",(function(n){var r;var e=window.Zonos.paypal;if(!e){w("Paypal is not available");return null}var t=l.checkoutSessionId;if(!t){w("Paypal is not available due to checkoutSessionId is not available");return null}w("==== Loading Paypal buttons");R();var o=[(r=e.FUNDING)===null||r===void 0?void 0:r.PAYPAL].filter(Boolean);D.paypalButtons=o.map((function(r){var o;var i=null;try{i=((o=e.Buttons)===null||o===void 0?void 0:o.call(e,Object.assign(Object.assign({},N(Object.assign({checkoutSessionId:t,fundingSource:r},n))),{fundingSource:r})))||null}catch(n){w("===== Failed to load paypal's \"".concat(r,'" button'),"warn",n)}if(i===null||i===void 0?void 0:i.isEligible()){w("==== Paypal button ".concat(r," loaded"));return i}return null})).filter(Boolean);return D.paypalButtons}));var Z=n("p",(function(){var n,e;var t=((e=(n=r.checkoutSettings.externalPaymentMethods)===null||n===void 0?void 0:n.find((function(n){return n.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!D.paypalButtons.length}))}}}));
17
+ */function b(n,r){var e=document.querySelector('script[src="'.concat(n,'"]'));if(e===null)return null;var t=k(n,r);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(n){if(o.dataset[n]!==t.dataset[n]){i=false}}));return i?e:null}function _(n){var r=n.url,e=n.attributes,t=n.onSuccess,o=n.onError;var i=k(r,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function m(n){var r=n.environment;var e=r==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete n.environment;if(n.sdkBaseUrl){e=n.sdkBaseUrl;delete n.sdkBaseUrl}var t=n;var o=Object.keys(t).filter((function(n){return typeof t[n]!=="undefined"&&t[n]!==null&&t[n]!==""})).reduce((function(n,r){var e=t[r].toString();r=P(r);if(r.substring(0,4)==="data"||r==="crossorigin"){n.attributes[r]=e}else{n.queryParams[r]=e}return n}),{queryParams:{},attributes:{}}),i=o.queryParams,a=o.attributes;if(i["merchant-id"]&&i["merchant-id"].indexOf(",")!==-1){a["data-merchant-id"]=i["merchant-id"];i["merchant-id"]="*"}return{url:"".concat(e,"?").concat(g(i)),attributes:a}}function P(n){var r=function(n,r){return(r?"-":"")+n.toLowerCase()};return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)}function g(n){var r="";Object.keys(n).forEach((function(e){if(r.length!==0)r+="&";r+=e+"="+n[e]}));return r}function k(n,r){if(r===void 0){r={}}var e=document.createElement("script");e.src=n;Object.keys(r).forEach((function(n){e.setAttribute(n,r[n]);if(n==="data-csp-nonce"){e.setAttribute("nonce",r["data-csp-nonce"])}}));return e}function j(n,r){if(r===void 0){r=Promise}S(n,r);if(typeof document==="undefined")return r.resolve(null);var e=m(n),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=I(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(b(t,o)&&a){return r.resolve(a)}return E({url:t,attributes:o},r).then((function(){var n=I(i);if(n){return n}throw new Error("The window.".concat(i," global variable is not available."))}))}function E(n,r){if(r===void 0){r=Promise}S(n,r);var e=n.url,t=n.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new r((function(n,r){if(typeof document==="undefined")return n();_({url:e,attributes:t,onSuccess:function(){return n()},onError:function(){var n=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return r(n)}})}))}function I(n){return window[n]}function S(n,r){if(typeof n!=="object"||n===null){throw new Error("Expected an options object.")}var e=n.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof r!=="undefined"&&typeof r!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var A=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,f("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var x=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.intent;return __generator(this,(function(n){switch(n.label){case 0:return[4,f("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var O=n("i",(function(n){var r=n.backgroundColor1,e=n.backgroundColor2;var t=w.readability(r,e);return t>2.5}));var L=n("s",(function(n){var e=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!e||(e===null||e===void 0?void 0:e.status)==="DISABLED"){return}if(typeof window.gtag==="function"){y("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}));var T=e((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),B=T.onChange,C=T.reset,D=T.state;n({e:B,c:C,a:D});var z=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t,o,i,a,u;var c=n.checkoutSessionId;return __generator(this,(function(n){switch(n.label){case 0:t=D.intent.toUpperCase();return[4,x({checkoutSessionId:c,intent:t})];case 1:o=n.sent(),i=o.errors,a=o.json;u=(r=a===null||a===void 0?void 0:a.paypalOrderCreate)===null||r===void 0?void 0:r.paypalOrderId;if(i.length||!u){throw new Error(((e=i.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var F=function(n){return __awaiter(h,[n],void 0,(function(n){var r,e,t,o,i,a;var u=n.checkoutSessionId,c=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,A({checkoutSessionId:u,paypalMockResponse:c})];case 1:t=n.sent(),o=t.errors,i=t.json;a=(r=i===null||i===void 0?void 0:i.paypalOrderCapture.order)===null||r===void 0?void 0:r.id;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||l("An unexpected error occurred when processing PayPal order."))}return[2,a]}}))}))};var M=function(n){var r=n.error;var e;var t=p(r.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var i=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!i){D.paypalErrorMessage=l("An unexpected error occurred when processing PayPal order.")}var a=i[2]||l("An unexpected error occurred when processing PayPal order.");D.paypalErrorMessage=a};var N=function(n){var e=n.checkoutSessionId,d=n.onPaypalFail,f=n.onPaypalSessionDone,p=n.overrideBorderRaidus,w=n.overridePrimaryColor;var y=w||r.appearance.colorPrimary;var b="#ffc33a";var _=O({backgroundColor1:b,backgroundColor2:y||""});return{createOrder:function(){return __awaiter(h,void 0,void 0,(function(){var n,r,c,s,f;return __generator(this,(function(p){switch(p.label){case 0:void t({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});return[4,o()];case 1:n=p.sent();if(!n.valid){D.paypalErrorMessage=n.errorMessage;i.hasPaymentError=false;i.customErrorMessage=null;d===null||d===void 0?void 0:d();return[2,""]}p.label=2;case 2:p.trys.push([2,8,,9]);D.paypalErrorMessage=null;a.inventoryCheckErrorMessage=null;p.label=3;case 3:p.trys.push([3,5,,6]);r=a;return[4,u()];case 4:r.inventoryCheckErrorMessage=p.sent();return[3,6];case 5:c=p.sent();a.inventoryCheckErrorMessage=l("Unable to check inventory. Please try again.");return[3,6];case 6:if(a.inventoryCheckErrorMessage){return[2,""]}return[4,z({checkoutSessionId:e})];case 7:s=p.sent();return[2,s];case 8:f=p.sent();v("Failed to create paypal order",f);D.paypalErrorMessage=l("Failed to create PayPal order. Please try again, or consider using an alternative method.");i.hasPaymentError=false;i.customErrorMessage=null;d===null||d===void 0?void 0:d();return[2,""];case 9:return[2]}}))}))},onApprove:function(n,r){return __awaiter(h,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);D.paypalErrorMessage=null;L("zonos-checkout-payment-info");return[4,F({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:n=t.sent();D.orderIdCreated=n;f===null||f===void 0?void 0:f({orderId:n});c();s();return[3,3];case 2:r=t.sent();v("==== Failed to capture paypal order",r);if(r instanceof Error){return[2,M({error:r})]}d===null||d===void 0?void 0:d();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:p==="SHARP"?0:10,color:_?"gold":"blue",shape:"rect"}}};var R=function(){if(!D.paypalButtons.length){return}D.paypalButtons.forEach((function(n){return __awaiter(h,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,n.close()];case 1:r.sent();return[2]}}))}))}));D.paypalButtons=[]};var Y=n("b",(function(n){return __awaiter(h,[n],void 0,(function(n){var e,t,o,i,a,u;var c=n.currency;return __generator(this,(function(n){switch(n.label){case 0:t=!!((e=r.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(n){return n.type==="PAYPAL"&&n.status==="ENABLED"})));if(!t){y("=== Paypal is disabled for this store","warn");return[2]}o=r.checkoutSettings.externalServiceTokens.find((function(n){return n.type==="PAYPAL_CLIENT_ID"}));if(!o){y("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=(!r.zonosMode||r.zonosMode==="production")&&r.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=r.checkoutSettings.captureDelay&&r.checkoutSettings.captureDelay>0;D.intent=a?"authorize":"capture";y("==== Paypal order intent","info",D.intent);u=window.Zonos;return[4,j({clientId:o.token,currency:c,environment:i,intent:D.intent})];case 1:u.paypal=n.sent();D.paypal=window.Zonos.paypal;y("==== Paypal script loaded");return[2]}}))}))}));var G=n("d",(function(n){var r;var e=window.Zonos.paypal;if(!e){y("Paypal is not available");return null}var t=d.checkoutSessionId;if(!t){y("Paypal is not available due to checkoutSessionId is not available");return null}y("==== Loading Paypal buttons");R();var o=[(r=e.FUNDING)===null||r===void 0?void 0:r.PAYPAL].filter(Boolean);D.paypalButtons=o.map((function(r){var o;var i=null;try{i=((o=e.Buttons)===null||o===void 0?void 0:o.call(e,Object.assign(Object.assign({},N(Object.assign({checkoutSessionId:t,fundingSource:r},n))),{fundingSource:r})))||null}catch(n){y("===== Failed to load paypal's \"".concat(r,'" button'),"warn",n)}if(i===null||i===void 0?void 0:i.isEligible()){y("==== Paypal button ".concat(r," loaded"));return i}return null})).filter(Boolean);return D.paypalButtons}));var Z=n("p",(function(){var n,e;var t=((e=(n=r.checkoutSettings.externalPaymentMethods)===null||n===void 0?void 0:n.find((function(n){return n.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!D.paypalButtons.length}))}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-989d3af9.system.js","./p-34bf7bbe.system.js","./p-9479f155.system.js","./p-976afc17.system.js","./p-23e7c655.system.js","./p-8af188f8.system.js","./p-4ffbb0d6.system.js","./p-d45285aa.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-909e2bc3.system.js","./p-23d497e3.system.js"],(function(o){"use strict";var t,s,e,n,i,a,l,c,r;return{setters:[function(o){t=o.r;s=o.h;e=o.H},function(o){n=o.e},function(o){i=o.t},function(o){a=o.r},function(o){l=o.c},function(o){c=o.c},function(o){r=o.r},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var f=h;var d=o("zonos_invoice_cart_items",function(){function o(o){t(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=n.items.filter((function(o){return!o.isRestricted}));return s(e,{key:"33a10486833e881dd8405984cfc59611b064bef5",class:l(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},s("table",{key:"c6c3a6017050cc385bc5944e83ca8db1f2564884",class:"zonos--cart-table"},s("tbody",{key:"6a232dbdf2e6e6c58b65d6360c9190d720c7dc1f"},t.map((function(t){var e,n,l,c;var r=(n=(e=t.attributes)===null||e===void 0?void 0:e.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||n===void 0?void 0:n.value;var h=(c=(l=t.attributes)===null||l===void 0?void 0:l.find((function(o){return o.key==="invoiceCreatedAt"})))===null||c===void 0?void 0:c.value;var f=h&&o.locale?new Date(h).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var d=r?"https://dashboard.zonos.com/billing/invoices/".concat(r):null;return s("tr",{class:"zonos--invoice-cart-item"},s("td",{class:"zonos--column zonos--cart-item-title"},s("zonos-text",{type:"semiBoldLabel"},i("Invoice:"))),s("td",{class:"zonos--column zonos--cart-item-link"},d&&r&&s("zonos-link",{href:d},r),o.isMobile&&s("zonos-text",{type:"caption"},f)),s("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&s("zonos-text",{type:"label"},f)),s("td",{class:"zonos--column zonos--cart-item-price"},s("zonos-text",{type:"label"},a({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());d.style=f;var b=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var m=b;var u=o("zonos_invoice_subtotal",function(){function o(o){t(this,o);this.isMobile=false}o.prototype.render=function(){return s(e,{key:"99eaf74026ee26cc11ab78adf57f1b7eb55309d3",class:l(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},s("table",{key:"a3f9a029a979fd4afeaee02c55a49c4e6547e483",class:"zonos--invoice-table"},s("tr",{key:"bf8594623c4eb7492899647fbe3bc4fa0a8b1973",class:"zonos--row zonos--invoice-total"},s("td",{key:"b967b527461161244479ff8ac5ae40bdbd7f2b38",class:"zonos--column"}),s("td",{key:"4af6f40176c19c0aad1109a8be722a2b41fc66e9",class:"zonos--column zonos--invoice-subtotal-title"},s("zonos-text",{key:"0b01c51ddabd61c0abaf8214e05db2fe6a650941",type:"semiBoldLabel"},i("Payment total"))),s("td",{key:"00109c0948f0110c478643461a0a70a7cc2441ba",class:"zonos--column zonos--invoice-subtotal-price"},r({content:s("zonos-text",{type:"semiBoldLabel"},a({amount:c.amountTotalDue||0,isForeign:true})),isLoading:c.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());u.style=m}}}));
@@ -1 +1 @@
1
- import{r as o,h as e,H as s}from"./p-ab41bab5.js";import{f as n}from"./p-b2a0ab4a.js";import{c as r}from"./p-b4b7f705.js";import"./p-0a377722.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1}render(){return e(s,{key:"5213d69a38c0e00d02d4c85d499ee5b5ca5a929c",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"178886813185320c971444c181a4fe0e8b57d7e3",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"6e75ee5fbbbe62b2d2c875a4866f33060dd9618b",textColor:`${this.badgeColor}-800`},e("slot",{key:"b6c1dcd8b29f1c99dc2cbd37d944ad8af3267713"})),this.dismissHandler&&e("zonos-icon",{key:"232d8056ee38962614267def07647c3f52246f0d","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};t.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:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
1
+ import{r as o,h as e,H as s}from"./p-ab41bab5.js";import{f as n}from"./p-b2a0ab4a.js";import{c as r}from"./p-b4b7f705.js";import"./p-0a377722.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1}render(){return e(s,{key:"2c6d37db80b369e4d287e2d7a6cb4db9b69fe6f6",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"f5f2f2530c11d8c46349024f044a7b042a12a10f",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"e031a216dc586d138b0d3c03781b8b362bcc25d2",textColor:`${this.badgeColor}-800`},e("slot",{key:"9757275ea8350ae8578e255bb99940697021258e"})),this.dismissHandler&&e("zonos-icon",{key:"42a08f166b237af5c7c508c257dda46ee5c3d58a","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};t.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:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
@@ -0,0 +1 @@
1
+ const w=w=>w||window.innerWidth<1024&&window.innerWidth>=768,o=w=>w||window.innerWidth<768;export{w as a,o as i}
@@ -0,0 +1 @@
1
+ import{r as o,c as e,h as t,F as s,H as n,a as l}from"./p-ab41bab5.js";import{c as a,d as i,t as c,H as r,y as d,I as h,e as p,r as m,z as f}from"./p-a2a0bf4e.js";import{s as b,c as u,a as z,b as y}from"./p-73c737aa.js";import{t as g,s as x,l as v,p as w}from"./p-170314a3.js";import{z as k}from"./p-b2a0ab4a.js";import{h as C,s as L,g as I,i as S,a as H}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as _}from"./p-1f894984.js";import{l as M,b as Z}from"./p-0a377722.js";import{i as P,a as W,e as D}from"./p-dc94d7eb.js";import{c as B}from"./p-b4b7f705.js";import{l as F}from"./p-97aceb11.js";import{r as U}from"./p-81e3eb5b.js";import{p as V}from"./p-dc5fb21c.js";import{r as T}from"./p-27f6930b.js";import"./p-57fa64d7.js";const $=class{constructor(t){o(this,t),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=g("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const t=x.checkoutSessionId,s=new URLSearchParams;s.set("checkoutSessionId",t||"");const{baseUrl:n,errors:l,json:a}=await C(`/api/zonos-elements/get-order?${s.toString()}`);return l.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=k.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,t;0===o&&M("=== Start to poll for order info","info");const{baseUrl:s,order:n}=await this.pullOrder(),l=!!(null===(t=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),a=x.checkoutSessionId,i=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;M(`=== Polling order (${o} attemps)`,"info"),n?(M("=== CollectOrder info found","info"),o>10&&L({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Collect order found after ${o} attempts`],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",orderId:n.id,storeId:k.storeId}}),this.order=n):n&&l||!(o<i)?L({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Collect order not found after ${i} attempts`],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",storeId:k.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:t,status:s}=await i({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===s||e;this.notificationType=n?"error":"success",this.notificationMessages=t||[],this.notificationTitle=g(n?"Payment failed":"You're all set!"),M("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:t,status:s});const l=new URL(window.location.href);if(l.searchParams.delete("payment_intent_client_secret"),l.searchParams.delete("payment_intent"),l.searchParams.delete("redirect_status"),l.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",l.toString()),e&&(null==t?void 0:t.length))b("zonos-checkout-payment-fail"),L({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${s} - checkout session: ${x.checkoutSessionId}`],metadata:{allLogs:Z,credentialToken:window.Zonos.zonosApiKey}});else{b("zonos-checkout-success"),c({checkoutSessionId:x.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,r(),d(),x.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=g("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),r(),d(),u(),x.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(z.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=g("Payment failed"),this.notificationMessages=[z.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,z.orderIdCreated&&(b("zonos-checkout-success"),c({checkoutSessionId:x.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=g("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),r(),d(),u(),x.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),I()&&e.searchParams.set("zonosTestMode","1");const t=new URLSearchParams(window.location.search).get("zonosQaUrl");return t&&e.searchParams.set("zonosQaUrl",t),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():z.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return t(n,{key:"e145b7396302157ccb515c54f99e50faa8ba45e6",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":_({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"b9df4788f27c935ba7fc47e7c930cd162c8fbebe",class:"zonos--finish-details"},t("div",{key:"a510c995880c8698dc98390d0504b70333551c86",class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),t("zonos-text",{key:"8f84f87bf2365b85acffefe16e8b10cd9227a6e6",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"0e3f3f71cae6262d6394ad2c5a6d656509b484d5",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"c769f2ada1e6b421e373aeb4393560a21d6fcffc",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(s,null,o,t("br",null))))),this.order&&o&&t("div",{key:"9972858fadd4d2d9c4f00e54921002ea04a5cc51",class:"zonos--button-container"},t("zonos-button",{key:"fe931a552fc1c43b29a1966736379c3c1d0536f6",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},g("View receipt"))))))}static get assetsDirs(){return["assets"]}};$.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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const R=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=W(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=W(this.tablet)}render(){var o;const e=null===(o=F.find((o=>o.code===v.selectedLocale)))||void 0===o?void 0:o.label,s="gray-1000";return t(n,{key:"9509e7325ad0153d2f5c9ba3b5689fdb3ad6313e",class:B(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"250716798bf30901678b16e1ac159810f1d7a6ad",class:"zonos--collect-footer"},t("div",{key:"ab61803d4b5348b8978e7dfcb16a5733cca5dd29",class:"zonos--collect-locale-wrapper"},t("zonos-button",{key:"6c5dcd25d5ef73b2098269d840e291343d30cb81",buttonColor:s,class:"zonos--collect-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:s}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},e),t("div",{key:"d1a367cd19b36f1a0f49ccfe78e750218b50a03e",class:B(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{key:"02f446b8f4e3dc875f78d5ac2f0b9aa6dd071f1c",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"b713a78cbd3d3f131c6c473bb1d979899d40b13b",class:"zonos--collect-footer-icon-wrapper"},t("div",{key:"97eab5909d556f13fa2acc0628d583d49f13d3a2",class:"zonos--collect-footer-logo"},t("zonos-text",{key:"a6488e084f153305eed8d6f65341d7ab00297adb",textColor:s},"Powered by"),t("a",{key:"c63a6e1064dbd733add1cc3b1df1456484e2f103",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"081cae2c34e58478a8c20f0f9a9f20dc0b47c9b7",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),t("div",{key:"0862a11838e62f425d38066230b01f445999d751",class:"dot"}),t("a",{key:"b13f3af014b5d970e45f88cbb0ef669a0f9aa2ac",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"a675218a36da83427c2ce517a15b1ed5ea5910d6",textColor:s},"Privacy policy")))))}get el(){return l(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};R.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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";const O=class{constructor(t){o(this,t),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=S(this.mobile)}componentWillLoad(){this.handleWindowResize()}renderShippingAddress(){if(D.isFetchingShippingInfo)return t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},t("zonos-skeleton",{skeletonWidth:"99px"})),t("div",{class:"zonos--collect-order-shipping-info"},t("zonos-skeleton",{skeletonWidth:"152px"}),t("zonos-h-stack",{spacing:8},t("zonos-skeleton",{skeletonWidth:"75px"}),t("zonos-skeleton",{skeletonWidth:"75px"})),t("zonos-skeleton",{skeletonWidth:"50px"})));const o=D.shippingAddress;return o?t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},g("Shipping address")),t("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((o=>t("zonos-text",null,o))))):null}render(){return t(n,{class:B(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},t("zonos-text",{type:"semiBoldLabel"},g("Order details")),(()=>t("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<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>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<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="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--collect-order-details-content"},t("zonos-collect-cart-items",null),t("div",{class:"zonos--collect-order-info"},t("div",{class:"zonos--collect-order-details-row"},null!==D.amountTotalPaid&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},g("Total paid")),t("zonos-text",null,U({amount:D.amountTotalPaid||0,isForeign:!0}))),D.originCompanyName&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},g("Ordered from")),t("zonos-text",null,D.originCompanyName||""))),this.renderShippingAddress()))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};O.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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(t){o(this,t),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,t;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(t=a.stripeElements)||void 0===t||t.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,b("zonos-checkout-payment-info"),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:g("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await V();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{y({currency:p.currency})}))],y({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=I(),l=p.isStagingMode||H(),i="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},g("Payment method")),(()=>{if(l){const o=k.appearance.theme;return t(s,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:g("No payment method needed for staging"),theme:o}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},g("Place test order"))))}return a.isFetchingSession||D.isFetchingShippingInfo?null:t(s,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},g("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||g("We couldn't complete your payment. Please verify the payment details and try again.")),z.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},z.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!i&&t(s,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):M("Checkout session is not found")},size:"lg",variant:this.submitBtnType},g("Pay [orderTotal]",{orderTotal:U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},g("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:i?"block":"none"}})),e&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},g("Test cards")),t("zonos-text",{textColor:"gray-700"},g("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},g("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},g("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return l(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-5px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";const E=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=W(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return t(n,{key:"6432c5dd5afd628e33ba26385ecfecb470f1757e",class:B(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"e4d113ff1268c36119e1f80164b6cfd702c67f75",class:"zonos--title"},t("zonos-text",{key:"aad9ad9b526ac65d97a88df516e8e7b34fc3d2b1",textColor:o,type:"semiBoldLabel"},g("Pay [organizationName]",{organizationName:k.organizationName}))),t("div",{key:"fcdaebc734a270742fbe21ff932550994e522ea6",class:"zonos--total-pay"},T({content:t("zonos-text",{type:"secondaryPageHeader"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};E.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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';const Y=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.subtotals={},this.initSubtotalData=()=>{var o;const e=null===(o=p.checkoutSession)||void 0===o?void 0:o.subtotals;if(!e)return;const t=g("Duties"),s=g("Taxes"),n=g("Fees"),l={[t]:0,[n]:0,[s]:0},a=e.duties,i=e.taxes,c=e.fees;void 0!==a&&(l[t]||(l[t]=0),l[t]+=a),void 0!==i&&(l[s]||(l[s]=0),l[s]+=i),void 0!==c&&(l[n]||(l[n]=0),l[n]+=c),this.subtotals=l}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[f("checkoutSession",this.initSubtotalData),w("translatedChunks",this.initSubtotalData)]}render(){return this.initSubtotalData(),t(n,{key:"ab687a6e1ec67f6609081036a75e9905ff34c6b1",class:"zonos--collect-subtotal zonos--elements"},t("table",{key:"303b8c49983e9f7aea4d31400fed53d858eb078d",class:"zonos--collect-table"},!!this.subtotals[g("Duties")]&&t("tr",{key:"a60fa4f1f1afacef0144b86c054f44572576f7af",class:"zonos--row zonos--collect-duty"},t("td",{key:"aeaf798e26bbd482196d7208eb05657a1d15dad8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"835d817709ae3b7e2d888d618e0856fb2e637e4d",type:"semiBoldLabel"},g("Duties"))),t("td",{key:"5bb47a115ea61fa897a3f48bbd10c5f78af3703e",class:"zonos--column"}),t("td",{key:"32632c4beb855ca687c615f5e6c63c82e2e05c80",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[g("Duties")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Taxes")]&&t("tr",{key:"055bb237dafaea8de18b127641c8fd7e1ece563b",class:"zonos--row zonos--collect-tax"},t("td",{key:"1e73b140c2c9090ccfb91ce4efca483e8fb56e9e",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"a3375ecd77460c78c7c5f59bf7b9b8612cd53e41",type:"semiBoldLabel"},g("Taxes"))),t("td",{key:"20685646be29873967c2f335c775046068248ad3",class:"zonos--column"}),t("td",{key:"2e2c6af2c1a7840df03351178ddf3107fcc36494",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[g("Taxes")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Fees")]&&t("tr",{key:"8157aba5c6a23680b0bc681adc127747f01a2973",class:"zonos--row zonos--collect-fee"},t("td",{key:"8266654f9e65003f297222bb935013a8b9b3b430",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"8399000a5f61e4737764b68b89799b409dce6034",type:"semiBoldLabel"},g("Fees"))),t("td",{key:"2a9763f2401967ea1bdfa2c17514d18e2a4e0db6",class:"zonos--column"}),t("td",{key:"ac2f275312c2ba69888e6e57dde8b4b451839b86",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[g("Fees")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"a293d1b9342251f7326c1ac68e2bab83eae2ed80",class:"zonos--row zonos--collect-spacing"},t("td",{key:"c136b1b807f32dc21c131326d70500d2e2c64efe",class:"zonos--column",colSpan:3})),t("tr",{key:"59747101f1a9ef7c8fad60e90ea5b8c31015438c",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},t("td",{key:"96d201ba6f3e571adac265127229c94cdc96be2a",class:"zonos--column"}),t("td",{key:"f2f4cb751e35fc0ebaa803659f26a2314d8bf639",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"b4f89ea1e523af8a5aead4ef007a6f0dc7e7f441",type:"label"},g("Subtotal"))),t("td",{key:"28b6aea6363b2bef1d072ad77f409ae77976305c",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"f0072cdd200e8483421265af39a90fb655fb2ef0",class:"zonos--row zonos--collect-total"},t("td",{key:"88a007048d33c919a6c5f87cf7cd071f83e7448b",class:"zonos--column"}),t("td",{key:"24bba9e9b81ff443dd5ca4832c3169e3605a93b8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"594d4e96bec3a2153f6622c6842970ebee5bb463",type:"semiBoldLabel"},g("Customs fees total"))),t("td",{key:"b3ffd6dcae747dd2ed68ae16fb60d9655f7669dc",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"semiBoldLabel"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};Y.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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";export{$ as zonos_collect_finish,R as zonos_collect_footer,O as zonos_collect_order_details,N as zonos_collect_payment,E as zonos_collect_review,Y as zonos_collect_subtotal}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,i){function r(o){try{c(t.next(o))}catch(o){i(o)}}function a(o){try{c(t["throw"](o))}catch(o){i(o)}}function c(o){o.done?n(o.value):s(o.value).then(r,a)}c((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(e){return c([o,e])}}function c(a){if(t)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(n=0)),n)try{if(t=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=e.call(o,n)}catch(o){a=[6,o];s=0}finally{t=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,n){if(n||arguments.length===2)for(var t=0,s=e.length,i;t<s;t++){if(i||!(t in e)){if(!i)i=Array.prototype.slice.call(e,0,t);i[t]=e[t]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-989d3af9.system.js","./p-34bf7bbe.system.js","./p-18d20206.system.js","./p-9479f155.system.js","./p-d45285aa.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-23d497e3.system.js","./p-d938f42f.system.js","./p-6f23a26a.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-8af188f8.system.js","./p-976afc17.system.js","./p-82febf70.system.js","./p-4ffbb0d6.system.js","./p-909e2bc3.system.js"],(function(o){"use strict";var e,n,t,s,i,r,a,c,l,d,u,h,f,p,m,v,b,g,y,z,x,w,k,C,_,S,j,I,L,M,H,Z,P,V,U,D,O,B,T,F;return{setters:[function(o){e=o.r;n=o.c;t=o.h;s=o.F;i=o.H;r=o.a},function(o){a=o.c;c=o.d;l=o.t;d=o.H;u=o.y;h=o.I;f=o.e;p=o.r;m=o.z},function(o){v=o.s;b=o.c;g=o.a;y=o.b},function(o){z=o.t;x=o.s;w=o.l},function(o){k=o.z},function(o){C=o.h;_=o.s;S=o.g;j=o.i;I=o.a},function(o){L=o.c},function(o){M=o.g},function(o){H=o.l;Z=o.b},function(o){P=o.i;V=o.a},function(o){U=o.c},function(o){D=o.l},function(o){O=o.c},function(o){B=o.r},function(o){T=o.p},function(o){F=o.r},function(){}],execute:function(){var R='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var N='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var A=":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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var E=A;var W=30;var Y=o("zonos_invoice_finish",function(){function o(o){var t=this;e(this,o);this.closeClick=n(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=z("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,r,a;return __generator(this,(function(c){switch(c.label){case 0:n=x.checkoutSessionId;t=new URLSearchParams;t.set("checkoutSessionId",n||"");return[4,C("/api/zonos-elements/get-order?".concat(t.toString()))];case 1:s=c.sent(),i=s.baseUrl,r=s.errors,a=s.json;if(r.length||!(a===null||a===void 0?void 0:a.id)){return[2,{baseUrl:i,order:null}]}return[4,(e=(o=k.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:i,zonosOrder:a})];case 2:c.sent();return[2,{baseUrl:i,order:a}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var e,n,t,s,i,r,a,c;if(o===void 0){o=0}return __generator(this,(function(l){switch(l.label){case 0:if(o===0){H("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:t=l.sent(),s=t.baseUrl,i=t.order;r=!!((n=(e=i===null||i===void 0?void 0:i.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value);a=x.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||W;H("=== Polling order (".concat(o," attemps)"),"info");if(!i)return[3,2];H("=== InvoiceOrder info found","info");if(o>10){void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(o," attempts")],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",orderId:i.id,storeId:k.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!r)&&o<c))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:l.sent();return[4,this.getPullOrder(o+1)];case 4:l.sent();return[3,6];case 5:void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a),errors:["Invoice order not found after ".concat(c," attempts")],metadata:{allLogs:Z,checkoutSessionId:x.checkoutSessionId||"",storeId:k.storeId}});l.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,r,h,f;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,c({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),n=e.error,t=e.messages,s=e.status;i=s==="requires_action"||n;this.notificationType=i?"error":"success";this.notificationMessages=t||[];this.notificationTitle=i?z("Payment failed"):z("You're all set!");H("=== Payment intent retrieve status","info",{clientSecret:o,error:n,messages:t,status:s});r=new URL(window.location.href);r.searchParams.delete("payment_intent_client_secret");r.searchParams.delete("payment_intent");r.searchParams.delete("redirect_status");r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(n&&(t===null||t===void 0?void 0:t.length)))return[3,2];v("zonos-checkout-payment-fail");void _({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(x.checkoutSessionId)],metadata:{allLogs:Z,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:v("zonos-checkout-success");h=x.checkoutSessionId;void l({checkoutSessionId:h,eventName:"checkout_orderCompleted"});f=L("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(f);return[4,this.handleSuccessBehavior()];case 3:p.sent();p.label=4;case 4:this.isLoading=false;d();u();x.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=h("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();d();u();b();x.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(g.paypalErrorMessage){this.notificationType="error";this.notificationTitle=z("Payment failed");this.notificationMessages=[g.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!g.orderIdCreated)return[3,2];v("zonos-checkout-success");o=x.checkoutSessionId;void l({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=h("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:d();u();b();x.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var n=new URL("".concat(window.location.origin,"/receipt"));n.searchParams.set("referenceId",e);var t=S();if(t){n.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){n.searchParams.set("zonosQaUrl",s)}return n.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(g.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return t(i,{key:"2d8d736241298daa30fdf8935cef67bfa748e2df",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"30e1eae6e9ac7289af88f8fe2048d40796dfdf0e",class:"zonos--finish-details"},t("div",{key:"0324e34b72e58d0862ed319576018bd45bd18b18",class:"zonos--group"},this.notificationType==="success"?t("zonos-icon",{"aria-label":"Order success",content:N,iconColor:"blue-800",size:50}):t("zonos-icon",{"aria-label":"Order failed",content:R,iconColor:"red-800",size:50}),t("zonos-text",{key:"227f3cdda8e9cb0ed15ea91acb88c88d15d3d21c",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"1458ad439dc56e9ca7641a9ca95f3dfb2fd6b28f",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"8b0ab258c7beab09b0bc12999198f38813a144b3",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return t(s,null,o,t("br",null))}))),this.order&&e&&t("div",{key:"ea6b4f8c1f8cce779fadf358966fece018d9869b",class:"zonos--button-container"},t("zonos-button",{key:"e5140fa1fab1e3150a2b15915c29d988f54468b2",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},z("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Y.style=E;var q='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var Q='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var G=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";var K=G;var J=o("zonos_invoice_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=P(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.render=function(){var o=this;var e;var n=(e=D.find((function(o){return o.code===w.selectedLocale})))===null||e===void 0?void 0:e.label;var s="gray-1000";return t(i,{key:"c84163fd8ab0bc0f2c791028b6896379a4ae6a27",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"099a3be332fa52c5e7551bdd2a618041c4a6eb22",class:"zonos--invoice-footer"},t("div",{key:"ab727f45f3a67bcdd51eb29b392462f15eb5fedd",class:"zonos--invoice-locale-wrapper"},t("zonos-button",{key:"3d8431c78d54e0fe630677d0dd4ae2c975a208fa",buttonColor:s,class:"zonos--invoice-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:q,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},n),t("div",{key:"2920b4105b6209c4177fc91651dc5d9397d6abf2",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},t("zonos-language-select",{key:"705e1a4243dc7ebc73c522a82f93c3d833240a95",handleOnClose:function(){return o.toggleLanguageDialog()}}))),t("div",{key:"49c2d0ae1f587079b48f12d62d10eb422991255e",class:"zonos--invoice-footer-icon-wrapper"},t("div",{key:"58a4da788527ddf4abd759b5e305e747aa96d540",class:"zonos--invoice-footer-logo"},t("zonos-text",{key:"45bf1af64ec0f0a2e11e8d23361b71f4b4189881",textColor:s},z("Powered by")),t("a",{key:"1dd7224f3e126bcabe60a42c9529ab65c64f0063",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"7dc21ce09b72bf37efd30e2c17b6d8b9328e8c3d",autoHeight:true,content:Q,size:42}))),t("div",{key:"a0d053e6745733cd61868c109628a1835f4fe3ed",class:"dot"}),t("a",{key:"fd467e88aa2ed10b707f88ed0d1a5af80af35539",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"35db684368ff8abc05c2c7fab22500270b0b7e21",textColor:s},z("Privacy policy"))))))};Object.defineProperty(o.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());J.style=K;var X='<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>';var $='<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="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var oo=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var eo=oo;var no=o("zonos_invoice_order_details",function(){function o(o){e(this,o);this.collapseClicked=n(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=j(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return t("zonos-icon",{"aria-label":"Collapse expanded section",content:X,iconColor:"gray-1200"})}return t("zonos-icon",{"aria-label":"Expand collapsed section",content:$,iconColor:"gray-1200"})};return t(i,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},t("div",{class:"zonos--order-details-header-text"},t("zonos-text",{type:"boldSubheader"},z("Pay [organizationName]",{organizationName:k.organizationName})),e()),t("zonos-text",{type:"boldSubheader"},B({amount:O.amountTotalDue||0,isForeign:true}))),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--invoice-order-details-content"},t("zonos-invoice-cart-items",{isMobile:this.isMobile}),t("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());no.style=eo;var to='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var so='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var io=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-5px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";var ro=io;var ao=o("zonos_invoice_payment",function(){function o(o){var t=this;e(this,o);this.continueClicked=n(this,"continueClicked",7);this.paypalSessionFailed=n(this,"paypalSessionFailed",7);this.paypalSessionDone=n(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=a.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(t,[o],void 0,(function(o){var e,n;var t=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=a.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((n=a.stripeElements)===null||n===void 0?void 0:n.submit());setTimeout((function(){var o;(o=t.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}a.checkoutSettlementCurrency=s;v("zonos-checkout-payment-info");this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(t,void 0,void 0,(function(){var e,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:t.sent();return[3,3];case 2:e=t.sent();n=document.createElement("textarea");n.style.position="fixed";n.style.left="-1000px";n.style.top="-1000px";n.style.width="1px";n.style.height="1px";n.value=o;n.id="zonos-copy-card-number";document.body.appendChild(n);n.select();document.execCommand("copy");document.body.removeChild(n);return[3,3];case 3:window.Zonos.showNotification({message:z("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;p();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("currency",(function(){void y({currency:f.currency})}))];void y({currency:f.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=a.hasPaymentError;if(!a.stripeElements){return null}if(!a.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=S();var r=f.isStagingMode||I();var c=((e=a.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var l=function(){if(r){var e=k.appearance.theme;return t(s,null,o.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:z("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},z("Place test order"))))}if(a.isFetchingSession||O.isFetchingPayorInfo){return null}return t(s,null,o.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},z("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||z("We couldn't complete your payment. Please verify the payment details and try again.")),g.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},g.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!c&&t(s,null,t("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&a.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&a.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!f.checkoutSession){H("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:f.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:B({amount:O.amountTotalDue||0,isForeign:true})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&a.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&a.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},z("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:function(e){var n=e.detail.orderId;o.paypalSessionDone.emit(n)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:c?"block":"none"}})),n&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},z("Test cards")),t("zonos-text",{textColor:"gray-700"},z("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:to}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},z("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:so}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},z("Failure")," (****0002)")),t("zonos-notification",null)))};return t(i,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},z("Payment method")),l()))};Object.defineProperty(o.prototype,"ele",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());ao.style=ro;var co=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var lo=co;var uo=o("zonos_invoice_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return t(i,{key:"60da23c47f39a94478f1eb83e003b788aab3b98c",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"70bbb1973ec1c7197da666ba30be6dc6a20bd386",class:"zonos--title"},t("zonos-text",{key:"35ffffa411ccde7c702b5d5ac3f11d7a8d62916f",textColor:o,type:"semiBoldLabel"},z("Pay [organizationName]",{organizationName:k.organizationName}))),t("div",{key:"c965e47314d1c3178b1dd2e54e835c0b91966a81",class:"zonos--total-pay"},F({content:t("zonos-text",{type:"secondaryPageHeader"},B({amount:O.amountTotalDue||0,isForeign:true})),isLoading:O.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());uo.style=lo}}}));
@@ -1 +1 @@
1
- import{r as t,h as o}from"./p-ab41bab5.js";const s=class{constructor(o){t(this,o),this.first="",this.middle="",this.last=""}getText(){return(this.first||"")+((t=this.middle)?` ${t}`:"")+((o=this.last)?` ${o}`:"");var t,o}render(){return o("div",{key:"ce1a6a656f02ba26460066561b08f449e9e042bc"},"Hello, World! I'm ",this.getText())}};s.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}div{color:red;font-size:large}";export{s as zonos_component}
1
+ import{r as t,h as o}from"./p-ab41bab5.js";const s=class{constructor(o){t(this,o),this.first="",this.middle="",this.last=""}getText(){return(this.first||"")+((t=this.middle)?` ${t}`:"")+((o=this.last)?` ${o}`:"");var t,o}render(){return o("div",{key:"a4ab64de2aa643b21c019857749b944a01d83ab8"},"Hello, World! I'm ",this.getText())}};s.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}div{color:red;font-size:large}";export{s as zonos_component}
@@ -0,0 +1 @@
1
+ System.register([],(function(t){"use strict";return{execute:function(){var r=t("i",(function(t){var r=/[ʼˮ՚ߴߵ']{1}/u;var n=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;return n.test(t)&&!r.test(t)}));var n=t("c",(function(t){var n=Object.entries(t).reduce((function(t,n){var u;var e=n[0],c=n[1];return r(c)?Object.assign(Object.assign({},t),(u={},u[e]=true,u)):t}),{});return n}))}}}));
@@ -0,0 +1 @@
1
+ import{h as e}from"./p-ab41bab5.js";const t=({content:t,isLoading:o,skeletonHeight:n,skeletonWidth:s})=>o?e("zonos-skeleton",{skeletonHeight:n,skeletonWidth:s}):t;export{t as r}
@@ -1 +1 @@
1
- System.register(["./p-989d3af9.system.js"],(function(t){"use strict";var o,s;return{setters:[function(t){o=t.r;s=t.h}],execute:function(){function n(t,o,s){return(t||"")+(o?" ".concat(o):"")+(s?" ".concat(s):"")}var h=":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}div{color:red;font-size:large}";var i=h;var e=t("zonos_component",function(){function t(t){o(this,t);this.first="";this.middle="";this.last=""}t.prototype.getText=function(){return n(this.first,this.middle,this.last)};t.prototype.render=function(){return s("div",{key:"ce1a6a656f02ba26460066561b08f449e9e042bc"},"Hello, World! I'm ",this.getText())};return t}());e.style=i}}}));
1
+ System.register(["./p-989d3af9.system.js"],(function(t){"use strict";var o,s;return{setters:[function(t){o=t.r;s=t.h}],execute:function(){function n(t,o,s){return(t||"")+(o?" ".concat(o):"")+(s?" ".concat(s):"")}var h=":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}div{color:red;font-size:large}";var i=h;var r=t("zonos_component",function(){function t(t){o(this,t);this.first="";this.middle="";this.last=""}t.prototype.getText=function(){return n(this.first,this.middle,this.last)};t.prototype.render=function(){return s("div",{key:"a4ab64de2aa643b21c019857749b944a01d83ab8"},"Hello, World! I'm ",this.getText())};return t}());r.style=i}}}));