@justifi/webcomponents 6.12.7-rc.3 → 6.13.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 (506) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Analytics-GYqUuEeO.js → Analytics-DaegoP5G.js} +3 -3
  3. package/dist/cjs/{Api-Bukk55YZ.js → Api-BioDE5he.js} +1 -1
  4. package/dist/cjs/{Plaid-6FYKaSTI.js → Plaid-QLOFOTeC.js} +3 -3
  5. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  6. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +37 -27
  7. package/dist/cjs/additional-questions_5.cjs.entry.js +1 -1
  8. package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
  9. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +5 -5
  10. package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +2 -2
  11. package/dist/cjs/bank-account-form.cjs.entry.js +34 -5
  12. package/dist/cjs/{business-identity-schema-CC1wOwXd.js → business-identity-schema-BA385xf-.js} +3 -3
  13. package/dist/cjs/{business.service-t-p3-gP-.js → business.service-DOGeb2O6.js} +2 -2
  14. package/dist/cjs/card-form.cjs.entry.js +5 -5
  15. package/dist/cjs/{check-pkg-version-wcoV7eK1.js → check-pkg-version-BNGOOokA.js} +1 -1
  16. package/dist/cjs/checkout-actions-CjR16i7o.js +62 -0
  17. package/dist/cjs/{checkout.service-BiLHhmjP.js → checkout.service-Bdr5qUHj.js} +2 -2
  18. package/dist/cjs/{checkout.store-CztwuCnG.js → checkout.store-CZHrIuaP.js} +9 -3
  19. package/dist/cjs/{country-config-Ck-eEeZZ.js → country-config-C1bWmF8P.js} +9 -4
  20. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  21. package/dist/cjs/dispute-notification_2.cjs.entry.js +15 -15
  22. package/dist/cjs/{event-types-DcN23uI_.js → event-types-DWDQKDv4.js} +2 -2
  23. package/dist/cjs/form-address-fields_3.cjs.entry.js +3 -3
  24. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  26. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  27. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  28. package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
  29. package/dist/cjs/form-control-number_2.cjs.entry.js +3 -3
  30. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  31. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  32. package/dist/cjs/{get-business-BqO_Sa6H.js → get-business-CrxvWZh6.js} +2 -2
  33. package/dist/cjs/{get-payment-details-Cs-P5xoW.js → get-payment-details-iCEkGDy4.js} +2 -2
  34. package/dist/cjs/{get-subaccounts-BbiIbUED.js → get-subaccounts-Dgl7ECtg.js} +3 -3
  35. package/dist/cjs/hidden-input_2.cjs.entry.js +6 -6
  36. package/dist/cjs/{insurance-state-Xe2auE-N.js → insurance-state-B-XQRmMs.js} +1 -1
  37. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +62 -92
  39. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +7 -7
  40. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +17 -7
  41. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
  43. package/dist/cjs/justifi-business-details.cjs.entry.js +9 -9
  44. package/dist/cjs/justifi-business-form.cjs.entry.js +12 -12
  45. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  46. package/dist/cjs/justifi-card-form.cjs.entry.js +7 -7
  47. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3141 -0
  48. package/dist/cjs/justifi-checkout.cjs.entry.js +9 -9
  49. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +4 -4
  50. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -11
  51. package/dist/cjs/justifi-dispute-management.cjs.entry.js +9 -9
  52. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +10 -10
  53. package/dist/cjs/justifi-order-terminals.cjs.entry.js +11 -11
  54. package/dist/cjs/justifi-payment-details.cjs.entry.js +17 -17
  55. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
  56. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +9 -9
  57. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-payments-list.cjs.entry.js +10 -10
  59. package/dist/cjs/justifi-payout-details.cjs.entry.js +12 -12
  60. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +9 -9
  61. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
  62. package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -14
  63. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +208 -0
  64. package/dist/cjs/justifi-refund-payment.cjs.entry.js +11 -11
  65. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  66. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -9
  67. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  68. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
  69. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +10 -10
  70. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
  71. package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -13
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/{package-BJUD_YSJ.js → package-BKwTzSig.js} +1 -1
  74. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  75. package/dist/cjs/{payment-provisioning-actions-Dnvqbh2N.js → payment-provisioning-actions-B4x7lnyF.js} +9 -9
  76. package/dist/cjs/{payment.service-DWK3fO_g.js → payment.service-a5EL3s2d.js} +2 -2
  77. package/dist/cjs/{payout.service-Cjc3PPfP.js → payout.service-BJtGBHsQ.js} +2 -2
  78. package/dist/cjs/{payouts-status-DluZkb6X.js → payouts-status-viYMBknO.js} +2 -2
  79. package/dist/cjs/{plaid.service-BaHuE_zZ.js → plaid.service-DpiLY-5D.js} +2 -2
  80. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  81. package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
  82. package/dist/cjs/{schema-validations-DackMxv7.js → schema-validations-C2XsZnqK.js} +2 -2
  83. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  84. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  85. package/dist/cjs/{terminal.service-DmlAGx7U.js → terminal.service-DN2A-bNx.js} +2 -2
  86. package/dist/cjs/{utils-dnVbB8d6.js → utils-BVM6JCW0.js} +1 -1
  87. package/dist/cjs/{utils-BHi4j5rB.js → utils-D1CWnhex.js} +4 -4
  88. package/dist/cjs/webcomponents.cjs.js +1 -1
  89. package/dist/collection/actions/payment/get-payments.js +1 -1
  90. package/dist/collection/actions/refund/refund-actions.js +1 -1
  91. package/dist/collection/actions/terminal/get-terminal-orders.js +1 -1
  92. package/dist/collection/actions/void/void-actions.js +1 -1
  93. package/dist/collection/collection-manifest.json +3 -1
  94. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
  95. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  96. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  97. package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +23 -13
  98. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  99. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +7 -7
  100. package/dist/collection/components/business-forms/schemas/business-address-schema.js +1 -1
  101. package/dist/collection/components/business-forms/schemas/schema-helpers.js +1 -1
  102. package/dist/collection/components/business-forms/utils/country-config.js +9 -4
  103. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +30 -2
  104. package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
  105. package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
  106. package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
  107. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  108. package/dist/collection/components/checkout/justifi-checkout.js +21 -2
  109. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
  110. package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
  111. package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +128 -0
  112. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
  113. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
  114. package/dist/collection/components/dispute-management/dispute-notification.js +3 -3
  115. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  116. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  117. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  118. package/dist/collection/components/dispute-management/dispute-response/dispute-response-actions.js +3 -3
  119. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  120. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  123. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  125. package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
  126. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  127. package/dist/collection/components/filters/utils.js +1 -1
  128. package/dist/collection/components/gross-payment-chart/chart-utils.js +3 -3
  129. package/dist/collection/components/insurance/insurance-state.js +1 -1
  130. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +19 -13
  131. package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +0 -21
  132. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  133. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +11 -1
  134. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  135. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  136. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  137. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  138. package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +10 -6
  139. package/dist/collection/components/modular-checkout/sub-components/justifi-plaid-payment-method.js +15 -2
  140. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  141. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  142. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  143. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  144. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  145. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  146. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  147. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  148. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  149. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  150. package/dist/collection/components/payouts-list/justifi-payouts-list.js +4 -4
  151. package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +349 -0
  152. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  153. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
  154. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  155. package/dist/collection/components/terminals-list/justifi-terminals-list.js +4 -4
  156. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +5 -3
  157. package/dist/collection/store/checkout.store.js +9 -3
  158. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  159. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  160. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  161. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  162. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  163. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  164. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  165. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  166. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  167. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  168. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  170. package/dist/collection/ui-components/form/hidden-input.js +2 -2
  171. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  172. package/dist/collection/ui-components/internal-button.js +1 -1
  173. package/dist/collection/ui-components/radio-list-item.js +1 -1
  174. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  175. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  176. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  177. package/dist/collection/utils/utils.js +4 -4
  178. package/dist/docs.json +314 -39
  179. package/dist/esm/{Analytics-Bg6T3DQV.js → Analytics-D_HycaxE.js} +3 -3
  180. package/dist/esm/{Api-DMd8hTI-.js → Api-DjAL73GZ.js} +1 -1
  181. package/dist/esm/{Plaid-CeYMgNts.js → Plaid-C8qoMZLV.js} +2 -2
  182. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  183. package/dist/esm/additional-questions-form-step_15.entry.js +37 -27
  184. package/dist/esm/additional-questions_5.entry.js +1 -1
  185. package/dist/esm/additional-statement_8.entry.js +8 -8
  186. package/dist/esm/bank-account-billing-form-simple_4.entry.js +5 -5
  187. package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
  188. package/dist/esm/bank-account-form.entry.js +34 -5
  189. package/dist/esm/{business-identity-schema-D8L_UfWl.js → business-identity-schema-Csou60ZC.js} +3 -3
  190. package/dist/esm/{business.service-ZN8yGby7.js → business.service-BGXqAyxu.js} +2 -2
  191. package/dist/esm/card-form.entry.js +5 -5
  192. package/dist/esm/{check-pkg-version-BXdtk1fk.js → check-pkg-version-BfrWk42V.js} +1 -1
  193. package/dist/esm/checkout-actions-D8JS2l5e.js +59 -0
  194. package/dist/esm/{checkout.service-D_6Zw77V.js → checkout.service-sHKaW-M0.js} +2 -2
  195. package/dist/esm/{checkout.store-DFnkcDZ8.js → checkout.store-DibfdUMm.js} +9 -3
  196. package/dist/esm/{country-config-BW2dUoTJ.js → country-config-CEJVOOGe.js} +9 -4
  197. package/dist/esm/custom-popper_2.entry.js +2 -2
  198. package/dist/esm/dispute-notification_2.entry.js +15 -15
  199. package/dist/esm/{event-types-DXYUs2vg.js → event-types-ynZLear3.js} +2 -2
  200. package/dist/esm/form-address-fields_3.entry.js +3 -3
  201. package/dist/esm/form-control-checkbox.entry.js +2 -2
  202. package/dist/esm/form-control-date.entry.js +2 -2
  203. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  204. package/dist/esm/form-control-file.entry.js +2 -2
  205. package/dist/esm/form-control-monetary.entry.js +3 -3
  206. package/dist/esm/form-control-number_2.entry.js +3 -3
  207. package/dist/esm/form-control-radio.entry.js +2 -2
  208. package/dist/esm/form-control-select_2.entry.js +4 -4
  209. package/dist/esm/{get-business-rP66Ger-.js → get-business-DAv_b3vf.js} +2 -2
  210. package/dist/esm/{get-payment-details-zCO59zZz.js → get-payment-details-Bipad3jX.js} +2 -2
  211. package/dist/esm/{get-subaccounts-DUopdVm2.js → get-subaccounts-FqCT2s3S.js} +3 -3
  212. package/dist/esm/hidden-input_2.entry.js +6 -6
  213. package/dist/esm/{insurance-state-CLGc1-_4.js → insurance-state-C5OZqDCT.js} +1 -1
  214. package/dist/esm/internal-button.entry.js +1 -1
  215. package/dist/esm/justifi-apple-pay_11.entry.js +60 -90
  216. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +7 -7
  217. package/dist/esm/justifi-bank-account-form.entry.js +17 -7
  218. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  219. package/dist/esm/justifi-billing-form.entry.js +1 -1
  220. package/dist/esm/justifi-business-details.entry.js +9 -9
  221. package/dist/esm/justifi-business-form.entry.js +12 -12
  222. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  223. package/dist/esm/justifi-card-form.entry.js +7 -7
  224. package/dist/esm/justifi-checkout-qr-code.entry.js +3139 -0
  225. package/dist/esm/justifi-checkout.entry.js +9 -9
  226. package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -4
  227. package/dist/esm/justifi-checkouts-list.entry.js +11 -11
  228. package/dist/esm/justifi-dispute-management.entry.js +9 -9
  229. package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
  230. package/dist/esm/justifi-order-terminals.entry.js +11 -11
  231. package/dist/esm/justifi-payment-details.entry.js +17 -17
  232. package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
  233. package/dist/esm/justifi-payment-transactions-list.entry.js +9 -9
  234. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  235. package/dist/esm/justifi-payments-list.entry.js +10 -10
  236. package/dist/esm/justifi-payout-details.entry.js +12 -12
  237. package/dist/esm/justifi-payout-transactions-list.entry.js +9 -9
  238. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
  239. package/dist/esm/justifi-payouts-list.entry.js +14 -14
  240. package/dist/esm/justifi-qr-terminal.entry.js +206 -0
  241. package/dist/esm/justifi-refund-payment.entry.js +11 -11
  242. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  243. package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -9
  244. package/dist/esm/justifi-skeleton.entry.js +1 -1
  245. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
  246. package/dist/esm/justifi-terminal-orders-list.entry.js +10 -10
  247. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
  248. package/dist/esm/justifi-terminals-list.entry.js +13 -13
  249. package/dist/esm/loader.js +1 -1
  250. package/dist/esm/{package-DSjpDUHk.js → package-DSavNeRB.js} +1 -1
  251. package/dist/esm/payment-method-option.entry.js +1 -1
  252. package/dist/esm/{payment-provisioning-actions-BfMdBzzh.js → payment-provisioning-actions-DI3QUsjh.js} +9 -9
  253. package/dist/esm/{payment.service-CRgN4aGV.js → payment.service-wSNYSRyl.js} +2 -2
  254. package/dist/esm/{payout.service-B_APc0x_.js → payout.service-CTAksNmD.js} +2 -2
  255. package/dist/esm/{payouts-status-klusV0rp.js → payouts-status-CeZoirpf.js} +2 -2
  256. package/dist/esm/{plaid.service-DbrHt5kj.js → plaid.service-5EpJEdwX.js} +2 -2
  257. package/dist/esm/radio-list-item.entry.js +1 -1
  258. package/dist/esm/save-new-payment-method.entry.js +2 -2
  259. package/dist/esm/{schema-validations-CjqWFLKt.js → schema-validations-CySYE883.js} +2 -2
  260. package/dist/esm/table-filters-menu.entry.js +1 -1
  261. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  262. package/dist/esm/{terminal.service-B5ezhIvW.js → terminal.service-xjfU0mJT.js} +2 -2
  263. package/dist/esm/{utils-BTtxWI2r.js → utils-CcA8Y5hs.js} +4 -4
  264. package/dist/esm/{utils-CfBIEaJJ.js → utils-myniydlM.js} +1 -1
  265. package/dist/esm/webcomponents.js +1 -1
  266. package/dist/module/Plaid.js +1 -1
  267. package/dist/module/additional-questions-form-step2.js +1 -1
  268. package/dist/module/additional-statement2.js +1 -1
  269. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  270. package/dist/module/bank-account-form2.js +30 -2
  271. package/dist/module/business-address-schema.js +1 -1
  272. package/dist/module/business-core-info-form-step2.js +1 -1
  273. package/dist/module/business-representative-form-step2.js +1 -1
  274. package/dist/module/cancellation-policy2.js +1 -1
  275. package/dist/module/card-billing-form-simple2.js +1 -1
  276. package/dist/module/card-form2.js +2 -2
  277. package/dist/module/checkout-actions.js +59 -0
  278. package/dist/module/checkout.store.js +9 -3
  279. package/dist/module/country-config.js +9 -4
  280. package/dist/module/custom-popper2.js +2 -2
  281. package/dist/module/customer-details2.js +1 -1
  282. package/dist/module/dispute-notification2.js +3 -3
  283. package/dist/module/dispute-response2.js +1 -1
  284. package/dist/module/document-upload-form-step2.js +24 -14
  285. package/dist/module/duplicate-charge2.js +1 -1
  286. package/dist/module/electronic-evidence2.js +1 -1
  287. package/dist/module/event-types3.js +3 -3
  288. package/dist/module/form-control-checkbox2.js +2 -2
  289. package/dist/module/form-control-date2.js +2 -2
  290. package/dist/module/form-control-file-v22.js +1 -1
  291. package/dist/module/form-control-file2.js +2 -2
  292. package/dist/module/form-control-monetary2.js +2 -2
  293. package/dist/module/form-control-number-masked2.js +2 -2
  294. package/dist/module/form-control-number2.js +2 -2
  295. package/dist/module/form-control-radio2.js +2 -2
  296. package/dist/module/form-control-select2.js +2 -2
  297. package/dist/module/form-control-text2.js +2 -2
  298. package/dist/module/form-control-textarea2.js +2 -2
  299. package/dist/module/get-payment-details.js +1 -1
  300. package/dist/module/hidden-input2.js +2 -2
  301. package/dist/module/iframe-input2.js +3 -3
  302. package/dist/module/insurance-state.js +1 -1
  303. package/dist/module/internal-button2.js +1 -1
  304. package/dist/module/justifi-apple-pay2.js +0 -2
  305. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  306. package/dist/module/justifi-bank-account-form.js +11 -1
  307. package/dist/module/justifi-billing-form-full.js +1 -1
  308. package/dist/module/justifi-billing-form.js +1 -1
  309. package/dist/module/justifi-button2.js +1 -1
  310. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  311. package/dist/module/justifi-card-form.js +1 -1
  312. package/dist/module/justifi-checkout-qr-code.d.ts +11 -0
  313. package/dist/module/justifi-checkout-qr-code.js +6 -0
  314. package/dist/module/justifi-checkout-qr-code2.js +3154 -0
  315. package/dist/module/justifi-checkout-summary2.js +1 -1
  316. package/dist/module/justifi-checkout.js +3 -2
  317. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  318. package/dist/module/justifi-checkouts-list.js +3 -3
  319. package/dist/module/justifi-dispute-management.js +2 -2
  320. package/dist/module/justifi-google-pay2.js +7 -2
  321. package/dist/module/justifi-gross-payment-chart.js +3 -3
  322. package/dist/module/justifi-header2.js +1 -1
  323. package/dist/module/justifi-modular-checkout2.js +21 -70
  324. package/dist/module/justifi-order-terminals.js +2 -2
  325. package/dist/module/justifi-payment-details.js +9 -9
  326. package/dist/module/justifi-payment-transactions-list.js +2 -2
  327. package/dist/module/justifi-payments-list-filters.js +2 -2
  328. package/dist/module/justifi-payments-list.js +3 -3
  329. package/dist/module/justifi-payout-details.js +4 -4
  330. package/dist/module/justifi-payout-transactions-list.js +2 -2
  331. package/dist/module/justifi-payouts-list-filters.js +2 -2
  332. package/dist/module/justifi-payouts-list.js +5 -5
  333. package/dist/module/justifi-plaid-payment-method2.js +14 -2
  334. package/dist/module/justifi-qr-terminal.d.ts +11 -0
  335. package/dist/module/justifi-qr-terminal.js +234 -0
  336. package/dist/module/justifi-refund-payment.js +3 -3
  337. package/dist/module/justifi-save-new-payment-method.js +1 -1
  338. package/dist/module/justifi-skeleton.js +1 -1
  339. package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
  340. package/dist/module/justifi-terminal-orders-list.js +4 -4
  341. package/dist/module/justifi-terminals-list-filters.js +2 -2
  342. package/dist/module/justifi-terminals-list.js +5 -5
  343. package/dist/module/justifi-tokenize-payment-method2.js +5 -3
  344. package/dist/module/legal-address-form-step2.js +1 -1
  345. package/dist/module/package.js +1 -1
  346. package/dist/module/payment-method-option.js +1 -1
  347. package/dist/module/payment-provisioning-actions.js +7 -7
  348. package/dist/module/product-or-service2.js +1 -1
  349. package/dist/module/radio-list-item2.js +1 -1
  350. package/dist/module/refund-policy2.js +1 -1
  351. package/dist/module/save-new-payment-method2.js +1 -1
  352. package/dist/module/schema-validations.js +1 -1
  353. package/dist/module/shipping-details2.js +1 -1
  354. package/dist/module/table-filters-menu2.js +1 -1
  355. package/dist/module/terminal-quantity-selector2.js +1 -1
  356. package/dist/module/utils2.js +4 -4
  357. package/dist/stencil.config.js +40 -0
  358. package/dist/types/api/Checkout.d.ts +1 -2
  359. package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +5 -1
  360. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +2 -0
  361. package/dist/types/components/checkout/justifi-checkout.d.ts +2 -0
  362. package/dist/types/components/checkout-qr-code/justifi-checkout-qr-code.d.ts +18 -0
  363. package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +0 -1
  364. package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-form.d.ts +1 -1
  365. package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +3 -1
  366. package/dist/types/components/modular-checkout/sub-components/justifi-plaid-payment-method.d.ts +1 -0
  367. package/dist/types/components/qr-terminal/justifi-qr-terminal.d.ts +42 -0
  368. package/dist/types/components.d.ts +103 -11
  369. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/stencil.config.d.ts +2 -0
  370. package/dist/types/store/checkout.store.d.ts +2 -0
  371. package/dist/webcomponents/p-015288c4.entry.js +1 -0
  372. package/dist/webcomponents/p-055640f9.entry.js +1 -0
  373. package/dist/webcomponents/p-0d98518e.entry.js +1 -0
  374. package/dist/webcomponents/p-0ea6aa9c.entry.js +1 -0
  375. package/dist/webcomponents/p-0ede7e82.entry.js +1 -0
  376. package/dist/webcomponents/{p-37676092.entry.js → p-0f2a1ac9.entry.js} +1 -1
  377. package/dist/webcomponents/p-1068ae13.entry.js +1 -0
  378. package/dist/webcomponents/p-14a03ad0.entry.js +1 -0
  379. package/dist/webcomponents/{p-69c5658c.entry.js → p-1a30f2d9.entry.js} +1 -1
  380. package/dist/webcomponents/p-1b51dea9.entry.js +1 -0
  381. package/dist/webcomponents/{p-89cd31f2.entry.js → p-1de248b1.entry.js} +1 -1
  382. package/dist/webcomponents/p-218b926a.entry.js +1 -0
  383. package/dist/webcomponents/p-25215ee7.entry.js +1 -0
  384. package/dist/webcomponents/p-266870f0.entry.js +1 -0
  385. package/dist/webcomponents/p-27c35a85.entry.js +1 -0
  386. package/dist/webcomponents/{p-D8MQn8ZW.js → p-2mMMaism.js} +1 -1
  387. package/dist/webcomponents/p-3a2629a2.entry.js +1 -0
  388. package/dist/webcomponents/p-3e56bbe5.entry.js +1 -0
  389. package/dist/webcomponents/p-4791c6d7.entry.js +1 -0
  390. package/dist/webcomponents/p-49d9c0a4.entry.js +1 -0
  391. package/dist/webcomponents/{p-49c0879b.entry.js → p-4a30693b.entry.js} +1 -1
  392. package/dist/webcomponents/{p-b2224f12.entry.js → p-4fab9314.entry.js} +1 -1
  393. package/dist/webcomponents/p-5218bcd0.entry.js +1 -0
  394. package/dist/webcomponents/{p-4b14b7e7.entry.js → p-53d775b9.entry.js} +1 -1
  395. package/dist/webcomponents/{p-70dcd833.entry.js → p-5a58f606.entry.js} +1 -1
  396. package/dist/webcomponents/p-5f6bc8e7.entry.js +1 -0
  397. package/dist/webcomponents/p-65908b5f.entry.js +1 -0
  398. package/dist/webcomponents/{p-5ec9634c.entry.js → p-67364f1d.entry.js} +1 -1
  399. package/dist/webcomponents/p-6bf4fea8.entry.js +1 -0
  400. package/dist/webcomponents/{p-0e4cda77.entry.js → p-6c3e9ebd.entry.js} +1 -1
  401. package/dist/webcomponents/{p-a9695714.entry.js → p-6fe329d6.entry.js} +1 -1
  402. package/dist/webcomponents/p-70e05aec.entry.js +1 -0
  403. package/dist/webcomponents/p-73deced9.entry.js +1 -0
  404. package/dist/webcomponents/p-762b1b7b.entry.js +1 -0
  405. package/dist/webcomponents/p-76ded81e.entry.js +1 -0
  406. package/dist/webcomponents/p-77cc572d.entry.js +1 -0
  407. package/dist/webcomponents/p-7b6cf400.entry.js +1 -0
  408. package/dist/webcomponents/p-8fd18ce2.entry.js +1 -0
  409. package/dist/webcomponents/{p-233fef57.entry.js → p-9c0760b9.entry.js} +1 -1
  410. package/dist/webcomponents/p-B62JX_Dh.js +1 -0
  411. package/dist/webcomponents/p-BB8Ce9rp.js +1 -0
  412. package/dist/webcomponents/{p-BRnBHsdq.js → p-BSs-2JKu.js} +1 -1
  413. package/dist/webcomponents/p-BUHsyQpA.js +1 -0
  414. package/dist/webcomponents/{p-D-zwk1J3.js → p-C-Jgmek8.js} +1 -1
  415. package/dist/webcomponents/p-C1gr32IS.js +1 -0
  416. package/dist/webcomponents/{p-DspPkDq4.js → p-C7hX61pS.js} +1 -1
  417. package/dist/webcomponents/{p-DIpFohcg.js → p-CO8ZGkfN.js} +1 -1
  418. package/dist/webcomponents/p-CPJC6tlj.js +1 -0
  419. package/dist/webcomponents/p-CdwzNfP1.js +1 -0
  420. package/dist/webcomponents/p-Cn7z5L7J.js +1 -0
  421. package/dist/webcomponents/{p-jlR7CJl2.js → p-CxBrydeX.js} +1 -1
  422. package/dist/webcomponents/p-DP9ysr2K.js +1 -0
  423. package/dist/webcomponents/{p-BzXQDB0t.js → p-DPA5TKvQ.js} +1 -1
  424. package/dist/webcomponents/p-DSavNeRB.js +1 -0
  425. package/dist/webcomponents/{p-DGbFOjOo.js → p-DXTa04jn.js} +1 -1
  426. package/dist/webcomponents/{p-CwP0ecN7.js → p-DYSc8uvs.js} +1 -1
  427. package/dist/webcomponents/p-Da3fPDxu.js +1 -0
  428. package/dist/webcomponents/{p-CYQvLgSs.js → p-De4Pig-y.js} +1 -1
  429. package/dist/webcomponents/p-DyPk4BJt.js +1 -0
  430. package/dist/webcomponents/p-NzPaWKbY.js +1 -0
  431. package/dist/webcomponents/{p-DlHomiZY.js → p-R_0S69Pr.js} +1 -1
  432. package/dist/webcomponents/{p-b393864a.entry.js → p-a1885b83.entry.js} +1 -1
  433. package/dist/webcomponents/p-a6b46f98.entry.js +1 -0
  434. package/dist/webcomponents/{p-cfe8eaf8.entry.js → p-a893d607.entry.js} +1 -1
  435. package/dist/webcomponents/{p-cab840bd.entry.js → p-b03e361e.entry.js} +1 -1
  436. package/dist/webcomponents/p-c3a25333.entry.js +1 -0
  437. package/dist/webcomponents/p-c60c4bed.entry.js +1 -0
  438. package/dist/webcomponents/{p-4f512f89.entry.js → p-c885cbf6.entry.js} +4 -4
  439. package/dist/webcomponents/p-c8bcc54f.entry.js +1 -0
  440. package/dist/webcomponents/p-d0c889e7.entry.js +1 -0
  441. package/dist/webcomponents/p-d554e0bb.entry.js +1 -0
  442. package/dist/webcomponents/p-d7e2ce48.entry.js +1 -0
  443. package/dist/webcomponents/{p-bbf54e31.entry.js → p-ddb885c3.entry.js} +1 -1
  444. package/dist/webcomponents/{p-1358a4f0.entry.js → p-ddffdec9.entry.js} +1 -1
  445. package/dist/webcomponents/{p-22d19755.entry.js → p-debc4768.entry.js} +1 -1
  446. package/dist/webcomponents/p-e1168904.entry.js +1 -0
  447. package/dist/webcomponents/p-e3021e22.entry.js +1 -0
  448. package/dist/webcomponents/p-e3f8541c.entry.js +1 -0
  449. package/dist/webcomponents/{p-c1539656.entry.js → p-eccc1fc6.entry.js} +1 -1
  450. package/dist/webcomponents/{p-3e10a0de.entry.js → p-f3c40c22.entry.js} +1 -1
  451. package/dist/webcomponents/{p-09d1663d.entry.js → p-f4de4ac0.entry.js} +1 -1
  452. package/dist/webcomponents/p-f953fd60.entry.js +1 -0
  453. package/dist/webcomponents/p-fdea8c57.entry.js +1 -0
  454. package/dist/webcomponents/p-z3RFjy9B.js +1 -0
  455. package/dist/webcomponents/{p-DOEMfCze.js → p-zZn1OXja.js} +1 -1
  456. package/dist/webcomponents/webcomponents.esm.js +1 -1
  457. package/package.json +17 -15
  458. package/dist/webcomponents/p-00335f02.entry.js +0 -1
  459. package/dist/webcomponents/p-04480f3c.entry.js +0 -1
  460. package/dist/webcomponents/p-095e5b0e.entry.js +0 -1
  461. package/dist/webcomponents/p-0b169fac.entry.js +0 -1
  462. package/dist/webcomponents/p-12ae030d.entry.js +0 -1
  463. package/dist/webcomponents/p-1e34c488.entry.js +0 -1
  464. package/dist/webcomponents/p-1f3515a8.entry.js +0 -1
  465. package/dist/webcomponents/p-21473196.entry.js +0 -1
  466. package/dist/webcomponents/p-34f9fe96.entry.js +0 -1
  467. package/dist/webcomponents/p-382f49f6.entry.js +0 -1
  468. package/dist/webcomponents/p-3a28052f.entry.js +0 -1
  469. package/dist/webcomponents/p-46477dfe.entry.js +0 -1
  470. package/dist/webcomponents/p-48319292.entry.js +0 -1
  471. package/dist/webcomponents/p-494e1254.entry.js +0 -1
  472. package/dist/webcomponents/p-4ae8f4e9.entry.js +0 -1
  473. package/dist/webcomponents/p-4ccf9cd7.entry.js +0 -1
  474. package/dist/webcomponents/p-5fd4c94d.entry.js +0 -1
  475. package/dist/webcomponents/p-63b7abf3.entry.js +0 -1
  476. package/dist/webcomponents/p-649f78de.entry.js +0 -1
  477. package/dist/webcomponents/p-80fdd013.entry.js +0 -1
  478. package/dist/webcomponents/p-947950cc.entry.js +0 -1
  479. package/dist/webcomponents/p-9b944aa4.entry.js +0 -1
  480. package/dist/webcomponents/p-B1yVkh15.js +0 -1
  481. package/dist/webcomponents/p-BArmtmkq.js +0 -1
  482. package/dist/webcomponents/p-Bh1Vr2it.js +0 -1
  483. package/dist/webcomponents/p-BtPSM2n_.js +0 -1
  484. package/dist/webcomponents/p-C32sJPns.js +0 -1
  485. package/dist/webcomponents/p-Cdy3lPBL.js +0 -1
  486. package/dist/webcomponents/p-DSjpDUHk.js +0 -1
  487. package/dist/webcomponents/p-DV4n8kZd.js +0 -1
  488. package/dist/webcomponents/p-DfMQsL55.js +0 -1
  489. package/dist/webcomponents/p-DnDbpabY.js +0 -1
  490. package/dist/webcomponents/p-a3b48ba3.entry.js +0 -1
  491. package/dist/webcomponents/p-bd466218.entry.js +0 -1
  492. package/dist/webcomponents/p-be4aee79.entry.js +0 -1
  493. package/dist/webcomponents/p-cc558e25.entry.js +0 -1
  494. package/dist/webcomponents/p-d253a573.entry.js +0 -1
  495. package/dist/webcomponents/p-d9287237.entry.js +0 -1
  496. package/dist/webcomponents/p-d9eec0cc.entry.js +0 -1
  497. package/dist/webcomponents/p-daf41b49.entry.js +0 -1
  498. package/dist/webcomponents/p-e29e32aa.entry.js +0 -1
  499. package/dist/webcomponents/p-e5c2215a.entry.js +0 -1
  500. package/dist/webcomponents/p-e679b76b.entry.js +0 -1
  501. package/dist/webcomponents/p-eb6150a8.entry.js +0 -1
  502. package/dist/webcomponents/p-ebd5a44e.entry.js +0 -1
  503. package/dist/webcomponents/p-f0d8ffe0.entry.js +0 -1
  504. package/dist/webcomponents/p-f9aafb21.entry.js +0 -1
  505. package/dist/webcomponents/p-krYyRSq-.js +0 -1
  506. package/dist/webcomponents/p-rISpbtJR.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as a}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{j as s,C as i,b as r}from"./p-DXTa04jn.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{J as o}from"./p-DYSc8uvs.js";import{c}from"./p-2mMMaism.js";import{g as p,a as h}from"./p-CdwzNfP1.js";import{P as d}from"./p-NzPaWKbY.js";import{T as f,a as l,b as u,c as m,d as y,e as b,f as _,g,h as j,i as T,j as w,k,l as v}from"./p-BICxxa69.js";import{S as C}from"./p-DzEdYT8R.js";import{T as D}from"./p-CZfYo5-1.js";import{a as P}from"./p-BSs-2JKu.js";import{a6 as S,a7 as R}from"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-DSavNeRB.js";import"./p-De4Pig-y.js";import"./p-CqiVXthx.js";const F={created_at:()=>e("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>e("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>e("th",{part:S,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>e("th",{part:S,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>e("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>e("th",{part:S,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>e("th",{part:S,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",platform_fee:"Platform Fee",platform_fee_return:"Platform Fee Return",processing_fee:"Processing Fee",processing_fee_return:"Processing Fee Return",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},I={created_at:(t,a)=>e("td",{part:R(a)},e("div",{class:"fw-bold"},P(t.created_at,{showDisplayDate:!0})),e("div",{class:"fw-bold"},P(t.created_at,{showTime:!0}))),type:(t,a)=>e("td",{part:R(a)},x[t.payment_balance_txn_type]),id:(t,a)=>e("td",{part:R(a)},t.id),amount:(t,a)=>e("td",{part:R(a),class:"text-end"},t.formattedPaymentAmount(t.amount)),balance:(t,a)=>e("td",{part:R(a),class:"text-end"},t.formattedPaymentAmount(t.balance)),currency:(t,a)=>e("td",{part:R(a)},t.currency),financial_transaction_id:(t,a)=>e("td",{part:R(a)},t.financial_transaction_id),payment_id:(t,a)=>e("td",{part:R(a)},t.payment_id),payment_balance_txn_type:(t,a)=>e("td",{part:R(a)},t.payment_balance_txn_type),source_id:(t,a)=>e("td",{part:R(a)},t.source_id),source_type:(t,a)=>e("td",{part:R(a)},t.source_type)},E=class{constructor(e){t(this,e),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=e=>{this.pagingParams={before_cursor:e},this.clickEvent.emit({name:D.previous})},this.handleClickNext=e=>{this.pagingParams={after_cursor:e},this.clickEvent.emit({name:D.next})},this.rowClickHandler=e=>{const t=e.target.closest("tr").dataset.rowEntityId;if(!t)return;const a=this.balanceTransactions.find((e=>e.id===t));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,F,I),c(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeApi()}handleError(e,t,a){this.isLoading=!1,this.errorEvent.emit({errorCode:e,message:t,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:e,authToken:t,service:a})=>async({params:r,onSuccess:n,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(e,t,r);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:i.ERROR}):n({balanceTransactions:c.data.map((e=>new s(e))),pagingInfo:Object.assign({},c.page_info)})}catch(e){const t=p(null==e?void 0:e.code);o({error:h(e),code:t,severity:i.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:e,pagingInfo:t})=>{this.balanceTransactions=e,this.paging=t,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e.message,this.handleError(e,t,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(r.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((e=>e.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return e(C,{key:"24e7a4313ab91f179fd27b6596f012487de06815"},e(l,{key:"1f9a7a56a940e41dd865bc6f3a8681ce86d60d58"},e(u,{key:"a26ce09ae4df84698be1ea37cb735e38c0a0402e"},e(m,{key:"07f8655efd483e1d9240e65b17dc13583028f376"},e(y,{key:"0b62a7700715dbaffbedc0538432d075a3158499"},this.transactionsTable.columnData.map((e=>e)))),e(b,{key:"adf75fa50ddfb5257875b2779fc6c157812d4c19"},e(_,{key:"bc77de512b3e5fd1e6c4b8cf908b46027a3bc33f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),e(g,{key:"413d46e184399cba3993f37efd64cb0d0a10d905",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),e(j,{key:"9deaa794dc848ed7c85cbadc3b4cfe7c9fb1176f",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((t,a)=>e(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},t)))),this.paging&&e(w,{key:"16ca0811bf42dc9419f8b77086e8e7e2cf6d0085"},e(k,{key:"e11be42549832c35078acf47b7c165fe1e50ea98"},e(v,{key:"205d649068b84200b88adc1be9cfe192abfe13be",colSpan:this.transactionsTable.columnData.length},e("pagination-menu",{key:"2a28645220d4f18b7037e461bd93eefc3aed49a0",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payment_transactions_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as a}from"./p-CV0Pyo1O.js";import{q as i,u as o,v as r,w as h,x as c,y as d}from"./p-CPKMvyV_.js";import{F as n}from"./p-B5gBiARs.js";import{F as l}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";import{f as p}from"./p-BSs-2JKu.js";import"./p-HXpYMWUU.js";const f=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>p(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,e=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(e),this.inputHandler(s,e),this.formControlInput.emit({name:s,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return e(a,{key:"6b13b9d4871571ab80480c044b813f70db17a85b"},e("div",{key:"de33d4a9dc8c5b5048c8b95d9c860433cb488c7c",class:"form-group d-flex flex-column"},e("label",{key:"e243e257c45018233a948c880e4fb15676f1b776",part:c,class:"form-label",htmlFor:this.name},this.label),e(n,{key:"c490aa1db17d5a181666631cd95c509dbb32aece",name:this.name,helpText:this.helpText}),e("div",{key:"69dd679301294e3c6a31ce0b880ec291ee6cf23e",class:"input-group"},e("span",{key:"71ed3716a7ea67933950b2140db4552799968193",class:"input-group-text",part:d},"$"),e("input",{key:"a1ddad4f875b56fde2d1a0054dd2cfe0c3797e0d",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),e(l,{key:"6bce010df58a187981efcad682cdc54150422bd6",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{f as form_control_monetary}
@@ -1 +1 @@
1
- import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-Cu7hgXL1.js";import{m as o,s as d,n as v}from"./p-BRnBHsdq.js";import"./p-CPKMvyV_.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_year),Number(null==l?void 0:l.dob_month)-1,Number(null==l?void 0:l.dob_day)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,f,g,w;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(f=this.representative)||void 0===f?void 0:f.email}),i(e,{title:"Phone",value:null===(g=this.representative)||void 0===g?void 0:g.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(w=this.representative)||void 0===w?void 0:w.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
1
+ import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-Cu7hgXL1.js";import{m as o,s as d,n as v}from"./p-BSs-2JKu.js";import"./p-CPKMvyV_.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_year),Number(null==l?void 0:l.dob_month)-1,Number(null==l?void 0:l.dob_day)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,f,g,w;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(f=this.representative)||void 0===f?void 0:f.email}),i(e,{title:"Phone",value:null===(g=this.representative)||void 0===g?void 0:g.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(w=this.representative)||void 0===w?void 0:w.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{c as e,F as r}from"./p-D9sqTVmd.js";import{b as o,i as a,a as h,c as n,d as p,e as l,f as m}from"./p-C1gr32IS.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as c,b as d}from"./p-DXTa04jn.js";import"./p-CLHwhyvu.js";import{C as u,B as j,b as v}from"./p-BcNb9bVO.js";import{J as f}from"./p-DYSc8uvs.js";import{B as b}from"./p-CHo7TfsM.js";import{S as w}from"./p-DzEdYT8R.js";import{H as g}from"./p-jIDKmNHy.js";import"./p-CZfYo5-1.js";import{c as y}from"./p-2mMMaism.js";import{S as C}from"./p-uZ5KAseb.js";import{B as D}from"./p-XYgDHrVL.js";import{m as S,a as B}from"./p-Da3fPDxu.js";import{B as x}from"./p-R_0S69Pr.js";import"./p-BFTU3MAI.js";import"./p-z3RFjy9B.js";import"./p-DPA5TKvQ.js";import"./p-BBSnDYJw.js";import"./p-D8GTwl9v.js";import"./p-BSs-2JKu.js";import"./p-DSavNeRB.js";import"./p-De4Pig-y.js";import"./p-CPKMvyV_.js";import"./p-CdwzNfP1.js";const O=e(Object.assign(Object.assign({},o().fields),{legal_address:n(),additional_questions:h(),representative:a("representative")}));e(Object.assign(Object.assign({},p().fields),{legal_address:m(),additional_questions:h(),representative:l("representative")}));const T=O,_=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"25%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(C,{width:"50%"}),s(C,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(C,{width:"65%"}),s(C,{width:"35%"}))),I=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(C,{width:"40%",height:"40px"})),s(_,null),s(_,null),s(_,null)),P=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event",7),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!1,this.isSaving=!1,this.country=u.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new j(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new j(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){y(),this.analytics=new f(this),this.formController=new r(T),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=S({authToken:this.authToken,businessId:this.businessId,service:new x}),this.patchBusiness=B({authToken:this.authToken,businessId:this.businessId,service:new x}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=v.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(w,null,this.isLoading?s(I,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(g,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(b,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:D.submit}),isLoading:this.isSaving},"Submit")))))}};export{P as justifi_business_form}
@@ -1 +1 @@
1
- import{r as s,h as t}from"./p-CV0Pyo1O.js";import{S as e}from"./p-DzEdYT8R.js";import{S as o}from"./p-uZ5KAseb.js";import"./p-CPKMvyV_.js";const r=class{constructor(t){s(this,t)}render(){return t(e,{key:"c995981caeae785829f1ef75454b2759243e8adb"},t(o,{key:"9c63cf385499820bb1acd3503e126363485684f6",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{r as justifi_skeleton}
1
+ import{r as s,h as t}from"./p-CV0Pyo1O.js";import{S as e}from"./p-DzEdYT8R.js";import{S as o}from"./p-uZ5KAseb.js";import"./p-CPKMvyV_.js";const r=class{constructor(t){s(this,t)}render(){return t(e,{key:"3494cfb61fe0284861e3e43edf608cca947c407f"},t(o,{key:"ee25cf4475e11ff816bf3a21f681b96b3db1995a",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{r as justifi_skeleton}
@@ -1 +1 @@
1
- import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{F as a,G as c,H as h,I as f,J as r,x as o}from"./p-CPKMvyV_.js";import{F as d}from"./p-B5gBiARs.js";import{F as m}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){s(this,e),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,e=t.getAttribute("name");this.inputHandler(e,t.checked),this.formControlInput.emit({name:e,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?a:this.isFocused&&this.checked?c:this.isFocused?h:this.checked?f:r}render(){return e(i,{key:"7072570338fd856d7fdce26552356e0846cf31d8"},e("div",{key:"51fb25f7caf51efa949be809aa9fed415505eb69",class:"form-group d-flex flex-column"},e("div",{key:"ca8032c14a3aba7f801d1cc10f914c6b61a91335",class:"form-check"},e("input",{key:"e1ce9cff2d99fbe2e150bff005e2ecfde68d130e",ref:s=>this.checkboxElement=s,type:"checkbox",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),e("label",{key:"a4073f9981fe4984cf25a9cdb1e2bd33d98688f6",class:"form-check-label",htmlFor:this.name,part:o},this.label)),e(d,{key:"bf263a490f4ed88d09ffd2da9370b435d4d351e6",helpText:this.helpText,name:this.name}),e(m,{key:"bb9a2cdaa131158feca523f4ace56519b3a12fce",errorText:this.errorText,name:this.name})))}};export{n as form_control_checkbox}
1
+ import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{F as a,G as h,H as r,I as o,J as c,x as d}from"./p-CPKMvyV_.js";import{F as f}from"./p-B5gBiARs.js";import{F as m}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){s(this,e),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,e=t.getAttribute("name");this.inputHandler(e,t.checked),this.formControlInput.emit({name:e,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?a:this.isFocused&&this.checked?h:this.isFocused?r:this.checked?o:c}render(){return e(i,{key:"dc2fdbd7fd92a0205b15e4b302458d8f0d775b35"},e("div",{key:"f32f7d5cb559282cece071f3623bdab80998bc04",class:"form-group d-flex flex-column"},e("div",{key:"5481439484b97ad733a0051f1722a5c3ed45778d",class:"form-check"},e("input",{key:"9e96a563e5b0b1a9589dff7eb4f3eb3038d4918b",ref:s=>this.checkboxElement=s,type:"checkbox",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),e("label",{key:"11a27a415d7741d8a29dde8d1fd029c2e143f235",class:"form-check-label",htmlFor:this.name,part:d},this.label)),e(f,{key:"3e0ef15182200a48d3cf3142c3511a0ad8095db3",helpText:this.helpText,name:this.name}),e(m,{key:"e85175ea76f6073d7ee813a3f2d8eaecc044601a",errorText:this.errorText,name:this.name})))}};export{n as form_control_checkbox}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as a}from"./p-De4Pig-y.js";import{A as o,r,s as l,t as h,u as c,v as d,w as u,C as p,b as y,c as m,I as v,x as g,y as f,z as b}from"./p-DXTa04jn.js";import{S as M}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import{S as k}from"./p-uZ5KAseb.js";import{c as w,o as j,a as P,g as T,b as A}from"./p-DyPk4BJt.js";import{t as N,r as C}from"./p-CPKMvyV_.js";import{f as I}from"./p-BSs-2JKu.js";import{w as E,c as D}from"./p-DVJaoI_m.js";import{H as S}from"./p-jIDKmNHy.js";import{H as O,b as L,h as x,i as z}from"./p-C-Jgmek8.js";import{H as _}from"./p-DYHjzFnJ.js";import{J as R}from"./p-DYSc8uvs.js";import{c as U}from"./p-2mMMaism.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{m as B,a as Y}from"./p-B62JX_Dh.js";import{C as F}from"./p-Cn7z5L7J.js";import{P as V}from"./p-DP9ysr2K.js";import{P as Q,a as H,b as G}from"./p-DkoufM1t.js";import{C as W}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-DSavNeRB.js";import"./p-CdwzNfP1.js";const Z=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1}render(){return i(M,{key:"02955940079320bd9c6bf94e239545385ac36458"},i("radio-list-item",{key:"fc6b98e456e4326b843b2b3248b7327436767cf4",name:this.name,value:this.value,label:this.label,checked:this.checked,hidden:this.hidden,class:this.class,"onRadio-click":t=>this.radioClick.emit(t.detail)}))}};var J;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(J||(J={}));class q{constructor(){this.api=a()}initialize(t){if(this.applePayConfig=new o(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.hostname,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:J.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:J.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:J.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const a=n.payment,o=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,o);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:a.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:J.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:J.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:J.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:J.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const K=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(k,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},X=t=>i("div",{class:"apple-pay-button-container"},i("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case c.WHITE:e+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case d.BUY:e+=" apple-pay-button-type-buy";break;case d.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&i("div",{class:"processing-overlay"},i("div",{class:"spinner"}),i("span",null,"Processing..."))),i("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),$=class{constructor(i){t(this,i),this.applePayStarted=e(this,"applePayStarted",7),this.applePayCompleted=e(this,"applePayCompleted",7),this.applePayCancelled=e(this,"applePayCancelled",7),this.applePayError=e(this,"applePayError",7),this.sdkLoaded=!1,this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e,i;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:w.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(w.paymentDescription,w.paymentAmount)},s=await this.applePayService.startPaymentSession(i,w.authToken,w.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||$.ErrorCode.PAYMENT_FAILED}))}catch(t){if((null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)===J.USER_CANCELLED)this.applePayCancelled.emit();else{const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:$.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}}finally{this.isProcessing=!1}}}componentWillLoad(){this.isAvailable=r.isApplePaySupported(),this.isAvailable?w.checkoutLoaded?this.loadApplePaySDK():j("checkoutLoaded",(t=>{t&&this.loadApplePaySDK()})):this.isLoading=!1}loadApplePaySDK(){if(this.sdkLoaded)return;this.sdkLoaded=!0;const t=document.createElement("script");t.src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",t.async=!0,t.onload=()=>this.initializeApplePay(),document.head.appendChild(t)}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(w.paymentAmount)&&Boolean(w.paymentCurrency)&&Boolean(w.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,this.applePayError.emit({error:this.error,code:$.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new q,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:$.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){var t;null===(t=this.applePayService)||void 0===t||t.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!w.applePayEnabled)return null;if(!this.isAvailable)return null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return i(M,null,i("div",{class:"apple-pay-container"},i(K,{isLoading:this.isLoading}),t&&i(X,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),i("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};$.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(M,{key:"241fe8903788f0442b42bf5a6835d152d1944967"},i("internal-button",{key:"7c13bd1fa53cf9faae26e521af5a40a08659fe92",text:this.text,variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,type:this.type,disabled:this.disabled,class:this.class,customStyle:this.customStyle,hidden:this.hidden}))}},et=class{constructor(e){t(this,e)}render(){return i(M,{key:"336fa6563952ee7905c2ed4a3330d73bbb33a0eb"},i("section",{key:"48b8798a925d618f5a2c52d743190207b78eb70a"},i("div",{key:"81d91167c10ccc49acb039ea54a9f97f4aa6e305"},i("div",{key:"9744242f2c2c3082e9c1a3af6e716ec4cb28f1fd",part:N},null==w?void 0:w.paymentDescription),i("div",{key:"438062935abd2f00495c432ef6652e3808e5215f"},i("span",{key:"e3f24d9c52ddae0206cbefe61bd08f24697fe28e",part:N},"Total")," ",i("span",{key:"9835cb60de31a2c8946b7ac2dd6d1fa82f223110",part:N},I(+(null==w?void 0:w.totalAmount)))))))}},it=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(k,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var st;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(st||(st={}));const nt=class{constructor(i){t(this,i),this.googlePayStarted=e(this,"googlePayStarted",7),this.googlePayCompleted=e(this,"googlePayCompleted",7),this.googlePayCancelled=e(this,"googlePayCancelled",7),this.merchantDisplayName="JustiFi Checkout",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case st.ready:this.iframeReady=!0;break;case st.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case st.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case st.error:console.error("Google Pay error:",i);break;case st.buttonClicked:this.googlePayStarted.emit(),this.sendStartPayment();break;case st.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case st.paymentCanceled:this.googlePayCancelled.emit();break;case st.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await E(),this.iframeOrigin=D.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}googlePayEnvironment(){return void 0!==this.environment?this.environment:"test"===w.checkoutMode?"TEST":"PRODUCTION"}sendInitialize(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={environment:this.googlePayEnvironment(),gatewayMerchantId:w.accountId,merchantName:this.merchantDisplayName,authToken:w.authToken,accountId:w.accountId};this.iframeElement.contentWindow.postMessage({eventType:st.initialize,data:e},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(w.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:w.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:st.startPayment,data:e},this.iframeOrigin)}render(){return w.checkoutLoaded?w.googlePayEnabled?i(s,null,i(it,{isLoading:!this.isReadyToPay}),i("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,allow:"payment",style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null):null}},at=class{constructor(e){t(this,e),this.levels={h1:S,h2:O,h3:_},this.level="h1"}render(){return i(M,{key:"5a0872ee486bdba3ba1c86145946889bb7d151f2"},i(this.levels[this.level],{key:"89807e249cdf64f7ef80800276cb50966083f28e",text:this.text,class:this.class}))}},ot=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.checkoutChangedEvent=e(this,"checkout-changed",7),this.plaidService=new V,this.handleApplePayStarted=()=>{w.isWalletProcessing=!0},this.handleGooglePayStarted=()=>{w.isWalletProcessing=!0},this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(w.isWalletProcessing=!1,w.paymentToken=i,w.selectedPaymentMethod={type:Q.GOOGLE_PAY},this.submitCheckout()):(w.isWalletProcessing=!1,this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR}))},this.handleGooglePayCancelled=()=>{w.isWalletProcessing=!1,w.paymentToken=void 0,w.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(w.isWalletProcessing=!1,w.paymentToken=s,w.selectedPaymentMethod={type:Q.APPLE_PAY},this.submitCheckout()):(w.isWalletProcessing=!1,console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR}))},this.handleApplePayError=t=>{w.isWalletProcessing=!1;const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:p.ERROR})},this.handleApplePayCancelled=()=>{w.isWalletProcessing=!1,w.paymentToken=void 0,w.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),w.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new F};this.getCheckout=B(t),this.completeCheckout=Y(t),P((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new R(this),U(),w.authToken=this.authToken,this.fetchCheckout(),L("set",(t=>{const e=z[t];void 0!==e&&x(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==v.completed?t.status!==v.expired||this.errorEvent.emit({message:m.CHECKOUT_EXPIRED,errorCode:y.CHECKOUT_EXPIRED,severity:p.ERROR}):this.errorEvent.emit({message:m.CHECKOUT_ALREADY_COMPLETED,errorCode:y.CHECKOUT_ALREADY_COMPLETED,severity:p.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:m.NOT_AUTHENTICATED,errorCode:y.NOT_AUTHENTICATED,severity:p.ERROR})}updateStore(t){var e,i,s,n,a,o,r,l;w.accountId=t.account_id,w.checkoutLoaded=!0;const h=null!=t.mode?String(t.mode).toLowerCase():"";w.checkoutMode="test"===h?"test":"live"===h?"live":null;const c=t.payment_methods.map((t=>new H(t))),d=Boolean(null===(e=t.payment_settings)||void 0===e?void 0:e.ach_payments);w.paymentMethods=c.filter((t=>t.type!==Q.SAVED_BANK_ACCOUNT||d)),w.paymentMethodGroupId=t.payment_method_group_id,w.paymentDescription=t.payment_description,w.totalAmount=t.total_amount,w.paymentAmount=t.payment_amount,w.bnplEnabled=t.payment_settings.bnpl_payments,w.insuranceEnabled=t.payment_settings.insurance_payments,w.bankAccountVerification=null===(i=t.payment_settings)||void 0===i?void 0:i.bank_account_verification,w.applePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.apple_payments,w.googlePayEnabled=null===(n=t.payment_settings)||void 0===n?void 0:n.google_payments,w.achPaymentsEnabled=d,w.bnplProviderClientId=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_client_id,w.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,w.bnplProviderApiVersion=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_api_version,w.bnplProviderCheckoutUrl=null===(l=null==t?void 0:t.bnpl)||void 0===l?void 0:l.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:T(),selectedPaymentMethod:w.selectedPaymentMethod,savedPaymentMethods:w.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){if(this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),!w.selectedPaymentMethod&&this.paymentMethodFormRef){const t=this.paymentMethodFormRef.tagName.toLowerCase();"justifi-card-form"===t?w.selectedPaymentMethod={type:Q.NEW_CARD}:"justifi-bank-account-form"!==t||w.checkoutLoaded&&!w.achPaymentsEnabled||(w.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT})}this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayStarted",this.handleApplePayStarted),this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayStarted",this.handleApplePayStarted),this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayStarted",this.handleGooglePayStarted),this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayStarted",this.handleGooglePayStarted),this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},a=Object.assign(Object.assign({},t),n),o=Object.assign({accountId:w.accountId,payment_method_group_id:void 0},a);w.savePaymentMethod&&(o.payment_method_group_id=w.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:w.accountId}));return r.error?r:(w.paymentToken=r.id,r.id)}async fillBillingForm(t){w.billingFormFields=t}async setSelectedPaymentMethod(t){w.selectedPaymentMethod=t,w.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];w.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.NEW_CARD,n=(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_BANK_ACCOUNT;if((s||n)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:y.VALIDATION_ERROR,severity:p.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,a;if(w.isSubmitting)return;w.isSubmitting=!0;const o=await this.validate();if(!w.selectedPaymentMethod)return w.isSubmitting=!1,void this.errorEvent.emit({message:"No payment method selected.",errorCode:y.VALIDATION_ERROR,severity:p.ERROR});const r=(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_CARD,l=(null===(i=w.selectedPaymentMethod)||void 0===i?void 0:i.type)===Q.NEW_BANK_ACCOUNT,h=(null===(s=w.selectedPaymentMethod)||void 0===s?void 0:s.type)===Q.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return w.isSubmitting=!1,void this.errorEvent.emit({message:e.error.message,errorCode:y.TOKENIZE_ERROR,severity:p.ERROR})}if(h&&!w.paymentToken){const t=w.plaidPublicToken,e=w.plaidLinkTokenId;if(!t)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(w.authToken,w.accountId,t,e||void 0,w.savePaymentMethod?w.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return w.isSubmitting=!1,void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});const s=null==i?void 0:i.data,a=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);w.paymentToken=a}catch(t){return w.isSubmitting=!1,void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR})}}if(!o)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:y.VALIDATION_ERROR,severity:p.ERROR});if(!w.paymentToken)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Payment token not found.",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});const c={payment_mode:(t=>{switch(t){case Q.NEW_CARD:case Q.SAVED_CARD:case Q.NEW_BANK_ACCOUNT:case Q.SAVED_BANK_ACCOUNT:case Q.PLAID:return G.ECOM;case Q.SEZZLE:return G.BNPL;case Q.APPLE_PAY:return G.APPLE_PAY;case Q.GOOGLE_PAY:return G.GOOGLE_PAY;default:return}})(null===(a=w.selectedPaymentMethod)||void 0===a?void 0:a.type),payment_token:w.paymentToken};if(this.preCompleteHook){const t=A();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return w.isSubmitting=!1,void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{w.isSubmitting=!1,this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{w.isSubmitting=!1,this.errorEvent.emit({message:t.message,errorCode:y.COMPLETE_CHECKOUT_ERROR,severity:p.ERROR})}})}render(){return i(s,{key:"545e1cb07252ba0dc78fa980bd17ee5572559f6c"})}get hostEl(){return n(this)}},rt=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.plaidError=e(this,"plaidError",7),this.plaidErrorRecovered=e(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.sdkLoaded=!1,this.plaidService=new V,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.hasLoggedAchPaymentsDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{w.authToken&&w.accountId&&w.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:b.PLAID_SDK_LOAD_FAILED,message:f[b.PLAID_SDK_LOAD_FAILED],severity:g[b.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:b.PLAID_LINK_TOKEN_FAILED,message:f[b.PLAID_LINK_TOKEN_FAILED],severity:g[b.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:b.PLAID_LINK_INIT_FAILED,message:f[b.PLAID_LINK_INIT_FAILED],severity:g[b.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!w.authToken||!w.accountId)return void this.handleError({code:b.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:p.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(w.authToken,w.accountId,w.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(w.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let a=b.PLAID_LINK_TOKEN_FAILED,o=f[a],r=!0;"AbortError"===t.name?(a=b.PLAID_TIMEOUT,o=f[a],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(a=b.PLAID_NETWORK_ERROR,o=f[a],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(a=b.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:a,message:o,severity:g[a],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return b.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return b.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return b.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return b.PLAID_RATE_LIMITED;case"maintenance":return b.PLAID_MAINTENANCE;case"not_authenticated":return b.PLAID_INVALID_CREDENTIALS;default:return b.PLAID_LINK_TOKEN_FAILED}return b.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,w.selectedPaymentMethod={type:Q.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:p.INFO}),w.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=b.PLAID_AUTHENTICATION_FAILED,i=f[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=b.PLAID_INVALID_CREDENTIALS,i=f[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=b.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=b.PLAID_ACCOUNT_LOCKED,i=f[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=b.PLAID_MAINTENANCE,i=f[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=b.PLAID_RATE_LIMITED,i=f[e],s=!0;break;case"INVALID_REQUEST":e=b.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=b.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const a=t.error_message.toLowerCase();a.includes("not supported")||a.includes("unsupported")?(e=b.PLAID_BANK_NOT_SUPPORTED,i=f[e],s=!1,n="Try a different payment method"):(a.includes("expired")||a.includes("timeout"))&&(e=b.PLAID_TOKEN_EXPIRED,i=f[e],s=!0)}this.handleError({code:e,message:i,severity:g[e],originalError:t,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)!==Q.PLAID&&(w.selectedPaymentMethod={type:Q.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentWillLoad(){var t;this.isSelected=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID,!0===w.bankAccountVerification&&(w.checkoutLoaded?w.achPaymentsEnabled&&this.loadPlaidSDK():j("checkoutLoaded",(t=>{t&&!0===w.bankAccountVerification&&w.achPaymentsEnabled&&this.loadPlaidSDK()})))}loadPlaidSDK(){if(this.sdkLoaded)return;this.sdkLoaded=!0;const t=document.createElement("script");t.src="https://cdn.plaid.com/link/v2/stable/link-initialize.js",t.async=!0,t.onload=()=>this.initializePlaidLink(),t.onerror=()=>{this.handleError({code:b.PLAID_SDK_LOAD_FAILED,message:f[b.PLAID_SDK_LOAD_FAILED],severity:g[b.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})},document.head.appendChild(t)}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return w.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,w.selectedPaymentMethod={type:Q.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(w.selectedPaymentMethod={type:Q.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=j("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(w.checkoutLoaded&&!w.achPaymentsEnabled)return this.hasLoggedAchPaymentsDisabledWarning||(console.warn("[JustifiPlaidPaymentMethod] ACH payments are disabled for this checkout. Component will not render."),this.hasLoggedAchPaymentsDisabledWarning=!0),null;if(!0!==w.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[JustifiPlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=i("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return i(M,{class:"payment-method"},i("div",{title:"Pay with Plaid"},i("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?i("div",{class:(this.error.severity===p.ERROR?"text-danger":this.error.severity===p.WARNING?"text-warning":"text-info")+" mt-2"},i("small",null,this.error.message),i("br",null),i("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&i("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?i("div",{class:"text-info mt-2"},i("small",null,"Connecting to your bank...")):this.publicToken?i("div",{class:"text-success mt-2"},i("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:i("div",{class:"text-muted mt-2"},i("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},lt=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),w.selectedPaymentMethod={id:t.id,type:t.type},w.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===Q.SAVED_CARD&&w.disableCreditCard||t===Q.SAVED_BANK_ACCOUNT&&w.disableBankAccount)}componentWillLoad(){w.checkoutLoaded&&(w.paymentMethods.length||console.warn("No saved payment methods available."),w.disablePaymentMethodGroup&&console.warn("Payment method group is disabled."))}render(){return w.disablePaymentMethodGroup?null:i(M,null,i("div",{class:"saved-payment-methods"},w.paymentMethods.length?w.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>i("div",{class:"radio-list-item p-3",part:C,onClick:this.onPaymentMethodOptionClick(t)},i("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:w.paymentToken===(null==t?void 0:t.id),label:`${W[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ht=i("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ct=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=Q.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(w.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:w.bnplProviderClientId,apiMode:w.bnplProviderMode,apiVersion:w.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:w.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){w.selectedPaymentMethod={type:Q.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,e;return w.bnplEnabled?i(M,{class:"payment-method"},i("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),i("div",null,i("div",null,"Buy now, pay later with ",ht),this.installmentPlan&&i("small",null,i("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",i("span",null,this.installmentPlan.schedule," payments of")," ",i("span",{class:"fw-bold"},I(null===(e=this.installmentPlan)||void 0===e?void 0:e.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}},dt={[Q.NEW_BANK_ACCOUNT]:"New bank account",[Q.NEW_CARD]:"New credit or debit card"},ut="Payment form not ready",pt="Validation error",yt=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){U(),this.analytics=new R(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,w.selectedPaymentMethod={type:t.detail}}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:y.TOKENIZE_ERROR,message:pt}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(y.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:y.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async fillBillingForm(t){w.billingFormFields=t}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:ut}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async getValues(){return this.billingFormRef.getValues()}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||w.authToken,account:this.accountId||w.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||w.authToken||this.emitError({errorCode:y.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||w.accountId||this.emitError({errorCode:y.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||w.checkoutLoaded&&!w.achPaymentsEnabled||(this.selectedPaymentMethod=Q.NEW_BANK_ACCOUNT,w.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=Q.NEW_CARD,w.selectedPaymentMethod={type:Q.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[],e=!w.checkoutLoaded||w.achPaymentsEnabled;return this.disableCreditCard||t.push(Q.NEW_CARD),!this.disableBankAccount&&e&&t.push(Q.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:p.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",ut);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||pt;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||w.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!w.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===w.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:dt[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("billing-form",{ref:t=>{t&&(this.billingFormRef=t)},hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===Q.NEW_CARD?"card-form":"bank-account-form",{ref:t=>{t&&(this.paymentMethodFormRef=t)}})}render(){return i(M,{key:"bc76697688be332ef84db56e61b6b455a6d1e986"},i("form",{key:"8f64f55f945d4ff4ed0f144c724dbd71278ec771"},i("fieldset",{key:"15b6d388117738391089cf91f999247cddb29714"},i("div",{key:"a4e23f7808b446dff6f7da437dba3cb57d2d62aa",class:"row gy-3"},i("div",{key:"63b0584d217d9bb50036eb7d5837e7287be58760",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"c9345be3429cd8ab01a84e8584270938feceba39",class:"col-12"},i("internal-button",{key:"aa56df7b6b1250e9b81fbc281b969d2a37a05428",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{$ as justifi_apple_pay,tt as justifi_button,et as justifi_checkout_summary,nt as justifi_google_pay,at as justifi_header,ot as justifi_modular_checkout,rt as justifi_plaid_payment_method,Z as justifi_radio_list_item,lt as justifi_saved_payment_methods,ct as justifi_sezzle_payment_method,yt as justifi_tokenize_payment_method}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{c as h}from"./p-DyPk4BJt.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";const o=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(e,t)=>{this.isChecked=t,h.savePaymentMethod=t,this.checkboxChanged.emit(this.isChecked)}}render(){return s(a,{key:"a5ecfa60f9f55bdb91343394c1dd5bea542c20ed",hidden:this.hidden},s("form-control-checkbox",{key:"282476dea11415eeec68336577ff17a5c03baad2",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{o as save_new_payment_method}
@@ -0,0 +1 @@
1
+ import{r,h as i}from"./p-CV0Pyo1O.js";import{S as s}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";const e=class{constructor(i){r(this,i)}async getValues(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.getValues())&&void 0!==i?i:{}}async validate(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.validate())&&void 0!==i?i:{isValid:!1,errors:{}}}render(){return i(s,{key:"799c9c1ed22b4794fc292a6cbe0986ad91c41cd9"},i("card-billing-form-simple",{key:"5a96ecdd0a474fae719f6fa48bcb4a88fd74ef92",legend:this.legend,ref:r=>this.cardBillingFormSimpleRef=r}))}};export{e as justifi_card_billing_form_simple}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as i}from"./p-CV0Pyo1O.js";import{P as h,Q as a,R as r,S as c,T as o,x as l}from"./p-CPKMvyV_.js";const n=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.errorText="",this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?h:this.isFocused&&this.checked?a:this.checked?r:this.isFocused?c:o}render(){return e(i,{key:"0c6362e375e04d23c7e31a6be9ea6a43fbfdaac2",class:"form-group d-flex flex-column"},e("div",{key:"81b22f74d5b872318e121a2be0cbd8108c3f32ec",class:"form-check"},e("input",{key:"903e8b0ad9cb30241d175da091de758bf4ac2471",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"df1402687b5965cbbd41ab65dc3de46a2e6e86b8",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:l},this.label)),e("form-control-help-text",{key:"cf5498002674765b9cc5a0a09be1851be4221e9f",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"c5b50668f0451d1d5cbf94c1399057758ac93a5e",errorText:this.errorText,name:this.name}))}};export{n as form_control_radio}
@@ -0,0 +1 @@
1
+ import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-uZ5KAseb.js";import{w as t,c as d}from"./p-DVJaoI_m.js";import{e as c}from"./p-BSs-2JKu.js";import{c as s}from"./p-2mMMaism.js";import"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-DSavNeRB.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(a,{height:"18px",width:"100px"}),i(a,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"80px"}),i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"30px"}),i(a,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await t(),this.iframeOrigin=d.iframeOrigin,this.tabId=c(),s()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}render(){return i("div",{key:"d3cb1fca6595f60e5f5f122b73d3d6c11a826423"},i(n,{key:"f83dcbbc214d460bb21c015ec051436ed5cf6670",isReady:this.isReady}),i("hidden-input",{key:"5fad0d06303d0ddb55c30c2cd94014255f2a8cec"}),i("div",{key:"68440756a1aad69b5c95245e7a2a5feb16899dca",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"b39eab56c79463935f1a1bb15cc867997f026e7b",class:"mb-3"},i("iframe-input",{key:"25a2390a8c3c92d5e6eceafe6b821202ecb22d76",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"68766798d954a0b3d093ae13c3c2955f819da4f2",class:"row"},i("div",{key:"05539f1ac8ebb0397574d55b4b76d7acdb7d2dca",class:"col-4 align-content-end"},i("iframe-input",{key:"4c437a4384e6c301e18824d799784c1133e70ee3",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"b9a5b8b5dda1d8ab6305c9dc1ef9b655eb02fb3d",class:"col-4 align-content-end"},i("iframe-input",{key:"c1a412c20e75d21c1084a4b93f22362c367c1907",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"abdfdbd7eb784871011397a7c5fdf371e3c6baf0",class:"col-4 align-content-end"},i("iframe-input",{key:"08dff072e785846d7543018c194b4df6ce5b343e",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as s,p as r,c as l}from"./p-BPTtWj7E.js";import{f as d,a as i}from"./p-CPKMvyV_.js";import{S as o}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import{c,a as p}from"./p-BSs-2JKu.js";import{T as b,f as n}from"./p-DXTa04jn.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a},this.handleDateInput=(e,a)=>{const t=c(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore,company_name:this.companyName}).forEach((([e,a])=>{a&&(r[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:b.created},{label:"Completed",value:b.completed},{label:"Submitted",value:b.submitted},{label:"In Progress",value:b.in_progress},{label:"On Hold",value:b.on_hold},{label:"Canceled",value:b.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:n.boardingOnly},{label:"Boarding Shipping",value:n.boardingShipping}]}render(){const e=Object.assign({},s);return a(o,{key:"287baf0a2de1287195105adbebd501d2bccd21d7"},a("table-filters-menu",{key:"b0112de1075f459780d01528f017780c9ceedb18",params:e,clearParams:l,part:d},a("div",{key:"f9acabaf7d2edbe4eabb81edc92b2378ef563012",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"e76d3b3771b8084fc5f6bf32fac2c75c3da87abb",class:"p-2"},a("form-control-select",{key:"9c687e7202a310500e85d3cbce29268ac04cdd4a",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||s.order_status||"",disabled:!!this.orderStatus,part:i})),a("div",{key:"345ebc972663899a456a7a660863cd81a9770a87",class:"p-2"},a("form-control-select",{key:"26879377755e826a1d1f236ab5e54a22415451e8",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||s.order_type||"",disabled:!!this.orderType,part:i})),a("div",{key:"2a7df2b8c9a3bfbbd76cca1a732c01521b08dd34",class:"p-2"},a("form-control-date",{key:"3fbceb80eaf7ae48e02221961317d8c77ec2c5a5",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:p(this.createdAfter,{showInputDateTime:!0})||p(s.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:i})),a("div",{key:"4c3c59ab54215591c5b0eb9a26c45a0265e48d96",class:"p-2"},a("form-control-date",{key:"aea46abb41595c0cc5d82edd0f1f09425c0a1701",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:p(this.createdBefore,{showInputDateTime:!0})||p(s.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:i})),a("div",{key:"e83af454cde29c12fcd6e2e37093bf70fd03718c",class:"p-2"},a("form-control-text",{key:"3c5fe84b5883b7df6247ed1eba1a15871cb882b5",name:"company_name",label:"Company Name",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.companyName||s.company_name,disabled:!!this.companyName,part:i})))))}};export{m as justifi_terminal_orders_list_filters}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as i,g as o}from"./p-CV0Pyo1O.js";import{w as a,x as r,q as h,u as c,v as l}from"./p-CPKMvyV_.js";import{F as f}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.fileSelected=s(this,"fileSelected",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=t=>{const s=t.target,e=s.getAttribute("name");this.inputHandler(e,s.value),this.formControlInput.emit({name:e,value:s.value})},this.changeHandler=()=>{const t=this.fileInput.files;t&&this.fileSelected.emit({fileList:t,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let t=a;return this.errorText&&(t=h),this.disabled&&(t=c),this.isFocused&&(t=l),t}render(){return e(i,{key:"9463f54c8850245de8d3ae92a45447fe8d2ce329"},e("div",{key:"fec5946a226ef5c270514e6b1f8a95de60d6bcb0",class:"form-group d-flex flex-column"},e("div",{key:"95783cbeab704b1b970af6619191667991814e73",class:"d-flex align-items-start gap-2"},e("label",{key:"c258720ecba808fcf18d3408569b4e391ca0e31f",part:r,class:"form-label",htmlFor:this.name},this.label),e("form-control-tooltip",{key:"280b23806bc9616506eb56025318b5c6fe395762",helpText:this.helpText})),e("input",{key:"2fcdd1ad6c923de9b28587ee3d1349d0fdf021eb",ref:t=>this.fileInput=t,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),e(f,{key:"df64bb1a0ac921da01fa8a4c3b63a8f5880781d2",errorText:this.errorText,name:this.name})))}get el(){return o(this)}};export{n as form_control_file}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as d,p as s,c as l}from"./p-Dm07nLGs.js";import{f as i,a as c}from"./p-CPKMvyV_.js";import{S as r}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import{c as f,a as o}from"./p-BRnBHsdq.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=f(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,account_holder:this.accountHolder,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}get paymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:"ecom"},{label:"ACH",value:"ach"},{label:"Card Present",value:"card_present"}]}render(){const e=Object.assign({},d);return a(r,{key:"5a68fb9c6ed40a558aee38624c4a1a1f0bde51c9"},a("table-filters-menu",{key:"5f99ec7b728aa7398176ce4e3cb1d574b7533f05",params:e,clearParams:l,part:i},a("div",{key:"c2602fcc45ef5304e9931a54e638e64307134816",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"f3ca5428d5acb61baa1d63efe8e7c5ff50bba432",class:"p-2"},a("form-control-text",{key:"5a8ff71ff5f86cdc0084b9fd6db6b84a6874cec0",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:c})),a("div",{key:"52b7938337c6dd390c0a4d042a229f83195ed4b1",class:"p-2"},a("form-control-text",{key:"6ac6132cfc26906541cd77f9d3a6f90a9405b708",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:c})),a("div",{key:"e325e13074ec776c8bb1663bd754d13002b64fd7",class:"p-2"},a("form-control-select",{key:"0dd0ff17f1b59bfb0731bbb0c3a918330f9f817a",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:c})),a("div",{key:"516164e1f585029e9f8a292fb6a2c7cc721767ec",class:"p-2"},a("form-control-select",{key:"caa3da5823cce6611055376ed4bb859e9ab8938f",name:"payment_mode",label:"Payment Mode",options:this.paymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:c})),a("div",{key:"acee82424117854be377c1e4d9c9f46b3f078941",class:"p-2"},a("form-control-text",{key:"b8958e92f3d19fe142150a28c81182d7549da0fe",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:c})),a("div",{key:"0674143ab47a1e58ac00dd621da1242c8250e4e8",class:"p-2"},a("form-control-text",{key:"90ba16232f5dcb96eea87f1cd3c5fa139dbabd35",name:"account_holder",label:"Account Holder",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.accountHolder||d.account_holder,disabled:!!this.accountHolder,part:c})),a("div",{key:"8ece87138034cd810c5dfcf17952fa8fe7112013",class:"p-2"},a("form-control-date",{key:"f927af3216ba515c174ebc89b45277bf769f6a06",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:o(this.createdAfter,{showInputDateTime:!0})||o(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:c})),a("div",{key:"76536d176806d29c904365d19270492e3c6d6d4b",class:"p-2"},a("form-control-date",{key:"bae8982af239d24f82a0b6298694749fd554868a",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:o(this.createdBefore,{showInputDateTime:!0})||o(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:c})))))}};export{n as justifi_payments_list_filters}
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as d,p as s,c as l}from"./p-Dm07nLGs.js";import{f as i,a as c}from"./p-CPKMvyV_.js";import{S as r}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import{c as f,a as o}from"./p-BSs-2JKu.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=f(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,account_holder:this.accountHolder,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}get paymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:"ecom"},{label:"ACH",value:"ach"},{label:"Card Present",value:"card_present"}]}render(){const e=Object.assign({},d);return a(r,{key:"09966b2b69d97d14d988b1658c50755be453451b"},a("table-filters-menu",{key:"e5e1e3bf59528776e0ce67be1d57f442cc47d717",params:e,clearParams:l,part:i},a("div",{key:"dfb76c7b261911aaecba4ddc179f935e076ab6a0",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"e875c8eb14dd1ca1bfe3d0973de89cba0627063d",class:"p-2"},a("form-control-text",{key:"cba3e7736f5d85f32ac8023125d59f25a4e5e427",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:c})),a("div",{key:"468b20f8494330c1db0a00f63e928c656e47e463",class:"p-2"},a("form-control-text",{key:"f9a48b0116e239f97a39246647470fd7f8e3718f",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:c})),a("div",{key:"805d358d7a091b4826f20af9df930f61cf754364",class:"p-2"},a("form-control-select",{key:"07c7d0627be6629864cc9b130c347d110e7b337d",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:c})),a("div",{key:"aa3f3d30fe781dce7f516d80730362bed20348be",class:"p-2"},a("form-control-select",{key:"7d70542a944db0588361ab5be7df9c8bf83d0463",name:"payment_mode",label:"Payment Mode",options:this.paymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:c})),a("div",{key:"df2642d3a148199d9ffbfd01cae6ba4aaef6f2a4",class:"p-2"},a("form-control-text",{key:"b462acc0489803f54b2beb4d8cc58bb1c11ebb48",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:c})),a("div",{key:"c5eb36e85489492d4cc66707762d04bf4e38e56f",class:"p-2"},a("form-control-text",{key:"483a8cea7f8f1f6128fc16789b34015041fb250b",name:"account_holder",label:"Account Holder",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.accountHolder||d.account_holder,disabled:!!this.accountHolder,part:c})),a("div",{key:"669126e41e31c84745dd7c4c6dc0f0d2eb843e9a",class:"p-2"},a("form-control-date",{key:"20b993fad450f448bc1cbce6a24c05f5038df2da",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:o(this.createdAfter,{showInputDateTime:!0})||o(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:c})),a("div",{key:"49002f16423461fca88249d9fdd7fc0a27abe117",class:"p-2"},a("form-control-date",{key:"5a3b0093e5c2593e1f39b82220511704210a6179",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:o(this.createdBefore,{showInputDateTime:!0})||o(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:c})))))}};export{b as justifi_payments_list_filters}
@@ -0,0 +1 @@
1
+ import{C as r}from"./p-DXTa04jn.js";import{g as o,a as e}from"./p-CdwzNfP1.js";const c=({authToken:c,checkoutId:t,service:s})=>async({onSuccess:n,onError:a})=>{var i;try{const u=await s.fetchCheckout(c,t);if(u.error){return a({error:e(u.error),code:o(null===(i=u.error)||void 0===i?void 0:i.code),severity:r.ERROR})}n({checkout:u.data})}catch(e){const c=o(null==e?void 0:e.code);return a({error:e.message||e,code:c,severity:r.ERROR})}},t=({authToken:c,checkoutId:t,service:s})=>async({payment:n,onSuccess:a,onError:i})=>{var u;try{const v=await s.complete(c,t,n);if(v.error){return i({error:e(v.error),code:o(null===(u=v.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a({checkout:v.data})}catch(e){const c=o(null==e?void 0:e.code);return i({error:e.message||e,code:c,severity:r.ERROR})}};export{t as a,c as m}
@@ -0,0 +1 @@
1
+ import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{e as o,C as r}from"./p-DXTa04jn.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as s,a as e}from"./p-CdwzNfP1.js";const a=({id:a,authToken:i,service:t})=>async({onSuccess:p,onError:n,final:c})=>{var m;try{const c=await t.fetchPayment(a,i);if(c.error){n({error:e(c.error),code:s(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR})}else p({payment:new o(c.data)})}catch(o){const a=s(null==o?void 0:o.code);n({error:e(o),code:a,severity:r.ERROR})}finally{c()}};export{a as m}