@justifi/webcomponents 5.7.6 → 5.7.7

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 (391) hide show
  1. package/dist/cjs/{Api-p2pK86Zd.js → Api-DLhABIj9.js} +2 -2
  2. package/dist/cjs/{Checkout-nsVtlYWD.js → Checkout-BbhldGDh.js} +1 -1
  3. package/dist/cjs/{Payment-2Zmn-l6G.js → Payment-D6XuQ4Ve.js} +1 -1
  4. package/dist/cjs/{Refund-h6MCxFEE.js → Refund-1bG6RRPO.js} +1 -1
  5. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  6. package/dist/cjs/{badge-CMmPvqtE.js → badge-CcJ9H85-.js} +1 -1
  7. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +9 -9
  8. package/dist/cjs/bank-account-form_9.cjs.entry.js +13 -11
  9. package/dist/cjs/business-details-core.cjs.entry.js +4 -4
  10. package/dist/cjs/{business.service-OxMVnZMF.js → business.service-CaCyLLFW.js} +4 -4
  11. package/dist/cjs/{button-CfVQSysQ.js → button-DsHDMHaa.js} +1 -1
  12. package/dist/cjs/{check-pkg-version-Co_IKlwj.js → check-pkg-version-D6Kztnv7.js} +5 -5
  13. package/dist/cjs/{checkout.service-GgFXq7Ux.js → checkout.service-DgD37tJv.js} +4 -4
  14. package/dist/cjs/checkouts-list-core.cjs.entry.js +12 -12
  15. package/dist/cjs/{payouts-list-params-state-BNbT1fuJ.js → checkouts-list-params-state-Cewmin_p.js} +1 -1
  16. package/dist/cjs/{checkouts-table-DJoMGwVG.js → checkouts-table-Bzpqcsu0.js} +3 -3
  17. package/dist/cjs/{config-state-5xZf-jax.js → config-state-BBOZIS8x.js} +1 -1
  18. package/dist/cjs/custom-popper.cjs.entry.js +1 -1
  19. package/dist/cjs/{dispute.service-XdB1KbMS.js → dispute.service-C0w_4Agq.js} +4 -4
  20. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  21. package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
  22. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  23. package/dist/cjs/{form-control-error-text-HM0zQerh.js → form-control-error-text-B-P5UDhm.js} +1 -1
  24. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
  25. package/dist/cjs/{form-control-help-text-5KIUw1IP.js → form-control-help-text-JoZjhb9m.js} +1 -1
  26. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  27. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
  28. package/dist/cjs/form-control-monetary.cjs.entry.js +4 -4
  29. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
  30. package/dist/cjs/form-control-number.cjs.entry.js +3 -3
  31. package/dist/cjs/form-control-radio.cjs.entry.js +1 -1
  32. package/dist/cjs/form-control-select_3.cjs.entry.js +2 -2
  33. package/dist/cjs/{get-payment-details-Ccd7IWqM.js → get-payment-details-BbfnopoD.js} +5 -5
  34. package/dist/cjs/{get-subaccounts-C4HDfc3o.js → get-subaccounts-CpCJjnYt.js} +6 -6
  35. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  36. package/dist/cjs/{header-1-DD41iNlG.js → header-1-DRA3f4Jh.js} +1 -1
  37. package/dist/cjs/{header-3-D9Wa0IfT.js → header-3-sOdOpfx3.js} +1 -1
  38. package/dist/cjs/{iframe-input-styles-state-CGWgxf_0.js → iframe-input-styles-state-DH-5a2Mg.js} +1 -1
  39. package/dist/cjs/iframe-input_4.cjs.entry.js +6 -6
  40. package/dist/cjs/{index-Yd9aLenr.js → index-B32W0A3m.js} +1 -1
  41. package/dist/cjs/{index-dm_GlYlb.js → index-C9hBD-32.js} +2 -2
  42. package/dist/cjs/{insurance-state-qT_hkvZV.js → insurance-state-e44s1lUQ.js} +2 -2
  43. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +9 -9
  44. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +10 -10
  45. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +1 -1
  46. package/dist/cjs/justifi-business-details.cjs.entry.js +12 -12
  47. package/dist/cjs/justifi-business-form.cjs.entry.js +15 -15
  48. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  49. package/dist/cjs/justifi-checkout-core.cjs.entry.js +9 -9
  50. package/dist/cjs/justifi-checkout.cjs.entry.js +11 -11
  51. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
  52. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +15 -15
  53. package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
  54. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  56. package/dist/cjs/justifi-dispute-management.cjs.entry.js +11 -11
  57. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +14 -14
  58. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11 -11
  59. package/dist/cjs/justifi-order-terminals.cjs.entry.js +14 -14
  60. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +10 -10
  61. package/dist/cjs/justifi-payment-details.cjs.entry.js +13 -13
  62. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
  63. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +11 -11
  64. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +14 -14
  65. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +5 -5
  66. package/dist/cjs/justifi-payments-list.cjs.entry.js +15 -15
  67. package/dist/cjs/justifi-payout-details.cjs.entry.js +12 -12
  68. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +14 -14
  69. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +5 -5
  70. package/dist/cjs/justifi-payouts-list.cjs.entry.js +16 -16
  71. package/dist/cjs/justifi-refund-payment.cjs.entry.js +15 -15
  72. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +6 -6
  73. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -10
  74. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +9 -9
  75. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +13 -13
  76. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +9 -9
  77. package/dist/cjs/justifi-terminals-list.cjs.entry.js +15 -15
  78. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +12 -12
  79. package/dist/cjs/loader.cjs.js +2 -2
  80. package/dist/cjs/{package-B7_ed3oS.js → package-C0-LCfay.js} +1 -1
  81. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  82. package/dist/cjs/payment-details-core.cjs.entry.js +7 -7
  83. package/dist/cjs/{payment.service-BU1Mwwnv.js → payment.service-CtSdIJoy.js} +4 -4
  84. package/dist/cjs/payments-list-core.cjs.entry.js +13 -13
  85. package/dist/cjs/{payments-list-params-state-BNbT1fuJ.js → payments-list-params-state-Cewmin_p.js} +1 -1
  86. package/dist/cjs/{payments-status-PB63klt3.js → payments-status-DXRh_ekP.js} +2 -2
  87. package/dist/cjs/{payments-table-uouQ4x2Y.js → payments-table-CUGE6F-R.js} +3 -3
  88. package/dist/cjs/payout-details-core.cjs.entry.js +8 -8
  89. package/dist/cjs/{payout.service-BjB-B6CX.js → payout.service-7DP6F8x7.js} +4 -4
  90. package/dist/cjs/payouts-list-core.cjs.entry.js +13 -13
  91. package/dist/cjs/{terminal-orders-list-params-state-BNbT1fuJ.js → payouts-list-params-state-Cewmin_p.js} +1 -1
  92. package/dist/cjs/{payouts-status-Bk1JFzbP.js → payouts-status-DxTQZv3i.js} +2 -2
  93. package/dist/cjs/{payouts-table-Bo61u5ZZ.js → payouts-table-Ca9HqjV7.js} +3 -3
  94. package/dist/cjs/{skeleton-x-GSs3xk.js → skeleton-C7DQRD6r.js} +1 -1
  95. package/dist/cjs/{spinner-Kb1BFvnL.js → spinner-jmeA44Ee.js} +1 -1
  96. package/dist/cjs/{styled-host-CqQYxX-w.js → styled-host-BfVJlAsJ.js} +1 -1
  97. package/dist/cjs/{table-BJVUhh3s.js → table-Ccdrt0v_.js} +2 -2
  98. package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
  99. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +12 -12
  100. package/dist/cjs/{checkouts-list-params-state-BNbT1fuJ.js → terminal-orders-list-params-state-Cewmin_p.js} +1 -1
  101. package/dist/cjs/{terminal-orders-table-FtFQqd0s.js → terminal-orders-table-DPe_2FNB.js} +7 -7
  102. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  103. package/dist/cjs/{terminal.service-De-0eGdM.js → terminal.service-BR9g1yaB.js} +4 -4
  104. package/dist/cjs/terminals-list-core.cjs.entry.js +12 -12
  105. package/dist/cjs/terminals-list-params-state-Cewmin_p.js +22 -0
  106. package/dist/cjs/{terminals-table-CGG9EhiI.js → terminals-table-DDoJIYZu.js} +3 -3
  107. package/dist/cjs/{utils-Df-pajL7.js → utils-Bzyj4qWe.js} +1 -1
  108. package/dist/cjs/{utils-Dka3MplB.js → utils-Dewr6SlQ.js} +6 -0
  109. package/dist/cjs/webcomponents.cjs.js +3 -3
  110. package/dist/collection/collection-manifest.json +1 -1
  111. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
  112. package/dist/collection/components/checkout/card-form/card-form.js +6 -3
  113. package/dist/collection/utils/utils.js +5 -0
  114. package/dist/docs.json +2 -2
  115. package/dist/esm/{Api-Bes3KkG6.js → Api-BJv2_XdA.js} +2 -2
  116. package/dist/esm/{Checkout-DfRTGCdt.js → Checkout-CIUkm9aQ.js} +1 -1
  117. package/dist/esm/{Payment-93PpwzdC.js → Payment-DrCqUoz-.js} +1 -1
  118. package/dist/esm/{Refund-CISeDJoW.js → Refund-Dwnnpqim.js} +1 -1
  119. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  120. package/dist/esm/{badge-BRPxcFAe.js → badge-XXatxWS0.js} +1 -1
  121. package/dist/esm/bank-account-document-form-inputs_4.entry.js +9 -9
  122. package/dist/esm/bank-account-form_9.entry.js +13 -11
  123. package/dist/esm/business-details-core.entry.js +4 -4
  124. package/dist/esm/{business.service-Cx6MiBgY.js → business.service-Di9jP2_p.js} +4 -4
  125. package/dist/esm/{button-B_viNpoz.js → button-C-ZZ9yD1.js} +1 -1
  126. package/dist/esm/{check-pkg-version-DvajBJj9.js → check-pkg-version-8KHO3ihW.js} +5 -5
  127. package/dist/esm/{checkout.service-BQ2Z7hHe.js → checkout.service-l-H_OIZa.js} +4 -4
  128. package/dist/esm/checkouts-list-core.entry.js +12 -12
  129. package/dist/esm/{checkouts-list-params-state-SMXQIZTt.js → checkouts-list-params-state-D8tzsGR_.js} +1 -1
  130. package/dist/esm/{checkouts-table-YyKWgXbv.js → checkouts-table-DmwocPX2.js} +3 -3
  131. package/dist/esm/{config-state-BrllxiM0.js → config-state-DZeVYerv.js} +1 -1
  132. package/dist/esm/custom-popper.entry.js +1 -1
  133. package/dist/esm/{dispute.service-Bmw6fgc6.js → dispute.service-CaEbHFjw.js} +4 -4
  134. package/dist/esm/form-alert_5.entry.js +1 -1
  135. package/dist/esm/form-control-checkbox.entry.js +3 -3
  136. package/dist/esm/form-control-date.entry.js +2 -2
  137. package/dist/esm/{form-control-error-text-BvjVjw2l.js → form-control-error-text-eKr_QuRZ.js} +1 -1
  138. package/dist/esm/form-control-file-v2_2.entry.js +2 -2
  139. package/dist/esm/{form-control-help-text-Dggj4lH9.js → form-control-help-text-Dw2vjMQ5.js} +1 -1
  140. package/dist/esm/form-control-help-text.entry.js +1 -1
  141. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  142. package/dist/esm/form-control-monetary.entry.js +4 -4
  143. package/dist/esm/form-control-number-masked_2.entry.js +2 -2
  144. package/dist/esm/form-control-number.entry.js +3 -3
  145. package/dist/esm/form-control-radio.entry.js +1 -1
  146. package/dist/esm/form-control-select_3.entry.js +2 -2
  147. package/dist/esm/{get-payment-details-Rww84hl5.js → get-payment-details-BOpjKcRB.js} +5 -5
  148. package/dist/esm/{get-subaccounts-0PmjUDEa.js → get-subaccounts-0Ri4RB5r.js} +6 -6
  149. package/dist/esm/gross-payment-chart-core.entry.js +4 -4
  150. package/dist/esm/{header-1-UMqoryJI.js → header-1-BnwrlkS-.js} +1 -1
  151. package/dist/esm/{header-3-DfV3YFNS.js → header-3-IOnOCyak.js} +1 -1
  152. package/dist/esm/{iframe-input-styles-state-2KXH-_4X.js → iframe-input-styles-state-Cqb62KAu.js} +1 -1
  153. package/dist/esm/iframe-input_4.entry.js +6 -6
  154. package/dist/esm/{index-B9me4yN2.js → index-B_KxSZIF.js} +1 -1
  155. package/dist/esm/{index-kpoIU4v_.js → index-Bn7inNWG.js} +2 -2
  156. package/dist/esm/{insurance-state-yzV5mr5o.js → insurance-state-DRFl0tWj.js} +2 -2
  157. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +9 -9
  158. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +10 -10
  159. package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
  160. package/dist/esm/justifi-business-details.entry.js +12 -12
  161. package/dist/esm/justifi-business-form.entry.js +15 -15
  162. package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
  163. package/dist/esm/justifi-checkout-core.entry.js +9 -9
  164. package/dist/esm/justifi-checkout.entry.js +11 -11
  165. package/dist/esm/justifi-checkouts-list-filters.entry.js +9 -9
  166. package/dist/esm/justifi-checkouts-list.entry.js +15 -15
  167. package/dist/esm/justifi-config-provider.entry.js +3 -3
  168. package/dist/esm/justifi-details.entry.js +2 -2
  169. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  170. package/dist/esm/justifi-dispute-management.entry.js +11 -11
  171. package/dist/esm/justifi-dispute-notification_3.entry.js +14 -14
  172. package/dist/esm/justifi-gross-payment-chart.entry.js +11 -11
  173. package/dist/esm/justifi-order-terminals.entry.js +14 -14
  174. package/dist/esm/justifi-owner-form_3.entry.js +10 -10
  175. package/dist/esm/justifi-payment-details.entry.js +13 -13
  176. package/dist/esm/justifi-payment-provisioning-core.entry.js +3 -3
  177. package/dist/esm/justifi-payment-provisioning.entry.js +11 -11
  178. package/dist/esm/justifi-payment-transactions-list.entry.js +14 -14
  179. package/dist/esm/justifi-payments-list-filters.entry.js +5 -5
  180. package/dist/esm/justifi-payments-list.entry.js +15 -15
  181. package/dist/esm/justifi-payout-details.entry.js +12 -12
  182. package/dist/esm/justifi-payout-transactions-list.entry.js +14 -14
  183. package/dist/esm/justifi-payouts-list-filters.entry.js +5 -5
  184. package/dist/esm/justifi-payouts-list.entry.js +16 -16
  185. package/dist/esm/justifi-refund-payment.entry.js +15 -15
  186. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +6 -6
  187. package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -10
  188. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +9 -9
  189. package/dist/esm/justifi-terminal-orders-list.entry.js +13 -13
  190. package/dist/esm/justifi-terminals-list-filters.entry.js +9 -9
  191. package/dist/esm/justifi-terminals-list.entry.js +15 -15
  192. package/dist/esm/justifi-tokenize-payment-method.entry.js +12 -12
  193. package/dist/esm/loader.js +3 -3
  194. package/dist/esm/{package-DwtqmD1M.js → package-BOCuVjGs.js} +1 -1
  195. package/dist/esm/pagination-menu.entry.js +1 -1
  196. package/dist/esm/payment-details-core.entry.js +7 -7
  197. package/dist/esm/{payment.service-Ck1kdYXH.js → payment.service-Dz5mhgIm.js} +4 -4
  198. package/dist/esm/payments-list-core.entry.js +13 -13
  199. package/dist/esm/{payments-list-params-state-SMXQIZTt.js → payments-list-params-state-D8tzsGR_.js} +1 -1
  200. package/dist/esm/{payments-status-gL2bjUp9.js → payments-status-CN8wEqKC.js} +2 -2
  201. package/dist/esm/{payments-table-DrnN-flR.js → payments-table-SmMgUr5X.js} +3 -3
  202. package/dist/esm/payout-details-core.entry.js +8 -8
  203. package/dist/esm/{payout.service-YOny8vA1.js → payout.service-DUnRbCmv.js} +4 -4
  204. package/dist/esm/payouts-list-core.entry.js +13 -13
  205. package/dist/esm/{payouts-list-params-state-SMXQIZTt.js → payouts-list-params-state-D8tzsGR_.js} +1 -1
  206. package/dist/esm/{payouts-status-BpBVp8j1.js → payouts-status-BzTh9X2W.js} +2 -2
  207. package/dist/esm/{payouts-table-Bt0Dhq3E.js → payouts-table-SB6q0e7V.js} +3 -3
  208. package/dist/esm/{skeleton-MHyzfkPM.js → skeleton-DK6mW457.js} +1 -1
  209. package/dist/esm/{spinner-CaGDuAi8.js → spinner-CWoD0q_S.js} +1 -1
  210. package/dist/esm/{styled-host-B_XBaM7z.js → styled-host-CTAGIN84.js} +1 -1
  211. package/dist/esm/{table-B-m83mFl.js → table-KCj3mM1K.js} +2 -2
  212. package/dist/esm/table-filters-menu.entry.js +2 -2
  213. package/dist/esm/terminal-orders-list-core.entry.js +12 -12
  214. package/dist/esm/{terminal-orders-list-params-state-SMXQIZTt.js → terminal-orders-list-params-state-D8tzsGR_.js} +1 -1
  215. package/dist/esm/{terminal-orders-table-shGx8Lcn.js → terminal-orders-table-CPsSDEWs.js} +7 -7
  216. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  217. package/dist/esm/{terminal.service-CJbnbE1S.js → terminal.service-Vhk3qPk2.js} +4 -4
  218. package/dist/esm/terminals-list-core.entry.js +12 -12
  219. package/dist/esm/terminals-list-params-state-D8tzsGR_.js +16 -0
  220. package/dist/esm/{terminals-table-DskXRPbS.js → terminals-table-CAavYaG5.js} +3 -3
  221. package/dist/esm/{utils-DIxPWgIk.js → utils-CKEiU2Q5.js} +6 -1
  222. package/dist/esm/{utils-DOW3rBEH.js → utils-_kzStVq_.js} +1 -1
  223. package/dist/esm/webcomponents.js +4 -4
  224. package/dist/module/bank-account-form2.js +5 -2
  225. package/dist/module/card-form2.js +5 -2
  226. package/dist/module/checkouts-list-core2.js +1 -1
  227. package/dist/module/gross-payment-chart-core2.js +1 -1
  228. package/dist/module/justifi-order-terminals.js +1 -1
  229. package/dist/module/justifi-payment-transactions-list.js +1 -1
  230. package/dist/module/justifi-payments-list-filters.js +1 -1
  231. package/dist/module/justifi-payout-transactions-list.js +1 -1
  232. package/dist/module/justifi-payouts-list-filters.js +1 -1
  233. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  234. package/dist/module/package.js +1 -1
  235. package/dist/module/payment-details-core2.js +1 -1
  236. package/dist/module/payments-list-core2.js +1 -1
  237. package/dist/module/payout-details-core2.js +1 -1
  238. package/dist/module/payouts-list-core2.js +1 -1
  239. package/dist/module/saved-payment-method.js +1 -1
  240. package/dist/module/season-interruption-insurance-core.js +1 -1
  241. package/dist/module/terminal-orders-list-core2.js +1 -1
  242. package/dist/module/terminals-list-core2.js +1 -1
  243. package/dist/module/utils2.js +6 -1
  244. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
  245. package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
  246. package/dist/types/utils/utils.d.ts +1 -0
  247. package/dist/webcomponents/{p-e4dbec27.entry.js → p-08e1bf28.entry.js} +1 -1
  248. package/dist/webcomponents/{p-af3ef542.entry.js → p-09cb06ed.entry.js} +1 -1
  249. package/dist/webcomponents/{p-66a77e7d.entry.js → p-0adbbb23.entry.js} +1 -1
  250. package/dist/webcomponents/{p-3b98d8ca.entry.js → p-0b067d3c.entry.js} +1 -1
  251. package/dist/webcomponents/{p-3f771784.entry.js → p-0bfd309e.entry.js} +1 -1
  252. package/dist/webcomponents/{p-f057b215.entry.js → p-0f005fdd.entry.js} +1 -1
  253. package/dist/webcomponents/p-0nMw2Aul.js +1 -0
  254. package/dist/webcomponents/{p-d47a05ba.entry.js → p-14dc17fd.entry.js} +1 -1
  255. package/dist/webcomponents/{p-7bc9d8f4.entry.js → p-266f1ff3.entry.js} +1 -1
  256. package/dist/webcomponents/p-35387685.entry.js +1 -0
  257. package/dist/webcomponents/{p-69800e4a.entry.js → p-3946adfa.entry.js} +1 -1
  258. package/dist/webcomponents/p-3c44b724.entry.js +1 -0
  259. package/dist/webcomponents/p-3e3b5cdb.entry.js +1 -0
  260. package/dist/webcomponents/{p-a1ce996c.entry.js → p-41876098.entry.js} +1 -1
  261. package/dist/webcomponents/{p-8dfc21d5.entry.js → p-45edf188.entry.js} +1 -1
  262. package/dist/webcomponents/p-4786f2d0.entry.js +1 -0
  263. package/dist/webcomponents/p-4c1c55bb.entry.js +1 -0
  264. package/dist/webcomponents/{p-652cc155.entry.js → p-4f358b63.entry.js} +1 -1
  265. package/dist/webcomponents/{p-f9a18fcb.entry.js → p-5375df08.entry.js} +1 -1
  266. package/dist/webcomponents/{p-41ab2378.entry.js → p-575b972d.entry.js} +1 -1
  267. package/dist/webcomponents/{p-7be2ef8d.entry.js → p-580aa2e3.entry.js} +1 -1
  268. package/dist/webcomponents/p-5b857a1c.entry.js +1 -0
  269. package/dist/webcomponents/{p-08ae973e.entry.js → p-5c9d1c35.entry.js} +1 -1
  270. package/dist/webcomponents/{p-28133336.entry.js → p-690514f2.entry.js} +1 -1
  271. package/dist/webcomponents/p-6a853571.entry.js +1 -0
  272. package/dist/webcomponents/{p-50f8e87e.entry.js → p-724e4e6c.entry.js} +1 -1
  273. package/dist/webcomponents/{p-96b75110.entry.js → p-756a7021.entry.js} +1 -1
  274. package/dist/webcomponents/{p-db9f3fcd.entry.js → p-7a0661a2.entry.js} +4 -4
  275. package/dist/webcomponents/p-80b6c011.entry.js +1 -0
  276. package/dist/webcomponents/p-89431ee2.entry.js +1 -0
  277. package/dist/webcomponents/{p-7528f993.entry.js → p-8f5c1ae6.entry.js} +1 -1
  278. package/dist/webcomponents/{p-831337bc.entry.js → p-96247d70.entry.js} +1 -1
  279. package/dist/webcomponents/{p-2b1090d0.entry.js → p-989d56de.entry.js} +1 -1
  280. package/dist/webcomponents/{p-b3e8e00f.entry.js → p-99f7a36d.entry.js} +1 -1
  281. package/dist/webcomponents/{p-DZw7v4st.js → p-BCgpQGhw.js} +1 -1
  282. package/dist/webcomponents/p-BOCuVjGs.js +1 -0
  283. package/dist/webcomponents/p-BQ2TIFoY.js +1 -0
  284. package/dist/webcomponents/{p-DBhBVIU-.js → p-BQQ7ifKz.js} +1 -1
  285. package/dist/webcomponents/p-BUSn_ReW.js +1 -0
  286. package/dist/webcomponents/p-BY1mRAvj.js +1 -0
  287. package/dist/webcomponents/p-BZtgbC0H.js +1 -0
  288. package/dist/webcomponents/p-B_t2t34m.js +1 -0
  289. package/dist/webcomponents/{p-kpoIU4v_.js → p-Bn7inNWG.js} +1 -1
  290. package/dist/webcomponents/p-BpWSwi9x.js +1 -0
  291. package/dist/webcomponents/p-Bs-84XY6.js +1 -0
  292. package/dist/webcomponents/{p-PmGAGJ5K.js → p-BtyEAd0R.js} +1 -1
  293. package/dist/webcomponents/{p-CHB0cPw7.js → p-BvXjypQm.js} +1 -1
  294. package/dist/webcomponents/p-C-wMveZe.js +1 -0
  295. package/dist/webcomponents/{p-qnx9PpK1.js → p-CCl9g-ln.js} +1 -1
  296. package/dist/webcomponents/p-CDPZXQAo.js +1 -0
  297. package/dist/webcomponents/{p-DIxPWgIk.js → p-CKEiU2Q5.js} +1 -1
  298. package/dist/webcomponents/p-CS4_rnSp.js +1 -0
  299. package/dist/webcomponents/{p-G_As8rAe.js → p-CnMP2-Xk.js} +1 -1
  300. package/dist/webcomponents/p-CpaS1Lex.js +1 -0
  301. package/dist/webcomponents/{p-5B_nojEF.js → p-CxHdQoIo.js} +1 -1
  302. package/dist/webcomponents/p-DFWnHEN2.js +1 -0
  303. package/dist/webcomponents/{p-CSNli0tl.js → p-DK0C7j0u.js} +1 -1
  304. package/dist/webcomponents/{p-BZ70sqbi.js → p-DKSNNnPC.js} +1 -1
  305. package/dist/webcomponents/{p-CvXbmLtl.js → p-DV1c2IYS.js} +1 -1
  306. package/dist/webcomponents/{p-CA1oADw4.js → p-DetWIU1e.js} +1 -1
  307. package/dist/webcomponents/{p-9y5MOK55.js → p-DhGNCW2f.js} +1 -1
  308. package/dist/webcomponents/{p-BiWuElbM.js → p-DjFzWJxk.js} +1 -1
  309. package/dist/webcomponents/{p-DZgAEPoo.js → p-DnGswpsl.js} +1 -1
  310. package/dist/webcomponents/p-DsLxs70Z.js +1 -0
  311. package/dist/webcomponents/p-DsZZxRXY.js +1 -0
  312. package/dist/webcomponents/p-DtdcFDM_.js +1 -0
  313. package/dist/webcomponents/p-DwF36W04.js +1 -0
  314. package/dist/webcomponents/{p-CRFzwZW6.js → p-DxqCFDtF.js} +1 -1
  315. package/dist/webcomponents/p-L4y68wud.js +1 -0
  316. package/dist/webcomponents/{p-c8ae1620.entry.js → p-a09ca567.entry.js} +1 -1
  317. package/dist/webcomponents/{p-3aafab63.entry.js → p-a3313ebe.entry.js} +1 -1
  318. package/dist/webcomponents/{p-463ae23a.entry.js → p-abbf14b5.entry.js} +1 -1
  319. package/dist/webcomponents/{p-2634a1ee.entry.js → p-aeaafe28.entry.js} +1 -1
  320. package/dist/webcomponents/{p-d6f02807.entry.js → p-b25bbf0a.entry.js} +1 -1
  321. package/dist/webcomponents/{p-d711f296.entry.js → p-b7594923.entry.js} +1 -1
  322. package/dist/webcomponents/{p-da6790bb.entry.js → p-b79e302a.entry.js} +1 -1
  323. package/dist/webcomponents/{p-6816c021.entry.js → p-ba268a78.entry.js} +1 -1
  324. package/dist/webcomponents/{p-144f15c1.entry.js → p-ba68ea4f.entry.js} +1 -1
  325. package/dist/webcomponents/{p-2e734e97.entry.js → p-bcadc072.entry.js} +1 -1
  326. package/dist/webcomponents/p-bf0e00be.entry.js +1 -0
  327. package/dist/webcomponents/{p-0ced05b3.entry.js → p-c15d8dd0.entry.js} +1 -1
  328. package/dist/webcomponents/p-c28f2569.entry.js +1 -0
  329. package/dist/webcomponents/{p-c711551a.entry.js → p-c51651aa.entry.js} +1 -1
  330. package/dist/webcomponents/{p-b46bf62f.entry.js → p-c5911cd9.entry.js} +1 -1
  331. package/dist/webcomponents/{p-254724c4.entry.js → p-cdd2c7c8.entry.js} +1 -1
  332. package/dist/webcomponents/{p-d9704f8c.entry.js → p-cefb9a76.entry.js} +1 -1
  333. package/dist/webcomponents/{p-CZ8q2CPi.js → p-ck6bcYXe.js} +1 -1
  334. package/dist/webcomponents/{p-be165165.entry.js → p-d2ae3c55.entry.js} +1 -1
  335. package/dist/webcomponents/{p-fa30d8bd.entry.js → p-d2e1d179.entry.js} +1 -1
  336. package/dist/webcomponents/{p-e7b60660.entry.js → p-d43a4316.entry.js} +1 -1
  337. package/dist/webcomponents/{p-5e10aa65.entry.js → p-d46dbb83.entry.js} +1 -1
  338. package/dist/webcomponents/{p-da731140.entry.js → p-d4d58793.entry.js} +1 -1
  339. package/dist/webcomponents/{p-437aaa5e.entry.js → p-d53c3370.entry.js} +1 -1
  340. package/dist/webcomponents/{p-29f81159.entry.js → p-dc6b707a.entry.js} +1 -1
  341. package/dist/webcomponents/{p-a3c5ac1c.entry.js → p-dfd9aff0.entry.js} +1 -1
  342. package/dist/webcomponents/{p-QxJlhLWM.js → p-dzS7n4Xj.js} +1 -1
  343. package/dist/webcomponents/{p-6158cf60.entry.js → p-e4682bb6.entry.js} +1 -1
  344. package/dist/webcomponents/p-eP3fmhta.js +1 -0
  345. package/dist/webcomponents/p-ee566062.entry.js +1 -0
  346. package/dist/webcomponents/{p-6dd98d75.entry.js → p-ef07d761.entry.js} +1 -1
  347. package/dist/webcomponents/{p-52092407.entry.js → p-f24b04eb.entry.js} +1 -1
  348. package/dist/webcomponents/{p-52ede69d.entry.js → p-f8e974af.entry.js} +1 -1
  349. package/dist/webcomponents/{p-20a75acd.entry.js → p-fb60bc7a.entry.js} +1 -1
  350. package/dist/webcomponents/{p-DkaX7Taq.js → p-qGbNz93o.js} +1 -1
  351. package/dist/webcomponents/p-sw5RO19U.js +1 -0
  352. package/dist/webcomponents/p-v6yK8Vbe.js +1 -0
  353. package/dist/webcomponents/{p-Y-KcAUY_.js → p-znmwKCgq.js} +1 -1
  354. package/dist/webcomponents/webcomponents.esm.js +1 -1
  355. package/package.json +1 -1
  356. package/dist/cjs/terminals-list-params-state-BNbT1fuJ.js +0 -22
  357. package/dist/esm/terminals-list-params-state-SMXQIZTt.js +0 -16
  358. package/dist/webcomponents/p-0ac1bb26.entry.js +0 -1
  359. package/dist/webcomponents/p-4114a328.entry.js +0 -1
  360. package/dist/webcomponents/p-423ad3eb.entry.js +0 -1
  361. package/dist/webcomponents/p-43752d57.entry.js +0 -1
  362. package/dist/webcomponents/p-44FkPJq7.js +0 -1
  363. package/dist/webcomponents/p-540c31f2.entry.js +0 -1
  364. package/dist/webcomponents/p-5dbd1b93.entry.js +0 -1
  365. package/dist/webcomponents/p-7WIgS5RM.js +0 -1
  366. package/dist/webcomponents/p-7d3a563f.entry.js +0 -1
  367. package/dist/webcomponents/p-BEXEpjn_.js +0 -1
  368. package/dist/webcomponents/p-BGUDiFCH.js +0 -1
  369. package/dist/webcomponents/p-BRBt7Vt-.js +0 -1
  370. package/dist/webcomponents/p-BVD7g3cE.js +0 -1
  371. package/dist/webcomponents/p-Bt388eye.js +0 -1
  372. package/dist/webcomponents/p-BvLgDun_.js +0 -1
  373. package/dist/webcomponents/p-BwRi5Eou.js +0 -1
  374. package/dist/webcomponents/p-CVQyw7ao.js +0 -1
  375. package/dist/webcomponents/p-Cuxr_9xa.js +0 -1
  376. package/dist/webcomponents/p-D-vUkGsU.js +0 -1
  377. package/dist/webcomponents/p-D6ssxpjT.js +0 -1
  378. package/dist/webcomponents/p-DAasymX_.js +0 -1
  379. package/dist/webcomponents/p-DT-cTREr.js +0 -1
  380. package/dist/webcomponents/p-DaDsBt65.js +0 -1
  381. package/dist/webcomponents/p-Dgo6D5G7.js +0 -1
  382. package/dist/webcomponents/p-DwtqmD1M.js +0 -1
  383. package/dist/webcomponents/p-b8b7603c.entry.js +0 -1
  384. package/dist/webcomponents/p-d54963ce.entry.js +0 -1
  385. package/dist/webcomponents/p-d5505b45.entry.js +0 -1
  386. package/dist/webcomponents/p-e3197269.entry.js +0 -1
  387. package/dist/webcomponents/p-fc1e3832.entry.js +0 -1
  388. package/dist/webcomponents/p-lZ9GOnvt.js +0 -1
  389. package/dist/webcomponents/p-pska2q1M.js +0 -1
  390. package/dist/webcomponents/p-vi4XpHew.js +0 -1
  391. package/dist/webcomponents/p-zRPvfo_G.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t,r as s,c as e}from"./p-kpoIU4v_.js";import{a as i,b as r}from"./p-DSP8qjHL.js";import{F as o,c as n,b as a}from"./p-CR9D6mKt.js";import{A as l,C as h,R as c,c as d}from"./p-BlJnA265.js";import{C as u,P as m}from"./p-B-iV5cYd.js";import{D as p}from"./p-CVGBVdVC.js";import{S as f}from"./p-BGUDiFCH.js";import"./p-CZfYo5-1.js";import{a as v,r as b,s as y,b as g}from"./p-yH3TC3ZQ.js";import{a as w,B as _}from"./p-XYgDHrVL.js";import{E as x,h as j,i as S}from"./p-DZgAEPoo.js";import{z as k,A as T,B as C,y as O,C as D,D as L}from"./p-CYBR4K2p.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as H,a as E}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-7MWRbTXI.js";import{n as V}from"./p-BnjCmwMr.js";import{B}from"./p-BvLgDun_.js";import{i as A,a as P}from"./p-PgEzcvI6.js";import{S as I}from"./p-BX8GieXu.js";import"./p-BFTU3MAI.js";import"./p-Dt-vy9Le.js";import"./p-7WIgS5RM.js";class W{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const F=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(f,{width:"25%"})),t("div",{class:"col-12"},t(f,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(f,{width:"50%"}),t(f,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(f,{width:"65%"}),t(f,{width:"35%"}))),U=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(f,{width:"40%",height:"40px"})),t(F,null),t(F,null),t(F,null)),R=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new l(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s})),this.additional_questions=new l(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new l(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const l=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Additional Questions"),t("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business’ estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==l?void 0:l.business_revenue,maskOptions:u.WHOLE})),t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==l?void 0:l.business_payment_volume,maskOptions:u.WHOLE})),t("div",{class:"col-12"},t("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:v,defaultValue:null==l?void 0:l.business_when_service_received})),t("div",{class:"col-12"},t("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:b,defaultValue:null==l?void 0:l.business_recurring_payments})),t("div",{class:"col-12",hidden:!this.recurringPayments},t("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==l?void 0:l.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),t("div",{class:"col-12"},t("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:y,defaultValue:null==l?void 0:l.business_seasonal})),t("div",{class:"col-12"},t("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==l?void 0:l.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},q=(t,s)=>t.some((t=>t.document_type===s)),N="Please upload either a voided check or a bank statement. Only one is required.",Y=(t,s)=>{const e=q(t,x.voidedCheck),i=q(t,x.bankStatement),r=e||i,o=n().shape({bank_name:L.required("Enter bank name"),nickname:D.required("Enter nickname"),account_owner_name:O.required("Enter account owner name"),account_type:C.required("Select account type"),account_number:T.required("Enter account number"),routing_number:k.required("Enter routing number"),voided_check:a().when("bank_statement",{is:t=>!t&&!r,then:t=>t.required(N),otherwise:t=>t.notRequired()}),bank_statement:a().when("voided_check",{is:t=>!t&&!r,then:t=>t.required(N),otherwise:t=>t.notRequired()})},[["voided_check","bank_statement"]]),l=n({bank_name:L.nullable(),nickname:D.nullable(),account_owner_name:O.nullable(),account_type:C.nullable(),account_number:T.nullable(),routing_number:k.nullable(),voided_check:a().nullable(),bank_statement:a().nullable()});return s?l:o},M=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new j,this.isLoading=!1,this.initializeFormController=()=>{this.formController=new o(Y(this.existingDocuments,this.allowOptionalFields)),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))},this.storeFiles=t=>{const s=Array.from(t.detail.fileList),e=t.detail.document_type,i=s.map((t=>new S({file:t,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.bank_accounts.length>0?this.bankAccount=new W(t.data.bank_accounts[0]):(this.bankAccount=new W({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=t.data.documents},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async t=>{this.isLoading=!0;const s=t.record_data;return new Promise((e=>{this.postDocumentRecord({payload:s,onSuccess:s=>{e(this.handleDocRecordResponse(t,s))},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(t,s)=>s.error?(this.errorEvent.emit({errorCode:E.POST_ERROR,message:s.error.message,severity:H.ERROR,data:s.error}),!1):(t.setPresignedUrl(s.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const s=await t.getFileData(),e=await fetch(t.presigned_url,{method:"PUT",body:s});return this.handleUploadResponse(e)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:E.POST_ERROR,message:t.error.message,severity:H.ERROR,data:t.error}),!1)}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){this.existingBankAccount?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(Y(this.existingDocuments,this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){return new W(this.formController.values.getValue()).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}async sendData(t){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;t()}catch(t){this.errorEvent.emit({message:t,errorCode:E.POST_ERROR,severity:H.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((s=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:s=>{t=s,e=!0},onError:({error:t,code:s,severity:i})=>{e=!1,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:w.bankAccount}),this.isLoading=!1,s(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",{class:"mb-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Bank Account Info"),t("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),t("hr",{class:"mt-2"}),t("bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),t("fieldset",{class:"mt-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Document Uploads"),t("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),t("hr",{class:"mt-2"}),t("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),t("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{isLoading:["watchHandler"]}}},X=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new h(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new h(this.formController.values.getValue()).payload}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(r(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Business Information")),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:s.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),t("div",{class:"col-12"},t("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:s.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),t("div",{class:"col-12 col-md-8"},t("form-control-select",{name:"classification",label:"Business Classification",options:g,defaultValue:s.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-4"},t("form-control-date",{name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:s.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"industry",label:"Industry",defaultValue:s.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"tax_id",label:"Tax ID (EIN or SSN)",defaultValue:s.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,keyDownHandler:V,maxLength:9,helpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes."})),t("div",{class:"col-12"},t("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:s.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"email",label:"Business Email Address",defaultValue:s.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:s.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:m.US})))))}},G=class{constructor(t){s(this,t),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(t,s)=>{const e=this.refs.findIndex((t=>t===s));-1!==e&&(this.refs[e]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:_.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((s=>s.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)}}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const s=this.refs.map((t=>t.validate()));if(!(await Promise.all(s)).every((t=>t)))return;const e=this.refs.map((t=>t.submit()));(await Promise.all(e)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const s=t.detail,e=this.ownersPayload.map((t=>t.id===s.id?s:t));e.includes(s)||(e[this.ownersPayload.findIndex((t=>!t.id))]=s,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?t(U,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Owners"),t("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},this.ownersPayload.map((s=>t("justifi-owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(B,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},K=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new c(t.data.representative||{}),this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(A("representative",this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(U,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController})}},Z=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.legal_address=new d(t.data.legal_address||{}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new d(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(P(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n;const a=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line1,errorText:null===(s=this.errors)||void 0===s?void 0:s.line1})),t("div",{class:"col-12"},t("form-control-text",{name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line2,errorText:null===(e=this.errors)||void 0===e?void 0:e.line2})),t("div",{class:"col-12"},t("form-control-text",{name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.city,errorText:null===(i=this.errors)||void 0===i?void 0:i.city})),t("div",{class:"col-12"},t("form-control-select",{name:"state",label:"State",options:I,inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.state,errorText:null===(r=this.errors)||void 0===r?void 0:r.state})),t("div",{class:"col-12"},t("form-control-text",{name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.postal_code,errorText:null===(o=this.errors)||void 0===o?void 0:o.postal_code,maxLength:5,keyDownHandler:V})),t("div",{class:"col-12"},t("form-control-select",{name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.country,errorText:null===(n=this.errors)||void 0===n?void 0:n.country,disabled:!0})))))}};export{R as justifi_additional_questions_form_step_core,M as justifi_business_bank_account_form_step_core,X as justifi_business_core_info_form_step_core,G as justifi_business_owners_form_step_core,K as justifi_business_representative_form_step_core,Z as justifi_legal_address_form_step_core}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import{C as r,a as o}from"./p-SdntD1xf.js";import{c as e,J as a}from"./p-BZ70sqbi.js";import{T as p}from"./p-DT-cTREr.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{b as n}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as c,a as m}from"./p-C5RuuShs.js";import{m as h,S as d}from"./p-DAasymX_.js";import{S as u}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-PmGAGJ5K.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-BRBt7Vt-.js";import"./p-CVGBVdVC.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var p,h;try{const d=await i.fetchTerminals(t,s,o);if(d.error)return a({error:m(d.error),code:c(null===(h=d.error)||void 0===h?void 0:h.code),severity:r.ERROR});{const t=Object.assign({},d.page_info);e({terminals:(null===(p=d.data)||void 0===p?void 0:p.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new p}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=h({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(u,{key:"a35e4efef6e52f45e8c2c232bde43afc0f5945ab"},i("terminals-list-core",{key:"46cdde8b97d04760cf1a32f561513dcf42c5dd37",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +0,0 @@
1
- import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as o}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import{P as r}from"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as s,a as p}from"./p-C5RuuShs.js";const t=({id:t,authToken:i,service:e})=>async({onSuccess:n,onError:a,final:m})=>{var c;try{const m=await e.fetchPayment(t,i);if(m.error){a({error:p(m.error),code:s(null===(c=m.error)||void 0===c?void 0:c.code),severity:o.ERROR})}else n({payment:new r(m.data)})}catch(r){const t=s(null==r?void 0:r.code);a({error:p(r),code:t,severity:o.ERROR})}finally{m()}};export{t as m}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as r}from"./p-kpoIU4v_.js";import{P as i}from"./p-Dgo6D5G7.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as o,a as e}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import{P as p}from"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as a,a as n}from"./p-C5RuuShs.js";import{c as m,J as c}from"./p-BZ70sqbi.js";import{S as h}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d}from"./p-CSNli0tl.js";import"./p-CZ8q2CPi.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DwtqmD1M.js";import"./p-DBhBVIU-.js";import"./p-BRBt7Vt-.js";import"./p-CVGBVdVC.js";const j=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:m,final:c})=>{var h,d;try{const c=await r.fetchPayments(t,s,i);if(c.error)return m({error:n(c.error),code:a(null===(d=c.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},c.page_info);e({payments:(null===(h=c.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return m({error:t.message||t,code:s,severity:o.ERROR})}finally{return c()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"60f3068b1b6dd23163f4fc373359a0e722ab9b3c"},r("payments-list-core",{key:"0ab858c2d4aac570935e7d9fedff2596209d2701",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_payments_list}
@@ -1 +0,0 @@
1
- import{h as t,r as e,H as i,c as s}from"./p-kpoIU4v_.js";import{S as a}from"./p-BGUDiFCH.js";import{w as n,c as o}from"./p-9y5MOK55.js";import{a as d}from"./p-qnx9PpK1.js";import{i as r,b as c,a as h,c as l,ay as u}from"./p-CVGBVdVC.js";import{a as m}from"./p-Y-KcAUY_.js";import{n as f,f as p}from"./p-DIxPWgIk.js";import"./p-7WIgS5RM.js";import"./p-7MWRbTXI.js";const b=e=>{const{isReady:i}=e;return i?null:t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-end"},t(a,{height:"18px",width:"120px"}),t(a,{height:"36px"}))),t("div",{class:"row"},t("div",{class:"col-12 align-content-end"},t(a,{height:"18px",width:"110px"}),t(a,{height:"36px"}))))},y=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await n(),this.iframeOrigin=o.iframeOrigin}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize(t,e,i){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return t(i,{key:"b6cdf5a9320d92a5390daaa0a5218274f2dfc178"},t(b,{key:"286fcc38a26820d166ced0bc886143ed3d880da4",isReady:this.isReady}),t("div",{key:"041fcacff70d7cdfc0c8f41258bd9db18703e4c1",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{key:"94dc0eb0d79b40ade96e1961611e3e7a8eef20ea",class:"row mb-3"},t("iframe-input",{key:"41c82b772e7873a45409e35ed56dfea16c20c2ee",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),t("div",{key:"1c95618a50e2d36a3a9a3a7b691ae0dfa6a09936",class:"row"},t("iframe-input",{key:"28a4dde70c8f55b4f6bf6ce2d3beee6acbebbc0b",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},v=e=>{const{isReady:i}=e;return i?null:t("div",{class:"container-fluid p-0"},t("div",{class:"mb-3"},t(a,{height:"18px",width:"100px"}),t(a,{height:"36px"})),t("div",{class:"row"},t("div",{class:"col-4 align-content-end"},t(a,{height:"18px",width:"80px"}),t(a,{height:"36px"})),t("div",{class:"col-4 align-content-end"},t(a,{height:"36px"})),t("div",{class:"col-4 align-content-end"},t(a,{height:"18px",width:"30px"}),t(a,{height:"36px"}))))},g=class{constructor(t){e(this,t),this.isReady=!1}async componentWillLoad(){await n(),this.iframeOrigin=o.iframeOrigin}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize(t,e,i){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return t(i,{key:"7d91102f0ecd44a368b614d6192b3c2c3955fcdf"},t(v,{key:"721c79931188558801dc462ec55ab6feaa6a8e65",isReady:this.isReady}),t("div",{key:"8050c1d12e1c5a68e574d4db8cb35bd94e10f92d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{key:"b53acd53cbd40f1127b4a15685630f7cac18643f",class:"mb-3"},t("iframe-input",{key:"0d1f70562753c975e5ca91d118a3621427e52cad",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),t("div",{key:"2b6077a165609aafb7d2f7a83029b225e9fb4193",class:"d-flex align-items-start"},t("div",{key:"7bf09dc36d84749035ff22607f802688cb96179a",class:"flex-fill me-3"},t("iframe-input",{key:"7a3e75c1b85a4de5b4430e4d81ac6173eb72ac8f",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),t("div",{key:"0372db745a61fddd0d4e7568302ea9ba9aeef250",class:"flex-fill me-3"},t("iframe-input",{key:"e37bd58f6704ab443e41bf4616641667b9d1cdde",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),t("div",{key:"659735815eb06b33d959ce1d77eb7d0673a80684",class:"flex-fill"},t("iframe-input",{key:"69650550c43f239a53011222a776ed6912895e52",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},k=class{constructor(t){e(this,t),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const t=await this.getBaseFontStyles();d("fontStyles",t);const e=await this.getFocusedStyles();d("focused",e);const i=await this.getFocusedAndInvalidStyles();d("focusedAndInvalid",i)}async getBaseFontStyles(){return new Promise((t=>{setTimeout((()=>{const e=getComputedStyle(this.hiddenInput);t({fontFamily:e.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:e.lineHeight,margin:e.margin,padding:e.padding,color:e.color})}),500)}))}async getFocusedStyles(){return new Promise((t=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let e=getComputedStyle(this.hiddenInput);t({boxShadow:e.boxShadow,border:e.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((t=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const e=getComputedStyle(this.hiddenInput),i={boxShadow:e.boxShadow,border:e.border};this.hiddenInput.blur(),t(i)}),500)}))}get part(){return this.isFocused&&this.errorText?r:this.errorText?c:this.isFocused?h:l}render(){return t(i,{key:"61f65f5960ecc45fe7e321299bdd367fde6f3f57"},t("input",{key:"ae2126e3efa70fe09a1211e0335667f324471649",ref:t=>this.hiddenInput=t,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}},w=class{constructor(t){e(this,t)}get showSimpleCardBillingForm(){return"card"===this.paymentMethodType&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return"bankAccount"===this.paymentMethodType&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return t(i,null,t(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},x={bankAccount:"New bank account",card:"New credit or debit card"},_=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.saveNewPaymentMethodChecked=!1,this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async resolvePaymentMethod(t){var e,i;if(this.paymentMethodFormRef&&this.billingFormRef)try{const{isValid:s,errors:a}=await this.validate();if(!s||!t.isValid)return{validationError:!0,error:{code:"validation_error",message:`${Object.values(a)[0]||"Validation error"}`,decline_code:void 0}};const n=await this.tokenize();if(n.error)return{error:n.error};{const t=n.data;return{token:(null===(e=t.card)||void 0===e?void 0:e.token)||(null===(i=t.bank_account)||void 0===i?void 0:i.token),data:t}}}catch(t){return{error:t}}}async validate(){const t=await this.billingFormRef.validate(),e=await this.paymentMethodFormRef.validate();return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues();let e;e=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const i=this.authToken;return await this.paymentMethodFormRef.tokenize(i,e,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var e;const i=null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id;return t("div",{class:"mt-4 pb-4"},t("hidden-input",null),t("card"===i?"card-form":"bank-account-form",{ref:t=>this.paymentMethodFormRef=t}),t("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:i}),t("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}get hiddenRadioInput(){return!this.showAch||!this.showCard}render(){var e,s;return t(i,{key:"137378e62a729bd2287b1bdf89cb85c702cd4e12",class:"payment-method"},t("div",{key:"dabfcf5c56169708a8968a16aeaafefb43ca3ab8",class:"radio-list-item p-3",part:u,onClick:this.onPaymentMethodOptionClick,hidden:this.hiddenRadioInput},t("form-control-radio",{key:"d098e2b8f6e1230fc16fdc2cbfd616559bcf2b89",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:x[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id]})),this.isSelected?this.showNewPaymentMethodForm():null)}};class j{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=f(t.type)}}var C;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(C||(C={}));const M=class{constructor(t){e(this,t),this.savedPaymentMethods=[],this.paymentMethodOptions=[]}async fillBillingForm(t){const e=this.selectedPaymentMethodOptionRef;e.fillBillingForm&&e.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,e;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new j(t))).filter((t=>(this.showCard||t.type!==m.card)&&(this.showAch||t.type!==m.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new j({id:m.sezzle})),this.showCard&&this.paymentMethodOptions.push(new j({id:m.card})),this.showAch&&this.paymentMethodOptions.push(new j({id:m.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(e=this.paymentMethodOptions[0])||void 0===e?void 0:e.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var e;return await(null===(e=this.selectedPaymentMethodOptionRef)||void 0===e?void 0:e.resolvePaymentMethod(t))}async validate(){return this.selectedPaymentMethodOptionRef.validate()}render(){var e;return t(i,{key:"c61e82c72aaa25e87ded723799a1eb0961c05444"},null===(e=this.paymentMethodOptions)||void 0===e?void 0:e.map((e=>{const i=this.selectedPaymentMethodId===e.id,s=e.id===m.sezzle;return e.id===m.card||e.id===m.bankAccount?t("justifi-new-payment-method",{paymentMethodOption:e,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,"show-card":this.showCard,"show-ach":this.showAch,paymentMethodGroupId:this.paymentMethodGroupId,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):s?t("justifi-sezzle-payment-method",{paymentMethodOption:e,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?t("justifi-saved-payment-method",{paymentMethodOption:e,"is-selected":i,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}},S=class{constructor(t){e(this,t),this.checkboxChanged=s(this,"checkboxChanged"),this.isChecked=!1}handleCheckboxChange(t,e){this.isChecked=e,this.checkboxChanged.emit(this.isChecked)}render(){return t("div",{key:"e6e7a75237ec2062188bf85deadac58892663b3b",class:"mt-4 form-check"},t("form-control-checkbox",{key:"abbaeb4e9119c4d41f0a727c7a070c14b7418302",label:"Save new payment method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange.bind(this)}))}},z=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var e,s,a;return t(i,{key:"78487e52f549547f4c89f48a238a8916d77d4f1c",class:"payment-method"},t("div",{key:"d437a5f9e79356b1177703da2b5d7f4ca98072ce",class:"radio-list-item p-3",part:u,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{key:"0dd03b9ebae98c441c63717aba310d77e587b1c8",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:`${C[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.brand]||""} *${null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four}`})))}},O=t("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"}}),P=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=this.bnpl,i=+this.paymentAmount,s=new(0,window.Checkout)({mode:"popup",publicKey:e.provider_client_id,apiMode:e.provider_mode,apiVersion:e.provider_api_version});s.sezzleButtonElement=this.sezzleButtonRef,s.init({onClick:function(t){t.preventDefault(),s.startCheckout({checkout_url:e.provider_checkout_url})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=s,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(i)}}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var e,s,a;return t(i,{key:"4ae50e7bbb15d0049d069edacd0d95ba7c13dbe5",class:"payment-method"},t("script",{key:"42a0590d89626ba7a93852e421eb121626b48375",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{key:"31a2a72650486c258267c6d4de3723f7afa5b063",class:"radio-list-item p-3",part:u,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{key:"eac1adbcd82fcb4f9c440c53c40ce34af6092991",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:t("div",null,t("div",null,"Buy now, pay later with ",O),this.installmentPlan&&t("small",null,t("span",null,null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},p(null===(a=this.installmentPlan)||void 0===a?void 0:a.installments[0].amountInCents))))})))}};export{y as bank_account_form,g as card_form,k as hidden_input,w as justifi_billing_form,_ as justifi_new_payment_method,M as justifi_payment_method_options,S as justifi_save_new_payment_method,z as justifi_saved_payment_method,P as justifi_sezzle_payment_method}
@@ -1 +0,0 @@
1
- import{a as e,f as t}from"./p-kpoIU4v_.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=e=>"function"==typeof e?e():e,r=(e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)},c=(s,c)=>{const p=((e,t=(e,t)=>e!==t)=>{const s=o(e);let n=new Map(Object.entries(s??{}));const c={dispose:[],get:[],set:[],reset:[]},p=new Map,a=()=>{n=new Map(Object.entries(o(e)??{})),c.reset.forEach((e=>e()))},i=e=>(c.get.forEach((t=>t(e))),n.get(e)),u=(e,s)=>{const o=n.get(e);t(s,o,e)&&(n.set(e,s),c.set.forEach((t=>t(e,s,o))))},f="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>i(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,s)=>(u(t,s),!0)}),d=(e,t)=>(c[e].push(t),()=>{r(c[e],t)});return{state:f,get:i,set:u,on:d,onChange:(t,s)=>{const n=(e,n)=>{e===t&&s(n)},r=()=>s(o(e)[t]),c=d("set",n),a=d("reset",r);return p.set(s,{setHandler:n,resetHandler:r,propName:t}),()=>{c(),a(),p.delete(s)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(d("set",t.set)),t.get&&e.push(d("get",t.get)),t.reset&&e.push(d("reset",t.reset)),t.dispose&&e.push(d("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{c.dispose.forEach((e=>e())),a()},reset:a,forceUpdate:e=>{const t=n.get(e);c.set.forEach((s=>s(e,t,t)))},removeListener:(e,t)=>{const s=p.get(t);s&&s.propName===e&&(r(c.set,s.setHandler),r(c.reset,s.resetHandler),p.delete(t))}}})(s,c);return p.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),p};export{c}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as a}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import{a as s}from"./p-DIxPWgIk.js";import{C as i,a as n}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{c as o}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{c,J as p}from"./p-BZ70sqbi.js";import{g as d,a as h}from"./p-C5RuuShs.js";import{P as f}from"./p-Dgo6D5G7.js";import{T as l,l as u,a as m,b as y,c as b,d as _,e as j,f as g,g as k,h as w,i as T,j as v,k as C}from"./p-CA1oADw4.js";import{S as D}from"./p-CRFzwZW6.js";import{T as S}from"./p-CZfYo5-1.js";import{P as I,Q as R}from"./p-CVGBVdVC.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-lZ9GOnvt.js";const x={created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:I,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:I,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:I,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},A={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",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},F={created_at:(e,a)=>t("td",{part:R(a)},t("div",{class:"fw-bold"},s(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},s(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:R(a)},A[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:R(a)},e.id),amount:(e,a)=>t("td",{part:R(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:R(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:R(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:R(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:R(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:R(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:R(a)},e.source_id),source_type:(e,a)=>t("td",{part:R(a)},e.source_type)},P=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new l(this.balanceTransactions,this.columns,x,F),c(),this.analytics=new p(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:s,onSuccess:n,onError:r,final:c})=>{var p;try{const c=await a.fetchPaymentTransactions(t,e,s);c.error?r({error:h(c.error),code:d(null===(p=c.error)||void 0===p?void 0:p.code),severity:i.ERROR}):n({balanceTransactions:c.data.map((t=>new o(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=d(null==t?void 0:t.code);r({error:h(t),code:e,severity:i.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new f})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(n.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.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 t(D,{key:"716f4c8f7d7a4e02a0bc11c4c19304b9fa2376ea"},t(u,{key:"85c0fb74e5208ceb8d4cd7d040f7de200b1fc211"},t(m,{key:"64015db69c878d6339103743a636b7b058e0d897"},t(y,{key:"48624b5cd232afdf4e5386e9c01c13e48e3645f0"},t(b,{key:"fb67abf53476706c2c1851ffdb9ff54faced0431"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"85db5c723d781673ddd700980ac680743ea9eaac"},t(j,{key:"72c5641bd1ff45d71996cee0789942d18e1531ef",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"a81cc544f50dfec1a8444d39f28ae0bf66d41e08",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(k,{key:"cfdc9817cbb5c399257b4bff9bb4620345766c9a",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"4f15aed8b10892db8e336f792bdf3279b7290f7f"},t(v,{key:"678a200a17d03130e09ff7b2b1eac850aa89e507"},t(C,{key:"ca242b95a513d56ebedddbdde7b38a56f309a830",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"abca6ea0f991d6ff480d287c29d9feb069da243f",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{P as justifi_payment_transactions_list}
@@ -1 +0,0 @@
1
- import{h as o}from"./p-kpoIU4v_.js";import{C as p}from"./p-CVGBVdVC.js";const r=r=>o("h1",{class:`header-1 ${null==r?void 0:r.class}`,part:p},r.text);export{r as H}
@@ -1 +0,0 @@
1
- import{h as t}from"./p-kpoIU4v_.js";import{E as e}from"./p-CVGBVdVC.js";const s=({component:s="div",height:o,width:r,className:i,styles:a={}})=>{const p=Object.assign(Object.assign({},a),{width:r,height:o});return t(s,{class:`${i} skeleton`,style:p,part:e,"aria-hidden":"true"})};export{s as S}
@@ -1 +0,0 @@
1
- import{h as a}from"./p-kpoIU4v_.js";import{F as r,G as s,H as g,I as e,J as n,K as d,L as i,M as t,N as b}from"./p-CVGBVdVC.js";var o;!function(a){a.PRIMARY="primary",a.SECONDARY="secondary",a.SUCCESS="success",a.DANGER="danger",a.WARNING="warning",a.INFO="info",a.LIGHT="light",a.DARK="dark"}(o||(o={}));const c=o=>{const{variant:c,text:p,title:f}=o,l={default:"badge",primary:"badge bg-primary",secondary:"badge bg-secondary",success:"badge bg-success",danger:"badge bg-danger",warning:"badge bg-warning",info:"badge bg-info",light:"badge bg-light",dark:"badge bg-dark"},m={default:b,primary:t,secondary:i,success:d,danger:n,warning:e,info:g,light:s,dark:r};return a("span",{class:l[c]||l.default,part:m[c]||m.default,title:f},p)};export{o as B,c as a}
@@ -1 +0,0 @@
1
- import{c as s}from"./p-7WIgS5RM.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
@@ -1 +0,0 @@
1
- import{c as s}from"./p-7WIgS5RM.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
@@ -1 +0,0 @@
1
- import{h as s}from"./p-kpoIU4v_.js";import{ac as a,ad as r,ae as n}from"./p-CVGBVdVC.js";const o=(o,t)=>s("button",Object.assign({class:`btn btn-${o.variant}`,onClick:o.clickHandler,part:`${{primary:r,secondary:a}[o.variant]} ${o.isLoading?n:""}`},o),o.isLoading?s("div",{class:"spinner-border spinner-border-sm",role:"status",part:"button-spinner"},s("span",{class:"visually-hidden"},"Loading...")):t);export{o as B}
@@ -1 +0,0 @@
1
- import{h as t}from"./p-kpoIU4v_.js";import{a}from"./p-DIxPWgIk.js";import{M as o}from"./p-CvXbmLtl.js";import{P as e,Q as s}from"./p-CVGBVdVC.js";const p="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",r={created_at:()=>t("th",{part:e,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:e,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:e,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:e,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:e,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:e,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:e,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:e,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:e,scope:"col",title:"Export CSV"})},l=e=>({created_at:(o,e)=>t("td",{part:s(e)},t("div",{class:"fw-bold"},a(o.created_at,{showDisplayDate:!0}))),sub_account_name:(a,o)=>t("td",{part:s(o)},a.sub_account_name),payments_total:(a,o)=>t("td",{part:s(o)},a.formattedPaymentAmount(a.payments_total)),refunds_total:(a,o)=>t("td",{part:s(o)},a.formattedPaymentAmount(a.refunds_total)),fees_total:(a,o)=>t("td",{part:s(o)},a.formattedPaymentAmount(a.fees_total)),other_total:(a,o)=>t("td",{part:s(o)},a.formattedPaymentAmount(a.other_total)),amount:(a,o)=>t("td",{part:s(o)},a.formattedPaymentAmount(a.amount)),status:(a,e)=>t("td",{part:s(e)},o(a.status)),csv:(a,o)=>t("td",{part:s(o)},t("a",{href:"#",onClick:t=>{t.preventDefault(),e(a.id)}},"CSV"))});export{l as a,p as d,r as p}
@@ -1 +0,0 @@
1
- import{c as s}from"./p-7WIgS5RM.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
@@ -1 +0,0 @@
1
- import{A as e}from"./p-CZ8q2CPi.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";const s=e();class t{async fetchDispute(e,t){return s.get({endpoint:`disputes/${e}`,authToken:t})}async updateDisputeResponse(e,t,p){return s.patch({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async submitDisputeResponse(e,t,p){return s.post({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async createDisputeEvidence(e,t,p){return s.put({endpoint:`disputes/${e}/evidence`,body:p,authToken:t})}}export{t as D}
@@ -1 +0,0 @@
1
- import{h as s}from"./p-kpoIU4v_.js";import{D as a}from"./p-CVGBVdVC.js";import{c as t}from"./p-7WIgS5RM.js";const o=t=>s("h2",{class:`header-2 ${null==t?void 0:t.class}`,part:a},t.text),r=t({}),{state:p,on:e}=r,i=t({}),{state:l}=i,m=()=>{let s=!0;return Object.keys(p).forEach((a=>{null===p[a]?(l[a]=!0,s=!1):l[a]=!1})),{isValid:s}};export{o as H,p as a,l as b,e as i,m as v}
@@ -1 +0,0 @@
1
- import{A as t}from"./p-CZ8q2CPi.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";const o=t();class n{async fetchPayouts(t,n,a){return o.get({authToken:n,endpoint:`account/${t}/payouts`,params:a})}async fetchPayout(t,n){return o.get({authToken:n,endpoint:`payouts/${t}`})}async fetchCSV(t,n){return o.get({authToken:n,endpoint:`reports/payouts/${t}`})}async fetchPayoutTransactions(t,n,a){return o.get({authToken:n,endpoint:"balance_transactions",params:a,headers:{"sub-account":t}})}}export{n as P}
@@ -1 +0,0 @@
1
- import{A as o}from"./p-CZ8q2CPi.js";import{C as s}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{S as r}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{g as t,a as n}from"./p-C5RuuShs.js";const c=o();class p{async fetchSubAccounts(o,s,r){return c.get({authToken:s,endpoint:"sub_accounts",params:r,headers:{Account:o}})}}const a=({accountId:o,authToken:c,service:p})=>async({params:a,onSuccess:i,onError:e})=>{var u,m;try{const j=await p.fetchSubAccounts(o,c,a);if(j.error){return e({error:n(j.error),code:t(null===(m=j.error)||void 0===m?void 0:m.code),severity:s.ERROR})}{const o=Object.assign({},j.page_info);i({subAccounts:(null===(u=j.data)||void 0===u?void 0:u.map((o=>new r(o))))||[],pagingInfo:o})}}catch(o){const r=t(null==o?void 0:o.code);return e({error:o.message||o,code:r,severity:s.ERROR})}};export{p as S,a as m}
@@ -1 +0,0 @@
1
- import{A as r}from"./p-CZ8q2CPi.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";const e=r();class n{async fetchTerminals(r,n,t){return e.get({endpoint:"terminals",params:t,headers:{Account:r},authToken:n})}async fetchTerminal(r,n){return e.get({endpoint:`terminals/${r}`,authToken:n})}async fetchTerminalModels(r,n){return e.get({endpoint:"terminals/order_models",headers:{"sub-account":r},authToken:n})}async orderTerminals(r,n){return e.post({endpoint:"terminals/orders",body:n,headers:{"sub-account":n.sub_account_id},authToken:r})}}export{n as T}
@@ -1 +0,0 @@
1
- import{c as s}from"./p-7WIgS5RM.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
@@ -1 +0,0 @@
1
- import{A as t}from"./p-CZ8q2CPi.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";const n=t();class a{async fetchPayments(t,a,p){return n.get({endpoint:`account/${t}/payments`,params:p,authToken:a})}async fetchPayment(t,a){return n.get({endpoint:`payments/${t}`,authToken:a})}async fetchPaymentTransactions(t,a,p){return n.get({endpoint:`payments/${t}/payment_balance_transactions`,params:p,authToken:a})}}export{a as P}
@@ -1 +0,0 @@
1
- var e={name:"@justifi/webcomponents",version:"5.7.6"};export{e as p}
@@ -1 +0,0 @@
1
- import{r as s,h as a}from"./p-kpoIU4v_.js";import{E as t}from"./p-DkaX7Taq.js";import"./p-CVGBVdVC.js";const e=class{constructor(a){s(this,a)}render(){return a("div",{key:"3c1c4e729711c6676c176a5a04228ec7ebb7acfa"},this.errorMessage?t(this.errorMessage):a("main",{class:"p-2"},a("slot",{name:"head-info"}),a("slot",{name:"detail-sections"})))}};export{e as justifi_details}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as o,a as r}from"./p-SdntD1xf.js";import{C as e}from"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as a,a as p}from"./p-C5RuuShs.js";import{c,J as n}from"./p-BZ70sqbi.js";import{C as h}from"./p-G_As8rAe.js";import{m,S as u}from"./p-DAasymX_.js";import{S as d}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-QxJlhLWM.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-BRBt7Vt-.js";import"./p-CVGBVdVC.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:c,onError:n})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return n({error:p(u.error),code:a(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);c({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"e448042916ca168416a16f8fb27daca1e240a58c"},i("checkouts-list-core",{key:"7a20ec17bb485a651bb14aee980dee8a9b6bf809",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import{P as r}from"./p-Dgo6D5G7.js";import{m as p}from"./p-44FkPJq7.js";import{E as o}from"./p-DkaX7Taq.js";import{C as e,a}from"./p-SdntD1xf.js";import{c as m,J as h}from"./p-BZ70sqbi.js";import"./p-CZ8q2CPi.js";import"./p-9y5MOK55.js";import"./p-7WIgS5RM.js";import"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-7MWRbTXI.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-C5RuuShs.js";import"./p-CVGBVdVC.js";import"./p-DwtqmD1M.js";const n=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.paymentService=new r,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new h(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=p({id:this.paymentId,authToken:this.authToken,service:new r}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:e.ERROR}))}render(){return this.errorMessage?o(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{n as justifi_payment_details}
@@ -1 +0,0 @@
1
- import{h as i,r as s,c as t}from"./p-kpoIU4v_.js";import{an as e,ak as r,ad as o,A as l}from"./p-CVGBVdVC.js";import{S as d}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{c as n,J as a}from"./p-BZ70sqbi.js";import{C as h,a as c}from"./p-SdntD1xf.js";import{B as v}from"./p-DZw7v4st.js";import{B as u}from"./p-BlJnA265.js";import{m as p}from"./p-Cs0cIpIm.js";import{S as m}from"./p-BGUDiFCH.js";import"./p-9y5MOK55.js";import{j as f}from"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{f as w,e as b,a as g}from"./p-DZgAEPoo.js";import"./p-7MWRbTXI.js";import{g as j,a as x}from"./p-C5RuuShs.js";import{T as y}from"./p-DT-cTREr.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-7WIgS5RM.js";const C=()=>i("div",{class:"row gap-3"},i("div",{class:"col-12"},i(m,{width:"25%"})),i("div",{class:"col-12"},i(m,{width:"100%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"50%"}),i(m,{width:"50%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"65%"}),i(m,{width:"35%"}))),S=()=>i("div",{class:"row gap-5"},i("div",{class:"col-12"},i(m,{width:"40%",height:"40px"})),i(C,null)),k=()=>i("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},i("div",{class:"d-flex align-items-center gap-3"},i(m,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),i("div",{class:"flex-grow-1"},i("div",{class:"d-flex row flex-row"},i("div",{class:"col-6 flex-column"},i(m,null),i(m,{width:"60%"})),i("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),i(m,{width:"80px",height:"32px"}),i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),i("div",{class:"mt-4"},i("div",{class:"d-flex flex-column gap-2"},i(m,null),i(m,null)))))),B=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event"),this.submitted=t(this,"submit-event"),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new b({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?g.boardingShipping:g.boardingOnly}),n(),this.analytics=new a(this),this.loadData()}disconnectedCallback(){var i;null===(i=this.analytics)||void 0===i||i.cleanup()}handleError(i,s,t){this.error={message:i,code:s,severity:t},this.errorEvent.emit({errorCode:s,message:i,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){p({id:this.businessId,authToken:this.authToken,service:new v})({onSuccess:({business:i})=>{this.business=new u(i),this.loading.business=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:i,authToken:s,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,n;try{const a=await t.fetchTerminalModels(i,s);if(a.error)return r({error:x(a.error),code:j(null===(n=a.error)||void 0===n?void 0:n.code),severity:h.ERROR});e({terminals:(null===(l=null===(o=a.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((i=>new w(i))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(i){const s=j(null==i?void 0:i.code);return r({error:i.message||i,code:s,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new y})({onSuccess:({terminals:i,orderLimit:s})=>{this.terminalModels=i,this.orderLimit=s,this.loading.terminals=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.terminals=!1}})}submitOrder(){const i=(({authToken:i,service:s,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await s.orderTerminals(i,e,t);if(d.error)return o({error:x(d.error),code:j(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:i}=d;r({data:i})}}catch(i){const s=j(null==i?void 0:i.code);return o({error:i.message||i,code:s,severity:h.ERROR})}})({authToken:this.authToken,service:new y});this.submitting=!0,i({terminalOrder:this.order.payload,onSuccess:({data:i})=>{this.submitted.emit(i),this.submitting=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.submitting=!1}})}onSelectedQuantityChange(i){this.order.updateTerminal(i.detail.modelName,i.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return i("div",null,this.loading.business&&i(S,null),this.loading.terminals&&i("div",{class:"mt-5"},i(k,null),i(k,null),i(k,null)))}renderBusinessDetails(){var s,t,o,l,d,n,a,h;if(!this.loading.business&&this.business)return i("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},i("div",{class:"row"},i("div",{class:"col-12"},i("h2",{part:r},this.business.legal_name))),i("div",{class:"row"},i("div",{class:"col-6"},i("h5",{part:e},"Representative:"),i("div",null,i("div",null,null===(t=null===(s=this.business)||void 0===s?void 0:s.representative)||void 0===t?void 0:t.name),i("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),i("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),i("div",null,f(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),i("div",{class:"col-6"},i("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),i("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",i("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return i("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((s=>i("terminal-quantity-selector",{modelName:s.model_name,description:s.description,imageUrl:s.image_url,helpUrl:s.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return i("div",{class:"mt-3"},i("div",{class:"text-end"},"Order limit: ",this.orderLimit),i("div",{class:"d-flex justify-content-end mt-3"},i("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return i(d,{key:"80b0b2a922c06952333adf7c8190b0c2b59f6fd4"},i("div",{key:"43b5b4d155e53e55b71483d31203dc6dacec1ae4",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{B as justifi_order_terminals}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import{C as e,a as r}from"./p-SdntD1xf.js";import{c as o,J as p}from"./p-BZ70sqbi.js";import{a}from"./p-7MWRbTXI.js";import{g as n,a as h}from"./p-C5RuuShs.js";import{D as m}from"./p-Cuxr_9xa.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-9y5MOK55.js";import"./p-7WIgS5RM.js";import"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const m=await i.fetchDispute(t,s);if(m.error)return o({error:h(m.error),code:n(null===(p=m.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},m.page_info);r({dispute:new a(m.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new m}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"0eb7f0d74fa19e79633a3ec2f7ab7945be3fe0fe",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_dispute_management}
@@ -1 +0,0 @@
1
- import{h as s}from"./p-kpoIU4v_.js";import{O as o}from"./p-CVGBVdVC.js";const r=()=>s("div",{class:"d-flex justify-content-center"},s("div",{class:"spinner-border",role:"status",part:o},s("span",{class:"visually-hidden"},"Loading...")));export{r as S}
@@ -1 +0,0 @@
1
- import{c as s}from"./p-7WIgS5RM.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
@@ -1 +0,0 @@
1
- import{h as t}from"./p-kpoIU4v_.js";import{A as e}from"./p-CVGBVdVC.js";const o=o=>{const{helpText:r,name:m}=o;return r?t("small",{class:"form-text text-muted",id:`form-help-text-${m}`,part:e},r):null};export{o as F}
@@ -1 +0,0 @@
1
- import{h as o}from"./p-kpoIU4v_.js";import{U as p}from"./p-CVGBVdVC.js";const r=r=>o("h3",{class:`header-3 ${null==r?void 0:r.class}`,part:p},r.text);export{r as H}