@justifi/webcomponents 6.0.2 → 6.1.0-rc.2

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 (461) hide show
  1. package/dist/cjs/{Api-DdNOMYxI.js → Api-CwTLkFY4.js} +1 -1
  2. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  3. package/dist/cjs/{badge-Cp5ap9Ge.js → badge-BmOSt4gS.js} +1 -1
  4. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
  5. package/dist/cjs/bank-account-form.cjs.entry.js +6 -6
  6. package/dist/cjs/{business-additional-questions-schema-b8P-0T0O.js → business-additional-questions-schema-DNbSH3E-.js} +2 -2
  7. package/dist/cjs/business-details-core.cjs.entry.js +4 -4
  8. package/dist/cjs/{business-identity-schema-aFUle0C9.js → business-identity-schema-CclzWSOn.js} +2 -2
  9. package/dist/cjs/{business.service-CjsXJOgZ.js → business.service-Dkhqyggm.js} +1 -1
  10. package/dist/cjs/{button-BMKiDxGa.js → button-7c2RN2yp.js} +1 -1
  11. package/dist/cjs/card-form.cjs.entry.js +6 -6
  12. package/dist/cjs/{check-pkg-version-CMjNMgW8.js → check-pkg-version-DUDlLDCJ.js} +2 -2
  13. package/dist/cjs/{checkout.service-o7fi8Z05.js → checkout.service-LwZVVgP5.js} +1 -1
  14. package/dist/cjs/{checkout.store-DrFb05Vr.js → checkout.store-C3f3E24L.js} +1 -1
  15. package/dist/cjs/checkouts-list-core.cjs.entry.js +9 -9
  16. package/dist/cjs/{checkouts-list-params-state-CKeoLpqm.js → checkouts-list-params-state-C4c8UZtP.js} +1 -1
  17. package/dist/cjs/{checkouts-table-Ckpk4UMS.js → checkouts-table-BQUhZZd_.js} +2 -2
  18. package/dist/cjs/{config-state-BXCZx6K8.js → config-state-B_gyIchD.js} +1 -1
  19. package/dist/cjs/custom-popper_2.cjs.entry.js +1 -1
  20. package/dist/cjs/{dispute.service-BANG6pry.js → dispute.service-927Gzb0N.js} +1 -1
  21. package/dist/cjs/form-alert_5.cjs.entry.js +5 -5
  22. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  23. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  24. package/dist/cjs/{form-control-error-text-CA6tsCwq.js → form-control-error-text-DD0dHGu8.js} +1 -1
  25. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
  26. package/dist/cjs/{form-control-help-text-sYroVd4u.js → form-control-help-text-2QwKi78M.js} +1 -1
  27. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  28. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +5 -5
  29. package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
  30. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +3 -3
  31. package/dist/cjs/form-control-number.cjs.entry.js +3 -3
  32. package/dist/cjs/form-control-radio.cjs.entry.js +1 -1
  33. package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
  34. package/dist/cjs/{get-payment-details-CqsEtJTg.js → get-payment-details-BSxp1HX0.js} +1 -1
  35. package/dist/cjs/{get-subaccounts-BfiiwPTB.js → get-subaccounts-B31f95PR.js} +2 -2
  36. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -3
  37. package/dist/cjs/{header-1-IQ1fI7he.js → header-1-DMsp0XM7.js} +1 -1
  38. package/dist/cjs/{header-3-CACJFFMS.js → header-3-BSvFq_IF.js} +1 -1
  39. package/dist/cjs/hidden-input_2.cjs.entry.js +4 -4
  40. package/dist/cjs/{index-BGUnWLse.js → index-D1Ba20gi.js} +1 -1
  41. package/dist/cjs/{index-8Prcj64P.js → index-Dyzl8Hn6.js} +13 -2
  42. package/dist/cjs/{index.esm-ByC0D4sJ.js → index.esm-BleZSAc0.js} +17 -18
  43. package/dist/cjs/{insurance-state-De4RWYBC.js → insurance-state-uWOl6jJN.js} +2 -2
  44. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +9 -9
  45. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +16 -16
  46. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +2 -2
  47. package/dist/cjs/justifi-apple-pay.cjs.entry.js +14 -10
  48. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +17 -17
  49. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
  50. package/dist/cjs/justifi-business-form.cjs.entry.js +15 -15
  51. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  52. package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +12 -12
  53. package/dist/cjs/justifi-checkout.cjs.entry.js +10 -10
  54. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -6
  55. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +12 -12
  56. package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
  57. package/dist/cjs/justifi-details.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  59. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
  60. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +10 -10
  61. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +7 -7
  62. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
  63. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -12
  64. package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
  65. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
  66. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +8 -8
  67. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -10
  68. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +4 -4
  69. package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -11
  70. package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
  71. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -10
  72. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
  73. package/dist/cjs/justifi-payouts-list.cjs.entry.js +12 -12
  74. package/dist/cjs/justifi-refund-payment.cjs.entry.js +12 -12
  75. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +2 -2
  76. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -10
  77. package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
  78. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
  79. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +9 -9
  80. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +5 -5
  81. package/dist/cjs/justifi-terminals-list.cjs.entry.js +11 -11
  82. package/dist/cjs/loader.cjs.js +2 -2
  83. package/dist/cjs/{package-DL-_SIgW.js → package-CFCy2fBx.js} +1 -1
  84. package/dist/cjs/pagination-menu.cjs.entry.js +4 -4
  85. package/dist/cjs/payment-details-core.cjs.entry.js +6 -6
  86. package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
  87. package/dist/cjs/{payment.service-Bk5f4yNM.js → payment.service-DUq-W7tS.js} +1 -1
  88. package/dist/cjs/payments-list-core.cjs.entry.js +9 -9
  89. package/dist/cjs/{payments-list-params-state-CKeoLpqm.js → payments-list-params-state-C4c8UZtP.js} +1 -1
  90. package/dist/cjs/{payments-status-B0mynjDF.js → payments-status-3iIQkoov.js} +2 -2
  91. package/dist/cjs/{payments-table-Dt_B6-wz.js → payments-table-BSHUQhM-.js} +2 -2
  92. package/dist/cjs/payout-details-core.cjs.entry.js +7 -7
  93. package/dist/cjs/{payout.service-DYm731Kq.js → payout.service-DoKMr8Xw.js} +1 -1
  94. package/dist/cjs/payouts-list-core.cjs.entry.js +9 -9
  95. package/dist/cjs/{payouts-list-params-state-CKeoLpqm.js → payouts-list-params-state-C4c8UZtP.js} +1 -1
  96. package/dist/cjs/{payouts-status-MC0n0N1x.js → payouts-status-DoQbxIms.js} +2 -2
  97. package/dist/cjs/{payouts-table-CjJEGkLL.js → payouts-table-BD_Fhz_j.js} +2 -2
  98. package/dist/cjs/{schema-validations-Bj7eYNO8.js → schema-validations-jek_iZ9W.js} +1 -1
  99. package/dist/cjs/{skeleton-CMESEszj.js → skeleton-CuIMC98G.js} +1 -1
  100. package/dist/cjs/{spinner-BePlCbOD.js → spinner-CMZXdrPe.js} +1 -1
  101. package/dist/cjs/{styled-host-CvM9RrsT.js → styled-host-2KXbjOFw.js} +1 -1
  102. package/dist/cjs/{table-1JBgqBkL.js → table-DlQCUVag.js} +2 -2
  103. package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
  104. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +8 -8
  105. package/dist/cjs/{terminal-orders-list-params-state-CKeoLpqm.js → terminal-orders-list-params-state-C4c8UZtP.js} +1 -1
  106. package/dist/cjs/{terminal-orders-table-DuvYC2f1.js → terminal-orders-table-t6XxNy_K.js} +3 -3
  107. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  108. package/dist/cjs/{terminal.service-B4FQ6roy.js → terminal.service-Iyje71vN.js} +1 -1
  109. package/dist/cjs/terminals-list-core.cjs.entry.js +8 -8
  110. package/dist/cjs/terminals-list-params-state-C4c8UZtP.js +22 -0
  111. package/dist/cjs/{terminals-table--d49kyCn.js → terminals-table-BTdKRiBN.js} +2 -2
  112. package/dist/cjs/{utils-BNjLFSUk.js → utils-FFP5ZHyE.js} +1 -1
  113. package/dist/cjs/webcomponents.cjs.js +3 -3
  114. package/dist/collection/collection-manifest.json +2 -2
  115. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +6 -6
  116. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -1
  117. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +6 -6
  118. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +6 -6
  119. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  120. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  121. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +6 -6
  122. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  123. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  124. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  125. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  126. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  127. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  128. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  129. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +1 -1
  130. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  131. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  132. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  133. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  134. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  135. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  136. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  137. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  138. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  139. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  140. package/dist/collection/components/checkout/checkout.js +2 -2
  141. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  142. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  143. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  144. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  145. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  146. package/dist/collection/components/modular-checkout/modular-checkout.js +2 -3
  147. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +8 -4
  148. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  149. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  150. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +2 -3
  151. package/dist/collection/ui-components/details/details.js +1 -1
  152. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  153. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  154. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
  155. package/dist/docs.json +19 -98
  156. package/dist/esm/{Api-CO0DBcUT.js → Api-D4tj-h4P.js} +1 -1
  157. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  158. package/dist/esm/{badge-CRAuWlVu.js → badge-ChwzCNAF.js} +1 -1
  159. package/dist/esm/bank-account-document-form-inputs_4.entry.js +7 -7
  160. package/dist/esm/bank-account-form.entry.js +6 -6
  161. package/dist/esm/{business-additional-questions-schema-9FAJSx_D.js → business-additional-questions-schema-C6NRHWEL.js} +2 -2
  162. package/dist/esm/business-details-core.entry.js +4 -4
  163. package/dist/esm/{business-identity-schema-CDJzknbg.js → business-identity-schema-D8n5dyLX.js} +2 -2
  164. package/dist/esm/{business.service-D2tRoPny.js → business.service-CsbtEDNi.js} +1 -1
  165. package/dist/esm/{button-B2XlI-Uy.js → button-SAIS_5os.js} +1 -1
  166. package/dist/esm/card-form.entry.js +6 -6
  167. package/dist/esm/{check-pkg-version-D3jZp8cz.js → check-pkg-version-B_Pl1uAE.js} +2 -2
  168. package/dist/esm/{checkout.service-BPYdgahN.js → checkout.service-BCkQ9pOA.js} +1 -1
  169. package/dist/esm/{checkout.store-DPOk5eUh.js → checkout.store-DBvS7cVB.js} +1 -1
  170. package/dist/esm/checkouts-list-core.entry.js +9 -9
  171. package/dist/esm/{checkouts-list-params-state-DmevqV6O.js → checkouts-list-params-state-C2_GlMKR.js} +1 -1
  172. package/dist/esm/{checkouts-table-DoHp51it.js → checkouts-table-CItEo0DU.js} +2 -2
  173. package/dist/esm/{config-state-Wdyw1F-s.js → config-state-Blo0ywwc.js} +1 -1
  174. package/dist/esm/custom-popper_2.entry.js +1 -1
  175. package/dist/esm/{dispute.service-Ct6DFjKt.js → dispute.service-CyLtJREK.js} +1 -1
  176. package/dist/esm/form-alert_5.entry.js +5 -5
  177. package/dist/esm/form-control-checkbox.entry.js +5 -5
  178. package/dist/esm/form-control-date.entry.js +2 -2
  179. package/dist/esm/{form-control-error-text-Bn_rq8AC.js → form-control-error-text-IXJJ4JpV.js} +1 -1
  180. package/dist/esm/form-control-file-v2_2.entry.js +2 -2
  181. package/dist/esm/{form-control-help-text-CuFo8IR5.js → form-control-help-text-CuhIsM3v.js} +1 -1
  182. package/dist/esm/form-control-help-text.entry.js +1 -1
  183. package/dist/esm/form-control-monetary-provisioning.entry.js +5 -5
  184. package/dist/esm/form-control-monetary.entry.js +3 -3
  185. package/dist/esm/form-control-number-masked_2.entry.js +3 -3
  186. package/dist/esm/form-control-number.entry.js +3 -3
  187. package/dist/esm/form-control-radio.entry.js +1 -1
  188. package/dist/esm/form-control-select_2.entry.js +2 -2
  189. package/dist/esm/{get-payment-details-BGQmxhRw.js → get-payment-details-BuT0QNOo.js} +1 -1
  190. package/dist/esm/{get-subaccounts-CYgVR2mk.js → get-subaccounts-VjY6-x_9.js} +2 -2
  191. package/dist/esm/gross-payment-chart-core.entry.js +3 -3
  192. package/dist/esm/{header-1-DWse7nuo.js → header-1-zXsamUS3.js} +1 -1
  193. package/dist/esm/{header-3-CSgiRXQA.js → header-3-DVtaUAlf.js} +1 -1
  194. package/dist/esm/hidden-input_2.entry.js +4 -4
  195. package/dist/esm/{index-DSUeaNWH.js → index-ZfXl6Xrm.js} +1 -1
  196. package/dist/esm/{index-CHdklybh.js → index-qipqIMyC.js} +13 -2
  197. package/dist/esm/{index.esm-IWS0494Y.js → index.esm-cYgKOXtz.js} +17 -18
  198. package/dist/esm/{insurance-state-DD0YD6c0.js → insurance-state-Dh9f36Qh.js} +2 -2
  199. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +9 -9
  200. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +16 -16
  201. package/dist/esm/justifi-additional-statement_8.entry.js +2 -2
  202. package/dist/esm/justifi-apple-pay.entry.js +14 -10
  203. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +17 -17
  204. package/dist/esm/justifi-business-details.entry.js +8 -8
  205. package/dist/esm/justifi-business-form.entry.js +15 -15
  206. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  207. package/dist/esm/justifi-checkout-summary_7.entry.js +12 -12
  208. package/dist/esm/justifi-checkout.entry.js +10 -10
  209. package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -6
  210. package/dist/esm/justifi-checkouts-list.entry.js +12 -12
  211. package/dist/esm/justifi-config-provider.entry.js +3 -3
  212. package/dist/esm/justifi-details.entry.js +3 -3
  213. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  214. package/dist/esm/justifi-dispute-management.entry.js +7 -7
  215. package/dist/esm/justifi-dispute-notification_3.entry.js +10 -10
  216. package/dist/esm/justifi-gross-payment-chart.entry.js +7 -7
  217. package/dist/esm/justifi-order-terminals.entry.js +10 -10
  218. package/dist/esm/justifi-owner-form_3.entry.js +12 -12
  219. package/dist/esm/justifi-payment-details.entry.js +9 -9
  220. package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
  221. package/dist/esm/justifi-payment-provisioning.entry.js +8 -8
  222. package/dist/esm/justifi-payment-transactions-list.entry.js +10 -10
  223. package/dist/esm/justifi-payments-list-filters.entry.js +4 -4
  224. package/dist/esm/justifi-payments-list.entry.js +11 -11
  225. package/dist/esm/justifi-payout-details.entry.js +8 -8
  226. package/dist/esm/justifi-payout-transactions-list.entry.js +10 -10
  227. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
  228. package/dist/esm/justifi-payouts-list.entry.js +12 -12
  229. package/dist/esm/justifi-refund-payment.entry.js +12 -12
  230. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  231. package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -10
  232. package/dist/esm/justifi-skeleton.entry.js +3 -3
  233. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
  234. package/dist/esm/justifi-terminal-orders-list.entry.js +9 -9
  235. package/dist/esm/justifi-terminals-list-filters.entry.js +5 -5
  236. package/dist/esm/justifi-terminals-list.entry.js +11 -11
  237. package/dist/esm/loader.js +3 -3
  238. package/dist/esm/{package-C5FfYVaH.js → package-pXjOPQhG.js} +1 -1
  239. package/dist/esm/pagination-menu.entry.js +4 -4
  240. package/dist/esm/payment-details-core.entry.js +6 -6
  241. package/dist/esm/payment-method-option.entry.js +2 -2
  242. package/dist/esm/{payment.service-D3ze0Zdq.js → payment.service-QJEmd6Nl.js} +1 -1
  243. package/dist/esm/payments-list-core.entry.js +9 -9
  244. package/dist/esm/{payments-list-params-state-DmevqV6O.js → payments-list-params-state-C2_GlMKR.js} +1 -1
  245. package/dist/esm/{payments-status-DTmQyPO9.js → payments-status-DDafc8Yr.js} +2 -2
  246. package/dist/esm/{payments-table-CavY9USC.js → payments-table-De3Jb6rY.js} +2 -2
  247. package/dist/esm/payout-details-core.entry.js +7 -7
  248. package/dist/esm/{payout.service-WXSktQvI.js → payout.service-XxyEr0rj.js} +1 -1
  249. package/dist/esm/payouts-list-core.entry.js +9 -9
  250. package/dist/esm/{payouts-list-params-state-DmevqV6O.js → payouts-list-params-state-C2_GlMKR.js} +1 -1
  251. package/dist/esm/{payouts-status-DTXrGUWw.js → payouts-status-u1eSRz3Q.js} +2 -2
  252. package/dist/esm/{payouts-table-3_J-SXvD.js → payouts-table-BO-MCzXj.js} +2 -2
  253. package/dist/esm/{schema-validations-B9dmY7ME.js → schema-validations-DcR1ujuX.js} +1 -1
  254. package/dist/esm/{skeleton-rMJsZa0a.js → skeleton-DtpkgjZ6.js} +1 -1
  255. package/dist/esm/{spinner-8n0qh4tK.js → spinner-CIXUVK4F.js} +1 -1
  256. package/dist/esm/{styled-host-DQq-l92c.js → styled-host-CbizlfAU.js} +1 -1
  257. package/dist/esm/{table-BUJMzXYe.js → table-DcRHK_sm.js} +2 -2
  258. package/dist/esm/table-filters-menu.entry.js +2 -2
  259. package/dist/esm/terminal-orders-list-core.entry.js +8 -8
  260. package/dist/esm/{terminal-orders-list-params-state-DmevqV6O.js → terminal-orders-list-params-state-C2_GlMKR.js} +1 -1
  261. package/dist/esm/{terminal-orders-table-gBU8rU8X.js → terminal-orders-table-9nsnrAq8.js} +3 -3
  262. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  263. package/dist/esm/{terminal.service-DihXdEs3.js → terminal.service-D2oETGnk.js} +1 -1
  264. package/dist/esm/terminals-list-core.entry.js +8 -8
  265. package/dist/esm/terminals-list-params-state-C2_GlMKR.js +16 -0
  266. package/dist/esm/{terminals-table-64XluocE.js → terminals-table-C6NO2m-t.js} +2 -2
  267. package/dist/esm/{utils-BvJW0VpC.js → utils-_ckvHjSW.js} +1 -1
  268. package/dist/esm/webcomponents.js +4 -4
  269. package/dist/module/additional-questions.js +2 -2
  270. package/dist/module/bank-account-billing-form-simple.js +1 -1
  271. package/dist/module/bank-account-document-inputs.js +1 -1
  272. package/dist/module/bank-account-form-inputs2.js +1 -1
  273. package/dist/module/bank-account-form.js +2 -2
  274. package/dist/module/business-additional-questions-form-step.js +1 -1
  275. package/dist/module/business-bank-account-form-step.js +1 -1
  276. package/dist/module/business-core-info-form-step.js +1 -1
  277. package/dist/module/business-core-info.js +1 -1
  278. package/dist/module/business-owners-form-step.js +1 -1
  279. package/dist/module/business-representative-form-inputs.js +1 -1
  280. package/dist/module/business-representative-form-step.js +1 -1
  281. package/dist/module/business-representative.js +2 -2
  282. package/dist/module/business-terms-conditions-form-step.js +1 -1
  283. package/dist/module/card-billing-form-simple.js +1 -1
  284. package/dist/module/card-form.js +2 -2
  285. package/dist/module/checkouts-list-core2.js +1 -1
  286. package/dist/module/details.js +1 -1
  287. package/dist/module/form-control-checkbox2.js +2 -2
  288. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  289. package/dist/module/form.js +17 -18
  290. package/dist/module/identity-address-form.js +1 -1
  291. package/dist/module/justifi-apple-pay.js +7 -3
  292. package/dist/module/justifi-checkout.js +2 -2
  293. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  294. package/dist/module/justifi-checkouts-list.js +1 -1
  295. package/dist/module/justifi-payment-provisioning.js +1 -1
  296. package/dist/module/justifi-radio-list-item2.js +1 -1
  297. package/dist/module/justifi-saved-payment-method.js +1 -1
  298. package/dist/module/legal-address-form-step.js +1 -1
  299. package/dist/module/legal-address-form.js +2 -2
  300. package/dist/module/owner-form-core2.js +1 -1
  301. package/dist/module/owner-form-inputs2.js +2 -2
  302. package/dist/module/owner-form.js +1 -1
  303. package/dist/module/package.js +1 -1
  304. package/dist/module/pagination-menu2.js +3 -3
  305. package/dist/module/payment-provisioning-core.js +1 -1
  306. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  307. package/dist/module/payment-provisioning-form-steps.js +1 -1
  308. package/dist/module/save-new-payment-method.js +1 -1
  309. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +1 -1
  310. package/dist/types/components.d.ts +8 -10
  311. package/dist/types/stencil-public-runtime.d.ts +4 -6
  312. package/dist/webcomponents/{p-8d45e30b.entry.js → p-06b6b61e.entry.js} +1 -1
  313. package/dist/webcomponents/{p-e01fe757.entry.js → p-0801324e.entry.js} +1 -1
  314. package/dist/webcomponents/{p-9c110f7a.entry.js → p-10278c48.entry.js} +1 -1
  315. package/dist/webcomponents/p-19ccbeee.entry.js +1 -0
  316. package/dist/webcomponents/p-1b3b6956.entry.js +1 -0
  317. package/dist/webcomponents/{p-4c7622ed.entry.js → p-1b7926f6.entry.js} +1 -1
  318. package/dist/webcomponents/p-1c433962.entry.js +1 -0
  319. package/dist/webcomponents/{p-60d59291.entry.js → p-1f9f6bdc.entry.js} +1 -1
  320. package/dist/webcomponents/{p-fa53a04f.entry.js → p-2246aa69.entry.js} +1 -1
  321. package/dist/webcomponents/{p-0c25d57b.entry.js → p-246ef4ff.entry.js} +1 -1
  322. package/dist/webcomponents/{p-0e85331b.entry.js → p-27fc3ef0.entry.js} +4 -4
  323. package/dist/webcomponents/{p-870cee9b.entry.js → p-2abfee08.entry.js} +1 -1
  324. package/dist/webcomponents/{p-1a5f53f4.entry.js → p-30147031.entry.js} +1 -1
  325. package/dist/webcomponents/{p-c7291c13.entry.js → p-3546a5aa.entry.js} +1 -1
  326. package/dist/webcomponents/{p-1835e531.entry.js → p-3621a429.entry.js} +1 -1
  327. package/dist/webcomponents/p-3c1d950d.entry.js +1 -0
  328. package/dist/webcomponents/{p-d817d7e4.entry.js → p-3d37045d.entry.js} +1 -1
  329. package/dist/webcomponents/p-406ba650.entry.js +1 -0
  330. package/dist/webcomponents/{p-755fa2b3.entry.js → p-4332962a.entry.js} +1 -1
  331. package/dist/webcomponents/{p-57d30e26.entry.js → p-4466d28d.entry.js} +1 -1
  332. package/dist/webcomponents/{p-c85cc2ca.entry.js → p-44d1341c.entry.js} +1 -1
  333. package/dist/webcomponents/p-46db49dd.entry.js +1 -0
  334. package/dist/webcomponents/p-4d5c71c4.entry.js +1 -0
  335. package/dist/webcomponents/{p-80feb885.entry.js → p-4ea83bfd.entry.js} +1 -1
  336. package/dist/webcomponents/{p-8b42eee7.entry.js → p-558f7967.entry.js} +1 -1
  337. package/dist/webcomponents/{p-7576e449.entry.js → p-5c477f08.entry.js} +1 -1
  338. package/dist/webcomponents/{p-29964705.entry.js → p-629c1d75.entry.js} +1 -1
  339. package/dist/webcomponents/p-68329f16.entry.js +1 -0
  340. package/dist/webcomponents/p-6fe79f16.entry.js +1 -0
  341. package/dist/webcomponents/{p-8cc80cda.entry.js → p-718f8b2c.entry.js} +1 -1
  342. package/dist/webcomponents/{p-0ad7a361.entry.js → p-73f88870.entry.js} +1 -1
  343. package/dist/webcomponents/{p-6f6e17cf.entry.js → p-760a5b4f.entry.js} +1 -1
  344. package/dist/webcomponents/{p-0aa2e1f9.entry.js → p-779e4467.entry.js} +1 -1
  345. package/dist/webcomponents/{p-318a95e7.entry.js → p-7aeb20d2.entry.js} +1 -1
  346. package/dist/webcomponents/{p-528300cf.entry.js → p-7c5cd118.entry.js} +1 -1
  347. package/dist/webcomponents/{p-74b96d25.entry.js → p-7ef3cb23.entry.js} +1 -1
  348. package/dist/webcomponents/{p-4de4598e.entry.js → p-84043580.entry.js} +1 -1
  349. package/dist/webcomponents/{p-0f4ea94a.entry.js → p-868ed3b6.entry.js} +1 -1
  350. package/dist/webcomponents/{p-c65afd95.entry.js → p-87f598ef.entry.js} +1 -1
  351. package/dist/webcomponents/p-8975bf93.entry.js +1 -0
  352. package/dist/webcomponents/{p-5f4b95f4.entry.js → p-906fdf0c.entry.js} +1 -1
  353. package/dist/webcomponents/{p-1a41c6ee.entry.js → p-90e43440.entry.js} +1 -1
  354. package/dist/webcomponents/{p-cf78e63a.entry.js → p-914e168d.entry.js} +1 -1
  355. package/dist/webcomponents/p-91c1e2ac.entry.js +1 -0
  356. package/dist/webcomponents/{p-664c9b1b.entry.js → p-95348ff6.entry.js} +1 -1
  357. package/dist/webcomponents/p-9f04cac4.entry.js +1 -0
  358. package/dist/webcomponents/p-B4idKqyn.js +1 -0
  359. package/dist/webcomponents/{p-ZWhv_80v.js → p-BB5-CJF-.js} +1 -1
  360. package/dist/webcomponents/{p-mxgDrK6T.js → p-BIPdn2VU.js} +1 -1
  361. package/dist/webcomponents/{p-Dph3Ao9s.js → p-BUa0YOaw.js} +1 -1
  362. package/dist/webcomponents/p-BY2p6Sxk.js +1 -0
  363. package/dist/webcomponents/{p-UmoEDufy.js → p-BZ7C9duj.js} +1 -1
  364. package/dist/webcomponents/{p-c3Fl3YIP.js → p-BdLLGV9t.js} +1 -1
  365. package/dist/webcomponents/p-BguBT6Hn.js +1 -0
  366. package/dist/webcomponents/{p-BuWHmUFx.js → p-Bp_QFeog.js} +1 -1
  367. package/dist/webcomponents/p-Bvp7uul3.js +1 -0
  368. package/dist/webcomponents/{p-BGRyC6Jk.js → p-C1xGBPma.js} +1 -1
  369. package/dist/webcomponents/p-C3n7-tlg.js +1 -0
  370. package/dist/webcomponents/{p-CXEvc-gI.js → p-CLQx9p9q.js} +1 -1
  371. package/dist/webcomponents/{p-CZjKnrRR.js → p-CPVN4dXS.js} +1 -1
  372. package/dist/webcomponents/p-CQeex56P.js +1 -0
  373. package/dist/webcomponents/{p-DiJD6Iqx.js → p-CR9D6mKt.js} +1 -1
  374. package/dist/webcomponents/p-CU4XQ3fO.js +1 -0
  375. package/dist/webcomponents/{p-PSJOKMWp.js → p-CYBR4K2p.js} +1 -1
  376. package/dist/webcomponents/{p-hzzlBrP2.js → p-C_3N7nqh.js} +1 -1
  377. package/dist/webcomponents/{p-BY5BgAd3.js → p-CaxjN6Uo.js} +1 -1
  378. package/dist/webcomponents/{p-CIN-y_rT.js → p-CpKvg1ok.js} +1 -1
  379. package/dist/webcomponents/{p-BVHUyJdS.js → p-CrQgyTRz.js} +1 -1
  380. package/dist/webcomponents/{p-BSa0NCli.js → p-CxzFvTgf.js} +1 -1
  381. package/dist/webcomponents/{p-DFNk_DP8.js → p-CzPUMw00.js} +1 -1
  382. package/dist/webcomponents/{p-D8uar3Ri.js → p-D--yCspA.js} +1 -1
  383. package/dist/webcomponents/{p-DbpL6AJS.js → p-D-JYHdJ7.js} +1 -1
  384. package/dist/webcomponents/{p-BB-9jeDZ.js → p-D6XirF21.js} +1 -1
  385. package/dist/webcomponents/{p-BDGiGASo.js → p-DCMrHeJI.js} +1 -1
  386. package/dist/webcomponents/{p-C9iide2W.js → p-DSP8qjHL.js} +1 -1
  387. package/dist/webcomponents/p-DbX0g1WF.js +1 -0
  388. package/dist/webcomponents/{p-f0Mcy7rH.js → p-De8UloOS.js} +1 -1
  389. package/dist/webcomponents/{p-DwBh6VCY.js → p-DsAwPf2y.js} +1 -1
  390. package/dist/webcomponents/p-DvZcI6pC.js +1 -0
  391. package/dist/webcomponents/p-DyDHaG6n.js +1 -0
  392. package/dist/webcomponents/{p-DWMITBje.js → p-DyOgQlh2.js} +1 -1
  393. package/dist/webcomponents/p-IG_KR8zP.js +1 -0
  394. package/dist/webcomponents/{p-tYuXMkCd.js → p-PgEzcvI6.js} +1 -1
  395. package/dist/webcomponents/p-Xv8DuU3Y.js +1 -0
  396. package/dist/webcomponents/p-a57c1400.entry.js +1 -0
  397. package/dist/webcomponents/{p-2ca59580.entry.js → p-a71a5e64.entry.js} +1 -1
  398. package/dist/webcomponents/{p-3bb7b07f.entry.js → p-a90b8b93.entry.js} +1 -1
  399. package/dist/webcomponents/{p-3d6e54cb.entry.js → p-b4e673fe.entry.js} +1 -1
  400. package/dist/webcomponents/{p-d16a348c.entry.js → p-bc902ec2.entry.js} +1 -1
  401. package/dist/webcomponents/p-bf82201a.entry.js +1 -0
  402. package/dist/webcomponents/{p-4d60eadc.entry.js → p-c16c0cbc.entry.js} +1 -1
  403. package/dist/webcomponents/{p-ba579b93.entry.js → p-c685fc33.entry.js} +1 -1
  404. package/dist/webcomponents/p-d0f93668.entry.js +1 -0
  405. package/dist/webcomponents/{p-c9863f5a.entry.js → p-d34befd7.entry.js} +1 -1
  406. package/dist/webcomponents/{p-6b56543b.entry.js → p-d3f5ff95.entry.js} +1 -1
  407. package/dist/webcomponents/p-df7f36aa.entry.js +1 -0
  408. package/dist/webcomponents/p-e035a92e.entry.js +1 -0
  409. package/dist/webcomponents/{p-27f20ccf.entry.js → p-e2a38ad0.entry.js} +1 -1
  410. package/dist/webcomponents/p-e628a0c8.entry.js +1 -0
  411. package/dist/webcomponents/{p-dccdcac8.entry.js → p-e6516014.entry.js} +1 -1
  412. package/dist/webcomponents/{p-3013484d.entry.js → p-e6e96be2.entry.js} +1 -1
  413. package/dist/webcomponents/{p-357c355e.entry.js → p-e79338f9.entry.js} +1 -1
  414. package/dist/webcomponents/p-eafd179b.entry.js +1 -0
  415. package/dist/webcomponents/{p-25344f42.entry.js → p-f5c3f489.entry.js} +1 -1
  416. package/dist/webcomponents/{p-cba326c0.entry.js → p-f6cf3e2b.entry.js} +1 -1
  417. package/dist/webcomponents/p-fUtq2xDs.js +1 -0
  418. package/dist/webcomponents/{p-152436e2.entry.js → p-ffe01f1b.entry.js} +1 -1
  419. package/dist/webcomponents/{p-DrXVtFfH.js → p-oGKW57R8.js} +1 -1
  420. package/dist/webcomponents/p-pXjOPQhG.js +1 -0
  421. package/dist/webcomponents/p-qipqIMyC.js +2 -0
  422. package/dist/webcomponents/{p-CkX-nM5d.js → p-xY5RkFuA.js} +1 -1
  423. package/dist/webcomponents/webcomponents.esm.js +1 -1
  424. package/package.json +13 -13
  425. package/LICENSE +0 -21
  426. package/dist/cjs/terminals-list-params-state-CKeoLpqm.js +0 -22
  427. package/dist/esm/terminals-list-params-state-DmevqV6O.js +0 -16
  428. package/dist/webcomponents/p-15e47d22.entry.js +0 -1
  429. package/dist/webcomponents/p-1a198ab4.entry.js +0 -1
  430. package/dist/webcomponents/p-2242b349.entry.js +0 -1
  431. package/dist/webcomponents/p-2f7ff817.entry.js +0 -1
  432. package/dist/webcomponents/p-33c5f41b.entry.js +0 -1
  433. package/dist/webcomponents/p-38Vv0Nju.js +0 -1
  434. package/dist/webcomponents/p-3b01c9c4.entry.js +0 -1
  435. package/dist/webcomponents/p-5170419e.entry.js +0 -1
  436. package/dist/webcomponents/p-61980e9a.entry.js +0 -1
  437. package/dist/webcomponents/p-78c17caf.entry.js +0 -1
  438. package/dist/webcomponents/p-7cd28a8b.entry.js +0 -1
  439. package/dist/webcomponents/p-85a1f152.entry.js +0 -1
  440. package/dist/webcomponents/p-85d82d77.entry.js +0 -1
  441. package/dist/webcomponents/p-8b414739.entry.js +0 -1
  442. package/dist/webcomponents/p-9fec7ff1.entry.js +0 -1
  443. package/dist/webcomponents/p-BC2AKcRD.js +0 -1
  444. package/dist/webcomponents/p-BffoVWib.js +0 -1
  445. package/dist/webcomponents/p-C5FfYVaH.js +0 -1
  446. package/dist/webcomponents/p-CHdklybh.js +0 -2
  447. package/dist/webcomponents/p-CVm_PxHa.js +0 -1
  448. package/dist/webcomponents/p-CZ27xhGU.js +0 -1
  449. package/dist/webcomponents/p-DFEjrRhP.js +0 -1
  450. package/dist/webcomponents/p-DcDYb1RC.js +0 -1
  451. package/dist/webcomponents/p-DhUrfS4M.js +0 -1
  452. package/dist/webcomponents/p-Dk0xo1G9.js +0 -1
  453. package/dist/webcomponents/p-DrRpEAef.js +0 -1
  454. package/dist/webcomponents/p-DsL9brW-.js +0 -1
  455. package/dist/webcomponents/p-WJLXezN2.js +0 -1
  456. package/dist/webcomponents/p-ab0e20cd.entry.js +0 -1
  457. package/dist/webcomponents/p-b40aa9da.entry.js +0 -1
  458. package/dist/webcomponents/p-bc5698fe.entry.js +0 -1
  459. package/dist/webcomponents/p-c53099b1.entry.js +0 -1
  460. package/dist/webcomponents/p-c96feb00.entry.js +0 -1
  461. package/dist/webcomponents/p-oIQjnSZa.js +0 -1
