@justifi/webcomponents 6.0.0 → 6.0.1
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.
- package/dist/cjs/{Api-CwTLkFY4.js → Api-DdNOMYxI.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/{badge-BmOSt4gS.js → badge-Cp5ap9Ge.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +5 -5
- package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/{business-additional-questions-schema-DNbSH3E-.js → business-additional-questions-schema-b8P-0T0O.js} +2 -2
- package/dist/cjs/business-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{business-identity-schema-CclzWSOn.js → business-identity-schema-aFUle0C9.js} +2 -2
- package/dist/cjs/{business.service-Dkhqyggm.js → business.service-CjsXJOgZ.js} +1 -1
- package/dist/cjs/{button-7c2RN2yp.js → button-BMKiDxGa.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +4 -4
- package/dist/cjs/{check-pkg-version-7FBAUhHw.js → check-pkg-version-C5MyAXgo.js} +2 -2
- package/dist/cjs/{checkout.service-LwZVVgP5.js → checkout.service-o7fi8Z05.js} +1 -1
- package/dist/cjs/{checkout.store-C3f3E24L.js → checkout.store-DrFb05Vr.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +8 -8
- package/dist/cjs/{payments-list-params-state-C4c8UZtP.js → checkouts-list-params-state-CKeoLpqm.js} +1 -1
- package/dist/cjs/{checkouts-table-BQUhZZd_.js → checkouts-table-Ckpk4UMS.js} +2 -2
- package/dist/cjs/{config-state-B_gyIchD.js → config-state-BXCZx6K8.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +1 -1
- package/dist/cjs/{dispute.service-927Gzb0N.js → dispute.service-BANG6pry.js} +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-error-text-DD0dHGu8.js → form-control-error-text-CA6tsCwq.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-help-text-2QwKi78M.js → form-control-help-text-sYroVd4u.js} +1 -1
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +3 -3
- package/dist/cjs/form-control-radio.cjs.entry.js +1 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/{get-payment-details-BSxp1HX0.js → get-payment-details-CqsEtJTg.js} +1 -1
- package/dist/cjs/{get-subaccounts-B31f95PR.js → get-subaccounts-BfiiwPTB.js} +2 -2
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -3
- package/dist/cjs/{header-1-DMsp0XM7.js → header-1-IQ1fI7he.js} +1 -1
- package/dist/cjs/{header-3-BSvFq_IF.js → header-3-CACJFFMS.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +4 -4
- package/dist/cjs/{index-Dyzl8Hn6.js → index-8Prcj64P.js} +2 -13
- package/dist/cjs/{index-D1Ba20gi.js → index-BGUnWLse.js} +1 -1
- package/dist/cjs/{index.esm-BleZSAc0.js → index.esm-ByC0D4sJ.js} +18 -17
- package/dist/cjs/{insurance-state-uWOl6jJN.js → insurance-state-De4RWYBC.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +9 -9
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +7 -7
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +2 -2
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +8 -8
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +13 -13
- package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +15 -15
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +25 -17
- package/dist/cjs/justifi-checkout.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +10 -10
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +7 -7
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +12 -12
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -10
- package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +11 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-BNN5fdIc.js → package-D1CuLdpw.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +6 -6
- package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
- package/dist/cjs/{payment.service-DUq-W7tS.js → payment.service-Bk5f4yNM.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +9 -9
- package/dist/cjs/{payouts-list-params-state-C4c8UZtP.js → payments-list-params-state-CKeoLpqm.js} +1 -1
- package/dist/cjs/{payments-status-3iIQkoov.js → payments-status-B0mynjDF.js} +2 -2
- package/dist/cjs/{payments-table-BSHUQhM-.js → payments-table-Dt_B6-wz.js} +2 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +7 -7
- package/dist/cjs/{payout.service-DoKMr8Xw.js → payout.service-DYm731Kq.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +9 -9
- package/dist/cjs/{terminal-orders-list-params-state-C4c8UZtP.js → payouts-list-params-state-CKeoLpqm.js} +1 -1
- package/dist/cjs/{payouts-status-DoQbxIms.js → payouts-status-MC0n0N1x.js} +2 -2
- package/dist/cjs/{payouts-table-BD_Fhz_j.js → payouts-table-CjJEGkLL.js} +2 -2
- package/dist/cjs/{schema-validations-jek_iZ9W.js → schema-validations-Bj7eYNO8.js} +1 -1
- package/dist/cjs/{skeleton-CuIMC98G.js → skeleton-CMESEszj.js} +1 -1
- package/dist/cjs/{spinner-CMZXdrPe.js → spinner-BePlCbOD.js} +1 -1
- package/dist/cjs/{styled-host-2KXbjOFw.js → styled-host-CvM9RrsT.js} +1 -1
- package/dist/cjs/{table-DlQCUVag.js → table-1JBgqBkL.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +8 -8
- package/dist/cjs/{checkouts-list-params-state-C4c8UZtP.js → terminal-orders-list-params-state-CKeoLpqm.js} +1 -1
- package/dist/cjs/{terminal-orders-table-t6XxNy_K.js → terminal-orders-table-DuvYC2f1.js} +3 -3
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-Iyje71vN.js → terminal.service-B4FQ6roy.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +8 -8
- package/dist/cjs/terminals-list-params-state-CKeoLpqm.js +22 -0
- package/dist/cjs/{terminals-table-BTdKRiBN.js → terminals-table--d49kyCn.js} +2 -2
- package/dist/cjs/{utils-FFP5ZHyE.js → utils-BNjLFSUk.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/services/apple-pay.service.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +13 -5
- package/dist/docs.json +2 -2
- package/dist/esm/{Api-D4tj-h4P.js → Api-CO0DBcUT.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{badge-ChwzCNAF.js → badge-CRAuWlVu.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +4 -4
- package/dist/esm/{business-additional-questions-schema-C6NRHWEL.js → business-additional-questions-schema-9FAJSx_D.js} +2 -2
- package/dist/esm/business-details-core.entry.js +4 -4
- package/dist/esm/{business-identity-schema-D8n5dyLX.js → business-identity-schema-CDJzknbg.js} +2 -2
- package/dist/esm/{business.service-CsbtEDNi.js → business.service-D2tRoPny.js} +1 -1
- package/dist/esm/{button-SAIS_5os.js → button-B2XlI-Uy.js} +1 -1
- package/dist/esm/card-form.entry.js +4 -4
- package/dist/esm/{check-pkg-version-BUkwdVdm.js → check-pkg-version-C_FhqYkP.js} +2 -2
- package/dist/esm/{checkout.service-BCkQ9pOA.js → checkout.service-BPYdgahN.js} +1 -1
- package/dist/esm/{checkout.store-DBvS7cVB.js → checkout.store-DPOk5eUh.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +8 -8
- package/dist/esm/{checkouts-list-params-state-C2_GlMKR.js → checkouts-list-params-state-DmevqV6O.js} +1 -1
- package/dist/esm/{checkouts-table-CItEo0DU.js → checkouts-table-DoHp51it.js} +2 -2
- package/dist/esm/{config-state-Blo0ywwc.js → config-state-Wdyw1F-s.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +1 -1
- package/dist/esm/{dispute.service-CyLtJREK.js → dispute.service-Ct6DFjKt.js} +1 -1
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +3 -3
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/{form-control-error-text-IXJJ4JpV.js → form-control-error-text-Bn_rq8AC.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +2 -2
- package/dist/esm/{form-control-help-text-CuhIsM3v.js → form-control-help-text-CuFo8IR5.js} +1 -1
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +3 -3
- package/dist/esm/form-control-number-masked_2.entry.js +2 -2
- package/dist/esm/form-control-number.entry.js +3 -3
- package/dist/esm/form-control-radio.entry.js +1 -1
- package/dist/esm/form-control-select_2.entry.js +2 -2
- package/dist/esm/{get-payment-details-BuT0QNOo.js → get-payment-details-BGQmxhRw.js} +1 -1
- package/dist/esm/{get-subaccounts-VjY6-x_9.js → get-subaccounts-CYgVR2mk.js} +2 -2
- package/dist/esm/gross-payment-chart-core.entry.js +3 -3
- package/dist/esm/{header-1-zXsamUS3.js → header-1-DWse7nuo.js} +1 -1
- package/dist/esm/{header-3-DVtaUAlf.js → header-3-CSgiRXQA.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +4 -4
- package/dist/esm/{index-qipqIMyC.js → index-CHdklybh.js} +2 -13
- package/dist/esm/{index-ZfXl6Xrm.js → index-DSUeaNWH.js} +1 -1
- package/dist/esm/{index.esm-cYgKOXtz.js → index.esm-IWS0494Y.js} +18 -17
- package/dist/esm/{insurance-state-Dh9f36Qh.js → insurance-state-DD0YD6c0.js} +2 -2
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +9 -9
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +7 -7
- package/dist/esm/justifi-additional-statement_8.entry.js +2 -2
- package/dist/esm/justifi-apple-pay.entry.js +8 -8
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +13 -13
- package/dist/esm/justifi-business-details.entry.js +8 -8
- package/dist/esm/justifi-business-form.entry.js +15 -15
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
- package/dist/esm/justifi-checkout-summary_7.entry.js +25 -17
- package/dist/esm/justifi-checkout.entry.js +8 -8
- package/dist/esm/justifi-checkouts-list-filters.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list.entry.js +11 -11
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +7 -7
- package/dist/esm/justifi-dispute-notification_3.entry.js +10 -10
- package/dist/esm/justifi-gross-payment-chart.entry.js +7 -7
- package/dist/esm/justifi-order-terminals.entry.js +10 -10
- package/dist/esm/justifi-owner-form_3.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +9 -9
- package/dist/esm/justifi-payment-provisioning-core.entry.js +3 -3
- package/dist/esm/justifi-payment-provisioning.entry.js +7 -7
- package/dist/esm/justifi-payment-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payments-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payments-list.entry.js +11 -11
- package/dist/esm/justifi-payout-details.entry.js +8 -8
- package/dist/esm/justifi-payout-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +12 -12
- package/dist/esm/justifi-refund-payment.entry.js +12 -12
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -10
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list.entry.js +9 -9
- package/dist/esm/justifi-terminals-list-filters.entry.js +5 -5
- package/dist/esm/justifi-terminals-list.entry.js +11 -11
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{package-BBpkkt2-.js → package-DgKuxw6L.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/payment-details-core.entry.js +6 -6
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/{payment.service-QJEmd6Nl.js → payment.service-D3ze0Zdq.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +9 -9
- package/dist/esm/{payments-list-params-state-C2_GlMKR.js → payments-list-params-state-DmevqV6O.js} +1 -1
- package/dist/esm/{payments-status-DDafc8Yr.js → payments-status-DTmQyPO9.js} +2 -2
- package/dist/esm/{payments-table-De3Jb6rY.js → payments-table-CavY9USC.js} +2 -2
- package/dist/esm/payout-details-core.entry.js +7 -7
- package/dist/esm/{payout.service-XxyEr0rj.js → payout.service-WXSktQvI.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +9 -9
- package/dist/esm/{payouts-list-params-state-C2_GlMKR.js → payouts-list-params-state-DmevqV6O.js} +1 -1
- package/dist/esm/{payouts-status-u1eSRz3Q.js → payouts-status-DTXrGUWw.js} +2 -2
- package/dist/esm/{payouts-table-BO-MCzXj.js → payouts-table-3_J-SXvD.js} +2 -2
- package/dist/esm/{schema-validations-DcR1ujuX.js → schema-validations-B9dmY7ME.js} +1 -1
- package/dist/esm/{skeleton-DtpkgjZ6.js → skeleton-rMJsZa0a.js} +1 -1
- package/dist/esm/{spinner-CIXUVK4F.js → spinner-8n0qh4tK.js} +1 -1
- package/dist/esm/{styled-host-CbizlfAU.js → styled-host-DQq-l92c.js} +1 -1
- package/dist/esm/{table-DcRHK_sm.js → table-BUJMzXYe.js} +2 -2
- package/dist/esm/table-filters-menu.entry.js +2 -2
- package/dist/esm/terminal-orders-list-core.entry.js +8 -8
- package/dist/esm/{terminal-orders-list-params-state-C2_GlMKR.js → terminal-orders-list-params-state-DmevqV6O.js} +1 -1
- package/dist/esm/{terminal-orders-table-9nsnrAq8.js → terminal-orders-table-gBU8rU8X.js} +3 -3
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-D2oETGnk.js → terminal.service-DihXdEs3.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +8 -8
- package/dist/esm/terminals-list-params-state-DmevqV6O.js +16 -0
- package/dist/esm/{terminals-table-C6NO2m-t.js → terminals-table-64XluocE.js} +2 -2
- package/dist/esm/{utils-_ckvHjSW.js → utils-BvJW0VpC.js} +1 -1
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/form.js +18 -17
- package/dist/module/justifi-apple-pay.js +1 -1
- package/dist/module/modular-checkout.js +13 -5
- package/dist/module/package.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/webcomponents/p-06413c6f.entry.js +1 -0
- package/dist/webcomponents/{p-246ef4ff.entry.js → p-0c25d57b.entry.js} +1 -1
- package/dist/webcomponents/{p-27fc3ef0.entry.js → p-0e85331b.entry.js} +4 -4
- package/dist/webcomponents/{p-f8cbcbe9.entry.js → p-152436e2.entry.js} +1 -1
- package/dist/webcomponents/{p-df329742.entry.js → p-15e47d22.entry.js} +1 -1
- package/dist/webcomponents/{p-3621a429.entry.js → p-1835e531.entry.js} +1 -1
- package/dist/webcomponents/{p-146de253.entry.js → p-1a198ab4.entry.js} +1 -1
- package/dist/webcomponents/{p-90e43440.entry.js → p-1a41c6ee.entry.js} +1 -1
- package/dist/webcomponents/{p-17f7590c.entry.js → p-1a5f53f4.entry.js} +1 -1
- package/dist/webcomponents/{p-f7690165.entry.js → p-1d917338.entry.js} +1 -1
- package/dist/webcomponents/{p-f5c3f489.entry.js → p-25344f42.entry.js} +1 -1
- package/dist/webcomponents/{p-e2a38ad0.entry.js → p-27f20ccf.entry.js} +1 -1
- package/dist/webcomponents/{p-a71a5e64.entry.js → p-2ca59580.entry.js} +1 -1
- package/dist/webcomponents/{p-e6e96be2.entry.js → p-3013484d.entry.js} +1 -1
- package/dist/webcomponents/{p-7aeb20d2.entry.js → p-318a95e7.entry.js} +1 -1
- package/dist/webcomponents/{p-e79338f9.entry.js → p-357c355e.entry.js} +1 -1
- package/dist/webcomponents/p-35f834e3.entry.js +1 -0
- package/dist/webcomponents/p-38Vv0Nju.js +1 -0
- package/dist/webcomponents/{p-0142114f.entry.js → p-3b01c9c4.entry.js} +1 -1
- package/dist/webcomponents/{p-a90b8b93.entry.js → p-3bb7b07f.entry.js} +1 -1
- package/dist/webcomponents/{p-9fc464eb.entry.js → p-459053e8.entry.js} +1 -1
- package/dist/webcomponents/p-48c4f90a.entry.js +1 -0
- package/dist/webcomponents/{p-1b7926f6.entry.js → p-4c7622ed.entry.js} +1 -1
- package/dist/webcomponents/{p-c16c0cbc.entry.js → p-4d60eadc.entry.js} +1 -1
- package/dist/webcomponents/{p-84043580.entry.js → p-4de4598e.entry.js} +1 -1
- package/dist/webcomponents/p-5170419e.entry.js +1 -0
- package/dist/webcomponents/{p-7c5cd118.entry.js → p-528300cf.entry.js} +1 -1
- package/dist/webcomponents/{p-906fdf0c.entry.js → p-5f4b95f4.entry.js} +1 -1
- package/dist/webcomponents/{p-f6fbd43d.entry.js → p-61980e9a.entry.js} +1 -1
- package/dist/webcomponents/{p-95348ff6.entry.js → p-664c9b1b.entry.js} +1 -1
- package/dist/webcomponents/{p-82781411.entry.js → p-671c059b.entry.js} +1 -1
- package/dist/webcomponents/p-67c9b5a1.entry.js +1 -0
- package/dist/webcomponents/{p-3e320c0d.entry.js → p-6b355861.entry.js} +1 -1
- package/dist/webcomponents/{p-5c477f08.entry.js → p-7576e449.entry.js} +1 -1
- package/dist/webcomponents/p-78c17caf.entry.js +1 -0
- package/dist/webcomponents/{p-4ea83bfd.entry.js → p-80feb885.entry.js} +1 -1
- package/dist/webcomponents/{p-8d3f5638.entry.js → p-85a1f152.entry.js} +1 -1
- package/dist/webcomponents/p-85d82d77.entry.js +1 -0
- package/dist/webcomponents/p-870cee9b.entry.js +1 -0
- package/dist/webcomponents/{p-5c3d8de5.entry.js → p-8b414739.entry.js} +1 -1
- package/dist/webcomponents/{p-558f7967.entry.js → p-8b42eee7.entry.js} +1 -1
- package/dist/webcomponents/{p-bc3cdc7b.entry.js → p-8d507cf3.entry.js} +1 -1
- package/dist/webcomponents/{p-005efe51.entry.js → p-92e9f862.entry.js} +1 -1
- package/dist/webcomponents/{p-44e32f85.entry.js → p-9c110f7a.entry.js} +1 -1
- package/dist/webcomponents/{p-20f036cc.entry.js → p-9fec7ff1.entry.js} +1 -1
- package/dist/webcomponents/{p-D6XirF21.js → p-BB-9jeDZ.js} +1 -1
- package/dist/webcomponents/p-BC2AKcRD.js +1 -0
- package/dist/webcomponents/{p-DCMrHeJI.js → p-BDGiGASo.js} +1 -1
- package/dist/webcomponents/{p-C1xGBPma.js → p-BGRyC6Jk.js} +1 -1
- package/dist/webcomponents/{p-CxzFvTgf.js → p-BSa0NCli.js} +1 -1
- package/dist/webcomponents/{p-CrQgyTRz.js → p-BVHUyJdS.js} +1 -1
- package/dist/webcomponents/{p-CaxjN6Uo.js → p-BY5BgAd3.js} +1 -1
- package/dist/webcomponents/p-BffoVWib.js +1 -0
- package/dist/webcomponents/{p-Bp_QFeog.js → p-BuWHmUFx.js} +1 -1
- package/dist/webcomponents/{p-DSP8qjHL.js → p-C9iide2W.js} +1 -1
- package/dist/webcomponents/p-CHdklybh.js +2 -0
- package/dist/webcomponents/{p-CpKvg1ok.js → p-CIN-y_rT.js} +1 -1
- package/dist/webcomponents/p-CVm_PxHa.js +1 -0
- package/dist/webcomponents/{p-CLQx9p9q.js → p-CXEvc-gI.js} +1 -1
- package/dist/webcomponents/p-CZ27xhGU.js +1 -0
- package/dist/webcomponents/{p-CPVN4dXS.js → p-CZjKnrRR.js} +1 -1
- package/dist/webcomponents/{p-xY5RkFuA.js → p-CkX-nM5d.js} +1 -1
- package/dist/webcomponents/{p-D--yCspA.js → p-D8uar3Ri.js} +1 -1
- package/dist/webcomponents/p-DFEjrRhP.js +1 -0
- package/dist/webcomponents/{p-CzPUMw00.js → p-DFNk_DP8.js} +1 -1
- package/dist/webcomponents/{p-DyOgQlh2.js → p-DWMITBje.js} +1 -1
- package/dist/webcomponents/{p-D-JYHdJ7.js → p-DbpL6AJS.js} +1 -1
- package/dist/webcomponents/p-DcDYb1RC.js +1 -0
- package/dist/webcomponents/p-DgKuxw6L.js +1 -0
- package/dist/webcomponents/p-DhUrfS4M.js +1 -0
- package/dist/webcomponents/{p-CR9D6mKt.js → p-DiJD6Iqx.js} +1 -1
- package/dist/webcomponents/p-Dk0xo1G9.js +1 -0
- package/dist/webcomponents/{p-BUa0YOaw.js → p-Dph3Ao9s.js} +1 -1
- package/dist/webcomponents/p-DrRpEAef.js +1 -0
- package/dist/webcomponents/{p-oGKW57R8.js → p-DrXVtFfH.js} +1 -1
- package/dist/webcomponents/p-DsL9brW-.js +1 -0
- package/dist/webcomponents/{p-DsAwPf2y.js → p-DwBh6VCY.js} +1 -1
- package/dist/webcomponents/{p-CYBR4K2p.js → p-PSJOKMWp.js} +1 -1
- package/dist/webcomponents/{p-BZ7C9duj.js → p-UmoEDufy.js} +1 -1
- package/dist/webcomponents/p-WJLXezN2.js +1 -0
- package/dist/webcomponents/p-a1665817.entry.js +1 -0
- package/dist/webcomponents/{p-9d7b5d07.entry.js → p-a84ca6ce.entry.js} +1 -1
- package/dist/webcomponents/p-ab041aeb.entry.js +1 -0
- package/dist/webcomponents/p-ab0e20cd.entry.js +1 -0
- package/dist/webcomponents/{p-265d0a1d.entry.js → p-acff2899.entry.js} +1 -1
- package/dist/webcomponents/{p-2a43e77f.entry.js → p-ae5bda0f.entry.js} +1 -1
- package/dist/webcomponents/{p-d7555ff1.entry.js → p-b1a310d3.entry.js} +1 -1
- package/dist/webcomponents/p-b40aa9da.entry.js +1 -0
- package/dist/webcomponents/{p-7b103dad.entry.js → p-bc5698fe.entry.js} +1 -1
- package/dist/webcomponents/{p-BdLLGV9t.js → p-c3Fl3YIP.js} +1 -1
- package/dist/webcomponents/{p-cecb65c4.entry.js → p-c53099b1.entry.js} +1 -1
- package/dist/webcomponents/{p-3546a5aa.entry.js → p-c7291c13.entry.js} +1 -1
- package/dist/webcomponents/{p-44d1341c.entry.js → p-c85cc2ca.entry.js} +1 -1
- package/dist/webcomponents/{p-ea2a9a81.entry.js → p-c96feb00.entry.js} +1 -1
- package/dist/webcomponents/{p-D_5McRD_.js → p-cSt1EbTB.js} +1 -1
- package/dist/webcomponents/{p-a928c6fb.entry.js → p-cf78e63a.entry.js} +1 -1
- package/dist/webcomponents/{p-c70e1aac.entry.js → p-d1fd3163.entry.js} +1 -1
- package/dist/webcomponents/{p-3d37045d.entry.js → p-d817d7e4.entry.js} +1 -1
- package/dist/webcomponents/{p-e6516014.entry.js → p-dccdcac8.entry.js} +1 -1
- package/dist/webcomponents/{p-0801324e.entry.js → p-e01fe757.entry.js} +1 -1
- package/dist/webcomponents/p-ed401083.entry.js +1 -0
- package/dist/webcomponents/{p-De8UloOS.js → p-f0Mcy7rH.js} +1 -1
- package/dist/webcomponents/p-f66c183e.entry.js +1 -0
- package/dist/webcomponents/{p-f99e4566.entry.js → p-f912f0bf.entry.js} +1 -1
- package/dist/webcomponents/{p-7cb6cc9f.entry.js → p-fa1da976.entry.js} +1 -1
- package/dist/webcomponents/{p-2246aa69.entry.js → p-fa53a04f.entry.js} +1 -1
- package/dist/webcomponents/{p-0d8fe5f2.entry.js → p-fc7b56c7.entry.js} +1 -1
- package/dist/webcomponents/{p-C_3N7nqh.js → p-hzzlBrP2.js} +1 -1
- package/dist/webcomponents/{p-BIPdn2VU.js → p-mxgDrK6T.js} +1 -1
- package/dist/webcomponents/p-oIQjnSZa.js +1 -0
- package/dist/webcomponents/{p-PgEzcvI6.js → p-tYuXMkCd.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/terminals-list-params-state-C4c8UZtP.js +0 -22
- package/dist/esm/terminals-list-params-state-C2_GlMKR.js +0 -16
- package/dist/webcomponents/p-25484e99.entry.js +0 -1
- package/dist/webcomponents/p-30c414b5.entry.js +0 -1
- package/dist/webcomponents/p-3152c84f.entry.js +0 -1
- package/dist/webcomponents/p-3906296f.entry.js +0 -1
- package/dist/webcomponents/p-406ba650.entry.js +0 -1
- package/dist/webcomponents/p-68329f16.entry.js +0 -1
- package/dist/webcomponents/p-6fdc03bc.entry.js +0 -1
- package/dist/webcomponents/p-6fe79f16.entry.js +0 -1
- package/dist/webcomponents/p-7e04d5af.entry.js +0 -1
- package/dist/webcomponents/p-8467851a.entry.js +0 -1
- package/dist/webcomponents/p-9c4079cc.entry.js +0 -1
- package/dist/webcomponents/p-B4idKqyn.js +0 -1
- package/dist/webcomponents/p-BBpkkt2-.js +0 -1
- package/dist/webcomponents/p-BY2p6Sxk.js +0 -1
- package/dist/webcomponents/p-BguBT6Hn.js +0 -1
- package/dist/webcomponents/p-Bvp7uul3.js +0 -1
- package/dist/webcomponents/p-C3n7-tlg.js +0 -1
- package/dist/webcomponents/p-CQeex56P.js +0 -1
- package/dist/webcomponents/p-CU4XQ3fO.js +0 -1
- package/dist/webcomponents/p-DbX0g1WF.js +0 -1
- package/dist/webcomponents/p-DvZcI6pC.js +0 -1
- package/dist/webcomponents/p-DyDHaG6n.js +0 -1
- package/dist/webcomponents/p-IG_KR8zP.js +0 -1
- package/dist/webcomponents/p-Xv8DuU3Y.js +0 -1
- package/dist/webcomponents/p-a7e40e91.entry.js +0 -1
- package/dist/webcomponents/p-b90999af.entry.js +0 -1
- package/dist/webcomponents/p-c262d10f.entry.js +0 -1
- package/dist/webcomponents/p-fUtq2xDs.js +0 -1
- package/dist/webcomponents/p-qipqIMyC.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a,g as i}from"./p-
|
|
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 +1 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-
|
|
1
|
+
import{r as e,h as t}from"./p-CHdklybh.js";import{r as a}from"./p-RvUQ__Pq.js";import{S as o}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";const s=class{constructor(t){e(this,t)}render(){return t(o,{key:"276e7685b6f5b7430fdac887fa5f270245011f6d",class:"payment-method"},t("div",{key:"032431a1a0e3e97077c84f02288e3e0d1334e230",class:"radio-list-item p-3",part:a,onClick:this.clickHandler,hidden:this.radioButtonHidden},t("form-control-radio",{key:"33a53344736a2a5d8546cbec24cc6c4aaebf7629",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{s as payment_method_option}
|
|
@@ -0,0 +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-cSt1EbTB.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-DgKuxw6L.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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s}from"./p-DwBh6VCY.js";const t={},a={},o=s((()=>t)),{state:c,on:e}=o,p=s((()=>a)),{state:j}=p,r=()=>Object.assign(Object.assign({},c),j),b=()=>{o.reset()};export{b as c,c as f,r as g,e as o,j as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CHdklybh.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c,d as o,e as n,f as p,g as d,h as u,i as f,j as m,k as b,l as g}from"./p-UmoEDufy.js";import{T as j}from"./p-CZfYo5-1.js";import{c as y,a as k}from"./p-DFNk_DP8.js";import{o as l,g as C}from"./p-DFEjrRhP.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-CkX-nM5d.js";import"./p-D8uar3Ri.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=i,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 e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new a(this.checkouts,this.columns,y,k),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"c411d1c3a54fd8a331f0c5cdbae344e231482c0f"},e(r,{key:"21774546f3500612497943869017fa7c712dff7e"},e(h,{key:"c4e745ead905a393ff1b0cd0fba23db2fcc03ad8"},e(c,{key:"88063d0baedd1febe0febcab1ccefc512accfd7d"},this.checkoutsTable.columnData.map((t=>t)))),e(o,{key:"e2534bc13d9e015f127c5396bbe73545d92536b4"},e(n,{key:"0f0958fa87403652880222365cf7f88dd33335cc",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"588bb80d518892791ed2134dd5405940e7c28db7",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"219cce1137232c64b7c9188042c4aaca7e0e91b6",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"16978b3be698ceabd1d19b9eaa3f85c01a862b83"},e(m,{key:"cd26e5b6f03dff77e09dfb4f9962e7601b2e40dc"},e(b,{key:"508008cf682b393549a839453d4b4c2eee1f67a4",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"688702c35e666def509ccb77b88b88ddd5e0d58a",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as checkouts_list_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CHdklybh.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as b,i as f,j as m,k as u,l as g}from"./p-UmoEDufy.js";import{T as l}from"./p-CZfYo5-1.js";import{t as y,a as j}from"./p-c3Fl3YIP.js";import{o as k,g as C}from"./p-DsL9brW-.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-CkX-nM5d.js";import"./p-D8uar3Ri.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:l.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new a(this.terminals,this.columns,y,j),this.getTerminals&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get terminalParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"27022f23dcede378c6a6d16bffb040aa6448f4be"},e(r,{key:"5d369cf93698adb50b843f65c747672abeb74cb4"},e(h,{key:"21173a74ccb82d7c3278157dae4ef3d471dbee5f"},e(o,{key:"43e425567500ff324fd6ed68647a9504df812bf6"},this.terminalsTable.columnData.map((t=>t)))),e(c,{key:"1151ee93144161308f8b27b0172acb32d2096d25"},e(n,{key:"353fb24dfbd941e8bba6f62799e0feea42d05c53",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"daa19b965b5519e766ba8bbb63cfc4327128bf22",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(d,{key:"ee44061fa93cd20a59040a7b3faaeac10a925810",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e(b,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"12cb09495ba8d416fd3593ccae4f205735226ecf"},e(m,{key:"da2e2695e6101193db9f67a0a76ce1ce8abdc646"},e(u,{key:"bffd81b4e90e668caa47813f96ab1a7764fa0f1b",colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"61c268da3402e0675f54515617a6bd2d58834e17",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as terminals_list_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-
|
|
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-cSt1EbTB.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-DgKuxw6L.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 u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const 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{u as justifi_dispute_management}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as r}from"./p-CHdklybh.js";import{A as o}from"./p-Dph3Ao9s.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as p,a}from"./p-D2muobcE.js";import{E as n}from"./p-mxgDrK6T.js";import{c as h,J as c}from"./p-cSt1EbTB.js";import"./p-BuWHmUFx.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-DgKuxw6L.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const h=await r.fetchGrossVolumeChartData(s,t);h.error?e({error:a(h.error),code:p(null===(n=h.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(h.data)}catch(s){const t=p(null==s?void 0:s.code);e({error:a(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s,H as a}from"./p-CHdklybh.js";import{c as i,l as r,b as o,T as h,a as d}from"./p-RvUQ__Pq.js";import{F as c}from"./p-BDGiGASo.js";import"./p-CZfYo5-1.js";const l=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=d),t}render(){return s(a,{key:"2e4a67de83ef5dcd64ff15e1f6fbc125db0d121d"},s("div",{key:"e73d09d041e2152e88917ac65f8a5b5bb7949df4",class:"form-group d-flex flex-column"},s("div",{key:"7c0e2d8be29956e61aaa37bc4575efc595382ce7",class:"d-flex gap-2"},s("label",{key:"1d3692f53203455abacb1addb300549d5d47d8e6",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"e16354b0813c63cd2b21b4185fdd33c0159d9ee3",helpText:this.helpText})),s("input",{key:"bf559dea1bf215276a69833a0d5ff78502043669",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=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-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"df02643ac9a15c675726ccba1bfb2ec45ed2c4bc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{l as form_control_date}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-
|
|
1
|
+
import{r as e,h as a}from"./p-CHdklybh.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-DsL9brW-.js";import{P as l,Q as p,R as o,S as f}from"./p-RvUQ__Pq.js";import{S as c}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{c as d}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:d.connected},{label:"Disconnected",value:d.disconnected},{label:"Unknown",value:d.unknown},{label:"Pending Configuration",value:d.pending_configuration}]}render(){const e=Object.assign({},s);return a(c,{key:"5e6f1e8abcc7cffc26c101160bff40ff5092ff90"},a("table-filters-menu",{key:"6a57cb7deeb0c6927ee557402ef2618a3d3d8a29",params:e,clearParams:r,part:l},a("div",{key:"aaa63156c9603aafbe1b9dd4d4f87670b4e0ab66",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"f76ca827834a98595a98d6bb6f982807506fe240",class:"p-2"},a("form-control-text",{key:"f9acf97e42e3e5f5ee216a10e116ab1aff2e6390",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:p})),a("div",{key:"c4ac977f7433193e7a9c52be483c65cb5f96f214",class:"p-2"},a("form-control-text",{key:"035fc59523056240eea5da7b63d75028278d3102",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:o})),a("div",{key:"ab72f5ef8a0191b1726cd84c36a7cca28a78ecf0",class:"p-2"},a("form-control-select",{key:"4a684c87e04e11f55c59d45a281f7c258fae4f0d",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:f})))))}};export{n as justifi_terminals_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-
|
|
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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,H as e,g as i}from"./p-CHdklybh.js";import{i as r,a as o,b as h,c as n,l}from"./p-RvUQ__Pq.js";import{F as c}from"./p-DrXVtFfH.js";import{F as f}from"./p-BDGiGASo.js";import"./p-CZfYo5-1.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target,a=s.getAttribute("name");this.inputHandler(a,s.value),this.formControlInput.emit({name:a,value:s.value})},this.updateInput=t=>{const s=this.el.querySelector("input");s&&(s.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?h:n}render(){return a(e,{key:"7d3590c5616114610038d95cf45e3aa1f6fca08f"},a("div",{key:"231c16a61a76aa7501df035639a7c2de474a2578",class:"form-group d-flex flex-column"},a("label",{key:"c6736b7830e68c4ebfad4e954510fa7e6f839772",part:l,class:"form-label",htmlFor:this.name},this.label),a("input",{key:"739a6c3f50a684da033e5a2669bb661cd50836a9",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-control is-invalid":"form-control",type:"number",disabled:this.disabled}),a(c,{key:"456c71cb54cf15bf17b2bcf95140d47db9002bce",helpText:this.helpText,name:this.name}),a(f,{key:"55aa4e9d84f0236e9a1b0e27b174f385de2b9537",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,h as i,H as t}from"./p-
|
|
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 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as a}from"./p-
|
|
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 +1 @@
|
|
|
1
|
-
import{h as i,r as e,H as a}from"./p-
|
|
1
|
+
import{h as i,r as e,H as a}from"./p-CHdklybh.js";import{S as t}from"./p-CVm_PxHa.js";import{w as s,c as f}from"./p-BuWHmUFx.js";import{b as c}from"./p-BHf9IqGw.js";import"./p-RvUQ__Pq.js";import"./p-DwBh6VCY.js";import"./p-HXpYMWUU.js";const d=e=>{const{isReady:a}=e;return a?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=f.iframeOrigin,this.tabId=c()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize(i,e,a){return this.cardNumberIframeElement.tokenize(i,e,a)}render(){return i(a,{key:"8a6454e0a16e0a26762627f7a42527ab243c1c7a"},i(d,{key:"ed7386f746518e1ebb62d1bf9bc2e98778d9804e",isReady:this.isReady}),i("div",{key:"f3092bcce1626f04a079ebcf64f0cdf06a7029a8",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"3e211e500bef824aff5b6bf6cdedc99435cacfd4",class:"mb-3"},i("iframe-input",{key:"6ad14a317fd6cad6d6535ba661684e31c325c5ab",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"931e9f1b047ff57c2b37bb2947e29f6708f239d9",class:"d-flex align-items-start"},i("div",{key:"5ca19fbf9047bd6595557890b0bdbbf0d2e65de9",class:"flex-fill me-3"},i("iframe-input",{key:"c99f426b77308b15fcb174e8adbe8c120abc58b5",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"677b8fb8f33a021afda90a8b4e13b5f44b5fe694",class:"flex-fill me-3"},i("iframe-input",{key:"9bcf91464c5f2ca77b339f2fe299db6027aa9f8b",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"9b5c52d9cc5b30eedf522801c3f8f6c0530757ce",class:"flex-fill"},i("iframe-input",{key:"3e73df1c7119193a239fcd2f5212967e109cff83",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as a,H as e}from"./p-
|
|
1
|
+
import{r as t,c as s,h as a,H as e}from"./p-CHdklybh.js";import{b as i,T as o,a as r,c as h,l as c,U as f}from"./p-RvUQ__Pq.js";import{F as n}from"./p-DrXVtFfH.js";import{F as d}from"./p-BDGiGASo.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";const p=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>l(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,a=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(a),this.inputHandler(s,a),this.formControlInput.emit({name:s,value:a})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return a(e,{key:"fdd31eca7047ab022668fd4ad9ebbde3ec691508"},a("div",{key:"fda274a4e96edc22bb99e699faaa91b37b95a856",class:"form-group d-flex flex-column"},a("label",{key:"72e259579224953c92c9df1f7e32cda7344019ac",part:c,class:"form-label",htmlFor:this.name},this.label),a(n,{key:"f548c208758806082639372954d1634cd7202570",name:this.name,helpText:this.helpText}),a("div",{key:"3365f9842f780d2ce8903a798fdf71df7673aae7",class:"input-group"},a("span",{key:"c6f8169b97667ee821ba79aec2ea2e1b0d35e3f6",class:"input-group-text",part:f},"$"),a("input",{key:"d8995e95fd187dda908dbacba511547c13bb4b27",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),a(d,{key:"00127c5cdce079d88a8b902c16d960201ff3bce1",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-
|
|
1
|
+
import{h as t,r as s,c as e}from"./p-CHdklybh.js";import{c as r,a as i,F as o}from"./p-DiJD6Iqx.js";import{f as n}from"./p-BHf9IqGw.js";import"./p-BuWHmUFx.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,j as m}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{B as h}from"./p-BB-9jeDZ.js";import{S as p}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-CIN-y_rT.js";import{m as d}from"./p-Dk0xo1G9.js";import{c as f,J as j}from"./p-cSt1EbTB.js";import{g as v,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-Dph3Ao9s.js";import{S as w}from"./p-CVm_PxHa.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-DwBh6VCY.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-DgKuxw6L.js";const x=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:x(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},C=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],B=b();class A{async postRefund(t,s,e,r){return B.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const I=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),T=()=>t(p,null,t("div",{class:"row gap-5"},t(I,null),t(I,null),t(I,null))),k=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new j(this),this.initializeApi(),this.formController=new o(g())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(g(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new m({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:v(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=v(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new A}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(T,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:C,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(h,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{k as justifi_refund_payment}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-CHdklybh.js";import{P as r}from"./p-CIN-y_rT.js";import{m as p}from"./p-Dk0xo1G9.js";import{E as e}from"./p-mxgDrK6T.js";import{C as o,a as m}from"./p-Cjcsf8ku.js";import{c as a,J as h}from"./p-cSt1EbTB.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-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-D2muobcE.js";import"./p-RvUQ__Pq.js";import"./p-DgKuxw6L.js";const n=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.paymentService=new r,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){a(),this.analytics=new h(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=p({id:this.paymentId,authToken:this.authToken,service:new r}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:m.MISSING_PROPS,severity:o.ERROR}))}render(){return this.errorMessage?e(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{n as justifi_payment_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-
|
|
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-cSt1EbTB.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 j,g as v,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 E}from"./p-RvUQ__Pq.js";import"./p-DwBh6VCY.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DgKuxw6L.js";import"./p-Dph3Ao9s.js";import"./p-CkX-nM5d.js";const q={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")},O={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"},x={id:e=>t("td",{part:E(e.id)},e.id),account_id:e=>t("td",{part:E(e.account_id)},e.account_id),payout_id:e=>t("td",{part:E(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:E(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:E(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:E(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:E(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:E(e.currency)},e.currency),description:e=>t("td",{part:E(e.description)},e.description),source_id:e=>t("td",{part:E(e.source_id)},e.source_id),txn_type:e=>t("td",{part:E(e.txn_type)},O[e.txn_type]),created_at:e=>t("td",{part:E(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:E(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:E(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,q,x),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(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{A as justifi_payout_transactions_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CHdklybh.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as p,e as n,f as c,g as f,h as m,i as d,j as b,k as u,l as j}from"./p-UmoEDufy.js";import{T as y}from"./p-CZfYo5-1.js";import{p as g,a as l}from"./p-CZjKnrRR.js";import{o as k,g as C}from"./p-38Vv0Nju.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-CkX-nM5d.js";import"./p-hzzlBrP2.js";import"./p-D8uar3Ri.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payments=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.payments.find((t=>t.id===s));this.clickEvent.emit({name:y.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.paymentsTable=new a(this.payments,this.columns,g,l),this.getPayments&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:s})=>{this.payments=t,this.paging=s,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get paymentParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"0f667b8996650351ee636d548437217696ba8845"},e(r,{key:"ea49b5f4a53b03525a960954df711f39ee1ec41d"},e(h,{key:"7e06f612e6aa80267abba505c5b44506a907ae1a"},e(o,{key:"561827555ab274f70fe4e2e08442689b82f8b2c9"},this.paymentsTable.columnData.map((t=>t)))),e(p,{key:"a1f724d553ca43fbe20aeeb1bcbedf87e7d5b917"},e(n,{key:"27c9f9e459857cf208f9bcb1a5a81f02fcac0850",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),e(c,{key:"546e87c7198e6b7efaf1dde4dba0e2bc9dd9e4a7",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),e(f,{key:"cbb35d379ac52943549b58128af24f682b53254f",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((t,s)=>e(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(d,{key:"4b8de6a6841bd6f087f8819febd3136742e535eb"},e(b,{key:"cb2f446cd73c72e551378d73d5fb7089bcf9b8a0"},e(u,{key:"01098f6891794529ddfc1d7b1303706313694316",colSpan:this.paymentsTable.columnData.length},e("pagination-menu",{key:"a907422b1d6246570d14862478154465c4ad59c9",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as payments_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-CHdklybh.js";import"./p-BuWHmUFx.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{I as t,a as s}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{f as l,p,c as o}from"./p-DFEjrRhP.js";import{e as r,s as i,p as c}from"./p-RvUQ__Pq.js";import{S as d}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{l[e]=a}}componentWillLoad(){Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode}).forEach((([e,a])=>{a&&(p[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:t.created},{label:"Completed",value:t.completed},{label:"Attempted",value:t.attempted},{label:"Expired",value:t.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:s.ecom},{label:"BNPL",value:s.bnpl}]}render(){const e=Object.assign({},l);return a(d,{key:"5474a09b729c816bafb47101dbf5a25aff92eb1b"},a("table-filters-menu",{key:"92e46a05e67bdf84b74cd644c1b89d0fc4c86af9",params:e,clearParams:o,part:r},a("div",{key:"d8562876f8a0c1d85caa5a298cccdb1143bd7512",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"4162644cf10861d91a79dc07f845dd21a6c8d6a5",class:"p-2"},a("form-control-select",{key:"2b13ef4af25f6ac3865f3b0edde91929655537bf",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||l.status,disabled:!!this.checkoutStatus,part:i})),a("div",{key:"9aee7f453be147b03a548fe9ea9bd9bcc6a233aa",class:"p-2"},a("form-control-select",{key:"8f375d5660c3414e5f3796e02694fa46ed761871",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||l.payment_mode,disabled:!!this.paymentMode,part:c})))))}};export{m as justifi_checkouts_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as c}from"./p-
|
|
1
|
+
import{r as e,c as t,h as c}from"./p-CHdklybh.js";import{W as s,X as a,Y as d}from"./p-RvUQ__Pq.js";const i=class{constructor(c){e(this,c),this.selectedQuantityChange=t(this,"selectedQuantityChange"),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return c("div",{key:"852621f3c36375e9c300201e4405c95501488c6d",class:"rounded shadow-sm card p-2",part:d},c("div",{key:"1695cd25eaf56619ef4cc39d81c11ca9b6a5cd45",class:"d-flex gap-3"},c("div",{key:"9930b0bd8881bc70bc5bdb2b31428980ec83a49b",class:"d-flex align-items-center"},c("img",{key:"ac71b5e64fd9081e8dc9c962cac1e747f2234fc4",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:s})),c("div",{key:"0d575087df793cdeaf7bc04744d60647ea7d563f",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},c("div",{key:"35f18a705ee606a825c8ad7a6ebe449e6941e4e5",class:"row"},c("div",{key:"bf4f916904479fc7abf3167cacd9a655709a5048",class:"col-6 d-flex gap-2"},this.modelName,c("form-control-tooltip",{key:"1a96f19f6f9732c5f8d9dbb2405de2d3f24b142d",helpText:this.description})),c("div",{key:"af1ca75c5134c832d8f64b63833b7494c8c11ca5",class:"col-6 d-flex justify-content-end align-items-center"},c("button",{key:"0d400a00a808c508ba870dc8e37d597581dd86ae",class:"p-0 minus btn",onClick:this.removeUnit,part:a},"-"),c("div",{key:"4348aef4cf19c02c574242f82061087e74e82617",class:"w-25 text-center"},this.selectedQuantity),c("button",{key:"75791dfdb7861bb7c1e4a2dc5376bceb12a19009",class:"p-0 plus btn",onClick:this.addUnit,part:a},"+"))))))}};export{i as terminal_quantity_selector}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as e,H as s}from"./p-
|
|
1
|
+
import{r as a,h as e,H as s}from"./p-CHdklybh.js";import{E as c}from"./p-CLHwhyvu.js";import{a8 as t,a9 as i,aa as b,ab as d,ac as f}from"./p-RvUQ__Pq.js";const n=class{constructor(e){a(this,e),this.paging=c,this.params={}}render(){return e(s,{key:"7b821154b627026ef8624af6e4759e2176004676"},e("nav",{key:"7990aee285d0cc3e6f83cb59bb216439e5364df5","aria-label":"Table pagination",class:"d-flex justify-content-end gap-3"},e("ul",{key:"02c68163934ce1aabf4abd607cc28e549e20ebe1",class:"pagination m-0"},e("li",{key:"aab661ae85fc61eecd230d058f135483796769c0",class:"page-item "+(this.paging.has_previous?"":" disabled")},e("button",{key:"ef42a41831a9890186c333418b161877761674e1",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickPrevious(this.paging.start_cursor)},part:this.paging.has_previous?t:i},e("span",{key:"a898a92687e4a5fec37d9dab4208430260a9f274",class:"me-1",part:b},"«"),e("span",{key:"ecc2eeedc064d405ad178b9a98ed088e12f1b2fb",part:d},"Previous"))),e("li",{key:"56569cd9f9803ead8b1180e2f982a98d7009be1f",class:"page-item "+(this.paging.has_next?"":" disabled")},e("button",{key:"c39d389ab89609e8ce11b3dd81eb5c4a50d3521f",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickNext(this.paging.end_cursor)},part:this.paging.has_next?t:i},e("span",{key:"6a01458a048a524931b03df6a964fa4a0ac403ac",part:d},"Next"),e("span",{key:"f4cb3d084647c00dff30b99f751180564463443f",class:"ms-1",part:f},"»"))))))}};export{n as pagination_menu}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CHdklybh.js";import{c as i,d as r,e as a}from"./p-5aA7gjr5.js";import{I as o}from"./p-WJLXezN2.js";import{F as d}from"./p-DiJD6Iqx.js";import{O as h}from"./p-BlJnA265.js";import{i as c}from"./p-tYuXMkCd.js";import{B as n}from"./p-BB-9jeDZ.js";import{V as f}from"./p-RvUQ__Pq.js";import"./p-CZfYo5-1.js";import{B as l}from"./p-XYgDHrVL.js";import{S as m,P as b}from"./p-B-iV5cYd.js";import{u,a as p,b as y}from"./p-1ydcg9ti.js";import"./p-Cjcsf8ku.js";import"./p-D2muobcE.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-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BFTU3MAI.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-PSJOKMWp.js";import"./p-yH3TC3ZQ.js";const k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event")}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:e}){this.coreComponent.validateAndSubmit({onSuccess:e})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=i({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.patchOwner=r({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.postOwner=a({authToken:this.authToken,service:new o}))}render(){return s("owner-form-core",{key:"07ad7cd2bb38442dc591c9e3421223294690ee8c",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,ref:e=>this.coreComponent=e})}},j=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.formLoading=t(this,"formLoading"),this.ownerSubmitted=t(this,"ownerSubmitted"),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:e=>{this.instantiateOwner(e.data)},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({message:e,errorCode:t,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((e=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:t=>{this.ownerSubmitted.emit({id:t.data.id}),this.instantiateOwner(t.data),e(!0)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:t=>{this.ownerSubmitted.emit({id:t.data.id}),this.instantiateOwner(t.data),e(!0)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async e=>{this.owner=Object.assign({},new h(e)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?l.updateOwner:l.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:l.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(e){e.preventDefault(),await this.validate()&&this.submit()}get payload(){let e=new h(this.formController.values.getValue()).payload;return this.ownerId?e:Object.assign(Object.assign({},e),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new d(c("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e)))}render(){return s("form",{key:"570c20c1fdf79268e6c8193a393515c8602a3a44",onSubmit:this.validateAndSubmit},s("fieldset",{key:"f4f75a735438baef254d4578b779ca16e5080a41"},s("legend",{key:"dc0c83a7ada9f908afec56d7560f7d9d116baa40",class:"fw-semibold fs-5",part:f},this.formTitle),s("br",{key:"5d97c0b38073618aef80ff9576cd57ab0e70d44e"}),s("div",{key:"b15a207a4c4afc1249ce3b8a381e7b57ceb32e7a",class:"row gy-3"},s("owner-form-inputs",{key:"21bd3e9b00580e7293338ad746c189d19ac3d98e",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController}),s("div",{key:"b4653d9b78094b15bfba61e3a18ea3703dc53162",class:"d-flex gap-2 justify-content-start"},s(n,{key:"0328aa7af6e3c2f7ed8aa16724dedcb576bb9870",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(n,{key:"e42671667156149d5424243eef1d6675a3bd6506",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"ee7bf4cdb63cdc31df8b307ffb1772e5c0f0348c"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},w=class{constructor(t){e(this,t),this.inputHandler=(e,t)=>{u(this.formController,{[e]:t})},this.onAddressFormUpdate=e=>{p(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){return s("div",{key:"86abe1713fdfd297e88c1fc1734fadb2c9eab966",class:"row gy-3"},s("div",{key:"63a03271f2a777d4cede3b0790e11c7f4108797f",class:"col-12 col-md-8"},s("form-control-text",{key:"b86dd9184dbf50e00e047a733ff708526e32d6dc",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"c3850b7425ca0d8a118a6b78933f3a2fbe343124",class:"col-12 col-md-4"},s("form-control-text",{key:"f1f6e801eb36bcae5f2e51f8cd4ea9b7ed6a34a8",name:"title",label:"Title",defaultValue:this.ownerDefaultValue.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"b07a8a86dbdef296c9438953ef311ccae3aed23c",class:"col-12 col-md-6"},s("form-control-text",{key:"714ca04b0bf0e5ed1b116b8f4963ba12f7fd6b77",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"46c11c80bb58d0190ff05f1e87ba962443b07c59",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"6da40db9fb8b3e4f3a744cd0426f4e6436350594",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:b.US})),s("div",{key:"0960ea2fb399d0098caeabf45347a89c74066f57",class:"col-12 col-md-4"},s("form-control-date",{key:"fe0891a3f42c093d70db1dd1d1a7e121ba3091c1",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>y(e,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"e7cbc519fa6f4fa5b03a0d0b69c7d7f1c42185ff",class:"col-12 col-md-8"},s("form-control-number-masked",{key:"cf2b280c1560bd1a9f80cf81c1543d41bd807233",name:"identification_number",label:"SSN",defaultValue:this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:m,helpText:"Enter your full Social Security Number. It is required for Federal OFAC check."})),s("div",{key:"1755c849992bfd9f459b65b4cf7e967039fdbe27",class:"col-12"},s("justifi-identity-address-form",{key:"ac5372d4a9fad8ee3cfe2af20c11868e8753cc35",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate})))}};export{k as justifi_owner_form,j as owner_form_core,w as owner_form_inputs}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as n}from"./p-CHdklybh.js";import{A as s}from"./p-Dph3Ao9s.js";import{S as i}from"./p-CXEvc-gI.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-CVm_PxHa.js";import{c as a}from"./p-BVHUyJdS.js";import"./p-BuWHmUFx.js";import"./p-DwBh6VCY.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-RvUQ__Pq.js";import"./p-DCIW8z1f.js";var l,r,p,c,h;!function(e){e.STATUS_SUCCESS="STATUS_SUCCESS",e.STATUS_FAILURE="STATUS_FAILURE"}(l||(l={})),function(e){e.PLAIN="plain",e.BUY="buy",e.SET_UP="set-up",e.DONATE="donate",e.CHECK_OUT="check-out",e.BOOK="book",e.SUBSCRIBE="subscribe"}(r||(r={})),function(e){e.BLACK="black",e.WHITE="white",e.WHITE_OUTLINE="white-outline"}(p||(p={})),function(e){e.SUPPORTS_3DS="supports3DS",e.SUPPORTS_EMV="supportsEMV",e.SUPPORTS_CREDIT="supportsCredit",e.SUPPORTS_DEBIT="supportsDebit"}(c||(c={}));class d{constructor(e){this.merchantIdentifier=e.merchantIdentifier,this.displayName=e.displayName,this.initiative=e.initiative,this.initiativeContext=e.initiativeContext,this.buttonType=e.buttonType||r.PLAIN,this.buttonStyle=e.buttonStyle||p.BLACK,this.buttonLocale=e.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class y{constructor(e){this.countryCode=e.countryCode,this.currencyCode=e.currencyCode,this.merchantCapabilities=e.merchantCapabilities,this.supportedNetworks=e.supportedNetworks,this.total=e.total,this.lineItems=e.lineItems,this.shippingMethods=e.shippingMethods,this.applicationData=e.applicationData,this.supportedCountries=e.supportedCountries}get isValid(){var e,t,n,s;return!!(this.countryCode&&this.currencyCode&&(null===(e=this.merchantCapabilities)||void 0===e?void 0:e.length)&&(null===(t=this.supportedNetworks)||void 0===t?void 0:t.length)&&(null===(n=this.total)||void 0===n?void 0:n.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class u{static isApplePaySupported(){var e;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.supportsVersion(3))}static canMakePayments(){var e;return this.isApplePaySupported()&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(e){var t;if(!this.isApplePaySupported())return!1;try{return await(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePaymentsWithActiveCard(e))||!1}catch(e){return console.error("Error checking Apple Pay active card:",e),!1}}static formatAmount(e){return(e/100).toFixed(2)}static parseAmount(e){return Math.round(100*parseFloat(e))}static createLineItem(e,t,n="final"){return{label:e,amount:this.formatAmount(t),type:n}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[c.SUPPORTS_3DS,c.SUPPORTS_EMV,c.SUPPORTS_CREDIT,c.SUPPORTS_DEBIT]}}!function(e){e.UNAVAILABLE="UNAVAILABLE",e.SESSION_ERROR="SESSION_ERROR",e.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",e.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",e.USER_CANCELLED="USER_CANCELLED"}(h||(h={}));class v{constructor(){this.api=s()}initialize(e){if(this.applePayConfig=new d(e),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(e,t){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:e,headers:{"Sub-Account":t}})}catch(e){throw console.error("Backend validation failed:",e),new Error("Merchant validation failed")}}async processPayment(e,t,n){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:e,body:n,headers:{"Sub-Account":t}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return u.isApplePaySupported()&&u.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await u.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(e,t,n){if(console.groupCollapsed("[ApplePayService] startPaymentSession called"),console.log("[ApplePayService] raw paymentRequest:",JSON.stringify(e,null,2)),console.log("[ApplePayService] has authToken:",Boolean(t)),console.log("[ApplePayService] accountId:",n),console.log("[ApplePayService] has config:",Boolean(this.applePayConfig)),!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),console.groupEnd(),new Error("Apple Pay not initialized. Call initialize() first.");const s=new y(e);if(console.log("[ApplePayService] created ApplePayPaymentRequest:",s),!s.isValid){const e=[];throw s.countryCode||e.push("countryCode"),s.currencyCode||e.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||e.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||e.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||e.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",e),console.groupEnd(),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((e,i)=>{try{if(console.log("[ApplePayService] About to instantiate ApplePaySession"),"undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),console.groupEnd(),i({success:!1,error:{code:h.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),console.log("[ApplePayService] ApplePaySession instantiated:",this.currentSession),this.setupSessionEventHandlers(e,i,t,n),console.log("[ApplePayService] Event handlers set. Beginning session..."),this.currentSession.begin(),console.log("[ApplePayService] Session.begin() called"),console.groupEnd()}catch(e){console.error("[ApplePayService] Exception while starting session:",e),console.groupEnd(),i({success:!1,error:{code:h.SESSION_ERROR,message:e instanceof Error?e.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(e,t,n,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{console.groupCollapsed("[ApplePayService] onvalidatemerchant");try{if(console.log("[ApplePayService] accountId:",s),!n)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const e=await this.validateMerchant(n,s);console.log("[ApplePayService] merchantSession received");try{this.currentSession.completeMerchantValidation(e),console.log("[ApplePayService] completeMerchantValidation called")}catch(e){throw console.error("Error calling completeMerchantValidation:",e),e}}catch(e){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.abort(),t({success:!1,error:{code:h.MERCHANT_VALIDATION_ERROR,message:e instanceof Error?e.message:"Merchant validation failed"}})}console.groupEnd()},this.currentSession.onpaymentauthorized=async i=>{var o;console.groupCollapsed("[ApplePayService] onpaymentauthorized");try{const a=i.payment;console.log("[ApplePayService] payment payload snapshot:",{hasToken:Boolean(null==a?void 0:a.token),tokenType:(null===(o=null==a?void 0:a.token)||void 0===o?void 0:o.paymentData)?"paymentData":"raw"});const r=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:u.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}});console.log("[ApplePayService] paymentPayload prepared");const p=await this.processPayment(n,s,r);console.log("[ApplePayService] processPayment result:",p),p.success?(this.currentSession.completePayment({status:l.STATUS_SUCCESS}),console.log("[ApplePayService] Payment success; resolving"),e({success:!0,token:a.token,paymentMethodId:p.data.id})):(console.error("PSP reported payment failure:",p.data),this.currentSession.completePayment({status:l.STATUS_FAILURE}),t({success:!1,error:{code:h.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(e){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.completePayment({status:l.STATUS_FAILURE}),t({success:!1,error:{code:h.PAYMENT_PROCESSING_ERROR,message:e instanceof Error?e.message:"Payment processing failed"}})}finally{console.log("[ApplePayService] Cleaning up session state"),this.currentSession=void 0,this.currentPaymentRequest=void 0}console.groupEnd()},this.currentSession.onpaymentmethodselected=()=>{console.groupCollapsed("[ApplePayService] onpaymentmethodselected");const e={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(e),console.log("[ApplePayService] completePaymentMethodSelection called")}catch(e){console.error("Error completing payment method selection:",e),this.currentSession.abort()}console.groupEnd()},this.currentSession.onshippingmethodselected=()=>{console.groupCollapsed("[ApplePayService] onshippingmethodselected"),this.currentSession.completeShippingMethodSelection({status:l.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]}),console.log("[ApplePayService] completeShippingMethodSelection called"),console.groupEnd()},this.currentSession.oncancel=e=>{if(console.groupCollapsed("[ApplePayService] oncancel"),e.sessionError)switch(console.error(e.sessionError),e.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",e.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:h.USER_CANCELLED,message:"User cancelled the Apple Pay session"}}),console.groupEnd()},"onerror"in this.currentSession&&(this.currentSession.onerror=e=>{console.groupCollapsed("[ApplePayService] onerror"),console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",e),this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:h.SESSION_ERROR,message:"Apple Pay session error occurred"}}),console.groupEnd()})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(e,t,n="US",s="USD"){return{countryCode:n,currencyCode:s,merchantCapabilities:u.getDefaultMerchantCapabilities(),supportedNetworks:u.getDefaultSupportedNetworks(),total:u.createLineItem(t,e)}}getApplePayConfig(){return this.applePayConfig}}const m=t=>{const{isLoading:n}=t;return n?e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-center"},e(o,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},b=t=>e("div",{class:"apple-pay-button-container"},e("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case p.WHITE:e+=" apple-pay-button-white";break;case p.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case r.BUY:e+=" apple-pay-button-type-buy";break;case r.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width||"200px",height:t.height||"48px"},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&e("div",{class:"processing-overlay"},e("div",{class:"spinner"}),e("span",null,"Processing..."))),e("style",null,"\n .apple-pay-button-container {\n display: inline-block;\n position: relative;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),P=class{constructor(e){t(this,e),this.applePayStarted=n(this,"applePayStarted"),this.applePayCompleted=n(this,"applePayCompleted"),this.applePayCancelled=n(this,"applePayCancelled"),this.applePayError=n(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=r.PLAIN,this.buttonStyle=p.BLACK,this.disabled=!1,this.showSkeleton=!0,this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var e,t;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit(),console.groupCollapsed("[ApplePay Component] handleApplePayClick"),console.log("[ApplePay Component] click context:",{isProcessing:this.isProcessing,disabled:this.disabled,isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasService:Boolean(this.applePayService)});const n={countryCode:this.countryCode,currencyCode:a.paymentCurrency,merchantCapabilities:u.getDefaultMerchantCapabilities(),supportedNetworks:u.getDefaultSupportedNetworks(),total:u.createLineItem(a.paymentDescription,a.paymentAmount)};console.log("[ApplePay Component] paymentRequest",n),console.log("[ApplePay Component] identifiers snapshot:",{authTokenLength:a.authToken?String(a.authToken).length:0,accountId:a.accountId});const s=await this.applePayService.startPaymentSession(n,a.authToken,a.accountId);console.log("[ApplePay Component] startPaymentSession result",s),s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(e=s.error)||void 0===e?void 0:e.message)||"Payment failed",code:(null===(t=s.error)||void 0===t?void 0:t.code)||P.ErrorCode.PAYMENT_FAILED}))}catch(e){const t=e instanceof Error?e.message:"Payment failed";this.error=t,this.applePayError.emit({error:t,code:P.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:t})}finally{this.isProcessing=!1,console.groupEnd()}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,console.groupCollapsed("[ApplePay Component] initializeApplePay"),console.log("[ApplePay Component] checkout state snapshot:",{paymentAmount:a.paymentAmount,paymentCurrency:a.paymentCurrency,hasAuthToken:Boolean(a.authToken),accountId:a.accountId}),!(Boolean(a.paymentAmount)&&Boolean(a.paymentCurrency)&&Boolean(a.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:a.paymentAmount,paymentCurrency:a.paymentCurrency,hasAuthToken:Boolean(a.authToken),accountId:a.accountId}),this.applePayError.emit({error:this.error,code:P.ErrorCode.CONFIG_ERROR}),this.isLoading=!1,void console.groupEnd();if(this.isAvailable=u.isApplePaySupported(),this.canMakePayments=u.canMakePayments(),console.log("[ApplePay Component] support check:",{isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasApplePaySessionOnWindow:"undefined"!=typeof window&&"ApplePaySession"in window}),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:P.ErrorCode.NOT_SUPPORTED}),this.isLoading=!1,void console.groupEnd();if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:P.ErrorCode.NOT_AVAILABLE}),this.isLoading=!1,void console.groupEnd();const e={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};console.log("[ApplePay Component] initializing service with config:",e),this.applePayService=new v,this.applePayService.initialize(e),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(e){console.error("Apple Pay initialization error:",e),this.error=e instanceof Error?e.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:P.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1,console.groupEnd()}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?u.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return e(i,{key:"0610b810bc458f7382bb78ebe155e38cd39d7023"},a.checkoutLoaded&&e("script",{key:"036ba823079bb6daa62e72a8ee76cdc32dab60f0",async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{console.log("[ApplePay Component] Apple Pay SDK script loaded"),this.initializeApplePay()}}),e("div",{key:"f5211ca2212306b7ee99dc1f6f06f56a9aa08643",class:"apple-pay-container"},e(m,{key:"bb4680ed4760d378237d36dd60e76d2db9cf0dd4",isLoading:this.isLoading}),t&&e(b,{key:"6c984f15b8ef2e629325253428c8243935328050",buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick})),e("style",{key:"670fcfa28ea2405f772238add126525ecb14841b"},"\n .apple-pay-container {\n width: 100%;\n }\n "))}};P.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};export{P as justifi_apple_pay}
|