@justifi/webcomponents 6.1.0-rc.2 → 6.1.0

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 (702) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Api-CwTLkFY4.js → Api-CjtvTD2_.js} +2 -2
  3. package/dist/cjs/{Refund-BPSBtjQC.js → Refund-BnhHNKLz.js} +4 -3
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +14 -13
  5. package/dist/cjs/{badge-BmOSt4gS.js → badge-CE3ss_OU.js} +2 -2
  6. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +12 -12
  7. package/dist/cjs/bank-account-form.cjs.entry.js +8 -8
  8. package/dist/cjs/{business-additional-questions-schema-DNbSH3E-.js → business-additional-questions-schema-b8P-0T0O.js} +2 -2
  9. package/dist/cjs/business-details-core.cjs.entry.js +5 -5
  10. package/dist/cjs/{business-identity-schema-CclzWSOn.js → business-identity-schema-aFUle0C9.js} +2 -2
  11. package/dist/cjs/{business.service-Dkhqyggm.js → business.service-Cj_NUZsr.js} +2 -2
  12. package/dist/cjs/{button-7c2RN2yp.js → button-gPNZ9XRn.js} +2 -2
  13. package/dist/cjs/card-form.cjs.entry.js +8 -8
  14. package/dist/cjs/{check-pkg-version-DUDlLDCJ.js → check-pkg-version-C7b-OLb5.js} +3 -3
  15. package/dist/cjs/{checkout.service-LwZVVgP5.js → checkout.service-Bc8L9ixO.js} +2 -2
  16. package/dist/cjs/{checkout.store-C3f3E24L.js → checkout.store-Bswr7kNY.js} +6 -3
  17. package/dist/cjs/checkouts-list-core.cjs.entry.js +12 -12
  18. package/dist/cjs/{payments-list-params-state-C4c8UZtP.js → checkouts-list-params-state-BYpq-c6X.js} +1 -1
  19. package/dist/cjs/{checkouts-table-BQUhZZd_.js → checkouts-table-C5AHeIr0.js} +4 -4
  20. package/dist/cjs/{config-state-B_gyIchD.js → config-state-C7babhLh.js} +1 -1
  21. package/dist/cjs/custom-popper_2.cjs.entry.js +4 -4
  22. package/dist/cjs/{dispute.service-927Gzb0N.js → dispute.service-DhO_tuDc.js} +2 -2
  23. package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
  24. package/dist/cjs/form-control-checkbox.cjs.entry.js +6 -6
  25. package/dist/cjs/form-control-date.cjs.entry.js +5 -5
  26. package/dist/cjs/{form-control-error-text-DD0dHGu8.js → form-control-error-text-BnMWn8U_.js} +2 -2
  27. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +6 -6
  28. package/dist/cjs/{form-control-help-text-2QwKi78M.js → form-control-help-text-DEi5vSjN.js} +2 -2
  29. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  30. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +6 -6
  31. package/dist/cjs/form-control-monetary.cjs.entry.js +7 -7
  32. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +6 -6
  33. package/dist/cjs/form-control-number.cjs.entry.js +6 -6
  34. package/dist/cjs/form-control-radio.cjs.entry.js +4 -4
  35. package/dist/cjs/form-control-select_2.cjs.entry.js +7 -7
  36. package/dist/cjs/{get-payment-details-BSxp1HX0.js → get-payment-details-BinT-ZEP.js} +2 -2
  37. package/dist/cjs/{get-subaccounts-B31f95PR.js → get-subaccounts-BoTVdl7v.js} +3 -3
  38. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +26 -17
  39. package/dist/cjs/{header-1-DMsp0XM7.js → header-1-D3r87SC6.js} +2 -2
  40. package/dist/cjs/{header-3-BSvFq_IF.js → header-3-BFQJJgBb.js} +2 -2
  41. package/dist/cjs/hidden-input_2.cjs.entry.js +9 -9
  42. package/dist/cjs/{index-Dyzl8Hn6.js → index-Bhtk1qkX.js} +46 -32
  43. package/dist/cjs/{index-D1Ba20gi.js → index-CWM5ions.js} +1 -1
  44. package/dist/cjs/{index.esm-BleZSAc0.js → index.esm-ByC0D4sJ.js} +18 -17
  45. package/dist/cjs/{insurance-state-uWOl6jJN.js → insurance-state-JbqYvJN3.js} +3 -3
  46. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +12 -12
  47. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +19 -19
  48. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +11 -11
  49. package/dist/cjs/{justifi-checkout-summary_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +896 -25
  50. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +28 -28
  51. package/dist/cjs/justifi-business-details.cjs.entry.js +11 -11
  52. package/dist/cjs/justifi-business-form.cjs.entry.js +18 -18
  53. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +3 -3
  54. package/dist/cjs/justifi-checkout.cjs.entry.js +18 -15
  55. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
  56. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +15 -15
  57. package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-details.cjs.entry.js +4 -4
  59. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
  60. package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
  61. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +16 -16
  62. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +10 -10
  63. package/dist/cjs/justifi-order-terminals.cjs.entry.js +14 -14
  64. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +15 -15
  65. package/dist/cjs/justifi-payment-details.cjs.entry.js +20 -13
  66. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +5 -5
  67. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +10 -10
  68. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +14 -14
  69. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +8 -8
  70. package/dist/cjs/justifi-payments-list.cjs.entry.js +15 -15
  71. package/dist/cjs/justifi-payout-details.cjs.entry.js +13 -12
  72. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +14 -14
  73. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +8 -8
  74. package/dist/cjs/justifi-payouts-list.cjs.entry.js +16 -16
  75. package/dist/cjs/justifi-refund-payment.cjs.entry.js +15 -15
  76. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +3 -3
  77. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +13 -13
  78. package/dist/cjs/justifi-skeleton.cjs.entry.js +5 -5
  79. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
  80. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +13 -13
  81. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +11 -10
  82. package/dist/cjs/justifi-terminals-list.cjs.entry.js +15 -15
  83. package/dist/cjs/loader.cjs.js +2 -2
  84. package/dist/cjs/{package-CFCy2fBx.js → package-BHmdO9eK.js} +1 -1
  85. package/dist/cjs/pagination-menu.cjs.entry.js +5 -5
  86. package/dist/cjs/{parts-9jMf1erK.js → parts-Pb06tUMp.js} +2 -0
  87. package/dist/cjs/payment-details-core.cjs.entry.js +34 -16
  88. package/dist/cjs/payment-method-option.cjs.entry.js +4 -4
  89. package/dist/cjs/{payment.service-DUq-W7tS.js → payment.service-C9thkR4g.js} +2 -2
  90. package/dist/cjs/payments-list-core.cjs.entry.js +13 -13
  91. package/dist/cjs/{payouts-list-params-state-C4c8UZtP.js → payments-list-params-state-BYpq-c6X.js} +1 -1
  92. package/dist/cjs/{payments-status-3iIQkoov.js → payments-status-CnNXcRLO.js} +21 -3
  93. package/dist/cjs/{payments-table-BSHUQhM-.js → payments-table-BGuCOPTJ.js} +25 -5
  94. package/dist/cjs/payout-details-core.cjs.entry.js +25 -12
  95. package/dist/cjs/{payout.service-DoKMr8Xw.js → payout.service-CGZxpQMq.js} +2 -2
  96. package/dist/cjs/payouts-list-core.cjs.entry.js +13 -13
  97. package/dist/cjs/{terminal-orders-list-params-state-C4c8UZtP.js → payouts-list-params-state-BYpq-c6X.js} +1 -1
  98. package/dist/cjs/{payouts-status-DoQbxIms.js → payouts-status-2na6MMgV.js} +2 -2
  99. package/dist/cjs/{payouts-table-BD_Fhz_j.js → payouts-table-DXekpbYc.js} +4 -4
  100. package/dist/cjs/{schema-validations-jek_iZ9W.js → schema-validations-Bj7eYNO8.js} +1 -1
  101. package/dist/cjs/{skeleton-CuIMC98G.js → skeleton-BvdAh448.js} +2 -2
  102. package/dist/cjs/{spinner-CMZXdrPe.js → spinner-Rt52JMa2.js} +2 -2
  103. package/dist/cjs/{styled-host-2KXbjOFw.js → styled-host-BSooSIhA.js} +1 -1
  104. package/dist/cjs/{table-DlQCUVag.js → table-Ccg4k90C.js} +3 -3
  105. package/dist/cjs/table-filters-menu.cjs.entry.js +4 -4
  106. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +12 -12
  107. package/dist/cjs/{checkouts-list-params-state-C4c8UZtP.js → terminal-orders-list-params-state-BYpq-c6X.js} +1 -1
  108. package/dist/cjs/{terminal-orders-table-t6XxNy_K.js → terminal-orders-table-7ew1vCKk.js} +6 -6
  109. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +3 -3
  110. package/dist/cjs/{terminal.service-Iyje71vN.js → terminal.service-BkKxH-k4.js} +2 -2
  111. package/dist/cjs/terminals-list-core.cjs.entry.js +12 -12
  112. package/dist/cjs/terminals-list-params-state-BYpq-c6X.js +22 -0
  113. package/dist/cjs/{terminals-table-BTdKRiBN.js → terminals-table-ByYs-pH7.js} +9 -4
  114. package/dist/cjs/{utils-ChCUZgUy.js → utils-Bab-tddY.js} +4 -0
  115. package/dist/cjs/{utils-FFP5ZHyE.js → utils-CUcA4G_O.js} +5 -5
  116. package/dist/cjs/webcomponents.cjs.js +3 -3
  117. package/dist/collection/api/Terminal.js +1 -0
  118. package/dist/collection/api/services/apple-pay.service.js +3 -0
  119. package/dist/collection/collection-manifest.json +3 -3
  120. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +1 -2
  121. package/dist/collection/components/business-details/business-details-core.js +0 -1
  122. package/dist/collection/components/business-details/business-details.js +4 -4
  123. package/dist/collection/components/business-details/core-info-details/core-info-details.js +0 -1
  124. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +0 -1
  125. package/dist/collection/components/business-details/owner-details/owner-details.js +9 -9
  126. package/dist/collection/components/business-details/representative-details/representative-details.js +1 -2
  127. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +6 -7
  128. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -2
  129. package/dist/collection/components/business-forms/business-form/business-form.js +7 -7
  130. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +6 -7
  131. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +6 -7
  132. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +5 -6
  133. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +11 -15
  134. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +10 -11
  135. package/dist/collection/components/business-forms/owner-form/owner-form.js +13 -14
  136. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +2 -4
  137. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +7 -7
  138. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +3 -5
  139. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +7 -8
  140. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.js +4 -7
  141. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +7 -7
  142. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-documents-on-file.js +2 -2
  143. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +4 -6
  144. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +7 -7
  145. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +6 -8
  146. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +7 -7
  147. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +5 -6
  148. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +2 -4
  149. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +7 -7
  150. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +15 -16
  151. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +2 -4
  152. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +7 -7
  153. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +8 -10
  154. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +9 -11
  155. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +8 -10
  156. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +7 -7
  157. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +7 -7
  158. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  159. package/dist/collection/components/checkout/billing-form/billing-form.js +11 -10
  160. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  161. package/dist/collection/components/checkout/checkout.js +17 -16
  162. package/dist/collection/components/checkout/save-new-payment-method.js +2 -2
  163. package/dist/collection/components/checkout/saved-payment-method.js +3 -4
  164. package/dist/collection/components/checkouts-list/checkouts-list-core.js +3 -5
  165. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +5 -5
  166. package/dist/collection/components/checkouts-list/checkouts-list.js +6 -6
  167. package/dist/collection/components/config-provider/config-provider.js +3 -3
  168. package/dist/collection/components/dispute-management/dispute-management-core.js +5 -6
  169. package/dist/collection/components/dispute-management/dispute-management.js +5 -5
  170. package/dist/collection/components/dispute-management/dispute-notification.js +5 -6
  171. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +4 -4
  172. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +4 -4
  173. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +4 -4
  174. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +2 -5
  175. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +6 -7
  176. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +4 -4
  177. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +4 -4
  178. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +4 -4
  179. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +4 -4
  180. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +4 -4
  181. package/dist/collection/components/filters/table-filters-menu.js +3 -4
  182. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -2
  183. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +4 -4
  184. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +26 -26
  185. package/dist/collection/components/modular-checkout/modular-checkout.js +14 -12
  186. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +57 -10
  187. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +3 -3
  188. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  189. package/dist/collection/components/modular-checkout/sub-components/billing-form-full.js +2 -2
  190. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +3 -3
  191. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  192. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +9 -10
  193. package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +1 -1
  194. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  195. package/dist/collection/components/order-terminals/order-terminals.js +9 -9
  196. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +10 -10
  197. package/dist/collection/components/payment-details/payment-details-core.js +19 -10
  198. package/dist/collection/components/payment-details/payment-details.js +32 -5
  199. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +6 -6
  200. package/dist/collection/components/payments-list/payments-list-core.js +3 -4
  201. package/dist/collection/components/payments-list/payments-list-filters.js +12 -12
  202. package/dist/collection/components/payments-list/payments-list.js +6 -6
  203. package/dist/collection/components/payments-list/payments-status.js +19 -1
  204. package/dist/collection/components/payments-list/payments-table.js +21 -1
  205. package/dist/collection/components/payout-details/payout-details-core.js +57 -6
  206. package/dist/collection/components/payout-details/payout-details.js +26 -5
  207. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +6 -6
  208. package/dist/collection/components/payouts-list/payouts-list-core.js +3 -6
  209. package/dist/collection/components/payouts-list/payouts-list-filters.js +6 -6
  210. package/dist/collection/components/payouts-list/payouts-list.js +6 -6
  211. package/dist/collection/components/refund-payment/refund-payment.js +7 -7
  212. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +3 -4
  213. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +10 -10
  214. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +6 -6
  215. package/dist/collection/components/terminals-list/terminals-list-core.js +3 -5
  216. package/dist/collection/components/terminals-list/terminals-list-filters.js +10 -9
  217. package/dist/collection/components/terminals-list/terminals-list.js +6 -6
  218. package/dist/collection/components/terminals-list/terminals-status.js +5 -0
  219. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +23 -22
  220. package/dist/collection/store/checkout.store.js +5 -2
  221. package/dist/collection/styles/parts.js +1 -1
  222. package/dist/collection/ui-components/apple-pay-button.js +6 -8
  223. package/dist/collection/ui-components/custom-popper/custom-popper.js +5 -7
  224. package/dist/collection/ui-components/details/details.js +3 -3
  225. package/dist/collection/ui-components/details/utils.js +4 -4
  226. package/dist/collection/ui-components/form/form-control-checkbox.js +14 -15
  227. package/dist/collection/ui-components/form/form-control-date.js +17 -18
  228. package/dist/collection/ui-components/form/form-control-file-v2.js +13 -14
  229. package/dist/collection/ui-components/form/form-control-file.js +16 -17
  230. package/dist/collection/ui-components/form/form-control-monetary.js +15 -17
  231. package/dist/collection/ui-components/form/form-control-number-masked.js +16 -17
  232. package/dist/collection/ui-components/form/form-control-number.js +14 -15
  233. package/dist/collection/ui-components/form/form-control-radio.js +16 -17
  234. package/dist/collection/ui-components/form/form-control-select.js +14 -16
  235. package/dist/collection/ui-components/form/form-control-text.js +16 -18
  236. package/dist/collection/ui-components/form/form-control-textarea.js +16 -18
  237. package/dist/collection/ui-components/form/form-helpers/form-alert/form-alert.js +4 -4
  238. package/dist/collection/ui-components/form/form-helpers/form-control-help-text/form-control-help-text.js +4 -4
  239. package/dist/collection/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.js +2 -2
  240. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  241. package/dist/collection/ui-components/form/iframe-input.js +9 -9
  242. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -5
  243. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +13 -14
  244. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +6 -6
  245. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +11 -11
  246. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +9 -10
  247. package/dist/collection/utils/utils.js +4 -0
  248. package/dist/docs.json +275 -108
  249. package/dist/esm/{Api-D4tj-h4P.js → Api-DhiA2e_P.js} +2 -2
  250. package/dist/esm/{Refund-Bc5By0lb.js → Refund-B-iOTRxz.js} +3 -2
  251. package/dist/esm/additional-questions-details_5.entry.js +14 -13
  252. package/dist/esm/{badge-ChwzCNAF.js → badge-CtdO-tEY.js} +2 -2
  253. package/dist/esm/bank-account-document-form-inputs_4.entry.js +12 -12
  254. package/dist/esm/bank-account-form.entry.js +8 -8
  255. package/dist/esm/{business-additional-questions-schema-C6NRHWEL.js → business-additional-questions-schema-9FAJSx_D.js} +2 -2
  256. package/dist/esm/business-details-core.entry.js +5 -5
  257. package/dist/esm/{business-identity-schema-D8n5dyLX.js → business-identity-schema-CDJzknbg.js} +2 -2
  258. package/dist/esm/{business.service-CsbtEDNi.js → business.service-D55OVyco.js} +2 -2
  259. package/dist/esm/{button-SAIS_5os.js → button-DtTaQHMK.js} +2 -2
  260. package/dist/esm/card-form.entry.js +8 -8
  261. package/dist/esm/{check-pkg-version-B_Pl1uAE.js → check-pkg-version-xM0uWxbL.js} +3 -3
  262. package/dist/esm/{checkout.service-BCkQ9pOA.js → checkout.service-fwbqSq8g.js} +2 -2
  263. package/dist/esm/{checkout.store-DBvS7cVB.js → checkout.store-4nUf2OuT.js} +6 -3
  264. package/dist/esm/checkouts-list-core.entry.js +12 -12
  265. package/dist/esm/{checkouts-list-params-state-C2_GlMKR.js → checkouts-list-params-state-C_fug9R3.js} +1 -1
  266. package/dist/esm/{checkouts-table-CItEo0DU.js → checkouts-table-B6gGDtOr.js} +4 -4
  267. package/dist/esm/{config-state-Blo0ywwc.js → config-state-DiHV-4QK.js} +1 -1
  268. package/dist/esm/custom-popper_2.entry.js +4 -4
  269. package/dist/esm/{dispute.service-CyLtJREK.js → dispute.service-Cdq3_yRo.js} +2 -2
  270. package/dist/esm/form-alert_5.entry.js +6 -6
  271. package/dist/esm/form-control-checkbox.entry.js +6 -6
  272. package/dist/esm/form-control-date.entry.js +5 -5
  273. package/dist/esm/{form-control-error-text-IXJJ4JpV.js → form-control-error-text-bprS-t9d.js} +2 -2
  274. package/dist/esm/form-control-file-v2_2.entry.js +6 -6
  275. package/dist/esm/{form-control-help-text-CuhIsM3v.js → form-control-help-text-Bvnp-IAG.js} +2 -2
  276. package/dist/esm/form-control-help-text.entry.js +1 -1
  277. package/dist/esm/form-control-monetary-provisioning.entry.js +6 -6
  278. package/dist/esm/form-control-monetary.entry.js +7 -7
  279. package/dist/esm/form-control-number-masked_2.entry.js +6 -6
  280. package/dist/esm/form-control-number.entry.js +6 -6
  281. package/dist/esm/form-control-radio.entry.js +4 -4
  282. package/dist/esm/form-control-select_2.entry.js +7 -7
  283. package/dist/esm/{get-payment-details-BuT0QNOo.js → get-payment-details-sGoWyAat.js} +2 -2
  284. package/dist/esm/{get-subaccounts-VjY6-x_9.js → get-subaccounts-BsJSlShO.js} +3 -3
  285. package/dist/esm/gross-payment-chart-core.entry.js +26 -17
  286. package/dist/esm/{header-1-zXsamUS3.js → header-1-C1Hnxki8.js} +2 -2
  287. package/dist/esm/{header-3-DVtaUAlf.js → header-3-Bq8fpjm-.js} +2 -2
  288. package/dist/esm/hidden-input_2.entry.js +9 -9
  289. package/dist/esm/{index-ZfXl6Xrm.js → index-DJ9G-4S-.js} +1 -1
  290. package/dist/esm/{index-qipqIMyC.js → index-DOjVAAtq.js} +46 -32
  291. package/dist/esm/{index.esm-cYgKOXtz.js → index.esm-IWS0494Y.js} +18 -17
  292. package/dist/esm/{insurance-state-Dh9f36Qh.js → insurance-state-CVme82j7.js} +3 -3
  293. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +12 -12
  294. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +19 -19
  295. package/dist/esm/justifi-additional-statement_8.entry.js +11 -11
  296. package/dist/esm/{justifi-checkout-summary_7.entry.js → justifi-apple-pay_8.entry.js} +896 -26
  297. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +28 -28
  298. package/dist/esm/justifi-business-details.entry.js +11 -11
  299. package/dist/esm/justifi-business-form.entry.js +18 -18
  300. package/dist/esm/justifi-business-representative-form-inputs.entry.js +3 -3
  301. package/dist/esm/justifi-checkout.entry.js +18 -15
  302. package/dist/esm/justifi-checkouts-list-filters.entry.js +9 -9
  303. package/dist/esm/justifi-checkouts-list.entry.js +15 -15
  304. package/dist/esm/justifi-config-provider.entry.js +3 -3
  305. package/dist/esm/justifi-details.entry.js +4 -4
  306. package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
  307. package/dist/esm/justifi-dispute-management.entry.js +10 -10
  308. package/dist/esm/justifi-dispute-notification_3.entry.js +16 -16
  309. package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
  310. package/dist/esm/justifi-order-terminals.entry.js +14 -14
  311. package/dist/esm/justifi-owner-form_3.entry.js +15 -15
  312. package/dist/esm/justifi-payment-details.entry.js +20 -13
  313. package/dist/esm/justifi-payment-provisioning-core.entry.js +5 -5
  314. package/dist/esm/justifi-payment-provisioning.entry.js +10 -10
  315. package/dist/esm/justifi-payment-transactions-list.entry.js +14 -14
  316. package/dist/esm/justifi-payments-list-filters.entry.js +8 -8
  317. package/dist/esm/justifi-payments-list.entry.js +15 -15
  318. package/dist/esm/justifi-payout-details.entry.js +13 -12
  319. package/dist/esm/justifi-payout-transactions-list.entry.js +14 -14
  320. package/dist/esm/justifi-payouts-list-filters.entry.js +8 -8
  321. package/dist/esm/justifi-payouts-list.entry.js +16 -16
  322. package/dist/esm/justifi-refund-payment.entry.js +15 -15
  323. package/dist/esm/justifi-saved-payment-method.entry.js +3 -3
  324. package/dist/esm/justifi-season-interruption-insurance.entry.js +13 -13
  325. package/dist/esm/justifi-skeleton.entry.js +5 -5
  326. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +10 -10
  327. package/dist/esm/justifi-terminal-orders-list.entry.js +13 -13
  328. package/dist/esm/justifi-terminals-list-filters.entry.js +11 -10
  329. package/dist/esm/justifi-terminals-list.entry.js +15 -15
  330. package/dist/esm/loader.js +3 -3
  331. package/dist/esm/{package-pXjOPQhG.js → package-DL-q4EcN.js} +1 -1
  332. package/dist/esm/pagination-menu.entry.js +5 -5
  333. package/dist/esm/{parts-RvUQ__Pq.js → parts-xDbRW9xn.js} +2 -1
  334. package/dist/esm/payment-details-core.entry.js +34 -16
  335. package/dist/esm/payment-method-option.entry.js +4 -4
  336. package/dist/esm/{payment.service-QJEmd6Nl.js → payment.service-BoQ1MW1k.js} +2 -2
  337. package/dist/esm/payments-list-core.entry.js +13 -13
  338. package/dist/esm/{payments-list-params-state-C2_GlMKR.js → payments-list-params-state-C_fug9R3.js} +1 -1
  339. package/dist/esm/{payments-status-DDafc8Yr.js → payments-status-cvtVmtY5.js} +22 -4
  340. package/dist/esm/{payments-table-De3Jb6rY.js → payments-table-D_BlyU1F.js} +25 -5
  341. package/dist/esm/payout-details-core.entry.js +25 -12
  342. package/dist/esm/{payout.service-XxyEr0rj.js → payout.service-xcBdom3q.js} +2 -2
  343. package/dist/esm/payouts-list-core.entry.js +13 -13
  344. package/dist/esm/{payouts-list-params-state-C2_GlMKR.js → payouts-list-params-state-C_fug9R3.js} +1 -1
  345. package/dist/esm/{payouts-status-u1eSRz3Q.js → payouts-status-D-vjrqBb.js} +2 -2
  346. package/dist/esm/{payouts-table-BO-MCzXj.js → payouts-table-Clj8YGLV.js} +4 -4
  347. package/dist/esm/{schema-validations-DcR1ujuX.js → schema-validations-B9dmY7ME.js} +1 -1
  348. package/dist/esm/{skeleton-DtpkgjZ6.js → skeleton-B8EUwt4b.js} +2 -2
  349. package/dist/esm/{spinner-CIXUVK4F.js → spinner-CYXkn1fh.js} +2 -2
  350. package/dist/esm/{styled-host-CbizlfAU.js → styled-host-OalOsPBp.js} +1 -1
  351. package/dist/esm/{table-DcRHK_sm.js → table-Bj20uWfu.js} +3 -3
  352. package/dist/esm/table-filters-menu.entry.js +4 -4
  353. package/dist/esm/terminal-orders-list-core.entry.js +12 -12
  354. package/dist/esm/{terminal-orders-list-params-state-C2_GlMKR.js → terminal-orders-list-params-state-C_fug9R3.js} +1 -1
  355. package/dist/esm/{terminal-orders-table-9nsnrAq8.js → terminal-orders-table-DzBpIW8i.js} +6 -6
  356. package/dist/esm/terminal-quantity-selector.entry.js +3 -3
  357. package/dist/esm/{terminal.service-D2oETGnk.js → terminal.service-l6zTIPZ3.js} +2 -2
  358. package/dist/esm/terminals-list-core.entry.js +12 -12
  359. package/dist/esm/terminals-list-params-state-C_fug9R3.js +16 -0
  360. package/dist/esm/{terminals-table-C6NO2m-t.js → terminals-table-BMS5tazC.js} +9 -4
  361. package/dist/esm/{utils-BscIVFn8.js → utils-BOijEGPV.js} +4 -1
  362. package/dist/esm/{utils-_ckvHjSW.js → utils-DRwofES0.js} +5 -5
  363. package/dist/esm/webcomponents.js +4 -4
  364. package/dist/module/Refund.js +2 -1
  365. package/dist/module/additional-questions-details2.js +2 -2
  366. package/dist/module/additional-questions.js +2 -2
  367. package/dist/module/additional-statement.js +2 -2
  368. package/dist/{esm/justifi-apple-pay.entry.js → module/apple-pay.js} +73 -31
  369. package/dist/module/badge.js +1 -1
  370. package/dist/module/bank-account-billing-form-simple.js +2 -2
  371. package/dist/module/bank-account-document-inputs.js +3 -3
  372. package/dist/module/bank-account-form-inputs2.js +2 -2
  373. package/dist/module/bank-account-form.js +3 -3
  374. package/dist/module/bank-account.js +2 -2
  375. package/dist/module/billing-form-full.js +1 -1
  376. package/dist/module/billing-form.js +3 -2
  377. package/dist/module/business-additional-questions-form-step-core.js +2 -2
  378. package/dist/module/business-additional-questions-form-step.js +1 -1
  379. package/dist/module/business-bank-account-form-step-core.js +4 -4
  380. package/dist/module/business-bank-account-form-step.js +1 -1
  381. package/dist/module/business-core-info-form-step-core.js +2 -2
  382. package/dist/module/business-core-info-form-step.js +1 -1
  383. package/dist/module/business-core-info.js +2 -2
  384. package/dist/module/business-details-core2.js +1 -1
  385. package/dist/module/business-documents-on-file2.js +1 -1
  386. package/dist/module/business-owners-form-step-core.js +2 -2
  387. package/dist/module/business-owners-form-step.js +1 -1
  388. package/dist/module/business-representative-form-inputs.js +2 -2
  389. package/dist/module/business-representative-form-step-core.js +2 -2
  390. package/dist/module/business-representative-form-step.js +1 -1
  391. package/dist/module/business-representative.js +2 -2
  392. package/dist/module/business-terms-conditions-form-step.js +1 -1
  393. package/dist/module/button.js +1 -1
  394. package/dist/module/cancellation-policy.js +2 -2
  395. package/dist/module/card-billing-form-simple.js +2 -2
  396. package/dist/module/card-form.js +3 -3
  397. package/dist/module/card-form2.js +2 -2
  398. package/dist/module/checkout.store.js +5 -2
  399. package/dist/module/checkouts-list-core2.js +4 -4
  400. package/dist/module/custom-popper2.js +3 -3
  401. package/dist/module/customer-details.js +2 -2
  402. package/dist/module/details.js +1 -1
  403. package/dist/module/dispute-management-core.js +2 -2
  404. package/dist/module/dispute-notification.js +2 -2
  405. package/dist/module/dispute-response-core.js +5 -5
  406. package/dist/module/dispute-response.js +2 -2
  407. package/dist/module/duplicate-charge.js +2 -2
  408. package/dist/module/electronic-evidence.js +2 -2
  409. package/dist/module/form-alert2.js +1 -1
  410. package/dist/module/form-control-checkbox2.js +4 -4
  411. package/dist/module/form-control-date2.js +4 -4
  412. package/dist/module/form-control-error-text.js +1 -1
  413. package/dist/module/form-control-file-v22.js +2 -2
  414. package/dist/module/form-control-file2.js +4 -4
  415. package/dist/module/form-control-monetary-provisioning2.js +4 -4
  416. package/dist/module/form-control-monetary2.js +5 -5
  417. package/dist/module/form-control-number-masked2.js +4 -4
  418. package/dist/module/form-control-number.js +4 -4
  419. package/dist/module/form-control-radio2.js +4 -4
  420. package/dist/module/form-control-select2.js +4 -4
  421. package/dist/module/form-control-text2.js +5 -5
  422. package/dist/module/form-control-textarea2.js +5 -5
  423. package/dist/module/form-control-tooltip2.js +1 -1
  424. package/dist/module/form.js +18 -17
  425. package/dist/module/gross-payment-chart-core2.js +23 -14
  426. package/dist/module/header-3.js +1 -1
  427. package/dist/module/hidden-input2.js +2 -2
  428. package/dist/module/identity-address-form.js +2 -2
  429. package/dist/module/iframe-input2.js +4 -4
  430. package/dist/module/justifi-apple-pay.js +1 -904
  431. package/dist/module/justifi-button2.js +2 -2
  432. package/dist/module/justifi-checkout.js +32 -24
  433. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  434. package/dist/module/justifi-checkouts-list.js +2 -2
  435. package/dist/module/justifi-dispute-management.js +1 -1
  436. package/dist/module/justifi-header2.js +1 -1
  437. package/dist/module/justifi-order-terminals.js +4 -4
  438. package/dist/module/justifi-payment-details.js +8 -1
  439. package/dist/module/justifi-payment-provisioning.js +1 -1
  440. package/dist/module/justifi-payment-transactions-list.js +3 -3
  441. package/dist/module/justifi-payments-list-filters.js +3 -3
  442. package/dist/module/justifi-payments-list.js +1 -1
  443. package/dist/module/justifi-payout-details.js +4 -2
  444. package/dist/module/justifi-payout-transactions-list.js +3 -3
  445. package/dist/module/justifi-payouts-list-filters.js +3 -3
  446. package/dist/module/justifi-payouts-list.js +2 -2
  447. package/dist/module/justifi-radio-list-item2.js +1 -1
  448. package/dist/module/justifi-refund-payment.js +1 -1
  449. package/dist/module/justifi-saved-payment-method.js +2 -2
  450. package/dist/module/justifi-season-interruption-insurance.js +2 -2
  451. package/dist/module/justifi-skeleton.js +2 -2
  452. package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
  453. package/dist/module/justifi-terminal-orders-list.js +2 -2
  454. package/dist/module/justifi-terminals-list-filters.js +5 -4
  455. package/dist/module/justifi-terminals-list.js +2 -2
  456. package/dist/module/legal-address-details2.js +1 -1
  457. package/dist/module/legal-address-form-step-core.js +2 -2
  458. package/dist/module/legal-address-form-step.js +1 -1
  459. package/dist/module/legal-address-form.js +2 -2
  460. package/dist/module/modular-checkout.js +7 -6
  461. package/dist/module/owner-details2.js +8 -7
  462. package/dist/module/owner-form-core2.js +6 -6
  463. package/dist/module/owner-form-inputs2.js +2 -2
  464. package/dist/module/owner-form.js +2 -2
  465. package/dist/module/package.js +1 -1
  466. package/dist/module/pagination-menu2.js +4 -4
  467. package/dist/module/parts.js +2 -1
  468. package/dist/module/payment-details-core2.js +23 -10
  469. package/dist/module/payment-method-option.js +2 -2
  470. package/dist/module/payment-provisioning-core.js +3 -3
  471. package/dist/module/payment-provisioning-form-buttons.js +3 -3
  472. package/dist/module/payment-provisioning-form-steps.js +2 -2
  473. package/dist/module/payments-list-core2.js +24 -4
  474. package/dist/module/payments-status.js +20 -2
  475. package/dist/module/payout-details-core2.js +20 -6
  476. package/dist/module/payouts-list-core2.js +5 -5
  477. package/dist/module/product-or-service.js +2 -2
  478. package/dist/module/refund-policy.js +2 -2
  479. package/dist/module/representative-details2.js +1 -1
  480. package/dist/module/save-new-payment-method.js +1 -1
  481. package/dist/module/sezzle-payment-method.js +1 -1
  482. package/dist/module/shipping-details.js +2 -2
  483. package/dist/module/spinner.js +1 -1
  484. package/dist/module/summary.js +1 -1
  485. package/dist/module/table-filters-menu2.js +3 -3
  486. package/dist/module/table.js +1 -1
  487. package/dist/module/terminal-orders-list-core2.js +4 -4
  488. package/dist/module/terminal-quantity-selector2.js +2 -2
  489. package/dist/module/terminals-list-core2.js +10 -5
  490. package/dist/module/tokenize-payment-method.js +1 -1
  491. package/dist/module/utils.js +4 -4
  492. package/dist/module/utils2.js +4 -1
  493. package/dist/types/api/Checkout.d.ts +2 -0
  494. package/dist/types/api/ComponentEvents.d.ts +4 -0
  495. package/dist/types/api/Terminal.d.ts +2 -1
  496. package/dist/types/components/business-details/owner-details/owner-details.d.ts +1 -1
  497. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +1 -1
  498. package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +2 -0
  499. package/dist/types/components/payment-details/payment-details-core.d.ts +3 -1
  500. package/dist/types/components/payment-details/payment-details.d.ts +3 -1
  501. package/dist/types/components/payments-list/payments-status.d.ts +12 -0
  502. package/dist/types/components/payments-list/payments-table.d.ts +5 -2
  503. package/dist/types/components/payout-details/payout-details-core.d.ts +5 -1
  504. package/dist/types/components/payout-details/payout-details.d.ts +1 -0
  505. package/dist/types/components.d.ts +48 -10
  506. package/dist/types/stencil-public-runtime.d.ts +37 -11
  507. package/dist/types/store/checkout.store.d.ts +1 -1
  508. package/dist/types/styles/parts.d.ts +1 -1
  509. package/dist/types/ui-components/details/utils.d.ts +3 -2
  510. package/dist/types/utils/utils.d.ts +1 -0
  511. package/dist/webcomponents/p-0217783c.entry.js +20 -0
  512. package/dist/webcomponents/{p-10278c48.entry.js → p-0256af65.entry.js} +1 -1
  513. package/dist/webcomponents/p-0af5269e.entry.js +1 -0
  514. package/dist/webcomponents/p-0cac8468.entry.js +1 -0
  515. package/dist/webcomponents/{p-3d37045d.entry.js → p-0cf71cbd.entry.js} +1 -1
  516. package/dist/webcomponents/p-0eb69f41.entry.js +1 -0
  517. package/dist/webcomponents/{p-30147031.entry.js → p-0f47f052.entry.js} +1 -1
  518. package/dist/webcomponents/p-0fgTPVV0.js +1 -0
  519. package/dist/webcomponents/p-28a3bf32.entry.js +1 -0
  520. package/dist/webcomponents/p-2b568e8e.entry.js +1 -0
  521. package/dist/webcomponents/p-2d300faa.entry.js +1 -0
  522. package/dist/webcomponents/{p-a71a5e64.entry.js → p-2f40f708.entry.js} +1 -1
  523. package/dist/webcomponents/p-30856338.entry.js +1 -0
  524. package/dist/webcomponents/p-328117e4.entry.js +1 -0
  525. package/dist/webcomponents/{p-e2a38ad0.entry.js → p-32978110.entry.js} +1 -1
  526. package/dist/webcomponents/{p-0801324e.entry.js → p-37a93597.entry.js} +1 -1
  527. package/dist/webcomponents/p-47997bc2.entry.js +1 -0
  528. package/dist/webcomponents/{p-2246aa69.entry.js → p-50701f16.entry.js} +1 -1
  529. package/dist/webcomponents/p-5235230f.entry.js +1 -0
  530. package/dist/webcomponents/p-526b7442.entry.js +1 -0
  531. package/dist/webcomponents/p-5aae36f3.entry.js +1 -0
  532. package/dist/webcomponents/p-5b5d7a8f.entry.js +1 -0
  533. package/dist/webcomponents/p-5bd3d86e.entry.js +1 -0
  534. package/dist/webcomponents/{p-b4e673fe.entry.js → p-66db858a.entry.js} +1 -1
  535. package/dist/webcomponents/p-720a2324.entry.js +1 -0
  536. package/dist/webcomponents/{p-a90b8b93.entry.js → p-78cb62a8.entry.js} +1 -1
  537. package/dist/webcomponents/p-7c8deca8.entry.js +1 -0
  538. package/dist/webcomponents/p-7dc9ef8a.entry.js +1 -0
  539. package/dist/webcomponents/p-84551ee4.entry.js +1 -0
  540. package/dist/webcomponents/p-854b3db0.entry.js +1 -0
  541. package/dist/webcomponents/p-85a2eac6.entry.js +1 -0
  542. package/dist/webcomponents/p-8663e8bd.entry.js +1 -0
  543. package/dist/webcomponents/p-89f6ad8f.entry.js +1 -0
  544. package/dist/webcomponents/{p-De8UloOS.js → p-8S_ROmnq.js} +1 -1
  545. package/dist/webcomponents/p-8ca21fab.entry.js +1 -0
  546. package/dist/webcomponents/p-8cebc84b.entry.js +1 -0
  547. package/dist/webcomponents/{p-914e168d.entry.js → p-8f8dfd4b.entry.js} +1 -1
  548. package/dist/webcomponents/p-94237472.entry.js +1 -0
  549. package/dist/webcomponents/p-9ad7d724.entry.js +1 -0
  550. package/dist/webcomponents/p-B6IWa9Ph.js +1 -0
  551. package/dist/webcomponents/{p-CaxjN6Uo.js → p-BBx_EQqR.js} +1 -1
  552. package/dist/webcomponents/{p-BHf9IqGw.js → p-Bgnhf5c9.js} +1 -1
  553. package/dist/webcomponents/{p-CLQx9p9q.js → p-BhCH9S0e.js} +1 -1
  554. package/dist/webcomponents/{p-CpKvg1ok.js → p-BjNuRWXK.js} +1 -1
  555. package/dist/webcomponents/p-BoQ6_4Ks.js +1 -0
  556. package/dist/webcomponents/{p-BZ7C9duj.js → p-C0wTyoTh.js} +1 -1
  557. package/dist/webcomponents/p-C2JJBtMc.js +1 -0
  558. package/dist/webcomponents/{p-DyOgQlh2.js → p-C8k7a6D-.js} +1 -1
  559. package/dist/webcomponents/{p-c4Mh3ZZ_.js → p-C98BC5W5.js} +1 -1
  560. package/dist/webcomponents/{p-D6XirF21.js → p-C9EQ459H.js} +1 -1
  561. package/dist/webcomponents/{p-DSP8qjHL.js → p-C9iide2W.js} +1 -1
  562. package/dist/webcomponents/{p-CxzFvTgf.js → p-CCLgieAN.js} +1 -1
  563. package/dist/webcomponents/p-CCmDcLao.js +1 -0
  564. package/dist/webcomponents/p-CEk3bv0x.js +1 -0
  565. package/dist/webcomponents/p-CH8Y3GSr.js +1 -0
  566. package/dist/webcomponents/{p-BdLLGV9t.js → p-ClvhB3WW.js} +1 -1
  567. package/dist/webcomponents/{p-CzPUMw00.js → p-CmBCj61h.js} +1 -1
  568. package/dist/webcomponents/p-D0Peuz-m.js +1 -0
  569. package/dist/webcomponents/{p-BB5-CJF-.js → p-D5Jb9OcR.js} +1 -1
  570. package/dist/webcomponents/p-D6BImiVi.js +1 -0
  571. package/dist/webcomponents/p-DGsXKF67.js +1 -0
  572. package/dist/webcomponents/p-DL-q4EcN.js +1 -0
  573. package/dist/webcomponents/p-DOjVAAtq.js +2 -0
  574. package/dist/webcomponents/{p-B4idKqyn.js → p-DQZ5VHTZ.js} +1 -1
  575. package/dist/webcomponents/p-DWn9BiNn.js +1 -0
  576. package/dist/webcomponents/{p-DsAwPf2y.js → p-DdMxswn1.js} +1 -1
  577. package/dist/webcomponents/{p-BUa0YOaw.js → p-DdZLLkQ5.js} +1 -1
  578. package/dist/webcomponents/p-DfV3dFDB.js +1 -0
  579. package/dist/webcomponents/{p-CR9D6mKt.js → p-DiJD6Iqx.js} +1 -1
  580. package/dist/webcomponents/p-Dieke6TH.js +1 -0
  581. package/dist/webcomponents/p-NAjz1Xfo.js +1 -0
  582. package/dist/webcomponents/p-NwmOm8Pg.js +1 -0
  583. package/dist/webcomponents/{p-CYBR4K2p.js → p-PSJOKMWp.js} +1 -1
  584. package/dist/webcomponents/p-RQzxYnz_.js +1 -0
  585. package/dist/webcomponents/p-T2yENPvU.js +1 -0
  586. package/dist/webcomponents/p-a4846316.entry.js +1 -0
  587. package/dist/webcomponents/p-a5c70eee.entry.js +1 -0
  588. package/dist/webcomponents/{p-Bp_QFeog.js → p-a6tcNl_T.js} +1 -1
  589. package/dist/webcomponents/p-aa14cc74.entry.js +1 -0
  590. package/dist/webcomponents/p-ae7054bf.entry.js +1 -0
  591. package/dist/webcomponents/{p-e6e96be2.entry.js → p-ae8ae5bb.entry.js} +1 -1
  592. package/dist/webcomponents/{p-fUtq2xDs.js → p-au49QgoI.js} +1 -1
  593. package/dist/webcomponents/p-b095c781.entry.js +1 -0
  594. package/dist/webcomponents/{p-629c1d75.entry.js → p-b36adce3.entry.js} +1 -1
  595. package/dist/webcomponents/{p-1b7926f6.entry.js → p-b608add9.entry.js} +1 -1
  596. package/dist/webcomponents/{p-f6cf3e2b.entry.js → p-b612d870.entry.js} +1 -1
  597. package/dist/webcomponents/p-baf0d3e7.entry.js +1 -0
  598. package/dist/webcomponents/p-bb53e2e9.entry.js +1 -0
  599. package/dist/webcomponents/p-be05d450.entry.js +1 -0
  600. package/dist/webcomponents/p-c089fb5f.entry.js +1 -0
  601. package/dist/webcomponents/{p-868ed3b6.entry.js → p-ce652ff9.entry.js} +1 -1
  602. package/dist/webcomponents/{p-d34befd7.entry.js → p-cff5dd60.entry.js} +1 -1
  603. package/dist/webcomponents/p-d0a2035f.entry.js +1 -0
  604. package/dist/webcomponents/p-d1bceac6.entry.js +1 -0
  605. package/dist/webcomponents/p-d37d752e.entry.js +1 -0
  606. package/dist/webcomponents/{p-90e43440.entry.js → p-d4476052.entry.js} +1 -1
  607. package/dist/webcomponents/p-d7f91c48.entry.js +1 -0
  608. package/dist/webcomponents/p-d84f0122.entry.js +1 -0
  609. package/dist/webcomponents/p-e55a161f.entry.js +1 -0
  610. package/dist/webcomponents/p-e6be4e19.entry.js +1 -0
  611. package/dist/webcomponents/p-ec9514f8.entry.js +1 -0
  612. package/dist/webcomponents/{p-ffe01f1b.entry.js → p-f11a74c3.entry.js} +1 -1
  613. package/dist/webcomponents/{p-7aeb20d2.entry.js → p-f705fc49.entry.js} +1 -1
  614. package/dist/webcomponents/p-f930acaa.entry.js +1 -0
  615. package/dist/webcomponents/p-fe8c2243.entry.js +1 -0
  616. package/dist/webcomponents/p-fedfe376.entry.js +1 -0
  617. package/dist/webcomponents/p-ffefa09c.entry.js +1 -0
  618. package/dist/webcomponents/p-h5pyZngT.js +1 -0
  619. package/dist/webcomponents/{p-D--yCspA.js → p-hbWSMN3O.js} +1 -1
  620. package/dist/webcomponents/p-lKnUT24T.js +1 -0
  621. package/dist/webcomponents/{p-PgEzcvI6.js → p-tYuXMkCd.js} +1 -1
  622. package/dist/webcomponents/p-wQgEEOq_.js +1 -0
  623. package/dist/webcomponents/p-xDbRW9xn.js +1 -0
  624. package/dist/webcomponents/webcomponents.esm.js +1 -1
  625. package/package.json +13 -13
  626. package/dist/cjs/justifi-apple-pay.cjs.entry.js +0 -876
  627. package/dist/cjs/terminals-list-params-state-C4c8UZtP.js +0 -22
  628. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +0 -125
  629. package/dist/esm/terminals-list-params-state-C2_GlMKR.js +0 -16
  630. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.test.d.ts +0 -1
  631. package/dist/webcomponents/p-06b6b61e.entry.js +0 -1
  632. package/dist/webcomponents/p-19ccbeee.entry.js +0 -1
  633. package/dist/webcomponents/p-1b3b6956.entry.js +0 -1
  634. package/dist/webcomponents/p-1c433962.entry.js +0 -1
  635. package/dist/webcomponents/p-1f9f6bdc.entry.js +0 -1
  636. package/dist/webcomponents/p-246ef4ff.entry.js +0 -1
  637. package/dist/webcomponents/p-27fc3ef0.entry.js +0 -20
  638. package/dist/webcomponents/p-2abfee08.entry.js +0 -1
  639. package/dist/webcomponents/p-3546a5aa.entry.js +0 -1
  640. package/dist/webcomponents/p-3621a429.entry.js +0 -1
  641. package/dist/webcomponents/p-3c1d950d.entry.js +0 -1
  642. package/dist/webcomponents/p-406ba650.entry.js +0 -1
  643. package/dist/webcomponents/p-4332962a.entry.js +0 -1
  644. package/dist/webcomponents/p-4466d28d.entry.js +0 -1
  645. package/dist/webcomponents/p-44d1341c.entry.js +0 -1
  646. package/dist/webcomponents/p-46db49dd.entry.js +0 -1
  647. package/dist/webcomponents/p-4d5c71c4.entry.js +0 -1
  648. package/dist/webcomponents/p-4ea83bfd.entry.js +0 -1
  649. package/dist/webcomponents/p-558f7967.entry.js +0 -1
  650. package/dist/webcomponents/p-5c477f08.entry.js +0 -1
  651. package/dist/webcomponents/p-68329f16.entry.js +0 -1
  652. package/dist/webcomponents/p-6fe79f16.entry.js +0 -1
  653. package/dist/webcomponents/p-718f8b2c.entry.js +0 -1
  654. package/dist/webcomponents/p-73f88870.entry.js +0 -1
  655. package/dist/webcomponents/p-760a5b4f.entry.js +0 -1
  656. package/dist/webcomponents/p-779e4467.entry.js +0 -1
  657. package/dist/webcomponents/p-7c5cd118.entry.js +0 -1
  658. package/dist/webcomponents/p-7ef3cb23.entry.js +0 -1
  659. package/dist/webcomponents/p-84043580.entry.js +0 -1
  660. package/dist/webcomponents/p-87f598ef.entry.js +0 -1
  661. package/dist/webcomponents/p-8975bf93.entry.js +0 -1
  662. package/dist/webcomponents/p-906fdf0c.entry.js +0 -1
  663. package/dist/webcomponents/p-91c1e2ac.entry.js +0 -1
  664. package/dist/webcomponents/p-95348ff6.entry.js +0 -1
  665. package/dist/webcomponents/p-9f04cac4.entry.js +0 -1
  666. package/dist/webcomponents/p-BIPdn2VU.js +0 -1
  667. package/dist/webcomponents/p-BY2p6Sxk.js +0 -1
  668. package/dist/webcomponents/p-BguBT6Hn.js +0 -1
  669. package/dist/webcomponents/p-Bvp7uul3.js +0 -1
  670. package/dist/webcomponents/p-C1xGBPma.js +0 -1
  671. package/dist/webcomponents/p-C3n7-tlg.js +0 -1
  672. package/dist/webcomponents/p-CPVN4dXS.js +0 -1
  673. package/dist/webcomponents/p-CQeex56P.js +0 -1
  674. package/dist/webcomponents/p-CU4XQ3fO.js +0 -1
  675. package/dist/webcomponents/p-C_3N7nqh.js +0 -1
  676. package/dist/webcomponents/p-CrQgyTRz.js +0 -1
  677. package/dist/webcomponents/p-D-JYHdJ7.js +0 -1
  678. package/dist/webcomponents/p-DCMrHeJI.js +0 -1
  679. package/dist/webcomponents/p-DbX0g1WF.js +0 -1
  680. package/dist/webcomponents/p-DvZcI6pC.js +0 -1
  681. package/dist/webcomponents/p-DyDHaG6n.js +0 -1
  682. package/dist/webcomponents/p-IG_KR8zP.js +0 -1
  683. package/dist/webcomponents/p-RvUQ__Pq.js +0 -1
  684. package/dist/webcomponents/p-Xv8DuU3Y.js +0 -1
  685. package/dist/webcomponents/p-a57c1400.entry.js +0 -1
  686. package/dist/webcomponents/p-bc902ec2.entry.js +0 -1
  687. package/dist/webcomponents/p-bf82201a.entry.js +0 -1
  688. package/dist/webcomponents/p-c16c0cbc.entry.js +0 -1
  689. package/dist/webcomponents/p-c685fc33.entry.js +0 -1
  690. package/dist/webcomponents/p-d0f93668.entry.js +0 -1
  691. package/dist/webcomponents/p-d3f5ff95.entry.js +0 -1
  692. package/dist/webcomponents/p-df7f36aa.entry.js +0 -1
  693. package/dist/webcomponents/p-e035a92e.entry.js +0 -1
  694. package/dist/webcomponents/p-e628a0c8.entry.js +0 -1
  695. package/dist/webcomponents/p-e6516014.entry.js +0 -1
  696. package/dist/webcomponents/p-e79338f9.entry.js +0 -1
  697. package/dist/webcomponents/p-eafd179b.entry.js +0 -1
  698. package/dist/webcomponents/p-f5c3f489.entry.js +0 -1
  699. package/dist/webcomponents/p-oGKW57R8.js +0 -1
  700. package/dist/webcomponents/p-pXjOPQhG.js +0 -1
  701. package/dist/webcomponents/p-qipqIMyC.js +0 -2
  702. package/dist/webcomponents/p-xY5RkFuA.js +0 -1
@@ -1,36 +1,905 @@
1
- import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-qipqIMyC.js';
2
- import { z as text, r as radioListItem } from './parts-RvUQ__Pq.js';
3
- import { f as formatCurrency } from './utils-BscIVFn8.js';
4
- import { c as checkoutStore, o as onAnyChange, g as getAvailablePaymentMethodTypes, a as onChange } from './checkout.store-DBvS7cVB.js';
5
- import { S as StyledHost } from './styled-host-CbizlfAU.js';
1
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-DOjVAAtq.js';
2
+ import { A as Api } from './Api-DhiA2e_P.js';
3
+ import { S as StyledHost } from './styled-host-OalOsPBp.js';
6
4
  import './event-types-CZfYo5-1.js';
7
- import { H as Header1 } from './header-1-zXsamUS3.js';
8
- import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-Dh9f36Qh.js';
9
- import { H as Header3 } from './header-3-DVtaUAlf.js';
10
- import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-B_Pl1uAE.js';
11
- import './config-state-Blo0ywwc.js';
5
+ import { S as Skeleton } from './skeleton-B8EUwt4b.js';
6
+ import { c as checkoutStore, o as onAnyChange, g as getAvailablePaymentMethodTypes, a as onChange } from './checkout.store-4nUf2OuT.js';
7
+ import { D as text, r as radioListItem } from './parts-xDbRW9xn.js';
8
+ import { f as formatCurrency } from './utils-BOijEGPV.js';
9
+ import { H as Header1 } from './header-1-C1Hnxki8.js';
10
+ import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-CVme82j7.js';
11
+ import { H as Header3 } from './header-3-Bq8fpjm-.js';
12
+ import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-xM0uWxbL.js';
13
+ import './config-state-DiHV-4QK.js';
12
14
  import './dinero-HXpYMWUU.js';
13
15
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes, b as ComponentErrorMessages } from './ComponentError-Cjcsf8ku.js';
14
- import { I as ICheckoutStatus } from './Refund-Bc5By0lb.js';
16
+ import { I as ICheckoutStatus } from './Refund-B-iOTRxz.js';
15
17
  import './Pagination-CLHwhyvu.js';