@@ -1 +1 @@
1
- import{r as t,h as e,c as i,H as s,g as a}from"./p-CHdklybh.js";import{z as n,r as o}from"./p-RvUQ__Pq.js";import{f as r}from"./p-BHf9IqGw.js";import{c as h,o as l,g as c,a as d}from"./p-BVHUyJdS.js";import{S as u}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import{H as y}from"./p-oIQjnSZa.js";import{H as m,b as p,h as M,i as v}from"./p-CZ27xhGU.js";import{H as f}from"./p-DcDYb1RC.js";import{J as g,c as k}from"./p-ZWhv_80v.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import{C as j,a as b,b as T}from"./p-Cjcsf8ku.js";import{I as w}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as N,a as D}from"./p-D2muobcE.js";import{C as I}from"./p-BffoVWib.js";import{A as C}from"./p-Dph3Ao9s.js";import{P as A,a as E,b as x}from"./p-DCIW8z1f.js";import{C as P}from"./p-ZpPDShvP.js";import"./p-DwBh6VCY.js";import"./p-C5FfYVaH.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const z=class{constructor(e){t(this,e)}render(){return e(u,{key:"3161e6f6a196c79d684574cafbc90bcf741b2150"},e("section",{key:"594b4485ed4fd9d7c1ee7f4556f071139f92ef0c"},e("div",{key:"5c2d14677dda6fc7ddcb074d4887b839385dca3a"},e("div",{key:"fb850cd7e9c11741349710696dd4e6241c98e805",part:n},null==h?void 0:h.paymentDescription),e("div",{key:"959014d7fa2a9c97bae0c986313a604930c1e0f3"},e("span",{key:"14ab0932a083568419b1c36c95f9072c73962b11",part:n},"Total")," ",e("span",{key:"08a9e00332253070ae984b77eb2a9bab88eb3472",part:n},r(+(null==h?void 0:h.totalAmount)))))))}},L=class{constructor(e){t(this,e),this.levels={h1:y,h2:m,h3:f},this.level="h1"}render(){return e(u,{key:"eb3651b698897193d34a6c6456cd57dd0bd0bc43"},e(this.levels[this.level],{key:"39caee687f93d3d4d90e62d9fbcae318eaa8022e",text:this.text,class:this.class}))}},O=C();class S{async getLinkToken(t,e,i,s){return O.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,a,n){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),a&&(r.payment_method_group_id=a),O.post({endpoint:o,body:r,authToken:t,signal:n})}}const _=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new S,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:a}=t.detail;e&&i?(h.paymentToken=s,h.selectedPaymentMethod={type:A.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",a),this.errorEvent.emit({message:(null==a?void 0:a.message)||"Apple Pay payment failed",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:j.ERROR})},this.handleApplePayCancelled=()=>{h.paymentToken=void 0,h.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),h.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new I};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:a})=>{var n;try{const o=await i.fetchCheckout(t,e);if(o.error)return a({error:D(o.error),code:N(null===(n=o.error)||void 0===n?void 0:n.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=N(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:a,onError:n})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return n({error:D(r.error),code:N(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});a({checkout:r.data})}catch(t){const e=N(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),l((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new g(this),k(),h.authToken=this.authToken,this.fetchCheckout(),p("set",(t=>{const e=v[t];void 0!==e&&M(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==w.completed?t.status!==w.expired||this.errorEvent.emit({message:T.CHECKOUT_EXPIRED,errorCode:b.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:T.CHECKOUT_ALREADY_COMPLETED,errorCode:b.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:T.NOT_AUTHENTICATED,errorCode:b.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,a,n;h.accountId=t.account_id,h.checkoutLoaded=!0,h.paymentMethods=t.payment_methods.map((t=>new E(t))),h.paymentMethodGroupId=t.payment_method_group_id,h.paymentDescription=t.payment_description,h.totalAmount=t.total_amount,h.paymentAmount=t.payment_amount,h.bnplEnabled=t.payment_settings.bnpl_payments,h.insuranceEnabled=t.payment_settings.insurance_payments,h.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,h.bnplProviderClientId=null===(i=null==t?void 0:t.bnpl)||void 0===i?void 0:i.provider_client_id,h.bnplProviderMode=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_mode,h.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,h.bnplProviderCheckoutUrl=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:c(),selectedPaymentMethod:h.selectedPaymentMethod,savedPaymentMethods:h.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const a=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},n=Object.assign(Object.assign({},t),a),o=Object.assign({accountId:h.accountId,payment_method_group_id:void 0},n);h.savePaymentMethod&&(o.payment_method_group_id=h.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:h.accountId}));return r.error?r:(h.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){h.selectedPaymentMethod=t,h.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];h.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.NEW_CARD,a=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_BANK_ACCOUNT;if((s||a)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:b.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,a,n;const o=await this.validate();if(!h.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_CARD,l=(null===(i=h.selectedPaymentMethod)||void 0===i?void 0:i.type)===A.NEW_BANK_ACCOUNT,c=(null===(s=h.selectedPaymentMethod)||void 0===s?void 0:s.type)===A.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}if(c&&!h.paymentToken){const t=h.plaidPublicToken,e=h.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(h.authToken,h.accountId,t,e||void 0,h.savePaymentMethod?h.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,n=(null===(a=null==s?void 0:s.bank_account)||void 0===a?void 0:a.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);h.paymentToken=n}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});if(!h.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});let d;d={payment_mode:(t=>{switch(t){case A.NEW_CARD:case A.SAVED_CARD:case A.NEW_BANK_ACCOUNT:case A.SAVED_BANK_ACCOUNT:case A.PLAID:return x.ECOM;case A.SEZZLE:return x.BNPL;case A.APPLE_PAY:return x.APPLE_PAY;default:return}})(null===(n=h.selectedPaymentMethod)||void 0===n?void 0:n.type),payment_token:h.paymentToken},this.completeCheckout({payment:d,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:b.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return e(s,{key:"dbe1fe78f8206fef2e3f4f51628d716786dea858"})}get hostEl(){return a(this)}};var R;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(R||(R={}));const U={[R.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[R.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[R.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[R.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[R.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[R.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[R.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[R.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[R.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[R.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[R.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[R.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[R.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},B={[R.PLAID_SDK_LOAD_FAILED]:j.ERROR,[R.PLAID_LINK_INIT_FAILED]:j.ERROR,[R.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[R.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[R.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[R.PLAID_TOKEN_EXPIRED]:j.WARNING,[R.PLAID_NETWORK_ERROR]:j.WARNING,[R.PLAID_USER_CANCELLED]:j.INFO,[R.PLAID_TIMEOUT]:j.WARNING,[R.PLAID_INVALID_CREDENTIALS]:j.ERROR,[R.PLAID_ACCOUNT_LOCKED]:j.ERROR,[R.PLAID_MAINTENANCE]:j.WARNING,[R.PLAID_RATE_LIMITED]:j.WARNING},Y=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new S,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{h.authToken&&h.accountId&&h.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:U[R.PLAID_LINK_TOKEN_FAILED],severity:B[R.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:R.PLAID_LINK_INIT_FAILED,message:U[R.PLAID_LINK_INIT_FAILED],severity:B[R.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,a;try{if(!h.authToken||!h.accountId)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(h.authToken,h.accountId,h.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(h.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=R.PLAID_LINK_TOKEN_FAILED,o=U[n],r=!0;"AbortError"===t.name?(n=R.PLAID_TIMEOUT,o=U[n],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(n=R.PLAID_NETWORK_ERROR,o=U[n],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(a=t.message)||void 0===a?void 0:a.includes("unauthorized")))&&(n=R.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:n,message:o,severity:B[n],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return R.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return R.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return R.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return R.PLAID_RATE_LIMITED;case"maintenance":return R.PLAID_MAINTENANCE;case"not_authenticated":return R.PLAID_INVALID_CREDENTIALS;default:return R.PLAID_LINK_TOKEN_FAILED}return R.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,h.selectedPaymentMethod={type:A.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),h.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=R.PLAID_AUTHENTICATION_FAILED,i=U[e],s=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=R.PLAID_INVALID_CREDENTIALS,i=U[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=R.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=R.PLAID_ACCOUNT_LOCKED,i=U[e],s=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=R.PLAID_MAINTENANCE,i=U[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=R.PLAID_RATE_LIMITED,i=U[e],s=!0;break;case"INVALID_REQUEST":e=R.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=R.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const n=t.error_message.toLowerCase();n.includes("not supported")||n.includes("unsupported")?(e=R.PLAID_BANK_NOT_SUPPORTED,i=U[e],s=!1,a="Try a different payment method"):(n.includes("expired")||n.includes("timeout"))&&(e=R.PLAID_TOKEN_EXPIRED,i=U[e],s=!0)}this.handleError({code:e,message:i,severity:B[e],originalError:t,retryable:s,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)!==A.PLAID&&(h.selectedPaymentMethod={type:A.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return h.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,h.selectedPaymentMethod={type:A.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(h.selectedPaymentMethod={type:A.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==h.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=e("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return e(u,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{title:"Pay with Plaid"},e("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},Q=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),h.selectedPaymentMethod={id:t.id,type:t.type},h.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===A.SAVED_CARD&&h.disableCreditCard||t===A.SAVED_BANK_ACCOUNT&&h.disableBankAccount)}componentWillLoad(){h.paymentMethods.length||console.warn("No saved payment methods available."),h.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return h.disablePaymentMethodGroup?null:e(u,null,e("div",{class:"saved-payment-methods"},h.paymentMethods.length?h.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>e("div",{class:"radio-list-item p-3",part:o,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:h.paymentToken===(null==t?void 0:t.id),label:`${P[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},F=e("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"}}),H=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=A.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(h.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:h.bnplProviderClientId,apiMode:h.bnplProviderMode,apiVersion:h.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:h.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){h.selectedPaymentMethod={type:A.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return!h.bnplEnabled||h.disableBnpl?(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null):e(u,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",null,e("div",null,"Buy now, pay later with ",F),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},r(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents)))))}},V={[A.NEW_BANK_ACCOUNT]:"New bank account",[A.NEW_CARD]:"New credit or debit card"},Z="Payment form not ready",W="Validation error",G=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){k(),this.analytics=new g(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,h.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:b.TOKENIZE_ERROR,message:W}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(b.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:b.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:Z}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||h.authToken,account:this.accountId||h.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||h.authToken||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||h.accountId||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=A.NEW_BANK_ACCOUNT,h.selectedPaymentMethod={type:A.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=A.NEW_CARD,h.selectedPaymentMethod={type:A.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(A.NEW_CARD),this.disableBankAccount||t.push(A.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:j.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",Z);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||W;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||h.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!h.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const i=this.selectedPaymentMethod===t&&void 0===h.selectedPaymentMethod.id;return e("div",{class:"payment-method"},e("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:i,label:V[t],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return e("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),e("div",{class:"mt-4"},e("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),e("div",{class:"mt-4"},e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return e(t===A.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return e(u,{key:"5fc5dad15215fe24b421f4d6c13355fb849b8a76"},e("form",{key:"0e0330e5b11ee3ae0bef9e092fa2fb2a0a6af3e7"},e("fieldset",{key:"ee4c026ccda62a249e019a9e105e40ea465fc400"},e("div",{key:"15a8a86fa5be8a545745260d76a8c3b2569d6a0e",class:"row gy-3"},e("div",{key:"bbbeed6ee96311394a876b4beb206e8e335184c2",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),e("div",{key:"da2a2009abe4348e25a5fc712557e81e9f6c4c1f",class:"col-12"},e("justifi-button",{key:"050939c757999383226f281ee0eff1ec178be203",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return a(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{z as justifi_checkout_summary,L as justifi_header,_ as justifi_modular_checkout,Y as justifi_plaid_payment_method,Q as justifi_saved_payment_methods,H as justifi_sezzle_payment_method,G as justifi_tokenize_payment_method}
1
+ import{r as t,h as e,c as i,H as s,g as a}from"./p-qipqIMyC.js";import{z as n,r as o}from"./p-RvUQ__Pq.js";import{f as r}from"./p-BHf9IqGw.js";import{c as h,o as l,g as c,a as d}from"./p-CrQgyTRz.js";import{S as u}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{H as y}from"./p-CQeex56P.js";import{H as m,b as p,h as M,i as v}from"./p-Bvp7uul3.js";import{H as g}from"./p-BguBT6Hn.js";import{J as f,c as k}from"./p-BB5-CJF-.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as j,a as b,b as T}from"./p-Cjcsf8ku.js";import{I as w}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as N,a as D}from"./p-D2muobcE.js";import{C as I}from"./p-BY2p6Sxk.js";import{A as C}from"./p-BUa0YOaw.js";import{P as A,a as E,b as P}from"./p-DCIW8z1f.js";import{C as x}from"./p-ZpPDShvP.js";import"./p-DsAwPf2y.js";import"./p-pXjOPQhG.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const z=class{constructor(e){t(this,e)}render(){return e(u,{key:"3161e6f6a196c79d684574cafbc90bcf741b2150"},e("section",{key:"594b4485ed4fd9d7c1ee7f4556f071139f92ef0c"},e("div",{key:"5c2d14677dda6fc7ddcb074d4887b839385dca3a"},e("div",{key:"fb850cd7e9c11741349710696dd4e6241c98e805",part:n},null==h?void 0:h.paymentDescription),e("div",{key:"959014d7fa2a9c97bae0c986313a604930c1e0f3"},e("span",{key:"14ab0932a083568419b1c36c95f9072c73962b11",part:n},"Total")," ",e("span",{key:"08a9e00332253070ae984b77eb2a9bab88eb3472",part:n},r(+(null==h?void 0:h.totalAmount)))))))}},O=class{constructor(e){t(this,e),this.levels={h1:y,h2:m,h3:g},this.level="h1"}render(){return e(u,{key:"eb3651b698897193d34a6c6456cd57dd0bd0bc43"},e(this.levels[this.level],{key:"39caee687f93d3d4d90e62d9fbcae318eaa8022e",text:this.text,class:this.class}))}},L=C();class _{async getLinkToken(t,e,i,s){return L.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,a,n){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),a&&(r.payment_method_group_id=a),L.post({endpoint:o,body:r,authToken:t,signal:n})}}const S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new _,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:a}=t.detail;e&&i?(h.paymentToken=s,h.selectedPaymentMethod={type:A.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",a),this.errorEvent.emit({message:(null==a?void 0:a.message)||"Apple Pay payment failed",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:j.ERROR})},this.handleApplePayCancelled=()=>{h.paymentToken=void 0,h.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),h.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new I};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:a})=>{var n;try{const o=await i.fetchCheckout(t,e);if(o.error)return a({error:D(o.error),code:N(null===(n=o.error)||void 0===n?void 0:n.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=N(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:a,onError:n})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return n({error:D(r.error),code:N(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});a({checkout:r.data})}catch(t){const e=N(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),l((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new f(this),k(),h.authToken=this.authToken,this.fetchCheckout(),p("set",(t=>{const e=v[t];void 0!==e&&M(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==w.completed?t.status!==w.expired||this.errorEvent.emit({message:T.CHECKOUT_EXPIRED,errorCode:b.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:T.CHECKOUT_ALREADY_COMPLETED,errorCode:b.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:T.NOT_AUTHENTICATED,errorCode:b.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,a,n;h.accountId=t.account_id,h.checkoutLoaded=!0,h.paymentMethods=t.payment_methods.map((t=>new E(t))),h.paymentMethodGroupId=t.payment_method_group_id,h.paymentDescription=t.payment_description,h.totalAmount=t.total_amount,h.paymentAmount=t.payment_amount,h.bnplEnabled=t.payment_settings.bnpl_payments,h.insuranceEnabled=t.payment_settings.insurance_payments,h.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,h.bnplProviderClientId=null===(i=null==t?void 0:t.bnpl)||void 0===i?void 0:i.provider_client_id,h.bnplProviderMode=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_mode,h.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,h.bnplProviderCheckoutUrl=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:c(),selectedPaymentMethod:h.selectedPaymentMethod,savedPaymentMethods:h.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const a=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},n=Object.assign(Object.assign({},t),a),o=Object.assign({accountId:h.accountId,payment_method_group_id:void 0},n);h.savePaymentMethod&&(o.payment_method_group_id=h.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:h.accountId}));return r.error?r:(h.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){h.selectedPaymentMethod=t,h.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];h.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.NEW_CARD,a=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_BANK_ACCOUNT;if((s||a)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:b.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,a,n;const o=await this.validate();if(!h.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_CARD,l=(null===(i=h.selectedPaymentMethod)||void 0===i?void 0:i.type)===A.NEW_BANK_ACCOUNT,c=(null===(s=h.selectedPaymentMethod)||void 0===s?void 0:s.type)===A.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}if(c&&!h.paymentToken){const t=h.plaidPublicToken,e=h.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(h.authToken,h.accountId,t,e||void 0,h.savePaymentMethod?h.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,n=(null===(a=null==s?void 0:s.bank_account)||void 0===a?void 0:a.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);h.paymentToken=n}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});if(!h.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});let d;d={payment_mode:(t=>{switch(t){case A.NEW_CARD:case A.SAVED_CARD:case A.NEW_BANK_ACCOUNT:case A.SAVED_BANK_ACCOUNT:case A.PLAID:return P.ECOM;case A.SEZZLE:return P.BNPL;case A.APPLE_PAY:return P.APPLE_PAY;default:return}})(null===(n=h.selectedPaymentMethod)||void 0===n?void 0:n.type),payment_token:h.paymentToken},this.completeCheckout({payment:d,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:b.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return e(s,{key:"dbe1fe78f8206fef2e3f4f51628d716786dea858"})}get hostEl(){return a(this)}};var R;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(R||(R={}));const U={[R.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[R.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[R.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[R.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[R.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[R.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[R.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[R.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[R.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[R.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[R.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[R.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[R.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},B={[R.PLAID_SDK_LOAD_FAILED]:j.ERROR,[R.PLAID_LINK_INIT_FAILED]:j.ERROR,[R.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[R.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[R.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[R.PLAID_TOKEN_EXPIRED]:j.WARNING,[R.PLAID_NETWORK_ERROR]:j.WARNING,[R.PLAID_USER_CANCELLED]:j.INFO,[R.PLAID_TIMEOUT]:j.WARNING,[R.PLAID_INVALID_CREDENTIALS]:j.ERROR,[R.PLAID_ACCOUNT_LOCKED]:j.ERROR,[R.PLAID_MAINTENANCE]:j.WARNING,[R.PLAID_RATE_LIMITED]:j.WARNING},Q=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new _,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{h.authToken&&h.accountId&&h.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:U[R.PLAID_LINK_TOKEN_FAILED],severity:B[R.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:R.PLAID_LINK_INIT_FAILED,message:U[R.PLAID_LINK_INIT_FAILED],severity:B[R.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,a;try{if(!h.authToken||!h.accountId)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(h.authToken,h.accountId,h.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(h.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=R.PLAID_LINK_TOKEN_FAILED,o=U[n],r=!0;"AbortError"===t.name?(n=R.PLAID_TIMEOUT,o=U[n],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(n=R.PLAID_NETWORK_ERROR,o=U[n],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(a=t.message)||void 0===a?void 0:a.includes("unauthorized")))&&(n=R.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:n,message:o,severity:B[n],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return R.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return R.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return R.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return R.PLAID_RATE_LIMITED;case"maintenance":return R.PLAID_MAINTENANCE;case"not_authenticated":return R.PLAID_INVALID_CREDENTIALS;default:return R.PLAID_LINK_TOKEN_FAILED}return R.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,h.selectedPaymentMethod={type:A.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),h.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=R.PLAID_AUTHENTICATION_FAILED,i=U[e],s=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=R.PLAID_INVALID_CREDENTIALS,i=U[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=R.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=R.PLAID_ACCOUNT_LOCKED,i=U[e],s=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=R.PLAID_MAINTENANCE,i=U[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=R.PLAID_RATE_LIMITED,i=U[e],s=!0;break;case"INVALID_REQUEST":e=R.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=R.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const n=t.error_message.toLowerCase();n.includes("not supported")||n.includes("unsupported")?(e=R.PLAID_BANK_NOT_SUPPORTED,i=U[e],s=!1,a="Try a different payment method"):(n.includes("expired")||n.includes("timeout"))&&(e=R.PLAID_TOKEN_EXPIRED,i=U[e],s=!0)}this.handleError({code:e,message:i,severity:B[e],originalError:t,retryable:s,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)!==A.PLAID&&(h.selectedPaymentMethod={type:A.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return h.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,h.selectedPaymentMethod={type:A.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(h.selectedPaymentMethod={type:A.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==h.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=e("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return e(u,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{title:"Pay with Plaid"},e("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},Y=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),h.selectedPaymentMethod={id:t.id,type:t.type},h.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===A.SAVED_CARD&&h.disableCreditCard||t===A.SAVED_BANK_ACCOUNT&&h.disableBankAccount)}componentWillLoad(){h.paymentMethods.length||console.warn("No saved payment methods available."),h.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return h.disablePaymentMethodGroup?null:e(u,null,e("div",{class:"saved-payment-methods"},h.paymentMethods.length?h.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>e("div",{class:"radio-list-item p-3",part:o,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:h.paymentToken===(null==t?void 0:t.id),label:`${x[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},F=e("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"}}),H=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=A.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(h.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:h.bnplProviderClientId,apiMode:h.bnplProviderMode,apiVersion:h.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:h.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){h.selectedPaymentMethod={type:A.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return!h.bnplEnabled||h.disableBnpl?(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null):e(u,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",null,e("div",null,"Buy now, pay later with ",F),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},r(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents)))))}},V={[A.NEW_BANK_ACCOUNT]:"New bank account",[A.NEW_CARD]:"New credit or debit card"},Z="Payment form not ready",W="Validation error",q=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){k(),this.analytics=new f(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,h.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:b.TOKENIZE_ERROR,message:W}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(b.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:b.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:Z}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||h.authToken,account:this.accountId||h.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||h.authToken||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||h.accountId||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=A.NEW_BANK_ACCOUNT,h.selectedPaymentMethod={type:A.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=A.NEW_CARD,h.selectedPaymentMethod={type:A.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(A.NEW_CARD),this.disableBankAccount||t.push(A.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:j.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",Z);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||W;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||h.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!h.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const i=this.selectedPaymentMethod===t&&void 0===h.selectedPaymentMethod.id;return e("div",{class:"payment-method"},e("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:i,label:V[t],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return e("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),e("div",{class:"mt-4"},e("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),e("div",{class:"mt-4"},e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return e(t===A.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return e(u,{key:"5fc5dad15215fe24b421f4d6c13355fb849b8a76"},e("form",{key:"0e0330e5b11ee3ae0bef9e092fa2fb2a0a6af3e7"},e("fieldset",{key:"ee4c026ccda62a249e019a9e105e40ea465fc400"},e("div",{key:"15a8a86fa5be8a545745260d76a8c3b2569d6a0e",class:"row gy-3"},e("div",{key:"bbbeed6ee96311394a876b4beb206e8e335184c2",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),e("div",{key:"da2a2009abe4348e25a5fc712557e81e9f6c4c1f",class:"col-12"},e("justifi-button",{key:"050939c757999383226f281ee0eff1ec178be203",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return a(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{z as justifi_checkout_summary,O as justifi_header,S as justifi_modular_checkout,Q as justifi_plaid_payment_method,Y as justifi_saved_payment_methods,H as justifi_sezzle_payment_method,q as justifi_tokenize_payment_method}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-CHdklybh.js";import{c as a,J as s}from"./p-ZWhv_80v.js";import{c as d}from"./p-BVHUyJdS.js";import{d as o}from"./p-RvUQ__Pq.js";import{S as c}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import{P as h}from"./p-DCIW8z1f.js";import"./p-C5FfYVaH.js";import"./p-Dph3Ao9s.js";import"./p-BuWHmUFx.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=class{constructor(i){e(this,i),this.errorEvent=t(this,"error-event"),this.loadedEvent=t(this,"loaded"),this.submitEvent=t(this,"submit-event"),this.availablePaymentMethods=[],this.errorMessage="",this.insuranceToggled=!1,this.isSubmitting=!1,this.disableBankAccount=!1,this.disableBnpl=!1,this.disableCreditCard=!1,this.disablePaymentMethodGroup=!1,this.hideBankAccountBillingForm=!1,this.hideCardBillingForm=!1}propChanged(){this.updateStore()}connectedCallback(){this.authToken&&this.checkoutId&&this.updateStore()}componentWillLoad(){a(),this.analytics=new s(this)}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}checkoutComplete(e){this.isSubmitting=!1}checkoutError(e){this.isSubmitting=!1}checkoutChanged(e){this.availablePaymentMethods=e.detail.availablePaymentMethodTypes}async fillBillingForm(e){var t;d.billingFormFields=e,null===(t=this.tokenizePaymentMethodRef)||void 0===t||t.fillBillingForm(e)}async validate(){var e;return{isValid:await(null===(e=this.modularCheckoutRef)||void 0===e?void 0:e.validate())}}updateStore(){d.checkoutId=this.checkoutId,d.authToken=this.authToken,d.disableCreditCard=this.disableCreditCard,d.disableBankAccount=this.disableBankAccount,d.disableBnpl=this.disableBnpl,d.disablePaymentMethodGroup=this.disablePaymentMethodGroup}async submit(e){var t;this.isSubmitting=!0,null===(t=this.modularCheckoutRef)||void 0===t||t.submitCheckout(d.billingFormFields)}get showPaymentTypeHeader(){return!this.disableCreditCard&&!this.disableBankAccount}render(){var e,t;return i(c,{key:"8967ceca5773c0f5913b893f8b626ef2eb58abe8"},i("justifi-modular-checkout",{key:"74294e37e359e68601699a543751c0835f074d47",ref:e=>{this.modularCheckoutRef=e},authToken:this.authToken,checkoutId:this.checkoutId},i("div",{key:"9daf1561a627f0a84dd7390c7d44ffab15a4a746",class:"row gy-3 jfi-checkout-core"},i("div",{key:"1f45fa61d3fa5f3e21d3086123aef3137734a363",class:"col-12",part:o},i("justifi-header",{key:"812d922d688bb5e00eaff3f967350b705454a06c",text:"Summary",level:"h2",class:"fs-5 fw-bold pb-3"}),i("section",{key:"9c8cfe346833339197f3922dcbee7230308064e6"},i("justifi-checkout-summary",{key:"8b6410ed811ff2793167ab8b21954d6bbb52c3d8"}))),i("div",{key:"87413afe99372a8523b25b8e3fe14b17666328ac",class:"col-12 mt-4"},i("slot",{key:"f8342527afd4e86abda3275db447e82f72e13e03",name:"insurance"})),i("div",{key:"97b39e4f03829ea5d1d29b2b1be3066ff4100ac7",class:"col-12 mt-4"},i("justifi-header",{key:"2b3196519d949d534595767879102951caad5788",text:"Payment",level:"h2",class:"fs-5 fw-bold pb-3"}),this.showPaymentTypeHeader&&i("justifi-header",{key:"c40bbfddfb990feda4aa75ab4caa38b4376b4a04",text:"Select payment type",level:"h3",class:"fs-6 fw-bold lh-lg"}),i("div",{key:"c323e2e892985b02a607253355b0b72eb5bfe9e9",class:"d-flex flex-column"},i("section",{key:"c85bb72343b256d072a086a4974167d421154023"},i("div",{key:"f4cb5c3b7fa4facbff7882b769da2bf9b9d01811"},i("justifi-saved-payment-methods",{key:"087cbde10cb23af391eb848f53a3732cdd528cd0"}),this.availablePaymentMethods.includes(h.SEZZLE)&&i("justifi-radio-list-item",{key:"35c7b0484cbec62b115aa8851c8266cd4d39b2b6",name:"paymentMethodType",value:h.SEZZLE,checked:(null===(e=null==d?void 0:d.selectedPaymentMethod)||void 0===e?void 0:e.type)===h.SEZZLE,label:i("justifi-sezzle-payment-method",{ref:e=>this.sezzlePaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.sezzlePaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),this.availablePaymentMethods.includes(h.PLAID)&&i("justifi-radio-list-item",{key:"a7ec30342cbb3453b460e72d60a1c726e3a3efa3",name:"paymentMethodType",value:h.PLAID,checked:(null===(t=null==d?void 0:d.selectedPaymentMethod)||void 0===t?void 0:t.type)===h.PLAID,label:i("justifi-plaid-payment-method",{ref:e=>this.plaidPaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.plaidPaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),i("justifi-tokenize-payment-method",{key:"590b2085e9aee9a06f5ee1755aeeb41aa3448699",ref:e=>this.tokenizePaymentMethodRef=e,authToken:this.authToken,accountId:d.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:!0,paymentMethodGroupId:d.paymentMethodGroupId}))))),i("div",{key:"b725e958faa55605e4542f59d461780eeced96fe",class:"mt-4"},i("justifi-button",{key:"119f7879620fc6dd06517c7a894ec05b60b1d4f8",text:"Pay",type:"submit",variant:"primary",clickHandler:e=>this.submit(e),disabled:this.isSubmitting,isLoading:this.isSubmitting,customStyle:{width:"100%",textAlign:"center"}})))))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"],disableCreditCard:["propChanged"],disableBankAccount:["propChanged"],disableBnpl:["propChanged"],disablePaymentMethodGroup:["propChanged"]}}};export{l as justifi_checkout}
1
+ import{r as e,c as t,h as i}from"./p-qipqIMyC.js";import{c as a,J as s}from"./p-BB5-CJF-.js";import{c as d}from"./p-CrQgyTRz.js";import{d as c}from"./p-RvUQ__Pq.js";import{S as o}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{P as h}from"./p-DCIW8z1f.js";import"./p-pXjOPQhG.js";import"./p-BUa0YOaw.js";import"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const r=class{constructor(i){e(this,i),this.errorEvent=t(this,"error-event"),this.loadedEvent=t(this,"loaded"),this.submitEvent=t(this,"submit-event"),this.availablePaymentMethods=[],this.errorMessage="",this.insuranceToggled=!1,this.isSubmitting=!1,this.disableBankAccount=!1,this.disableBnpl=!1,this.disableCreditCard=!1,this.disablePaymentMethodGroup=!1,this.hideBankAccountBillingForm=!1,this.hideCardBillingForm=!1}propChanged(){this.updateStore()}connectedCallback(){this.authToken&&this.checkoutId&&this.updateStore()}componentWillLoad(){a(),this.analytics=new s(this)}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}checkoutComplete(e){this.isSubmitting=!1}checkoutError(e){this.isSubmitting=!1}checkoutChanged(e){this.availablePaymentMethods=e.detail.availablePaymentMethodTypes}async fillBillingForm(e){var t;d.billingFormFields=e,null===(t=this.tokenizePaymentMethodRef)||void 0===t||t.fillBillingForm(e)}async validate(){var e;return{isValid:await(null===(e=this.modularCheckoutRef)||void 0===e?void 0:e.validate())}}updateStore(){d.checkoutId=this.checkoutId,d.authToken=this.authToken,d.disableCreditCard=this.disableCreditCard,d.disableBankAccount=this.disableBankAccount,d.disableBnpl=this.disableBnpl,d.disablePaymentMethodGroup=this.disablePaymentMethodGroup}async submit(e){var t;this.isSubmitting=!0,null===(t=this.modularCheckoutRef)||void 0===t||t.submitCheckout(d.billingFormFields)}get showPaymentTypeHeader(){return!this.disableCreditCard&&!this.disableBankAccount}render(){var e,t;return i(o,{key:"65e97b6e7b25f885beda63487d96877ac4785847"},i("justifi-modular-checkout",{key:"dc009a2897ae02dfaa9ca7694dc20a588bca5b8a",ref:e=>{this.modularCheckoutRef=e},authToken:this.authToken,checkoutId:this.checkoutId},i("div",{key:"8c8536f5139ad2d05316546a5442552e87992d89",class:"row gy-3 jfi-checkout-core"},i("div",{key:"20135fb737963df1d2c5e790881b98d6efa8c04b",class:"col-12",part:c},i("justifi-header",{key:"4fa1fdcad237ce5014266adbd6fec1fa766c3e44",text:"Summary",level:"h2",class:"fs-5 fw-bold pb-3"}),i("section",{key:"44a694a98e30ebd21e1f3d2beaafe8d5d11f1a36"},i("justifi-checkout-summary",{key:"1ff39b9c2d31649f2346d0aa666168d1cbe1deca"}))),i("div",{key:"6401bebd557fcf9ef73746c2ee4f2d67ccccf73b",class:"col-12 mt-4"},i("slot",{key:"72d1e32aaed73232cf2b2d247ab5e7fc19a36092",name:"insurance"})),i("div",{key:"2fea8b30dd19032afc7a5b37abe897aa1aee1362",class:"col-12 mt-4"},i("justifi-header",{key:"8b2d443e9e5db4ba95ab72983e737a7579824e69",text:"Payment",level:"h2",class:"fs-5 fw-bold pb-3"}),this.showPaymentTypeHeader&&i("justifi-header",{key:"67a2c1a30841a789b9b2ee2d16209373ad055783",text:"Select payment type",level:"h3",class:"fs-6 fw-bold lh-lg"}),i("div",{key:"1fdb903931cd73a801975eabd12d7ad43cefcb97",class:"d-flex flex-column"},i("section",{key:"29b3a041e397aebae60106ac508188d6b4770f1f"},i("div",{key:"0ab54f7a284a59d8bcae57df1abe8e8347628fc2"},i("justifi-saved-payment-methods",{key:"b8f73b6e8992e99332dc55cf6ed099ccb60953c3"}),this.availablePaymentMethods.includes(h.SEZZLE)&&i("justifi-radio-list-item",{key:"d87bd60da7d44160a56de342fcbe6c505e8d79e5",name:"paymentMethodType",value:h.SEZZLE,checked:(null===(e=null==d?void 0:d.selectedPaymentMethod)||void 0===e?void 0:e.type)===h.SEZZLE,label:i("justifi-sezzle-payment-method",{ref:e=>this.sezzlePaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.sezzlePaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),this.availablePaymentMethods.includes(h.PLAID)&&i("justifi-radio-list-item",{key:"9d0527fe516eaee74a10314a6f7a866cf40a6942",name:"paymentMethodType",value:h.PLAID,checked:(null===(t=null==d?void 0:d.selectedPaymentMethod)||void 0===t?void 0:t.type)===h.PLAID,label:i("justifi-plaid-payment-method",{ref:e=>this.plaidPaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.plaidPaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),i("justifi-tokenize-payment-method",{key:"fd29144c8e488ee48361df556bde824a80d1a207",ref:e=>this.tokenizePaymentMethodRef=e,authToken:this.authToken,accountId:d.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:!0,paymentMethodGroupId:d.paymentMethodGroupId}))))),i("div",{key:"9f3cc42ae66e37193ab0b6df7f5235aaf8cc3c84",class:"mt-4"},i("justifi-button",{key:"2cbd13a7bde5ce0478e948456edb2191f9b96c0b",text:"Pay",type:"submit",variant:"primary",clickHandler:e=>this.submit(e),disabled:this.isSubmitting,isLoading:this.isSubmitting,customStyle:{width:"100%",textAlign:"center"}})))))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"],disableCreditCard:["propChanged"],disableBankAccount:["propChanged"],disableBnpl:["propChanged"],disablePaymentMethodGroup:["propChanged"]}}};export{r as justifi_checkout}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CHdklybh.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-ZWhv_80v.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-DWMITBje.js";import"./p-C5FfYVaH.js";import"./p-Dph3Ao9s.js";import"./p-BuWHmUFx.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const m=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 c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.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 c}):(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:"4087eb105a046a3cc194d9f25c80fa11298fa0a2",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_dispute_management}
1
+ import{r as t,c as s,h as i}from"./p-qipqIMyC.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-BB5-CJF-.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-DyOgQlh2.js";import"./p-pXjOPQhG.js";import"./p-BUa0YOaw.js";import"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const m=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 c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.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 c}):(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:"4087eb105a046a3cc194d9f25c80fa11298fa0a2",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_dispute_management}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as a,g as i}from"./p-CHdklybh.js";import{c as o,l as h,b as r,T as l,a as c}from"./p-RvUQ__Pq.js";import{F as f}from"./p-BDGiGASo.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=r),this.disabled&&(t=l),this.isFocused&&(t=c),t}render(){var t;return s(a,{key:"a7428cd8a89414d877dafe9948f5652f28c36a5f"},s("div",{key:"c9d5d5d2f8a6292484d3606d883dbb9d168aa316",class:"form-group d-flex flex-column"},s("div",{key:"c1aba6560934b966de02e9afef77428c6060eefb",class:"d-flex align-items-start gap-2"},s("label",{key:"5fbbb09c3955ff3285b006f24c3873082394d39c",part:h,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"f756a05a8273ab6fd65205bb5c32cd34c30a9db3",helpText:this.helpText})),s("select",{key:"ffd0fa461d3c35da5595e705a7c4068066d8f971",ref:t=>this.selectElement=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>s("option",{value:t.value},t.label)))),s(f,{key:"6ee60bb236ccf7cea7bc8ccf946a363d2cd26906",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?r:this.disabled?l:this.isFocused?c:o}render(){return s(a,{key:"71473077484c65dce4e3311db05a194f642a37c8"},s("div",{key:"fbceee0b9fae4f05e1310a97c009fa5a97866ea4",class:"form-group d-flex flex-column"},s("div",{key:"c5b6cc944e8a1a7aafe136e67e5f37772f364cd6",class:"d-flex align-items-start gap-2"},s("label",{key:"029a560a612b7e00f4d67c7adc2b5bdffa85cb53",part:h,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"3d8b3a41a599dc2f59171befb532c0cd219adba5",helpText:this.helpText})),s("input",{key:"2510c95b50bb26d00fb2975e38fde9efb7a6986e",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"feff4a3d104ea6f74a8d7049f79b8c2850b308a9",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_select,d as form_control_text}
1
+ import{r as t,c as e,h as s,H as a,g as i}from"./p-qipqIMyC.js";import{c as o,l as r,b as h,T as l,a as c}from"./p-RvUQ__Pq.js";import{F as f}from"./p-DCMrHeJI.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=h),this.disabled&&(t=l),this.isFocused&&(t=c),t}render(){var t;return s(a,{key:"a7428cd8a89414d877dafe9948f5652f28c36a5f"},s("div",{key:"c9d5d5d2f8a6292484d3606d883dbb9d168aa316",class:"form-group d-flex flex-column"},s("div",{key:"c1aba6560934b966de02e9afef77428c6060eefb",class:"d-flex align-items-start gap-2"},s("label",{key:"5fbbb09c3955ff3285b006f24c3873082394d39c",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"f756a05a8273ab6fd65205bb5c32cd34c30a9db3",helpText:this.helpText})),s("select",{key:"ffd0fa461d3c35da5595e705a7c4068066d8f971",ref:t=>this.selectElement=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>s("option",{value:t.value},t.label)))),s(f,{key:"6ee60bb236ccf7cea7bc8ccf946a363d2cd26906",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?h:this.disabled?l:this.isFocused?c:o}render(){return s(a,{key:"71473077484c65dce4e3311db05a194f642a37c8"},s("div",{key:"fbceee0b9fae4f05e1310a97c009fa5a97866ea4",class:"form-group d-flex flex-column"},s("div",{key:"c5b6cc944e8a1a7aafe136e67e5f37772f364cd6",class:"d-flex align-items-start gap-2"},s("label",{key:"029a560a612b7e00f4d67c7adc2b5bdffa85cb53",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"3d8b3a41a599dc2f59171befb532c0cd219adba5",helpText:this.helpText})),s("input",{key:"2510c95b50bb26d00fb2975e38fde9efb7a6986e",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"feff4a3d104ea6f74a8d7049f79b8c2850b308a9",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_select,d as form_control_text}
@@ -1 +1 @@
1
- import{r as l,h as i,H as t}from"./p-CHdklybh.js";import{c as e,D as s}from"./p-mxgDrK6T.js";import{m as d,s as v,n as o}from"./p-BHf9IqGw.js";import"./p-RvUQ__Pq.js";import"./p-HXpYMWUU.js";const a=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||d(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},u=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:v(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,v,o,a,u,n;return!this.legalAddress||d(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(v=this.legalAddress)||void 0===v?void 0:v.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(o=this.legalAddress)||void 0===o?void 0:o.city}),i(e,{title:"State",value:null===(a=this.legalAddress)||void 0===a?void 0:a.state}),i(e,{title:"Postal Code",value:null===(n=null===(u=this.legalAddress)||void 0===u?void 0:u.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,d,v,a,u;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-table gap-2 w-100 mt-3"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:o(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.line2}),i(e,{title:"City",value:null===(v=null==l?void 0:l.address)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.state}),i(e,{title:"Zip",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.postal_code}))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,v,a,u,n,r,c,h,m,p,b,g,w;return!this.representative||d(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(a=null===(v=this.representative)||void 0===v?void 0:v.address)||void 0===a?void 0:a.line1}),i(e,{title:"Created At",value:(null===(u=this.representative)||void 0===u?void 0:u.created_at)&&o(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&o(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(b=this.representative)||void 0===b?void 0:b.email}),i(e,{title:"Phone",value:null===(g=this.representative)||void 0===g?void 0:g.phone}),i(e,{title:"Updated At",value:this.representative&&o(null===(w=this.representative)||void 0===w?void 0:w.updated_at)})))))}};export{a as additional_questions_details,u as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
1
+ import{r as l,h as i,H as t}from"./p-qipqIMyC.js";import{c as e,D as s}from"./p-BIPdn2VU.js";import{m as d,s as v,n as o}from"./p-BHf9IqGw.js";import"./p-RvUQ__Pq.js";import"./p-HXpYMWUU.js";const a=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||d(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},u=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:v(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,v,o,a,u,n;return!this.legalAddress||d(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(v=this.legalAddress)||void 0===v?void 0:v.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(o=this.legalAddress)||void 0===o?void 0:o.city}),i(e,{title:"State",value:null===(a=this.legalAddress)||void 0===a?void 0:a.state}),i(e,{title:"Postal Code",value:null===(n=null===(u=this.legalAddress)||void 0===u?void 0:u.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,d,v,a,u;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-table gap-2 w-100 mt-3"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:o(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.line2}),i(e,{title:"City",value:null===(v=null==l?void 0:l.address)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.state}),i(e,{title:"Zip",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.postal_code}))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,v,a,u,n,r,c,h,m,p,w,b,g;return!this.representative||d(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(a=null===(v=this.representative)||void 0===v?void 0:v.address)||void 0===a?void 0:a.line1}),i(e,{title:"Created At",value:(null===(u=this.representative)||void 0===u?void 0:u.created_at)&&o(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&o(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(w=this.representative)||void 0===w?void 0:w.email}),i(e,{title:"Phone",value:null===(b=this.representative)||void 0===b?void 0:b.phone}),i(e,{title:"Updated At",value:this.representative&&o(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{a as additional_questions_details,u as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
@@ -1 +1 @@
1
- import{h as t,r as e,c as a}from"./p-CHdklybh.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{f as n}from"./p-c4Mh3ZZ_.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c,J as o}from"./p-ZWhv_80v.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-CIN-y_rT.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as j,g,h as k,i as T,j as v,k as w}from"./p-UmoEDufy.js";import{S as C}from"./p-CXEvc-gI.js";import{T as D}from"./p-CZfYo5-1.js";import{a as F}from"./p-BHf9IqGw.js";import{N as I,O as S}from"./p-RvUQ__Pq.js";import"./p-DwBh6VCY.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-C5FfYVaH.js";import"./p-Dph3Ao9s.js";import"./p-CkX-nM5d.js";const R={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")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},E={created_at:(e,a)=>t("td",{part:S(a)},t("div",{class:"fw-bold"},F(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},F(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:S(a)},x[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:S(a)},e.id),amount:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:S(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:S(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:S(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:S(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:S(a)},e.source_id),source_type:(e,a)=>t("td",{part:S(a)},e.source_type)},H=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:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.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:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,R,E),c(),this.analytics=new o(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:i,onSuccess:r,onError:c,final:o})=>{var d;try{const o=await a.fetchPaymentTransactions(t,e,i);o.error?c({error:h(o.error),code:p(null===(d=o.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:o.data.map((t=>new n(t))),pagingInfo:Object.assign({},o.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{o()}})({id:this.paymentId,authToken:this.authToken,service:new d})({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(i.MISSING_PROPS,this.errorMessage,s.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(C,{key:"c73dfcd1d3038dbca6800b9bd0f4e6c5fba2b8bf"},t(l,{key:"66d8f92a96f2ace82c05d10a9f538d6ad22b588f"},t(u,{key:"cff0e6344efd035f264326ecc79615bddfe8d0ac"},t(m,{key:"702e53ae1d59ab674425f4753c1cf0b6415feacd"},t(y,{key:"7773de2d113af30b3a0d64405dce5d5e09a0bb8c"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"7b86d982f52037349b5cc2f7ec5fa800e38ed519"},t(_,{key:"040c3dfb101c1ea127cfcf982e4415ae94661b2a",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"6d25f8a886cf9b15ea9c17c44dfe0bce6125c557",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(g,{key:"60bb435ecf7a595cdb028df4cd95c1361ce06c8d",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(k,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"accb2e3cb9dc8521c50db6a8ed306f91e5aa44c7"},t(v,{key:"a4408276ce552fe4c43c60f79e7a2a3602566b2c"},t(w,{key:"20b13cc71f8b62166e8b6e9fce5dea2d1b4c5ac0",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"90657ed6a805af46446bc8fb316a52252a9a2bf4",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{H as justifi_payment_transactions_list}
1
+ import{h as t,r as e,c as a}from"./p-qipqIMyC.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{f as n}from"./p-c4Mh3ZZ_.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c,J as o}from"./p-BB5-CJF-.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-CpKvg1ok.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as j,g,h as k,i as w,j as T,k as v}from"./p-BZ7C9duj.js";import{S as C}from"./p-CLQx9p9q.js";import{T as D}from"./p-CZfYo5-1.js";import{a as F}from"./p-BHf9IqGw.js";import{N as R,O as S}from"./p-RvUQ__Pq.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-pXjOPQhG.js";import"./p-BUa0YOaw.js";import"./p-xY5RkFuA.js";const q={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},B={created_at:(e,a)=>t("td",{part:S(a)},t("div",{class:"fw-bold"},F(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},F(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:S(a)},x[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:S(a)},e.id),amount:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:S(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:S(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:S(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:S(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:S(a)},e.source_id),source_type:(e,a)=>t("td",{part:S(a)},e.source_type)},I=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:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.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:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,q,B),c(),this.analytics=new o(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:i,onSuccess:r,onError:c,final:o})=>{var d;try{const o=await a.fetchPaymentTransactions(t,e,i);o.error?c({error:h(o.error),code:p(null===(d=o.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:o.data.map((t=>new n(t))),pagingInfo:Object.assign({},o.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{o()}})({id:this.paymentId,authToken:this.authToken,service:new d})({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(i.MISSING_PROPS,this.errorMessage,s.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(C,{key:"c73dfcd1d3038dbca6800b9bd0f4e6c5fba2b8bf"},t(l,{key:"66d8f92a96f2ace82c05d10a9f538d6ad22b588f"},t(u,{key:"cff0e6344efd035f264326ecc79615bddfe8d0ac"},t(m,{key:"702e53ae1d59ab674425f4753c1cf0b6415feacd"},t(y,{key:"7773de2d113af30b3a0d64405dce5d5e09a0bb8c"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"7b86d982f52037349b5cc2f7ec5fa800e38ed519"},t(_,{key:"040c3dfb101c1ea127cfcf982e4415ae94661b2a",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"6d25f8a886cf9b15ea9c17c44dfe0bce6125c557",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(g,{key:"60bb435ecf7a595cdb028df4cd95c1361ce06c8d",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(k,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"accb2e3cb9dc8521c50db6a8ed306f91e5aa44c7"},t(T,{key:"a4408276ce552fe4c43c60f79e7a2a3602566b2c"},t(v,{key:"20b13cc71f8b62166e8b6e9fce5dea2d1b4c5ac0",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"90657ed6a805af46446bc8fb316a52252a9a2bf4",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{I as justifi_payment_transactions_list}
@@ -1 +1 @@
1
- import{r as t,h as e}from"./p-CHdklybh.js";import{B as a}from"./p-BB-9jeDZ.js";import{ag as r,ah as s}from"./p-RvUQ__Pq.js";const d=t=>{const e=["after_cursor","before_cursor"];return!!Object.keys(t).filter((t=>!e.includes(t))).length},c=class{constructor(e){t(this,e),this.showClearButton=!1}watchParamsHandler(t){this.showClearButton=d(t)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=d(this.params)}render(){return e("div",{key:"db1619bbaa73d4102c684b2ca1b4897d1c36fa66",class:"d-flex gap-2"},e("div",{key:"68f4538d4465aadbf20e322264e219ce7ca8078a",class:"dropdown pb-3"},e("button",{key:"cc1835756c1fa2a24a4bbc4ec2960caca0d24e75",type:"button dropdown-toggle",ref:t=>this.anchorButton=t,class:"btn btn-primary dropdown-toggle",part:r,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),e("custom-popper",{key:"14f88ecd195fcf3770cadd71659b00d4c117c460",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},e("form",{key:"d33a6875f30413f3a2f5b8d706cf0bf0e3d6620a",class:"dropdown-menu",part:s,"data-test-id":"filter-menu",ref:t=>this.menu=t,onSubmit:t=>t.preventDefault()},e("slot",{key:"5923bb3684fc9f710a6686d9bf90a6d0f35a1818"})))),e("div",{key:"eba66abc4ef60bf7603fd9459cf4040ed6105e8c"},e(a,{key:"f5de28962ac56636904cee2a5e5d41204e07143c",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{c as table_filters_menu}
1
+ import{r as t,h as e}from"./p-qipqIMyC.js";import{B as a}from"./p-D6XirF21.js";import{ag as r,ah as s}from"./p-RvUQ__Pq.js";const c=t=>{const e=["after_cursor","before_cursor"];return!!Object.keys(t).filter((t=>!e.includes(t))).length},d=class{constructor(e){t(this,e),this.showClearButton=!1}watchParamsHandler(t){this.showClearButton=c(t)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=c(this.params)}render(){return e("div",{key:"db1619bbaa73d4102c684b2ca1b4897d1c36fa66",class:"d-flex gap-2"},e("div",{key:"68f4538d4465aadbf20e322264e219ce7ca8078a",class:"dropdown pb-3"},e("button",{key:"cc1835756c1fa2a24a4bbc4ec2960caca0d24e75",type:"button dropdown-toggle",ref:t=>this.anchorButton=t,class:"btn btn-primary dropdown-toggle",part:r,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),e("custom-popper",{key:"14f88ecd195fcf3770cadd71659b00d4c117c460",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},e("form",{key:"d33a6875f30413f3a2f5b8d706cf0bf0e3d6620a",class:"dropdown-menu",part:s,"data-test-id":"filter-menu",ref:t=>this.menu=t,onSubmit:t=>t.preventDefault()},e("slot",{key:"5923bb3684fc9f710a6686d9bf90a6d0f35a1818"})))),e("div",{key:"eba66abc4ef60bf7603fd9459cf4040ed6105e8c"},e(a,{key:"f5de28962ac56636904cee2a5e5d41204e07143c",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{d as table_filters_menu}
@@ -1 +1 @@
1
- import{h as t,r as e,c as a}from"./p-CHdklybh.js";import{c as i}from"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import{C as s,a as o}from"./p-Cjcsf8ku.js";import{g as r}from"./p-c4Mh3ZZ_.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c as n,J as d}from"./p-ZWhv_80v.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-f0Mcy7rH.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as v,g as j,h as T,i as g,j as k,k as C}from"./p-UmoEDufy.js";import{S as D}from"./p-CXEvc-gI.js";import{T as P}from"./p-CZfYo5-1.js";import{a as I}from"./p-BHf9IqGw.js";import{N as S,O as q}from"./p-RvUQ__Pq.js";import"./p-DwBh6VCY.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-C5FfYVaH.js";import"./p-Dph3Ao9s.js";import"./p-CkX-nM5d.js";const E={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},H={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},O={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},H[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},I(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},I(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},I(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.updated_at,{showTime:!0})))},A=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=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.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:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,E,O),n(),this.analytics=new d(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.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:i,onSuccess:o,onError:c,final:n})=>{var d;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:p(null===(d=n.error)||void 0===d?void 0:d.code),severity:s.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{n()}})({accountId:i.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,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="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,s.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}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"f795f89fe39f8cded7f0d9c671df8e3e86de6f03"},t(u,{key:"5bb5f805a78965068f675012a1a491e5dd3d4416"},t(m,{key:"c75e72fb5bde6b3f8f127be4d76ef1fa66ce6781"},t(b,{key:"3dfb03ed0205f6fff21953e0a4c85e8b151680a1"},t(y,{key:"169156e61bdf1ce6e10b89c660526a7ec9efb860"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"1e59e340e98ace8291acfbe26836e5b2b7b7dd29"},t(w,{key:"3c1a420d293d24ac9434f034c7e6de7a83698b63",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(v,{key:"2038ebb6ff5480d74b0bb6a6ecf31a9531f606ef",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"48582c83e384b4e5ba81c4d0055dc9e727a81cdd",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(g,{key:"0bb2c1f4085278db7b114c8b9c5a11702a1840d1"},t(k,{key:"2cc9fe5d66b433b392da1e0a1ae265db6404002d"},t(C,{key:"cb21e30d68c92758efa03fbd16509ff28ab5e316",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"e5ac8aa63ddb08d7f70976cfceccbadab3b8efa9",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{A as justifi_payout_transactions_list}
1
+ import{h as t,r as e,c as a}from"./p-qipqIMyC.js";import{c as i}from"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as s,a as o}from"./p-Cjcsf8ku.js";import{g as r}from"./p-c4Mh3ZZ_.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c as n,J as p}from"./p-BB5-CJF-.js";import{g as d,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-De8UloOS.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as j,g as v,h as T,i as g,j as k,k as C}from"./p-BZ7C9duj.js";import{S as D}from"./p-CLQx9p9q.js";import{T as P}from"./p-CZfYo5-1.js";import{a as I}from"./p-BHf9IqGw.js";import{N as S,O as q}from"./p-RvUQ__Pq.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-pXjOPQhG.js";import"./p-BUa0YOaw.js";import"./p-xY5RkFuA.js";const O={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},B={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},A={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},B[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},I(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},I(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},I(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.updated_at,{showTime:!0})))},F=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=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.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:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,O,A),n(),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.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:i,onSuccess:o,onError:c,final:n})=>{var p;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:s.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=d(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{n()}})({accountId:i.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,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="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,s.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}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"f795f89fe39f8cded7f0d9c671df8e3e86de6f03"},t(u,{key:"5bb5f805a78965068f675012a1a491e5dd3d4416"},t(m,{key:"c75e72fb5bde6b3f8f127be4d76ef1fa66ce6781"},t(b,{key:"3dfb03ed0205f6fff21953e0a4c85e8b151680a1"},t(y,{key:"169156e61bdf1ce6e10b89c660526a7ec9efb860"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"1e59e340e98ace8291acfbe26836e5b2b7b7dd29"},t(w,{key:"3c1a420d293d24ac9434f034c7e6de7a83698b63",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"2038ebb6ff5480d74b0bb6a6ecf31a9531f606ef",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(v,{key:"48582c83e384b4e5ba81c4d0055dc9e727a81cdd",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(g,{key:"0bb2c1f4085278db7b114c8b9c5a11702a1840d1"},t(k,{key:"2cc9fe5d66b433b392da1e0a1ae265db6404002d"},t(C,{key:"cb21e30d68c92758efa03fbd16509ff28ab5e316",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"e5ac8aa63ddb08d7f70976cfceccbadab3b8efa9",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{F as justifi_payout_transactions_list}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CHdklybh.js";import{P as o}from"./p-f0Mcy7rH.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as p}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-mxgDrK6T.js";import{c as m,J as c}from"./p-ZWhv_80v.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-Dph3Ao9s.js";import"./p-BHf9IqGw.js";import"./p-DwBh6VCY.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-C5FfYVaH.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(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
1
+ import{r as t,c as s,h as i}from"./p-qipqIMyC.js";import{P as o}from"./p-De8UloOS.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as p}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-BIPdn2VU.js";import{c as m,J as c}from"./p-BB5-CJF-.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-BUa0YOaw.js";import"./p-BHf9IqGw.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-pXjOPQhG.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(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
@@ -0,0 +1 @@
1
+ import{h as e,r as i,H as a}from"./p-qipqIMyC.js";import{S as t}from"./p-Xv8DuU3Y.js";import{w as s,c}from"./p-Bp_QFeog.js";import{b as r}from"./p-BHf9IqGw.js";import"./p-RvUQ__Pq.js";import"./p-DsAwPf2y.js";import"./p-HXpYMWUU.js";const d=i=>{const{isReady:a}=i;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"mb-3"},e(t,{height:"18px",width:"100px"}),e(t,{height:"36px"})),e("div",{class:"row"},e("div",{class:"col-4 align-content-end"},e(t,{height:"18px",width:"80px"}),e(t,{height:"36px"})),e("div",{class:"col-4 align-content-end"},e(t,{height:"36px"})),e("div",{class:"col-4 align-content-end"},e(t,{height:"18px",width:"30px"}),e(t,{height:"36px"}))))},f=class{constructor(e){i(this,e),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=c.iframeOrigin,this.tabId=r()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((e=>new Promise((i=>{e.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.cardNumberIframeElement.validate(),i=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return e&&i&&a&&t}async tokenize(e,i,a){return this.cardNumberIframeElement.tokenize(e,i,a)}render(){return e(a,{key:"4918918c10e558587e1d356cee9ec8540ed88e1c"},e(d,{key:"e61d11784aa1a9ea84fe9f0544a84f587cdf6fa4",isReady:this.isReady}),e("div",{key:"d0640890482bcb679c0d49e569ed34912aa37426",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"ef3548ee5dcf517f5c31b3aa40fc5ed5f8e37f59",class:"mb-3"},e("iframe-input",{key:"4fa52574bfe8334f3294e45b2e63bf109750f925",inputId:"cardNumber",ref:e=>this.cardNumberIframeElement=e,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),e("div",{key:"5ad5bfe88c1531a74a636e2e07572b8401095ecf",class:"d-flex align-items-start"},e("div",{key:"29d9d3e3c0080243ea44ca7515c690b90bd0d944",class:"flex-fill me-3"},e("iframe-input",{key:"01ebb2a6101d33b08135ac879fce192f57ea822e",inputId:"expirationMonth",ref:e=>this.expirationMonthIframeElement=e,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),e("div",{key:"769c4e873c4062ec90fae3a7b0606e8db49754c0",class:"flex-fill me-3"},e("iframe-input",{key:"a36c705e6f8231f01615ee8a878aa5427a11bcce",inputId:"expirationYear",ref:e=>this.expirationYearIframeElement=e,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),e("div",{key:"2923118dc4ec2f107aad34e0f77ea3d58340a734",class:"flex-fill"},e("iframe-input",{key:"ec3226c1eca1705672e8ea7f80be47ca6f81838b",inputId:"CVV",ref:e=>this.cvvIframeElement=e,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{f as card_form}
@@ -1 +1 @@
1
- import{r as t,c as s,h as a}from"./p-CHdklybh.js";import{T as e,a as i,b as r,c as h,d as o,e as c,f as n,g as p,h as d,i as m,j as f,k as b,l as u}from"./p-UmoEDufy.js";import{T as j}from"./p-CZfYo5-1.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as g}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{t as l,a as y}from"./p-BY5BgAd3.js";import{o as k,g as C}from"./p-BC2AKcRD.js";import"./p-RvUQ__Pq.js";import"./p-CkX-nM5d.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-D8uar3Ri.js";const w=class{constructor(a){t(this,a),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminalOrders=[],this.loading=!0,this.paging=g,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const a=this.terminalOrders.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:a})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalOrdersTable=new e(this.terminalOrders,this.columns,l,y),this.getTerminalOrders&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:s})=>{this.terminalOrders=t,this.paging=s,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:s,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:a})},final:()=>{this.loading=!1}})}get terminalOrderParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return a(u,{key:"a8131df17851ab1468e025932371fa4b97ccc144"},a(i,{key:"0fc81f64fb8a8f138f25c70522d046921edbd094"},a(r,{key:"7cc8be0184008cf08128eb1f241ab670538ecc65"},a(h,{key:"5a7aa37a2b8f02469ca6c703e098da9431c0b45f"},this.terminalOrdersTable.columnData.map((t=>t)))),a(o,{key:"ff32aad8d5c4f319550d47ae1e0f77b617aa3d70"},a(c,{key:"dcc25430c77867a2c9639eba359c0d54cbacb73a",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),a(n,{key:"474ecda7420d595f49777f31910a380b48a8a1bc",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),a(p,{key:"d91e28581823ca91778159914157a003b011caaf",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((t,s)=>a(d,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&a(m,{key:"6dea4a93ab757d35916b9351e4e5fa7f76b4afd9"},a(f,{key:"5098c2d994bb0ba397bc94d7a0e9419b06e582a5"},a(b,{key:"5a8f90708691987f672cde0c102323225568d989",colSpan:this.terminalOrdersTable.columnData.length},a("pagination-menu",{key:"509e53f4c070fc9a8b479dc673c526417aceb5ef",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminalOrders:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as terminal_orders_list_core}
1
+ import{r as t,c as s,h as a}from"./p-qipqIMyC.js";import{T as e,a as i,b as r,c as h,d as o,e as c,f as p,g as n,h as d,i as f,j as m,k as b,l as j}from"./p-BZ7C9duj.js";import{T as u}from"./p-CZfYo5-1.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as g}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{t as l,a as y}from"./p-CaxjN6Uo.js";import{o as k,g as C}from"./p-C3n7-tlg.js";import"./p-RvUQ__Pq.js";import"./p-xY5RkFuA.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-D--yCspA.js";const w=class{constructor(a){t(this,a),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminalOrders=[],this.loading=!0,this.paging=g,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:u.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:u.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const a=this.terminalOrders.find((t=>t.id===s));this.clickEvent.emit({name:u.row,data:a})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalOrdersTable=new e(this.terminalOrders,this.columns,l,y),this.getTerminalOrders&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:s})=>{this.terminalOrders=t,this.paging=s,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:s,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:a})},final:()=>{this.loading=!1}})}get terminalOrderParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return a(j,{key:"a8131df17851ab1468e025932371fa4b97ccc144"},a(i,{key:"0fc81f64fb8a8f138f25c70522d046921edbd094"},a(r,{key:"7cc8be0184008cf08128eb1f241ab670538ecc65"},a(h,{key:"5a7aa37a2b8f02469ca6c703e098da9431c0b45f"},this.terminalOrdersTable.columnData.map((t=>t)))),a(o,{key:"ff32aad8d5c4f319550d47ae1e0f77b617aa3d70"},a(c,{key:"dcc25430c77867a2c9639eba359c0d54cbacb73a",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),a(p,{key:"474ecda7420d595f49777f31910a380b48a8a1bc",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),a(n,{key:"d91e28581823ca91778159914157a003b011caaf",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((t,s)=>a(d,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&a(f,{key:"6dea4a93ab757d35916b9351e4e5fa7f76b4afd9"},a(m,{key:"5098c2d994bb0ba397bc94d7a0e9419b06e582a5"},a(b,{key:"5a8f90708691987f672cde0c102323225568d989",colSpan:this.terminalOrdersTable.columnData.length},a("pagination-menu",{key:"509e53f4c070fc9a8b479dc673c526417aceb5ef",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminalOrders:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as terminal_orders_list_core}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-CHdklybh.js";import{c as t,a as i,F as c}from"./p-DiJD6Iqx.js";import{al as d}from"./p-RvUQ__Pq.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"4d0fbca80a880577be7853efc494807d7d1e2fd9"},a("div",{key:"6c3a82afe01b0812807a8e19dc750d4e9901876a",class:"row gy-3"},a("div",{key:"89e7f50b0c6d67249b892caf8c6b2d78c1742309",class:"col-12"},a("h2",{key:"e0c4db3f5330cdd0e00897da0a54b898f0056f93",class:"h5",part:d},"Additional Evidence")),a("div",{key:"58d4506d4bc0470afa4de87fdcf25ce4397d4180",class:"col-12"},a("form-control-textarea",{key:"aee641d90803d0ff483cfe75d881e3259303d4bc",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"19377eb6382adc9cb69ec57fe7928b7d477110d8",class:"col-12"},a("form-control-file-v2",{key:"9529de236046398904d4780fcedada3a67ce4daf",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"ac10b9b21d37179211d74118b06f561e95d9ea71"},a("div",{key:"8ff525f8ed20828ed153b7dc23cb84a0277b81d4",class:"row gy-3"},a("div",{key:"4f22ed526972a6625dc77b3ab0ab5b074277d7b2",class:"col-12"},a("h2",{key:"d78d54468b91edd99238bd757f871b18ec5b58ca",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"629c9660446cbba8951cd8396d9b72aea71c731b",class:"col-12"},a("form-control-textarea",{key:"60e0b4903e4ddec6915d23617f215d5d2ea20935",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"aec3e4561f880b86ba6f5c7ce0298e45b837c2fd",class:"col-12"},a("form-control-textarea",{key:"e77d126709037cb22e6e4fcf2228652ffeb672ee",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"407c071a0f7a1e488eb2ef4d522e515138a5ed2c",class:"col-12"},a("form-control-file-v2",{key:"15dfacd8e1de439848d12ecec9a0f5ffac259484",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"e09402d1c3ca9bb8f3a243c22bec2e9d908d661f"},a("div",{key:"67a1038f92a9a9711ca37d353af7a06b87cbe0a8",class:"row gy-3"},a("div",{key:"1be2249539c434bf3faf847b4202ff2f421d15a3",class:"col-12"},a("h2",{key:"17d8bc1b31dfa77f08500ff4029f572049d9e1ce",class:"h5",part:d},"Customer Details")),a("div",{key:"3e218b39c8f5dab178cc8b23caf403e1a912694c",class:"col-12"},a("form-control-text",{key:"ab28a2176315c3ecd1ff984a599589a81375f4e0",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"e1739728748de575e39f29018cd1139d75232611",class:"col-12"},a("form-control-text",{key:"9f2aec120b08ac793be93f9c990d81a74c9e57d2",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"9be7e4a85edfc9bc95e8ede96ebc81f4777f1cdb",class:"col-12"},a("form-control-textarea",{key:"100e419cc2064509aaa03c76e2898fc7df85e950",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"94da95bb013738aefb17088203ee14e07f159ae0",class:"col-12"},a("form-control-file-v2",{key:"1ab77a12a715fbb82c0bc1c9f9081e54fd3fef0e",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"88eed9387758b86332137fa64b4e3b3c5825d908",class:"col-12"},a("form-control-file-v2",{key:"0b654ffcf253c639b07ffe03450a87550caaa75a",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"2a51ce4a6859bdd9b6fc3376f08726a682a61587"},a("div",{key:"49765fde2654e0eda955e4569d3003749d04b1a1",class:"row gy-3"},a("div",{key:"9a04ce529407e436c5c7dc363525821116eb3271",class:"col-12"},a("h2",{key:"6d8c1c64da56d19e3adedc08171b7096084adb0b",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"3a4be2ced9e35974864a6fb3504dff58d792e623",class:"col-12"},a("form-control-text",{key:"a3d86e2059a017d931619d1e53a24e60e9f95282",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"407386824a21bc40a802366ebf4c8e0cc2aef908",class:"col-12"},a("form-control-textarea",{key:"c4b5a5026eeffedeae11d9f6fd74ecd4e288894c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"cc4a805b1c5574436a19258007cd3271831e9967",class:"col-12"},a("form-control-file-v2",{key:"49d84e63f7acd6dd953429063fc9206373482d16",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"41d5fd40ac6fc4fffddb7913b647046869882dfd"},a("div",{key:"265d25bbd6423f6514a1bb4fab1574631113783d",class:"row gy-3"},a("div",{key:"e55e31fbfaa88eacd940622551e37951e54aa321",class:"col-12"},a("h2",{key:"710bec9fdf42a7ddedbaed447ab1212bc9d6be9c",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"81ad6d6af441041c0aa0f39c732d528e9d966b61",class:"col-12"},a("form-control-text",{key:"b9a3ae49cc394e28baadec0ca9904e5c25996921",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"53c9b52e9ff3a988805c9e72dca2038ac8cb8483",class:"col-12"},a("form-control-file-v2",{key:"bd2bd5d7131bf7c92a7d11042211a9b7764dbbd7",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"c93f5bc2e64f5e2964eb033cb6c972283841876b"},a("div",{key:"7986f459ba9cc0d7e896a418ba4bd9e51148d36f",class:"row gy-3"},a("div",{key:"ddf033f861a5b91961294600a5d6d7261937711c",class:"col-12"},a("h2",{key:"2a33306859a2982fbb3457831c29a98cd3e86c4f",class:"h5",part:d},"Product & Service Details")),a("div",{key:"385212b08cbdcd4d610c806f1f9b5d18446a9831",class:"col-12"},a("form-control-text",{key:"210a8c07288473e93737e93659dc91e7f813e306",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"5a52ad00db803d2ddd0afe6ee7cde4b907e1ad1a",class:"col-12"},a("form-control-date",{key:"1bdef3f3391b4a97aa3e97aefac3e29b5520f620",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"d4fc75d0f175914e2fbb134e6449e1d45742a9f3",class:"col-12"},a("form-control-file-v2",{key:"62e1ae0f42103f49bc5c93427b62ad90570634f8",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"a300941b5472ab2cfd1dd212fbab4b280c132f73"},a("div",{key:"1f11681c815c4f0676da384884b758b1bd49f3d1",class:"row gy-3"},a("div",{key:"56f1575a5e2c7da5d725ca224b5d64163de0fd23",class:"col-12"},a("h2",{key:"9ccb22c016184f233d1096b66380473a8e62c269",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"e602ac3e5fe3cbd3d12910d66cc8d879295a9e4a",class:"col-12"},a("form-control-textarea",{key:"f6e6dae3ab7d383da16fa5308933a77cf63f11d8",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"8cdb3b28847683f5fd4594eb64522c899e5ef993",class:"col-12"},a("form-control-textarea",{key:"c8e4b7c760cbe8bb9cb30818b0c29f6012092649",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"95c376af4517e3ee23afd64d479a6ae051f03d72",class:"col-12"},a("form-control-file-v2",{key:"dc2ef0d5911dbab2d820bc46563bbb7218390501",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"b9d6ffb85e987f5037e414dde26e72f5219c0ea8",class:"col-12"},a("form-control-file-v2",{key:"c6513b7a2f9d68c2df2be8c21da0d16e03a6a885",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"4556d3dbedce4833b63302f78f467ccf71cce02c"},a("div",{key:"18569ca4c37bbf7b82a13db6c8ae878d0b2c12fa",class:"row gy-3"},a("div",{key:"001f41285eda4237686861df1aaaad24836fbf7c",class:"col-12"},a("h2",{key:"3193324c11f5ca7c81de99cd224e2f8a8d21a43d",class:"h5",part:d},"Shipping Details")),a("div",{key:"e312e8aee070bee2b317dc7f6f9e616dc3cbd26e",class:"col-12"},a("form-control-text",{key:"69a90af0a8c328b7e0eba67d39ac3f2f4ffd3439",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"5c4ca04204a7467918e2e130d6ee437a4c5db85b",class:"col-12"},a("form-control-text",{key:"266415e75633d4d4b5062f56ec43d47e60e03aa1",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"90088259556bbfce03c87af029ea53efc4c394de",class:"col-12"},a("form-control-date",{key:"b5eaf92844540c4536f8296e8668ed7e826dfd1f",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"180c72ec5c37cb7bca2edbf3d158d4973c149084",class:"col-12"},a("form-control-textarea",{key:"924cae54e30cba491dd4ce10bb514a7374a1d793",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"b7f06251c0a03bec0b6622b9d05c7c55d7d6bb13",class:"col-12"},a("form-control-file-v2",{key:"832da84ac1f4822ac882c03d60b169a2351ffb8e",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
1
+ import{r as e,h as a}from"./p-qipqIMyC.js";import{c as t,a as i,F as c}from"./p-CR9D6mKt.js";import{al as d}from"./p-RvUQ__Pq.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"4d0fbca80a880577be7853efc494807d7d1e2fd9"},a("div",{key:"6c3a82afe01b0812807a8e19dc750d4e9901876a",class:"row gy-3"},a("div",{key:"89e7f50b0c6d67249b892caf8c6b2d78c1742309",class:"col-12"},a("h2",{key:"e0c4db3f5330cdd0e00897da0a54b898f0056f93",class:"h5",part:d},"Additional Evidence")),a("div",{key:"58d4506d4bc0470afa4de87fdcf25ce4397d4180",class:"col-12"},a("form-control-textarea",{key:"aee641d90803d0ff483cfe75d881e3259303d4bc",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"19377eb6382adc9cb69ec57fe7928b7d477110d8",class:"col-12"},a("form-control-file-v2",{key:"9529de236046398904d4780fcedada3a67ce4daf",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"ac10b9b21d37179211d74118b06f561e95d9ea71"},a("div",{key:"8ff525f8ed20828ed153b7dc23cb84a0277b81d4",class:"row gy-3"},a("div",{key:"4f22ed526972a6625dc77b3ab0ab5b074277d7b2",class:"col-12"},a("h2",{key:"d78d54468b91edd99238bd757f871b18ec5b58ca",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"629c9660446cbba8951cd8396d9b72aea71c731b",class:"col-12"},a("form-control-textarea",{key:"60e0b4903e4ddec6915d23617f215d5d2ea20935",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"aec3e4561f880b86ba6f5c7ce0298e45b837c2fd",class:"col-12"},a("form-control-textarea",{key:"e77d126709037cb22e6e4fcf2228652ffeb672ee",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"407c071a0f7a1e488eb2ef4d522e515138a5ed2c",class:"col-12"},a("form-control-file-v2",{key:"15dfacd8e1de439848d12ecec9a0f5ffac259484",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"e09402d1c3ca9bb8f3a243c22bec2e9d908d661f"},a("div",{key:"67a1038f92a9a9711ca37d353af7a06b87cbe0a8",class:"row gy-3"},a("div",{key:"1be2249539c434bf3faf847b4202ff2f421d15a3",class:"col-12"},a("h2",{key:"17d8bc1b31dfa77f08500ff4029f572049d9e1ce",class:"h5",part:d},"Customer Details")),a("div",{key:"3e218b39c8f5dab178cc8b23caf403e1a912694c",class:"col-12"},a("form-control-text",{key:"ab28a2176315c3ecd1ff984a599589a81375f4e0",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"e1739728748de575e39f29018cd1139d75232611",class:"col-12"},a("form-control-text",{key:"9f2aec120b08ac793be93f9c990d81a74c9e57d2",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"9be7e4a85edfc9bc95e8ede96ebc81f4777f1cdb",class:"col-12"},a("form-control-textarea",{key:"100e419cc2064509aaa03c76e2898fc7df85e950",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"94da95bb013738aefb17088203ee14e07f159ae0",class:"col-12"},a("form-control-file-v2",{key:"1ab77a12a715fbb82c0bc1c9f9081e54fd3fef0e",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"88eed9387758b86332137fa64b4e3b3c5825d908",class:"col-12"},a("form-control-file-v2",{key:"0b654ffcf253c639b07ffe03450a87550caaa75a",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"2a51ce4a6859bdd9b6fc3376f08726a682a61587"},a("div",{key:"49765fde2654e0eda955e4569d3003749d04b1a1",class:"row gy-3"},a("div",{key:"9a04ce529407e436c5c7dc363525821116eb3271",class:"col-12"},a("h2",{key:"6d8c1c64da56d19e3adedc08171b7096084adb0b",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"3a4be2ced9e35974864a6fb3504dff58d792e623",class:"col-12"},a("form-control-text",{key:"a3d86e2059a017d931619d1e53a24e60e9f95282",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"407386824a21bc40a802366ebf4c8e0cc2aef908",class:"col-12"},a("form-control-textarea",{key:"c4b5a5026eeffedeae11d9f6fd74ecd4e288894c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"cc4a805b1c5574436a19258007cd3271831e9967",class:"col-12"},a("form-control-file-v2",{key:"49d84e63f7acd6dd953429063fc9206373482d16",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"41d5fd40ac6fc4fffddb7913b647046869882dfd"},a("div",{key:"265d25bbd6423f6514a1bb4fab1574631113783d",class:"row gy-3"},a("div",{key:"e55e31fbfaa88eacd940622551e37951e54aa321",class:"col-12"},a("h2",{key:"710bec9fdf42a7ddedbaed447ab1212bc9d6be9c",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"81ad6d6af441041c0aa0f39c732d528e9d966b61",class:"col-12"},a("form-control-text",{key:"b9a3ae49cc394e28baadec0ca9904e5c25996921",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"53c9b52e9ff3a988805c9e72dca2038ac8cb8483",class:"col-12"},a("form-control-file-v2",{key:"bd2bd5d7131bf7c92a7d11042211a9b7764dbbd7",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"c93f5bc2e64f5e2964eb033cb6c972283841876b"},a("div",{key:"7986f459ba9cc0d7e896a418ba4bd9e51148d36f",class:"row gy-3"},a("div",{key:"ddf033f861a5b91961294600a5d6d7261937711c",class:"col-12"},a("h2",{key:"2a33306859a2982fbb3457831c29a98cd3e86c4f",class:"h5",part:d},"Product & Service Details")),a("div",{key:"385212b08cbdcd4d610c806f1f9b5d18446a9831",class:"col-12"},a("form-control-text",{key:"210a8c07288473e93737e93659dc91e7f813e306",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"5a52ad00db803d2ddd0afe6ee7cde4b907e1ad1a",class:"col-12"},a("form-control-date",{key:"1bdef3f3391b4a97aa3e97aefac3e29b5520f620",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"d4fc75d0f175914e2fbb134e6449e1d45742a9f3",class:"col-12"},a("form-control-file-v2",{key:"62e1ae0f42103f49bc5c93427b62ad90570634f8",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"a300941b5472ab2cfd1dd212fbab4b280c132f73"},a("div",{key:"1f11681c815c4f0676da384884b758b1bd49f3d1",class:"row gy-3"},a("div",{key:"56f1575a5e2c7da5d725ca224b5d64163de0fd23",class:"col-12"},a("h2",{key:"9ccb22c016184f233d1096b66380473a8e62c269",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"e602ac3e5fe3cbd3d12910d66cc8d879295a9e4a",class:"col-12"},a("form-control-textarea",{key:"f6e6dae3ab7d383da16fa5308933a77cf63f11d8",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"8cdb3b28847683f5fd4594eb64522c899e5ef993",class:"col-12"},a("form-control-textarea",{key:"c8e4b7c760cbe8bb9cb30818b0c29f6012092649",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"95c376af4517e3ee23afd64d479a6ae051f03d72",class:"col-12"},a("form-control-file-v2",{key:"dc2ef0d5911dbab2d820bc46563bbb7218390501",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"b9d6ffb85e987f5037e414dde26e72f5219c0ea8",class:"col-12"},a("form-control-file-v2",{key:"c6513b7a2f9d68c2df2be8c21da0d16e03a6a885",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"4556d3dbedce4833b63302f78f467ccf71cce02c"},a("div",{key:"18569ca4c37bbf7b82a13db6c8ae878d0b2c12fa",class:"row gy-3"},a("div",{key:"001f41285eda4237686861df1aaaad24836fbf7c",class:"col-12"},a("h2",{key:"3193324c11f5ca7c81de99cd224e2f8a8d21a43d",class:"h5",part:d},"Shipping Details")),a("div",{key:"e312e8aee070bee2b317dc7f6f9e616dc3cbd26e",class:"col-12"},a("form-control-text",{key:"69a90af0a8c328b7e0eba67d39ac3f2f4ffd3439",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"5c4ca04204a7467918e2e130d6ee437a4c5db85b",class:"col-12"},a("form-control-text",{key:"266415e75633d4d4b5062f56ec43d47e60e03aa1",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"90088259556bbfce03c87af029ea53efc4c394de",class:"col-12"},a("form-control-date",{key:"b5eaf92844540c4536f8296e8668ed7e826dfd1f",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"180c72ec5c37cb7bca2edbf3d158d4973c149084",class:"col-12"},a("form-control-textarea",{key:"924cae54e30cba491dd4ce10bb514a7374a1d793",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"b7f06251c0a03bec0b6622b9d05c7c55d7d6bb13",class:"col-12"},a("form-control-file-v2",{key:"832da84ac1f4822ac882c03d60b169a2351ffb8e",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}