16
18
  import './Business-BCoP0TAV.js';
17
19
  import './Dispute-BH0Xfn-F.js';
18
20
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
19
- import { C as CheckoutService } from './checkout.service-BCkQ9pOA.js';
20
- import { A as Api } from './Api-D4tj-h4P.js';
21
+ import { C as CheckoutService } from './checkout.service-fwbqSq8g.js';
21
22
  import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DCIW8z1f.js';
22
23
  import { C as CardBrandLabels } from './payment-method-option-utils-lUHAQVFl.js';
23
- import './index-ZfXl6Xrm.js';
24
- import './package-pXjOPQhG.js';
24
+ import './index-DJ9G-4S-.js';
25
+ import './package-DL-q4EcN.js';
25
26
  import './helpers-Mu7LQT-w.js';
26
27
  import './state-options-BX8GieXu.js';
27
28
 
29
+ var ApplePaySessionStatus;
30
+ (function (ApplePaySessionStatus) {
31
+ ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
32
+ ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
33
+ })(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
34
+ var ApplePayButtonType;
35
+ (function (ApplePayButtonType) {
36
+ ApplePayButtonType["PLAIN"] = "plain";
37
+ ApplePayButtonType["BUY"] = "buy";
38
+ ApplePayButtonType["SET_UP"] = "set-up";
39
+ ApplePayButtonType["DONATE"] = "donate";
40
+ ApplePayButtonType["CHECK_OUT"] = "check-out";
41
+ ApplePayButtonType["BOOK"] = "book";
42
+ ApplePayButtonType["SUBSCRIBE"] = "subscribe";
43
+ })(ApplePayButtonType || (ApplePayButtonType = {}));
44
+ var ApplePayButtonStyle;
45
+ (function (ApplePayButtonStyle) {
46
+ ApplePayButtonStyle["BLACK"] = "black";
47
+ ApplePayButtonStyle["WHITE"] = "white";
48
+ ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
49
+ })(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
50
+ var ApplePayMerchantCapability;
51
+ (function (ApplePayMerchantCapability) {
52
+ ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
53
+ ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
54
+ ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
55
+ ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
56
+ })(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
57
+ class ApplePayConfig {
58
+ constructor(data) {
59
+ this.merchantIdentifier = data.merchantIdentifier;
60
+ this.displayName = data.displayName;
61
+ this.initiative = data.initiative;
62
+ this.initiativeContext = data.initiativeContext;
63
+ this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
64
+ this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
65
+ this.buttonLocale = data.buttonLocale || 'en-US';
66
+ }
67
+ get isValid() {
68
+ return !!(this.merchantIdentifier &&
69
+ this.displayName &&
70
+ this.initiative &&
71
+ this.initiativeContext);
72
+ }
73
+ }
74
+ class ApplePayPaymentRequest {
75
+ constructor(data) {
76
+ this.countryCode = data.countryCode;
77
+ this.currencyCode = data.currencyCode;
78
+ this.merchantCapabilities = data.merchantCapabilities;
79
+ this.supportedNetworks = data.supportedNetworks;
80
+ this.total = data.total;
81
+ this.lineItems = data.lineItems;
82
+ this.shippingMethods = data.shippingMethods;
83
+ this.applicationData = data.applicationData;
84
+ this.supportedCountries = data.supportedCountries;
85
+ }
86
+ get isValid() {
87
+ var _a, _b, _c, _d;
88
+ return !!(this.countryCode &&
89
+ this.currencyCode &&
90
+ ((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
91
+ ((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
92
+ ((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
93
+ ((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
94
+ }
95
+ }
96
+ class ApplePayHelpers {
97
+ static isApplePaySupported() {
98
+ var _a;
99
+ return (typeof window !== 'undefined' &&
100
+ 'ApplePaySession' in window &&
101
+ ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3)));
102
+ }
103
+ static canMakePayments() {
104
+ var _a;
105
+ if (!this.isApplePaySupported()) {
106
+ return false;
107
+ }
108
+ return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
109
+ }
110
+ static async canMakePaymentsWithActiveCard(merchantIdentifier) {
111
+ var _a;
112
+ if (!this.isApplePaySupported()) {
113
+ return false;
114
+ }
115
+ try {
116
+ return ((await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier))) || false);
117
+ }
118
+ catch (error) {
119
+ console.error('Error checking Apple Pay active card:', error);
120
+ return false;
121
+ }
122
+ }
123
+ static formatAmount(amount) {
124
+ return (amount / 100).toFixed(2);
125
+ }
126
+ static parseAmount(amount) {
127
+ return Math.round(parseFloat(amount) * 100);
128
+ }
129
+ static createLineItem(label, amount, type = 'final') {
130
+ return {
131
+ label,
132
+ amount: this.formatAmount(amount),
133
+ type,
134
+ };
135
+ }
136
+ static getDefaultSupportedNetworks() {
137
+ return ['amex', 'discover', 'masterCard', 'visa'];
138
+ }
139
+ static getDefaultMerchantCapabilities() {
140
+ return [
141
+ ApplePayMerchantCapability.SUPPORTS_3DS,
142
+ ApplePayMerchantCapability.SUPPORTS_EMV,
143
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
144
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
145
+ ];
146
+ }
147
+ }
148
+
149
+ // Centralized error codes for Apple Pay service
150
+ var ApplePayServiceErrorCode;
151
+ (function (ApplePayServiceErrorCode) {
152
+ ApplePayServiceErrorCode["UNAVAILABLE"] = "UNAVAILABLE";
153
+ ApplePayServiceErrorCode["SESSION_ERROR"] = "SESSION_ERROR";
154
+ ApplePayServiceErrorCode["MERCHANT_VALIDATION_ERROR"] = "MERCHANT_VALIDATION_ERROR";
155
+ ApplePayServiceErrorCode["PAYMENT_PROCESSING_ERROR"] = "PAYMENT_PROCESSING_ERROR";
156
+ ApplePayServiceErrorCode["USER_CANCELLED"] = "USER_CANCELLED";
157
+ })(ApplePayServiceErrorCode || (ApplePayServiceErrorCode = {}));
158
+ class ApplePayService {
159
+ constructor() {
160
+ this.api = Api();
161
+ }
162
+ /**
163
+ * Initialize Apple Pay configuration
164
+ */
165
+ initialize(applePayConfig) {
166
+ this.applePayConfig = new ApplePayConfig(applePayConfig);
167
+ if (!this.applePayConfig.isValid) {
168
+ throw new Error('Invalid Apple Pay configuration provided');
169
+ }
170
+ }
171
+ /**
172
+ * Validate merchant with Apple Pay servers via API
173
+ */
174
+ async validateMerchant(authToken, accountId) {
175
+ const endpoint = 'apple_pay/merchant_session';
176
+ try {
177
+ const response = await this.api.post({
178
+ endpoint,
179
+ authToken,
180
+ headers: {
181
+ 'Sub-Account': accountId,
182
+ },
183
+ body: {
184
+ domain: window.location.host
185
+ }
186
+ });
187
+ return response;
188
+ }
189
+ catch (error) {
190
+ console.error('Backend validation failed:', error);
191
+ throw new Error('Merchant validation failed');
192
+ }
193
+ }
194
+ /**
195
+ * Process Apple Pay payment via API (fixed to match original logic)
196
+ */
197
+ async processPayment(authToken, accountId, payload) {
198
+ const endpoint = 'apple_pay/process_token';
199
+ const result = await this.api.post({
200
+ endpoint,
201
+ authToken,
202
+ body: payload,
203
+ headers: {
204
+ 'Sub-Account': accountId,
205
+ },
206
+ });
207
+ return {
208
+ success: result.id && !!result.data.token,
209
+ data: result,
210
+ };
211
+ }
212
+ /**
213
+ * Check if Apple Pay is available on this device/browser
214
+ */
215
+ isAvailable() {
216
+ return (ApplePayHelpers.isApplePaySupported() && ApplePayHelpers.canMakePayments());
217
+ }
218
+ /**
219
+ * Check if the user has an active card for the merchant
220
+ */
221
+ async canMakePaymentsWithActiveCard() {
222
+ if (!this.applePayConfig) {
223
+ throw new Error('Apple Pay not initialized. Call initialize() first.');
224
+ }
225
+ return await ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
226
+ }
227
+ /**
228
+ * Start Apple Pay session
229
+ */
230
+ async startPaymentSession(paymentRequest, authToken, accountId) {
231
+ // Begin verbose diagnostics for easier debugging in the field
232
+ console.groupCollapsed('[ApplePayService] startPaymentSession called');
233
+ console.log('[ApplePayService] raw paymentRequest:', JSON.stringify(paymentRequest, null, 2));
234
+ console.log('[ApplePayService] has authToken:', Boolean(authToken));
235
+ console.log('[ApplePayService] accountId:', accountId);
236
+ console.log('[ApplePayService] has config:', Boolean(this.applePayConfig));
237
+ if (!this.applePayConfig) {
238
+ console.error('[ApplePayService] Missing applePayConfig. Did you call initialize()?');
239
+ console.groupEnd();
240
+ throw new Error('Apple Pay not initialized. Call initialize() first.');
241
+ }
242
+ // if (!this.isAvailable()) {
243
+ // throw new Error('Apple Pay is not available on this device/browser');
244
+ // }
245
+ const request = new ApplePayPaymentRequest(paymentRequest);
246
+ console.log('[ApplePayService] created ApplePayPaymentRequest:', request);
247
+ if (!request.isValid) {
248
+ const missingFields = [];
249
+ if (!request.countryCode)
250
+ missingFields.push('countryCode');
251
+ if (!request.currencyCode)
252
+ missingFields.push('currencyCode');
253
+ if (!request.merchantCapabilities ||
254
+ request.merchantCapabilities.length === 0)
255
+ missingFields.push('merchantCapabilities');
256
+ if (!request.supportedNetworks || request.supportedNetworks.length === 0)
257
+ missingFields.push('supportedNetworks');
258
+ if (!request.total || !request.total.label || !request.total.amount)
259
+ missingFields.push('total');
260
+ console.error('[ApplePayService] Payment request is invalid. Missing/invalid:', missingFields);
261
+ console.groupEnd();
262
+ throw new Error('Invalid payment request provided');
263
+ }
264
+ this.currentPaymentRequest = request;
265
+ return new Promise((resolve, reject) => {
266
+ try {
267
+ console.log('[ApplePayService] About to instantiate ApplePaySession');
268
+ // Defensive checks for Apple Pay environment
269
+ if (typeof window === 'undefined' || !('ApplePaySession' in window)) {
270
+ console.error('[ApplePayService] ApplePaySession not available on window');
271
+ console.groupEnd();
272
+ return reject({
273
+ success: false,
274
+ error: {
275
+ code: ApplePayServiceErrorCode.UNAVAILABLE,
276
+ message: 'ApplePaySession API is not available in this environment',
277
+ },
278
+ });
279
+ }
280
+ this.currentSession = new window.ApplePaySession(3, request);
281
+ console.log('[ApplePayService] ApplePaySession instantiated:', this.currentSession);
282
+ this.setupSessionEventHandlers(resolve, reject, authToken, accountId);
283
+ console.log('[ApplePayService] Event handlers set. Beginning session...');
284
+ this.currentSession.begin();
285
+ console.log('[ApplePayService] Session.begin() called');
286
+ console.groupEnd();
287
+ }
288
+ catch (error) {
289
+ console.error('[ApplePayService] Exception while starting session:', error);
290
+ console.groupEnd();
291
+ reject({
292
+ success: false,
293
+ error: {
294
+ code: ApplePayServiceErrorCode.SESSION_ERROR,
295
+ message: error instanceof Error
296
+ ? error.message
297
+ : 'Failed to start Apple Pay session',
298
+ },
299
+ });
300
+ }
301
+ });
302
+ }
303
+ /**
304
+ * Abort current Apple Pay session
305
+ */
306
+ abortPaymentSession() {
307
+ if (this.currentSession) {
308
+ this.currentSession.abort();
309
+ this.currentSession = undefined;
310
+ this.currentPaymentRequest = undefined;
311
+ }
312
+ }
313
+ /**
314
+ * Setup Apple Pay session event handlers
315
+ */
316
+ setupSessionEventHandlers(resolve, reject, authToken, accountId) {
317
+ if (!this.currentSession ||
318
+ !this.applePayConfig ||
319
+ !this.currentPaymentRequest) {
320
+ console.error('[ApplePayService] setupSessionEventHandlers called without required state', {
321
+ hasSession: Boolean(this.currentSession),
322
+ hasConfig: Boolean(this.applePayConfig),
323
+ hasPaymentRequest: Boolean(this.currentPaymentRequest),
324
+ });
325
+ return;
326
+ }
327
+ this.currentSession.onvalidatemerchant = async () => {
328
+ console.groupCollapsed('[ApplePayService] onvalidatemerchant');
329
+ try {
330
+ console.log('[ApplePayService] accountId:', accountId);
331
+ if (!authToken) {
332
+ console.error('[ApplePayService] Missing authToken for merchant validation');
333
+ throw new Error('Authentication token not provided.');
334
+ }
335
+ const merchantSession = await this.validateMerchant(authToken, accountId);
336
+ console.log('[ApplePayService] merchantSession received');
337
+ try {
338
+ this.currentSession.completeMerchantValidation(merchantSession);
339
+ console.log('[ApplePayService] completeMerchantValidation called');
340
+ }
341
+ catch (completionError) {
342
+ console.error('Error calling completeMerchantValidation:', completionError);
343
+ throw completionError;
344
+ }
345
+ }
346
+ catch (error) {
347
+ console.error('=== MERCHANT VALIDATION ERROR ===');
348
+ console.error('Error during merchant validation:', error);
349
+ if (error && error.stack) {
350
+ console.error('Error stack:', error.stack);
351
+ }
352
+ this.currentSession.abort();
353
+ reject({
354
+ success: false,
355
+ error: {
356
+ code: ApplePayServiceErrorCode.MERCHANT_VALIDATION_ERROR,
357
+ message: error instanceof Error
358
+ ? error.message
359
+ : 'Merchant validation failed',
360
+ },
361
+ });
362
+ }
363
+ console.groupEnd();
364
+ };
365
+ this.currentSession.onpaymentauthorized = async (event) => {
366
+ var _a;
367
+ console.groupCollapsed('[ApplePayService] onpaymentauthorized');
368
+ try {
369
+ const payment = event.payment;
370
+ console.log('[ApplePayService] payment payload snapshot:', {
371
+ hasToken: Boolean(payment === null || payment === void 0 ? void 0 : payment.token),
372
+ tokenType: ((_a = payment === null || payment === void 0 ? void 0 : payment.token) === null || _a === void 0 ? void 0 : _a.paymentData) ? 'paymentData' : 'raw',
373
+ });
374
+ const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
375
+ name: this.currentPaymentRequest.total.label,
376
+ price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
377
+ description: this.currentPaymentRequest.total.label,
378
+ } });
379
+ console.log('[ApplePayService] paymentPayload prepared');
380
+ const paymentResult = await this.processPayment(authToken, accountId, paymentPayload);
381
+ console.log('[ApplePayService] processPayment result:', paymentResult);
382
+ if (paymentResult.success) {
383
+ this.currentSession.completePayment({
384
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
385
+ });
386
+ console.log('[ApplePayService] Payment success; resolving');
387
+ resolve({
388
+ success: true,
389
+ token: payment.token,
390
+ paymentMethodId: paymentResult.data.id,
391
+ });
392
+ }
393
+ else {
394
+ console.error('PSP reported payment failure:', paymentResult.data);
395
+ this.currentSession.completePayment({
396
+ status: ApplePaySessionStatus.STATUS_FAILURE,
397
+ });
398
+ reject({
399
+ success: false,
400
+ error: {
401
+ code: ApplePayServiceErrorCode.PAYMENT_PROCESSING_ERROR,
402
+ message: 'Payment processing failed',
403
+ },
404
+ });
405
+ }
406
+ }
407
+ catch (error) {
408
+ console.error('=== PAYMENT PROCESSING ERROR ===');
409
+ console.error('Error processing payment:', error);
410
+ if (error && error.stack) {
411
+ console.error('Error stack:', error.stack);
412
+ }
413
+ this.currentSession.completePayment({
414
+ status: ApplePaySessionStatus.STATUS_FAILURE,
415
+ });
416
+ reject({
417
+ success: false,
418
+ error: {
419
+ code: ApplePayServiceErrorCode.PAYMENT_PROCESSING_ERROR,
420
+ message: error instanceof Error
421
+ ? error.message
422
+ : 'Payment processing failed',
423
+ },
424
+ });
425
+ }
426
+ finally {
427
+ console.log('[ApplePayService] Cleaning up session state');
428
+ this.currentSession = undefined;
429
+ this.currentPaymentRequest = undefined;
430
+ }
431
+ console.groupEnd();
432
+ };
433
+ this.currentSession.onpaymentmethodselected = () => {
434
+ console.groupCollapsed('[ApplePayService] onpaymentmethodselected');
435
+ const paymentUpdate = {
436
+ newTotal: this.currentPaymentRequest.total,
437
+ newLineItems: this.currentPaymentRequest.lineItems || [],
438
+ };
439
+ try {
440
+ this.currentSession.completePaymentMethodSelection(paymentUpdate);
441
+ console.log('[ApplePayService] completePaymentMethodSelection called');
442
+ }
443
+ catch (error) {
444
+ console.error('Error completing payment method selection:', error);
445
+ this.currentSession.abort();
446
+ }
447
+ console.groupEnd();
448
+ };
449
+ this.currentSession.onshippingmethodselected = () => {
450
+ console.groupCollapsed('[ApplePayService] onshippingmethodselected');
451
+ this.currentSession.completeShippingMethodSelection({
452
+ status: ApplePaySessionStatus.STATUS_SUCCESS,
453
+ newTotal: this.currentPaymentRequest.total,
454
+ newLineItems: this.currentPaymentRequest.lineItems || [],
455
+ });
456
+ console.log('[ApplePayService] completeShippingMethodSelection called');
457
+ console.groupEnd();
458
+ };
459
+ this.currentSession.oncancel = (event) => {
460
+ console.groupCollapsed('[ApplePayService] oncancel');
461
+ if (event.sessionError) {
462
+ console.error(event.sessionError);
463
+ switch (event.sessionError.code) {
464
+ case 'unknown':
465
+ console.error('Unknown error - likely merchant validation issue');
466
+ console.error('This usually means:');
467
+ console.error('1. Merchant certificate is invalid or expired');
468
+ console.error('2. Merchant identifier mismatch');
469
+ console.error('3. Backend validation endpoint issues');
470
+ break;
471
+ case 'invalidMerchantSession':
472
+ console.error('Invalid merchant session provided');
473
+ console.error('Check that the merchant session from backend is valid');
474
+ break;
475
+ case 'userCancel':
476
+ console.error('User cancelled the payment');
477
+ break;
478
+ default:
479
+ console.error('Other error code:', event.sessionError.code);
480
+ }
481
+ }
482
+ this.currentSession = undefined;
483
+ this.currentPaymentRequest = undefined;
484
+ reject({
485
+ success: false,
486
+ error: {
487
+ code: ApplePayServiceErrorCode.USER_CANCELLED,
488
+ message: 'User cancelled the Apple Pay session',
489
+ },
490
+ });
491
+ console.groupEnd();
492
+ };
493
+ if ('onerror' in this.currentSession) {
494
+ this.currentSession.onerror = (error) => {
495
+ console.groupCollapsed('[ApplePayService] onerror');
496
+ console.error('=== APPLE PAY SESSION ERROR ===');
497
+ console.error('Session error:', error);
498
+ this.currentSession = undefined;
499
+ this.currentPaymentRequest = undefined;
500
+ reject({
501
+ success: false,
502
+ error: {
503
+ code: ApplePayServiceErrorCode.SESSION_ERROR,
504
+ message: 'Apple Pay session error occurred',
505
+ },
506
+ });
507
+ console.groupEnd();
508
+ };
509
+ }
510
+ }
511
+ /**
512
+ * Create a basic payment request
513
+ */
514
+ static createPaymentRequest(amount, label, countryCode = 'US', currencyCode = 'USD') {
515
+ return {
516
+ countryCode,
517
+ currencyCode,
518
+ merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
519
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
520
+ total: ApplePayHelpers.createLineItem(label, amount),
521
+ };
522
+ }
523
+ /**
524
+ * Get current configuration
525
+ */
526
+ getApplePayConfig() {
527
+ return this.applePayConfig;
528
+ }
529
+ }
530
+
531
+ const ApplePaySkeleton = (props) => {
532
+ const { isLoading } = props;
533
+ if (!isLoading) {
534
+ return null;
535
+ }
536
+ return (h("div", { class: 'container-fluid p-0' }, h("div", { class: 'row mb-3' }, h("div", { class: 'col-12 align-content-center' }, h(Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
537
+ };
538
+
539
+ const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
540
+ const ApplePayButton = (props) => {
541
+ const getApplePayButtonClass = () => {
542
+ let classes = "apple-pay-button";
543
+ switch (props.buttonStyle) {
544
+ case ApplePayButtonStyle.WHITE:
545
+ classes += " apple-pay-button-white";
546
+ break;
547
+ case ApplePayButtonStyle.WHITE_OUTLINE:
548
+ classes += " apple-pay-button-white-outline";
549
+ break;
550
+ case ApplePayButtonStyle.BLACK:
551
+ default:
552
+ classes += " apple-pay-button-black";
553
+ break;
554
+ }
555
+ switch (props.buttonType) {
556
+ case ApplePayButtonType.BUY:
557
+ classes += " apple-pay-button-type-buy";
558
+ break;
559
+ case ApplePayButtonType.DONATE:
560
+ classes += " apple-pay-button-type-donate";
561
+ break;
562
+ case ApplePayButtonType.PLAIN:
563
+ default:
564
+ classes += " apple-pay-button-type-plain";
565
+ break;
566
+ }
567
+ if (props.disabled || props.isProcessing || !props.isAvailable) {
568
+ classes += " disabled";
569
+ }
570
+ return classes;
571
+ };
572
+ const handleClick = () => {
573
+ if (!props.disabled &&
574
+ !props.isProcessing &&
575
+ props.isAvailable &&
576
+ props.clickHandler) {
577
+ props.clickHandler();
578
+ }
579
+ };
580
+ return (h("div", { class: 'apple-pay-button-container' }, h("button", Object.assign({ class: getApplePayButtonClass(), style: {
581
+ width: props.width,
582
+ height: props.height,
583
+ }, onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner()), h("style", null, `
584
+ .apple-pay-button-container {
585
+ display: block;
586
+ position: relative;
587
+ width: 100%;
588
+ }
589
+
590
+ /* Apple Pay CSS classes - these are the official Apple Pay button styles */
591
+ .apple-pay-button {
592
+ display: inline-block;
593
+ -webkit-appearance: -apple-pay-button;
594
+ -apple-pay-button-type: plain; /* default */
595
+ -apple-pay-button-style: black; /* default */
596
+ border-radius: 8px;
597
+ cursor: pointer;
598
+ border: none;
599
+ outline: none;
600
+ transition: opacity 0.2s ease;
601
+ position: relative;
602
+ }
603
+
604
+ /* Button styles */
605
+ .apple-pay-button.apple-pay-button-black {
606
+ -apple-pay-button-style: black;
607
+ }
608
+
609
+ .apple-pay-button.apple-pay-button-white {
610
+ -apple-pay-button-style: white;
611
+ }
612
+
613
+ .apple-pay-button.apple-pay-button-white-outline {
614
+ -apple-pay-button-style: white-outline;
615
+ }
616
+
617
+ /* Button types */
618
+ .apple-pay-button.apple-pay-button-type-plain {
619
+ -apple-pay-button-type: plain;
620
+ }
621
+
622
+ .apple-pay-button.apple-pay-button-type-buy {
623
+ -apple-pay-button-type: buy;
624
+ }
625
+
626
+ .apple-pay-button.apple-pay-button-type-donate {
627
+ -apple-pay-button-type: donate;
628
+ }
629
+
630
+ /* Hover and disabled states */
631
+ .apple-pay-button:hover:not(.disabled) {
632
+ opacity: 0.9;
633
+ }
634
+
635
+ .apple-pay-button.disabled {
636
+ opacity: 0.5;
637
+ cursor: not-allowed;
638
+ }
639
+
640
+ /* Processing overlay */
641
+ .processing-overlay {
642
+ position: absolute;
643
+ top: 0;
644
+ left: 0;
645
+ right: 0;
646
+ bottom: 0;
647
+ display: flex;
648
+ align-items: center;
649
+ justify-content: center;
650
+ gap: 8px;
651
+ background: rgba(0, 0, 0, 0.8);
652
+ color: white;
653
+ border-radius: 8px;
654
+ font-size: 14px;
655
+ font-weight: 500;
656
+ }
657
+
658
+ .spinner {
659
+ width: 16px;
660
+ height: 16px;
661
+ border: 2px solid rgba(255, 255, 255, 0.3);
662
+ border-top: 2px solid #fff;
663
+ border-radius: 50%;
664
+ animation: spin 1s linear infinite;
665
+ }
666
+
667
+ @keyframes spin {
668
+ 0% { transform: rotate(0deg); }
669
+ 100% { transform: rotate(360deg); }
670
+ }
671
+
672
+ /* Responsive design */
673
+ @media (max-width: 480px) {
674
+ .apple-pay-button {
675
+ width: 100% !important;
676
+ min-width: 200px;
677
+ }
678
+ }
679
+ `)));
680
+ };
681
+
682
+ const ApplePay = class {
683
+ constructor(hostRef) {
684
+ registerInstance(this, hostRef);
685
+ this.applePayStarted = createEvent(this, "applePayStarted");
686
+ this.applePayCompleted = createEvent(this, "applePayCompleted");
687
+ this.applePayCancelled = createEvent(this, "applePayCancelled");
688
+ this.applePayError = createEvent(this, "applePayError");
689
+ this.countryCode = "US";
690
+ this.merchantIdentifier = "merchant.com.staging-justifi.checkout-dev";
691
+ this.merchantDisplayName = "JustiFi Checkout";
692
+ this.initiativeContext = "dev-checkout.justifi-staging.com";
693
+ this.buttonType = ApplePayButtonType.PLAIN;
694
+ this.buttonStyle = ApplePayButtonStyle.BLACK;
695
+ this.disabled = false;
696
+ this.showSkeleton = true;
697
+ this.width = "100%";
698
+ this.height = "48px";
699
+ this.isLoading = true;
700
+ this.isProcessing = false;
701
+ this.isAvailable = false;
702
+ this.canMakePayments = false;
703
+ this.isConfigValid = true;
704
+ this.error = null;
705
+ this.handleApplePayClick = async () => {
706
+ var _a, _b;
707
+ if (this.isProcessing || this.disabled || !this.isAvailable) {
708
+ return;
709
+ }
710
+ try {
711
+ this.isProcessing = true;
712
+ this.error = null;
713
+ this.applePayStarted.emit();
714
+ console.groupCollapsed('[ApplePay Component] handleApplePayClick');
715
+ console.log('[ApplePay Component] click context:', {
716
+ isProcessing: this.isProcessing,
717
+ disabled: this.disabled,
718
+ isAvailable: this.isAvailable,
719
+ canMakePayments: this.canMakePayments,
720
+ hasService: Boolean(this.applePayService),
721
+ });
722
+ const paymentRequest = {
723
+ countryCode: this.countryCode,
724
+ currencyCode: checkoutStore.paymentCurrency,
725
+ merchantCapabilities: [
726
+ ApplePayMerchantCapability.SUPPORTS_3DS,
727
+ ApplePayMerchantCapability.SUPPORTS_CREDIT,
728
+ ApplePayMerchantCapability.SUPPORTS_DEBIT,
729
+ ],
730
+ supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
731
+ total: ApplePayHelpers.createLineItem(checkoutStore.paymentDescription, checkoutStore.paymentAmount),
732
+ };
733
+ console.log("[ApplePay Component] paymentRequest", paymentRequest);
734
+ console.log('[ApplePay Component] identifiers snapshot:', {
735
+ authTokenLength: checkoutStore.authToken ? String(checkoutStore.authToken).length : 0,
736
+ accountId: checkoutStore.accountId,
737
+ });
738
+ const result = await this.applePayService.startPaymentSession(paymentRequest, checkoutStore.authToken, checkoutStore.accountId);
739
+ console.log("[ApplePay Component] startPaymentSession result", result);
740
+ if (result.success) {
741
+ this.applePayCompleted.emit({
742
+ success: true,
743
+ token: result.token,
744
+ paymentMethodId: result.paymentMethodId,
745
+ });
746
+ }
747
+ else {
748
+ this.applePayCompleted.emit({
749
+ success: false,
750
+ error: result.error,
751
+ });
752
+ this.applePayError.emit({
753
+ error: ((_a = result.error) === null || _a === void 0 ? void 0 : _a.message) || "Payment failed",
754
+ code: ((_b = result.error) === null || _b === void 0 ? void 0 : _b.code) || ApplePay.ErrorCode.PAYMENT_FAILED,
755
+ });
756
+ }
757
+ }
758
+ catch (error) {
759
+ const errorMessage = error instanceof Error ? error.message : "Payment failed";
760
+ this.error = errorMessage;
761
+ this.applePayError.emit({ error: errorMessage, code: ApplePay.ErrorCode.PAYMENT_FAILED });
762
+ this.applePayCompleted.emit({
763
+ success: false,
764
+ error: errorMessage,
765
+ });
766
+ }
767
+ finally {
768
+ this.isProcessing = false;
769
+ console.groupEnd();
770
+ }
771
+ };
772
+ }
773
+ async initializeApplePay() {
774
+ try {
775
+ this.isLoading = true;
776
+ this.error = null;
777
+ this.isConfigValid = true;
778
+ console.groupCollapsed('[ApplePay Component] initializeApplePay');
779
+ console.log('[ApplePay Component] checkout state snapshot:', {
780
+ paymentAmount: checkoutStore.paymentAmount,
781
+ paymentCurrency: checkoutStore.paymentCurrency,
782
+ hasAuthToken: Boolean(checkoutStore.authToken),
783
+ accountId: checkoutStore.accountId,
784
+ });
785
+ const hasRequiredConfig = Boolean(checkoutStore.paymentAmount) &&
786
+ Boolean(checkoutStore.paymentCurrency) &&
787
+ Boolean(checkoutStore.authToken);
788
+ if (!hasRequiredConfig) {
789
+ this.error = "Missing required Apple Pay configuration";
790
+ this.isConfigValid = false;
791
+ console.error("Apple Pay config error: missing required values", {
792
+ paymentAmount: checkoutStore.paymentAmount,
793
+ paymentCurrency: checkoutStore.paymentCurrency,
794
+ hasAuthToken: Boolean(checkoutStore.authToken),
795
+ accountId: checkoutStore.accountId,
796
+ });
797
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.CONFIG_ERROR });
798
+ this.isLoading = false;
799
+ console.groupEnd();
800
+ return;
801
+ }
802
+ this.isAvailable = ApplePayHelpers.isApplePaySupported();
803
+ this.canMakePayments = ApplePayHelpers.canMakePayments();
804
+ console.log('[ApplePay Component] support check:', {
805
+ isAvailable: this.isAvailable,
806
+ canMakePayments: this.canMakePayments,
807
+ hasApplePaySessionOnWindow: typeof window !== 'undefined' && 'ApplePaySession' in window,
808
+ });
809
+ if (!this.isAvailable) {
810
+ this.error = "Apple Pay is not supported on this device";
811
+ console.error(this.error);
812
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.NOT_SUPPORTED });
813
+ this.isLoading = false;
814
+ console.groupEnd();
815
+ return;
816
+ }
817
+ if (!this.canMakePayments) {
818
+ this.error = "Apple Pay is not available";
819
+ console.error(this.error);
820
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.NOT_AVAILABLE });
821
+ this.isLoading = false;
822
+ console.groupEnd();
823
+ return;
824
+ }
825
+ const applePayConfig = {
826
+ merchantIdentifier: this.merchantIdentifier,
827
+ displayName: this.merchantDisplayName,
828
+ initiative: "web",
829
+ initiativeContext: this.initiativeContext,
830
+ buttonType: this.buttonType,
831
+ buttonStyle: this.buttonStyle,
832
+ };
833
+ console.log('[ApplePay Component] initializing service with config:', applePayConfig);
834
+ this.applePayService = new ApplePayService();
835
+ this.applePayService.initialize(applePayConfig);
836
+ const hasActiveCard = await this.applePayService.canMakePaymentsWithActiveCard();
837
+ if (!hasActiveCard) {
838
+ console.warn("No Apple Pay cards available, but continuing...");
839
+ }
840
+ }
841
+ catch (error) {
842
+ console.error("Apple Pay initialization error:", error);
843
+ this.error =
844
+ error instanceof Error
845
+ ? error.message
846
+ : "Failed to initialize Apple Pay";
847
+ this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.INITIALIZATION_ERROR });
848
+ }
849
+ finally {
850
+ this.isLoading = false;
851
+ console.groupEnd();
852
+ }
853
+ }
854
+ async isSupported() {
855
+ return this.isAvailable && this.canMakePayments;
856
+ }
857
+ async getPaymentMethods() {
858
+ if (!this.isAvailable) {
859
+ return [];
860
+ }
861
+ return ApplePayHelpers.getDefaultSupportedNetworks();
862
+ }
863
+ async abort() {
864
+ this.applePayService.abortPaymentSession();
865
+ this.isProcessing = false;
866
+ this.applePayCancelled.emit();
867
+ }
868
+ render() {
869
+ if (!checkoutStore.applePayEnabled) {
870
+ // Render nothing when Apple Pay is disabled at the checkout settings level
871
+ console.log('[ApplePay Component] Apple Pay disabled in checkout settings; not rendering');
872
+ return null;
873
+ }
874
+ const isReady = !this.isLoading &&
875
+ this.isAvailable &&
876
+ this.canMakePayments &&
877
+ this.isConfigValid;
878
+ return (h(StyledHost, null, checkoutStore.checkoutLoaded && (h("script", { async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
879
+ console.log('[ApplePay Component] Apple Pay SDK script loaded');
880
+ this.initializeApplePay();
881
+ } })), h("div", { class: 'apple-pay-container' }, h(ApplePaySkeleton, { isLoading: this.isLoading }), isReady && (h(ApplePayButton, { buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick, width: this.width, height: this.height }))), h("style", null, `
882
+ .apple-pay-container {
883
+ width: 100%;
884
+ }
885
+ `)));
886
+ }
887
+ };
888
+ // Centralized error codes for the Apple Pay component layer
889
+ ApplePay.ErrorCode = {
890
+ CONFIG_ERROR: 'CONFIG_ERROR',
891
+ NOT_SUPPORTED: 'NOT_SUPPORTED',
892
+ NOT_AVAILABLE: 'NOT_AVAILABLE',
893
+ INITIALIZATION_ERROR: 'INITIALIZATION_ERROR',
894
+ PAYMENT_FAILED: 'PAYMENT_FAILED',
895
+ };
896
+
28
897
  const Summary = class {
29
898
  constructor(hostRef) {
30
899
  registerInstance(this, hostRef);
31
900
  }
32
901
  render() {
33
- return (h(StyledHost, { key: '3161e6f6a196c79d684574cafbc90bcf741b2150' }, h("section", { key: '594b4485ed4fd9d7c1ee7f4556f071139f92ef0c' }, h("div", { key: '5c2d14677dda6fc7ddcb074d4887b839385dca3a' }, h("div", { key: 'fb850cd7e9c11741349710696dd4e6241c98e805', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '959014d7fa2a9c97bae0c986313a604930c1e0f3' }, h("span", { key: '14ab0932a083568419b1c36c95f9072c73962b11', part: text }, "Total"), "\u00A0", h("span", { key: '08a9e00332253070ae984b77eb2a9bab88eb3472', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
902
+ return (h(StyledHost, { key: 'abd92b499208321582b08a490c78c9167be2ebd4' }, h("section", { key: '38e15cef5a19a43249d7ecf3d4eb4ea8e032f248' }, h("div", { key: '747f811012ed9707265369e59dbde8cd7ad3bca6' }, h("div", { key: '8575f50759664d5c64d235025699c81f055267ca', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: 'af77776bbe21bce77586447bbf445e4c5d8c1165' }, h("span", { key: '5cdaaec454118197b3e37a942d83907e72444342', part: text }, "Total"), "\u00A0", h("span", { key: 'ccc35217ac9740d5a00b7abbcec4133848afcc28', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
34
903
  }
35
904
  };
36
905
 
@@ -46,7 +915,7 @@ const Header = class {
46
915
  }
47
916
  render() {
48
917
  const HeaderComponent = this.levels[this.level];
49
- return (h(StyledHost, { key: 'eb3651b698897193d34a6c6456cd57dd0bd0bc43' }, h(HeaderComponent, { key: '39caee687f93d3d4d90e62d9fbcae318eaa8022e', text: this.text, class: this.class })));
918
+ return (h(StyledHost, { key: 'e1d39365c2ff2c291a42b53d6bcbe1d97d602778' }, h(HeaderComponent, { key: '0b8c8c3a42ff2151e3b293cafeeaeda72e94d767', text: this.text, class: this.class })));
50
919
  }
51
920
  };
52
921
 
@@ -248,7 +1117,7 @@ const ModularCheckout = class {
248
1117
  }
249
1118
  }
250
1119
  updateStore(checkout) {
251
- var _a, _b, _c, _d, _e;
1120
+ var _a, _b, _c, _d, _e, _f;
252
1121
  checkoutStore.accountId = checkout.account_id;
253
1122
  checkoutStore.checkoutLoaded = true;
254
1123
  checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new PaymentMethod(paymentMethod));
@@ -259,11 +1128,12 @@ const ModularCheckout = class {
259
1128
  checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
260
1129
  checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
261
1130
  checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
262
- checkoutStore.bnplProviderClientId = (_b = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _b === void 0 ? void 0 : _b.provider_client_id;
263
- checkoutStore.bnplProviderMode = (_c = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _c === void 0 ? void 0 : _c.provider_mode;
264
- checkoutStore.bnplProviderApiVersion = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_api_version;
1131
+ checkoutStore.applePayEnabled = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.apple_payments;
1132
+ checkoutStore.bnplProviderClientId = (_c = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _c === void 0 ? void 0 : _c.provider_client_id;
1133
+ checkoutStore.bnplProviderMode = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_mode;
1134
+ checkoutStore.bnplProviderApiVersion = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_api_version;
265
1135
  checkoutStore.bnplProviderCheckoutUrl =
266
- (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_checkout_url;
1136
+ (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_checkout_url;
267
1137
  }
268
1138
  emitCheckoutChanged() {
269
1139
  const detail = {
@@ -474,7 +1344,7 @@ const ModularCheckout = class {
474
1344
  });
475
1345
  }
476
1346
  render() {
477
- return h(Host, { key: 'dbe1fe78f8206fef2e3f4f51628d716786dea858' });
1347
+ return h(Host, { key: 'a3619798ffe1de168262d61d7855209b46b01ab5' });
478
1348
  }
479
1349
  get hostEl() { return getElement(this); }
480
1350
  };
@@ -1162,7 +2032,7 @@ const SezzlePaymentMethod = class {
1162
2032
  }
1163
2033
  render() {
1164
2034
  var _a, _b;
1165
- if (!checkoutStore.bnplEnabled || checkoutStore.disableBnpl) {
2035
+ if (!checkoutStore.bnplEnabled) {
1166
2036
  console.warn('justifi-sezzle-payment-method: BNPL is not enabled for this account.');
1167
2037
  return null;
1168
2038
  }
@@ -1415,7 +2285,7 @@ const TokenizePaymentMethod = class {
1415
2285
  return paymentMethodType === PAYMENT_METHODS.NEW_CARD ? (h("justifi-card-form", { ref: (el) => (this.paymentMethodFormRef = el) })) : (h("justifi-bank-account-form", { ref: (el) => (this.paymentMethodFormRef = el) }));
1416
2286
  }
1417
2287
  render() {
1418
- return (h(StyledHost, { key: '5fc5dad15215fe24b421f4d6c13355fb849b8a76' }, h("form", { key: '0e0330e5b11ee3ae0bef9e092fa2fb2a0a6af3e7' }, h("fieldset", { key: 'ee4c026ccda62a249e019a9e105e40ea465fc400' }, h("div", { key: '15a8a86fa5be8a545745260d76a8c3b2569d6a0e', class: "row gy-3" }, h("div", { key: 'bbbeed6ee96311394a876b4beb206e8e335184c2', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'da2a2009abe4348e25a5fc712557e81e9f6c4c1f', class: "col-12" }, h("justifi-button", { key: '050939c757999383226f281ee0eff1ec178be203', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
2288
+ return (h(StyledHost, { key: 'bf221d17739bf70c3f581f3b9791a725e76c3f35' }, h("form", { key: 'df117d42d4160f31df1fca5d6903967cc48ad573' }, h("fieldset", { key: '550e670feffb405c669d44c44eb9073f535c6cb6' }, h("div", { key: '8eff7d3ab19618da54161220b92641bf19bfa82d', class: "row gy-3" }, h("div", { key: 'bf9d19e92be74abf48ce65c97efb3f9df52d4c3c', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'eef1f4e1e03c2263efb51ae94085c5a3d73a9166', class: "col-12" }, h("justifi-button", { key: 'f0e5697e658236610da45c34e64a8cbb3f0f9d95', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
1419
2289
  }
1420
2290
  get host() { return getElement(this); }
1421
2291
  static get watchers() { return {
@@ -1424,4 +2294,4 @@ const TokenizePaymentMethod = class {
1424
2294
  }; }
1425
2295
  };
1426
2296
 
1427
- export { Summary as justifi_checkout_summary, Header as justifi_header, ModularCheckout as justifi_modular_checkout, PlaidPaymentMethod as justifi_plaid_payment_method, SavedPaymentMethods as justifi_saved_payment_methods, SezzlePaymentMethod as justifi_sezzle_payment_method, TokenizePaymentMethod as justifi_tokenize_payment_method };
2297
+ export { ApplePay as justifi_apple_pay, Summary as justifi_checkout_summary, Header as justifi_header, ModularCheckout as justifi_modular_checkout, PlaidPaymentMethod as justifi_plaid_payment_method, SavedPaymentMethods as justifi_saved_payment_methods, SezzlePaymentMethod as justifi_sezzle_payment_method, TokenizePaymentMethod as justifi_tokenize_payment_method };