@justifi/webcomponents 6.12.2 → 6.12.4
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/{Analytics-C1Wd9OW4.js → Analytics-BERGweGK.js} +2 -3
- package/dist/cjs/{Plaid-BlSGeGpn.js → Plaid-BRSyOOuw.js} +60 -4
- package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +151 -19
- package/dist/cjs/{justifi-additional-statement_8.cjs.entry.js → additional-statement_8.cjs.entry.js} +24 -24
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-identity-schema-DWWtSiUF.js → business-identity-schema-DI9XFbaD.js} +67 -0
- package/dist/cjs/{business.service-BheJs82v.js → business.service-Z9OACEQL.js} +1 -2
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-DMXmPDqZ.js → check-pkg-version-ByKpJklZ.js} +1 -1
- package/dist/cjs/{checkout.service-DZKdHQQq.js → checkout.service-BZOyqXgW.js} +1 -2
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/{justifi-dispute-notification_3.cjs.entry.js → dispute-notification_2.cjs.entry.js} +67 -90
- package/dist/cjs/{event-types-BWQT2lwu.js → event-types-AU1B76Vm.js} +30 -0
- package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_2.cjs.entry.js +89 -0
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-CKC1P4Qs.js → get-business-aR-C83KX.js} +6 -3
- package/dist/cjs/{get-payment-details-DL5FmIyF.js → get-payment-details-dwhA02Zl.js} +2 -3
- package/dist/cjs/{get-subaccounts-CVK4O7th.js → get-subaccounts-B1jmSa2d.js} +2 -3
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +12 -13
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -6
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +7 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +10 -12
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +190 -27
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +65 -18
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11071 -23
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -17
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -8
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -11
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -10
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -8
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -6
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +178 -24
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CRaVpb0w.js → package-B6L3zyfG.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-BO7dzIm1.js → payment-provisioning-actions-BiSpysjW.js} +2 -2
- package/dist/cjs/{payment.service-sZKlg2Jq.js → payment.service-ByrgA_QZ.js} +1 -2
- package/dist/cjs/{payout.service-BcQVsMCS.js → payout.service-CnQm_BpU.js} +1 -2
- package/dist/cjs/{payouts-status-CwgOMz-S.js → payouts-status-AuS3Mp0V.js} +2 -2
- package/dist/cjs/{plaid.service-BcgO2VXC.js → plaid.service-Dlb8EUR8.js} +1 -2
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-CjMMWSh3.js → terminal.service-BdwHQ3Vv.js} +1 -2
- package/dist/cjs/{utils-DbTucCTO.js → utils-FVGp6se3.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/actions/business/get-business.js +4 -1
- package/dist/collection/api/Terminal.js +1 -1
- package/dist/collection/collection-manifest.json +10 -16
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -2
- package/dist/collection/components/business-forms/owner-form/owner-form.js +226 -12
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +166 -16
- package/dist/collection/components/dispute-management/{justifi-dispute-notification.js → dispute-notification.js} +5 -6
- package/dist/collection/components/dispute-management/dispute-response/{justifi-additional-statement.js → additional-statement.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-cancellation-policy.js → cancellation-policy.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-customer-details.js → customer-details.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{dispute-response-core.js → dispute-response.js} +105 -77
- package/dist/collection/components/dispute-management/dispute-response/{justifi-duplicate-charge.js → duplicate-charge.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-electronic-evidence.js → electronic-evidence.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-product-or-service.js → product-or-service.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-refund-policy.js → refund-policy.js} +3 -3
- package/dist/collection/components/dispute-management/dispute-response/{justifi-shipping-details.js → shipping-details.js} +3 -3
- package/dist/collection/components/dispute-management/justifi-dispute-management.js +78 -11
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/justifi-gross-payment-chart.js +79 -15
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/order-terminals/justifi-order-terminals.js +4 -3
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
- package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +134 -10
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +5763 -6945
- package/dist/esm/{Analytics-qafLCOEU.js → Analytics-B1bQP71R.js} +2 -3
- package/dist/esm/{Plaid-BuKEVgbB.js → Plaid-l6nNIjab.js} +58 -3
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/additional-questions-form-step_14.entry.js +156 -24
- package/dist/esm/additional-questions_5.entry.js +2 -2
- package/dist/esm/{justifi-additional-statement_8.entry.js → additional-statement_8.entry.js} +19 -19
- package/dist/esm/{badge-B6dp1XGV.js → badge-Dlcl9qdm.js} +1 -1
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +4 -4
- package/dist/esm/bank-account-read-only-value.entry.js +1 -1
- package/dist/esm/business-identity-schema-D-Nk9aGV.js +163 -0
- package/dist/esm/{business.service-BPbZ5fxQ.js → business.service-C31wbMVs.js} +1 -2
- package/dist/esm/{button-DRdaAudE.js → button-BvzOzV4l.js} +1 -1
- package/dist/esm/card-form.entry.js +4 -4
- package/dist/esm/{check-pkg-version-BJtCbzf9.js → check-pkg-version-CNwUC4SV.js} +1 -1
- package/dist/esm/{checkout.service-CJMfFKyS.js → checkout.service-cVdOGDuI.js} +1 -2
- package/dist/esm/{country-config-P042rrI3.js → country-config-B_fuF6JU.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +3 -3
- package/dist/esm/{justifi-dispute-notification_3.entry.js → dispute-notification_2.entry.js} +68 -90
- package/dist/esm/{event-types-Bg2SZArf.js → event-types-DalU_6SB.js} +29 -1
- package/dist/esm/form-address-fields_3.entry.js +5 -5
- package/dist/esm/form-control-checkbox.entry.js +3 -3
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-DVedKyhp.js → form-control-error-text-Di9QePY5.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/form-control-file.entry.js +4 -4
- package/dist/esm/{form-control-help-text-D-349cNw.js → form-control-help-text-DGMpMuAm.js} +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number_2.entry.js +86 -0
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_2.entry.js +6 -6
- package/dist/esm/{get-business-DpFRs5dE.js → get-business-Gg6qn5on.js} +6 -3
- package/dist/esm/{get-payment-details-DjBou5Fu.js → get-payment-details-BiWgSJau.js} +2 -3
- package/dist/esm/{get-subaccounts-CgDWE_5o.js → get-subaccounts-CkjZeR9U.js} +2 -3
- package/dist/esm/{header-1-Bl7MHW0w.js → header-1-evYxFIGN.js} +1 -1
- package/dist/esm/{header-3-C7JJVnMG.js → header-3-BUDap2xY.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +7 -7
- package/dist/esm/{index.esm-BHdVU4hV.js → index.esm-CgNcFueq.js} +1 -1
- package/dist/esm/{insurance-state-qTdpe84i.js → insurance-state-CLGc1-_4.js} +1 -1
- package/dist/esm/internal-button.entry.js +3 -3
- package/dist/esm/justifi-apple-pay_11.entry.js +17 -18
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -6
- package/dist/esm/justifi-bank-account-form.entry.js +5 -6
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +10 -11
- package/dist/esm/justifi-business-form.entry.js +15 -17
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +5 -6
- package/dist/esm/justifi-checkout.entry.js +5 -6
- package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
- package/dist/esm/justifi-checkouts-list.entry.js +190 -27
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +64 -17
- package/dist/esm/justifi-gross-payment-chart.entry.js +11071 -23
- package/dist/esm/justifi-order-terminals.entry.js +14 -14
- package/dist/esm/justifi-payment-details.entry.js +20 -21
- package/dist/esm/justifi-payment-provisioning.entry.js +11 -12
- package/dist/esm/justifi-payment-transactions-list.entry.js +10 -11
- package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +12 -13
- package/dist/esm/justifi-payout-details.entry.js +15 -16
- package/dist/esm/justifi-payout-transactions-list.entry.js +10 -11
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -5
- package/dist/esm/justifi-payouts-list.entry.js +13 -14
- package/dist/esm/justifi-refund-payment.entry.js +11 -12
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -9
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -6
- package/dist/esm/justifi-terminal-orders-list.entry.js +175 -21
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -4
- package/dist/esm/justifi-terminals-list.entry.js +12 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-BCgsLInF.js → package-OGt0dCJl.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/{parts-DnrawQn3.js → parts-CPKMvyV_.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/{payment-provisioning-actions-Dr0YIShV.js → payment-provisioning-actions-cl5xIYnF.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +2 -2
- package/dist/esm/{payment-provisioning-loading-DI2wDkhm.js → payment-provisioning-loading-Dve2xQA4.js} +1 -1
- package/dist/esm/{payment.service-Ckbb7gXA.js → payment.service-5_u-UzTY.js} +1 -2
- package/dist/esm/{payments-status-BIDoGw-m.js → payments-status-BlVUt4C1.js} +1 -1
- package/dist/esm/{payout.service-BgFKxEoL.js → payout.service-D2zS5y8N.js} +1 -2
- package/dist/esm/{payouts-status-1T2NZBoE.js → payouts-status-DCjCGTaa.js} +3 -3
- package/dist/esm/{plaid.service-BLguQHs_.js → plaid.service-BiJ65YG8.js} +1 -2
- package/dist/esm/radio-list-item.entry.js +2 -2
- package/dist/esm/{schema-validations-v6WGlZkq.js → schema-validations-u9_XnlUL.js} +2 -2
- package/dist/esm/{skeleton-CXGFVqDf.js → skeleton-BEHo2ypu.js} +1 -1
- package/dist/esm/{spinner-kSw6PcwU.js → spinner-DIiQZd6_.js} +1 -1
- package/dist/esm/{table-CcyuIutB.js → table-DqGfsdys.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +3 -3
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/{terminal.service-0oISl5j-.js → terminal.service-CIxDfM7V.js} +1 -2
- package/dist/esm/{utils-DcfpJGDZ.js → utils-C1B2hVAB.js} +1 -1
- package/dist/esm/{utils-BxYS3WDw.js → utils-CX6puxwf.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +2 -2
- package/dist/module/{justifi-refund-policy.d.ts → additional-statement.d.ts} +4 -4
- package/dist/module/additional-statement.js +6 -0
- package/dist/module/{justifi-additional-statement2.js → additional-statement2.js} +8 -8
- package/dist/module/badge.js +1 -1
- package/dist/module/bank-account-billing-form-simple2.js +1 -1
- package/dist/module/billing-form-full2.js +1 -1
- package/dist/module/business-bank-account-form-step2.js +1 -1
- package/dist/module/business-owners-form-step2.js +20 -26
- package/dist/module/button.js +1 -1
- package/dist/module/cancellation-policy.d.ts +11 -0
- package/dist/module/cancellation-policy.js +6 -0
- package/dist/module/{justifi-cancellation-policy2.js → cancellation-policy2.js} +8 -8
- package/dist/module/card-billing-form-simple2.js +1 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/{checkouts-list-core.d.ts → customer-details.d.ts} +4 -4
- package/dist/module/customer-details.js +6 -0
- package/dist/module/{justifi-customer-details2.js → customer-details2.js} +8 -8
- package/dist/module/dispute-notification.d.ts +11 -0
- package/dist/module/dispute-notification.js +6 -0
- package/dist/module/dispute-notification2.js +82 -0
- package/dist/module/dispute-response.d.ts +11 -0
- package/dist/module/dispute-response.js +6 -0
- package/dist/module/{dispute-response-core.js → dispute-response2.js} +105 -53
- package/dist/module/duplicate-charge.d.ts +11 -0
- package/dist/module/duplicate-charge.js +6 -0
- package/dist/module/{justifi-duplicate-charge2.js → duplicate-charge2.js} +8 -8
- package/dist/module/electronic-evidence.d.ts +11 -0
- package/dist/module/electronic-evidence.js +6 -0
- package/dist/module/{justifi-electronic-evidence2.js → electronic-evidence2.js} +8 -8
- package/dist/module/event-types3.js +119 -1
- package/dist/module/form-alert2.js +1 -1
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number2.js +3 -3
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +3 -3
- package/dist/module/get-business.js +4 -1
- package/dist/module/get-payment-details.js +1 -1
- package/dist/module/hidden-input2.js +2 -2
- package/dist/module/iframe-input2.js +4 -4
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/module/justifi-bank-account-form.js +1 -1
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +3 -3
- package/dist/module/justifi-checkouts-list.js +197 -28
- package/dist/module/justifi-dispute-management.js +103 -62
- package/dist/module/justifi-gross-payment-chart.js +11074 -24
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +2 -2
- package/dist/module/justifi-order-terminals.js +7 -6
- package/dist/module/justifi-payment-details.js +9 -9
- package/dist/module/justifi-payment-provisioning.js +53 -59
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +2 -2
- package/dist/module/justifi-payout-details.js +4 -4
- package/dist/module/justifi-payout-transactions-list.js +2 -2
- package/dist/module/justifi-payouts-list-filters.js +3 -3
- package/dist/module/justifi-payouts-list.js +2 -2
- package/dist/module/justifi-season-interruption-insurance.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
- package/dist/module/justifi-terminal-orders-list.js +184 -22
- package/dist/module/justifi-terminals-list-filters.js +2 -2
- package/dist/module/justifi-terminals-list.js +3 -3
- package/dist/module/justifi-tokenize-payment-method2.js +1 -1
- package/dist/module/owner-form-inputs2.js +2 -2
- package/dist/module/owner-form2.js +177 -33
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-form-steps2.js +52 -58
- package/dist/module/product-or-service.d.ts +11 -0
- package/dist/module/product-or-service.js +6 -0
- package/dist/module/{justifi-product-or-service2.js → product-or-service2.js} +8 -8
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/{owner-form-core.d.ts → refund-policy.d.ts} +4 -4
- package/dist/module/refund-policy.js +6 -0
- package/dist/module/{justifi-refund-policy2.js → refund-policy2.js} +8 -8
- package/dist/module/shipping-details.d.ts +11 -0
- package/dist/module/shipping-details.js +6 -0
- package/dist/module/{justifi-shipping-details2.js → shipping-details2.js} +8 -8
- package/dist/module/spinner.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/utils2.js +1 -1
- package/dist/types/actions/business/get-business.d.ts +2 -1
- package/dist/types/api/Terminal.d.ts +1 -1
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +69 -5
- package/dist/types/components/checkouts-list/justifi-checkouts-list.d.ts +28 -6
- package/dist/types/components/dispute-management/{justifi-dispute-notification.d.ts → dispute-notification.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-additional-statement.d.ts → additional-statement.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-cancellation-policy.d.ts → cancellation-policy.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-customer-details.d.ts → customer-details.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{dispute-response-core.d.ts → dispute-response.d.ts} +21 -10
- package/dist/types/components/dispute-management/dispute-response/{justifi-duplicate-charge.d.ts → duplicate-charge.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-electronic-evidence.d.ts → electronic-evidence.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-product-or-service.d.ts → product-or-service.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-refund-policy.d.ts → refund-policy.d.ts} +1 -1
- package/dist/types/components/dispute-management/dispute-response/{justifi-shipping-details.d.ts → shipping-details.d.ts} +1 -1
- package/dist/types/components/dispute-management/justifi-dispute-management.d.ts +10 -2
- package/dist/types/components/gross-payment-chart/justifi-gross-payment-chart.d.ts +13 -2
- package/dist/types/components/terminal-orders-list/justifi-terminal-orders-list.d.ts +21 -3
- package/dist/types/components.d.ts +304 -551
- package/dist/webcomponents/p-0708cb76.entry.js +1 -0
- package/dist/webcomponents/p-07236291.entry.js +1 -0
- package/dist/webcomponents/p-12ae030d.entry.js +1 -0
- package/dist/webcomponents/p-215c6b6b.entry.js +1 -0
- package/dist/webcomponents/{p-256c5509.entry.js → p-22d19755.entry.js} +1 -1
- package/dist/webcomponents/{p-2425a375.entry.js → p-2dfdecbb.entry.js} +1 -1
- package/dist/webcomponents/p-31452258.entry.js +1 -0
- package/dist/webcomponents/p-35dd1fc0.entry.js +1 -0
- package/dist/webcomponents/p-383b8317.entry.js +1 -0
- package/dist/webcomponents/{p-1e877e0a.entry.js → p-3d6b9434.entry.js} +1 -1
- package/dist/webcomponents/p-3f5e9afb.entry.js +1 -0
- package/dist/webcomponents/p-45c0fb53.entry.js +1 -0
- package/dist/webcomponents/p-46477dfe.entry.js +1 -0
- package/dist/webcomponents/{p-581808f0.entry.js → p-49a4123c.entry.js} +1 -1
- package/dist/webcomponents/{p-befe01ef.entry.js → p-49c13952.entry.js} +1 -1
- package/dist/webcomponents/p-4ccf9cd7.entry.js +1 -0
- package/dist/webcomponents/p-4ec433f4.entry.js +1 -0
- package/dist/webcomponents/p-58b5e08e.entry.js +1 -0
- package/dist/webcomponents/p-5G1OMxZz.js +1 -0
- package/dist/webcomponents/{p-8253ef9f.entry.js → p-605bd107.entry.js} +1 -1
- package/dist/webcomponents/p-6220a384.entry.js +1 -0
- package/dist/webcomponents/p-63b7abf3.entry.js +1 -0
- package/dist/webcomponents/p-69fdd137.entry.js +1 -0
- package/dist/webcomponents/p-6RTf1SXX.js +1 -0
- package/dist/webcomponents/{p-3c046adc.entry.js → p-70dcd833.entry.js} +1 -1
- package/dist/webcomponents/p-7119fddd.entry.js +1 -0
- package/dist/webcomponents/p-7ebed752.entry.js +1 -0
- package/dist/webcomponents/p-8964f4ca.entry.js +1 -0
- package/dist/webcomponents/p-89cd31f2.entry.js +1 -0
- package/dist/webcomponents/p-8aa53ef2.entry.js +1 -0
- package/dist/webcomponents/p-8d173a7c.entry.js +1 -0
- package/dist/webcomponents/p-9153c121.entry.js +1 -0
- package/dist/webcomponents/p-91aef5bf.entry.js +1 -0
- package/dist/webcomponents/p-9b944aa4.entry.js +1 -0
- package/dist/webcomponents/p-9d021e10.entry.js +1 -0
- package/dist/webcomponents/{p-bc2af6b4.entry.js → p-9fc7714d.entry.js} +1 -1
- package/dist/webcomponents/{p-CR_-qIuN.js → p-APOabprT.js} +1 -1
- package/dist/webcomponents/p-Aacb4jqT.js +1 -0
- package/dist/webcomponents/p-B5gBiARs.js +1 -0
- package/dist/webcomponents/{p-bn_huKYG.js → p-BICxxa69.js} +1 -1
- package/dist/webcomponents/p-BJu1-9kE.js +1 -0
- package/dist/webcomponents/{p-Cej-1bD6.js → p-BXyADlAH.js} +1 -1
- package/dist/webcomponents/p-Ba8jdOkX.js +1 -0
- package/dist/webcomponents/p-BxKbnILQ.js +1 -0
- package/dist/webcomponents/{p-2LVpxCS_.js → p-CHo7TfsM.js} +1 -1
- package/dist/webcomponents/p-CHw7tICr.js +1 -0
- package/dist/webcomponents/{p-DnrawQn3.js → p-CPKMvyV_.js} +1 -1
- package/dist/webcomponents/p-Ce_W43gc.js +1 -0
- package/dist/webcomponents/{p-B5vVjDc_.js → p-Cm9f5fyh.js} +1 -1
- package/dist/webcomponents/p-CqiVXthx.js +1 -0
- package/dist/webcomponents/{p-x9fFFf7F.js → p-Cu7hgXL1.js} +1 -1
- package/dist/webcomponents/p-Cz_7BuGW.js +1 -0
- package/dist/webcomponents/p-D-zwk1J3.js +1 -0
- package/dist/webcomponents/{p-D1D2eC05.js → p-D1_eip6x.js} +1 -1
- package/dist/webcomponents/p-DSclFZ32.js +1 -0
- package/dist/webcomponents/p-DYHjzFnJ.js +1 -0
- package/dist/webcomponents/p-Dk26hk5T.js +1 -0
- package/dist/webcomponents/{p-CKiAlBsU.js → p-DwoT0UoX.js} +1 -1
- package/dist/webcomponents/{p-_-2E_vYf.js → p-DyucNSA4.js} +1 -1
- package/dist/webcomponents/p-KXLYEe1D.js +1 -0
- package/dist/webcomponents/p-NZS8uCtH.js +1 -0
- package/dist/webcomponents/p-OGt0dCJl.js +1 -0
- package/dist/webcomponents/p-a1dcdc8b.entry.js +20 -0
- package/dist/webcomponents/{p-10be75b8.entry.js → p-a80f69a9.entry.js} +1 -1
- package/dist/webcomponents/{p-9581d6a1.entry.js → p-a9695714.entry.js} +1 -1
- package/dist/webcomponents/{p-7f814609.entry.js → p-ae91fc9b.entry.js} +1 -1
- package/dist/webcomponents/p-av6jyzyC.js +1 -0
- package/dist/webcomponents/p-b0b6083f.entry.js +1 -0
- package/dist/webcomponents/p-b272a29d.entry.js +1 -0
- package/dist/webcomponents/p-b341efd6.entry.js +1 -0
- package/dist/webcomponents/{p-e6e56dbb.entry.js → p-b62ff001.entry.js} +1 -1
- package/dist/webcomponents/p-c1539656.entry.js +1 -0
- package/dist/webcomponents/p-c8f3656f.entry.js +1 -0
- package/dist/webcomponents/p-c9fe4f33.entry.js +1 -0
- package/dist/webcomponents/{p-09d2efad.entry.js → p-ca87c609.entry.js} +1 -1
- package/dist/webcomponents/p-cde76bf8.entry.js +1 -0
- package/dist/webcomponents/p-d24240a5.entry.js +1 -0
- package/dist/webcomponents/p-d79c5ee4.entry.js +1 -0
- package/dist/webcomponents/p-daaa2a99.entry.js +1 -0
- package/dist/webcomponents/{p-9db1444f.entry.js → p-db09f306.entry.js} +1 -1
- package/dist/webcomponents/{p-354fb3c4.entry.js → p-e020f003.entry.js} +1 -1
- package/dist/webcomponents/p-e4cb7c21.entry.js +1 -0
- package/dist/webcomponents/p-e5c2215a.entry.js +1 -0
- package/dist/webcomponents/p-ea0d7a98.entry.js +1 -0
- package/dist/webcomponents/p-ef85717f.entry.js +1 -0
- package/dist/webcomponents/p-f1b9cbf0.entry.js +1 -0
- package/dist/webcomponents/p-f30069ea.entry.js +1 -0
- package/dist/webcomponents/p-f3ff7e00.entry.js +1 -0
- package/dist/webcomponents/p-f9aafb21.entry.js +1 -0
- package/dist/webcomponents/p-fE5A37L5.js +1 -0
- package/dist/webcomponents/p-jIDKmNHy.js +1 -0
- package/dist/webcomponents/{p-BJ7GFTiW.js → p-mF5zKtkx.js} +1 -1
- package/dist/webcomponents/p-nb_LhbJq.js +1 -0
- package/dist/webcomponents/p-oTtn8xDw.js +1 -0
- package/dist/webcomponents/p-uZ5KAseb.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Dispute-CruQTF6_.js +0 -59
- package/dist/cjs/business-additional-questions-schema-CI80eZLJ.js +0 -73
- package/dist/cjs/checkouts-list-core.cjs.entry.js +0 -146
- package/dist/cjs/checkouts-table-CCxrsy0x.js +0 -55
- package/dist/cjs/dispute.service-BbtwY673.js +0 -32
- package/dist/cjs/form-control-number_3.cjs.entry.js +0 -249
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +0 -11075
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +0 -61
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +0 -108
- package/dist/cjs/terminal-orders-table-Cz6qvzVE.js +0 -83
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +0 -523
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +0 -262
- package/dist/collection/components/dispute-management/dispute-management-core.js +0 -169
- package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +0 -190
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +0 -139
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +0 -199
- package/dist/esm/Dispute-BH0Xfn-F.js +0 -57
- package/dist/esm/business-additional-questions-schema-DKudYaoE.js +0 -69
- package/dist/esm/business-identity-schema-CFhSc0cA.js +0 -99
- package/dist/esm/checkouts-list-core.entry.js +0 -144
- package/dist/esm/checkouts-table-C8sPHeTm.js +0 -51
- package/dist/esm/dispute.service-vlYGy0nR.js +0 -30
- package/dist/esm/form-control-number_3.entry.js +0 -245
- package/dist/esm/gross-payment-chart-core.entry.js +0 -11073
- package/dist/esm/justifi-dispute-management-core.entry.js +0 -59
- package/dist/esm/terminal-orders-list-core.entry.js +0 -106
- package/dist/esm/terminal-orders-table-C7KOcRpq.js +0 -79
- package/dist/module/checkouts-list-core.js +0 -6
- package/dist/module/checkouts-list-core2.js +0 -227
- package/dist/module/dispute-management-core.js +0 -193
- package/dist/module/dispute-response-actions.js +0 -119
- package/dist/module/gross-payment-chart-core.d.ts +0 -11
- package/dist/module/gross-payment-chart-core.js +0 -6
- package/dist/module/gross-payment-chart-core2.js +0 -11096
- package/dist/module/justifi-additional-statement.d.ts +0 -11
- package/dist/module/justifi-additional-statement.js +0 -6
- package/dist/module/justifi-cancellation-policy.d.ts +0 -11
- package/dist/module/justifi-cancellation-policy.js +0 -6
- package/dist/module/justifi-customer-details.d.ts +0 -11
- package/dist/module/justifi-customer-details.js +0 -6
- package/dist/module/justifi-dispute-management-core.d.ts +0 -11
- package/dist/module/justifi-dispute-management-core.js +0 -6
- package/dist/module/justifi-dispute-notification.d.ts +0 -11
- package/dist/module/justifi-dispute-notification.js +0 -6
- package/dist/module/justifi-dispute-notification2.js +0 -85
- package/dist/module/justifi-dispute-response-core.d.ts +0 -11
- package/dist/module/justifi-dispute-response-core.js +0 -6
- package/dist/module/justifi-dispute-response.d.ts +0 -11
- package/dist/module/justifi-dispute-response.js +0 -6
- package/dist/module/justifi-dispute-response2.js +0 -198
- package/dist/module/justifi-duplicate-charge.d.ts +0 -11
- package/dist/module/justifi-duplicate-charge.js +0 -6
- package/dist/module/justifi-electronic-evidence.d.ts +0 -11
- package/dist/module/justifi-electronic-evidence.js +0 -6
- package/dist/module/justifi-product-or-service.d.ts +0 -11
- package/dist/module/justifi-product-or-service.js +0 -6
- package/dist/module/justifi-refund-policy.js +0 -6
- package/dist/module/justifi-shipping-details.d.ts +0 -11
- package/dist/module/justifi-shipping-details.js +0 -6
- package/dist/module/owner-form-core.js +0 -6
- package/dist/module/owner-form-core2.js +0 -262
- package/dist/module/terminal-orders-list-core.d.ts +0 -11
- package/dist/module/terminal-orders-list-core.js +0 -6
- package/dist/module/terminal-orders-list-core2.js +0 -209
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +0 -88
- package/dist/types/components/checkouts-list/checkouts-list-core.d.ts +0 -34
- package/dist/types/components/dispute-management/dispute-management-core.d.ts +0 -18
- package/dist/types/components/dispute-management/dispute-response/justifi-dispute-response.d.ts +0 -35
- package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +0 -21
- package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +0 -28
- package/dist/webcomponents/p--e0ff06z.js +0 -1
- package/dist/webcomponents/p-032b4553.entry.js +0 -1
- package/dist/webcomponents/p-042daaf8.entry.js +0 -1
- package/dist/webcomponents/p-0638f0bd.entry.js +0 -1
- package/dist/webcomponents/p-06ecd4cb.entry.js +0 -1
- package/dist/webcomponents/p-0b3f4f22.entry.js +0 -1
- package/dist/webcomponents/p-164f95ec.entry.js +0 -1
- package/dist/webcomponents/p-174eb877.entry.js +0 -1
- package/dist/webcomponents/p-1e0be7b0.entry.js +0 -1
- package/dist/webcomponents/p-24935254.entry.js +0 -1
- package/dist/webcomponents/p-39cc6928.entry.js +0 -1
- package/dist/webcomponents/p-4226eb4a.entry.js +0 -1
- package/dist/webcomponents/p-474ee3f8.entry.js +0 -1
- package/dist/webcomponents/p-485b77ba.entry.js +0 -1
- package/dist/webcomponents/p-52908814.entry.js +0 -1
- package/dist/webcomponents/p-587886f1.entry.js +0 -1
- package/dist/webcomponents/p-5ef355ce.entry.js +0 -1
- package/dist/webcomponents/p-6917aa3c.entry.js +0 -1
- package/dist/webcomponents/p-6d81822f.entry.js +0 -1
- package/dist/webcomponents/p-6ecb3ef9.entry.js +0 -1
- package/dist/webcomponents/p-79713014.entry.js +0 -1
- package/dist/webcomponents/p-798f4708.entry.js +0 -1
- package/dist/webcomponents/p-7f0f72c6.entry.js +0 -1
- package/dist/webcomponents/p-80652cf8.entry.js +0 -1
- package/dist/webcomponents/p-82fe02e4.entry.js +0 -1
- package/dist/webcomponents/p-83147f23.entry.js +0 -1
- package/dist/webcomponents/p-870fac9e.entry.js +0 -1
- package/dist/webcomponents/p-8c2427ed.entry.js +0 -1
- package/dist/webcomponents/p-92de00d7.entry.js +0 -1
- package/dist/webcomponents/p-956eca2e.entry.js +0 -1
- package/dist/webcomponents/p-9f74d7ea.entry.js +0 -1
- package/dist/webcomponents/p-B--N37zY.js +0 -1
- package/dist/webcomponents/p-BCgsLInF.js +0 -1
- package/dist/webcomponents/p-BH0Xfn-F.js +0 -1
- package/dist/webcomponents/p-Bg2SZArf.js +0 -1
- package/dist/webcomponents/p-BnaR7f2G.js +0 -1
- package/dist/webcomponents/p-BovgIz83.js +0 -1
- package/dist/webcomponents/p-BsQy297i.js +0 -1
- package/dist/webcomponents/p-CDf5H0TB.js +0 -1
- package/dist/webcomponents/p-CUI41_5y.js +0 -1
- package/dist/webcomponents/p-CX36GHQP.js +0 -1
- package/dist/webcomponents/p-Cf6HoQKl.js +0 -1
- package/dist/webcomponents/p-CsdYMTrc.js +0 -1
- package/dist/webcomponents/p-D4OlsyTo.js +0 -1
- package/dist/webcomponents/p-D8EGHc_m.js +0 -1
- package/dist/webcomponents/p-DPmnGTmg.js +0 -1
- package/dist/webcomponents/p-DWevPe7C.js +0 -1
- package/dist/webcomponents/p-Dbg501Lu.js +0 -1
- package/dist/webcomponents/p-DcBvJu0k.js +0 -1
- package/dist/webcomponents/p-DkdzUTnl.js +0 -1
- package/dist/webcomponents/p-GJyHX3us.js +0 -1
- package/dist/webcomponents/p-HT_4DkD0.js +0 -1
- package/dist/webcomponents/p-MDZuGvsl.js +0 -1
- package/dist/webcomponents/p-XrKLre8M.js +0 -1
- package/dist/webcomponents/p-a80d958d.entry.js +0 -1
- package/dist/webcomponents/p-b06910b0.entry.js +0 -1
- package/dist/webcomponents/p-b2447726.entry.js +0 -1
- package/dist/webcomponents/p-b483e71b.entry.js +0 -1
- package/dist/webcomponents/p-bfe2583d.entry.js +0 -1
- package/dist/webcomponents/p-c73631f0.entry.js +0 -1
- package/dist/webcomponents/p-c8f7ebf6.entry.js +0 -1
- package/dist/webcomponents/p-d7633e10.entry.js +0 -1
- package/dist/webcomponents/p-d878df6c.entry.js +0 -1
- package/dist/webcomponents/p-da882bd1.entry.js +0 -1
- package/dist/webcomponents/p-dd1cfb9e.entry.js +0 -1
- package/dist/webcomponents/p-ddf699e6.entry.js +0 -20
- package/dist/webcomponents/p-de836ec9.entry.js +0 -1
- package/dist/webcomponents/p-ea30cf08.entry.js +0 -1
- package/dist/webcomponents/p-edf5a854.entry.js +0 -1
- package/dist/webcomponents/p-f24563ab.entry.js +0 -1
- package/dist/webcomponents/p-f4aeda71.entry.js +0 -1
- package/dist/webcomponents/p-faa090a5.entry.js +0 -1
- package/dist/webcomponents/p-fc7ba195.entry.js +0 -1
- package/dist/webcomponents/p-hhdRync5.js +0 -1
- package/dist/webcomponents/p-niGr4RT2.js +0 -1
- package/dist/webcomponents/p-pL4dNfsl.js +0 -1
- package/dist/webcomponents/p-qcQTYcr3.js +0 -1
- package/dist/webcomponents/p-uCg79W3M.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as i}from"./p-CV0Pyo1O.js";import{C as a,e as n,E as r,y as o,z as h,v as l,w as c,x as d}from"./p-CUI41_5y.js";import{m as u,a as m,c as b,d as p,e as f,f as v,g as y}from"./p-CR_-qIuN.js";import{B as g,a as k,D as w,I as _}from"./p-CsdYMTrc.js";import{a as x,c as T,b as L}from"./p-BovgIz83.js";import{F as C,c as j,a as O,b as A,d as E}from"./p-CKiAlBsU.js";import{A as I,C as S,e as H,R as D,f as V}from"./p-BcNb9bVO.js";import{C as B,P,I as N}from"./p-CVaOFfrI.js";import{b as M,a0 as R,C as F,x as q,u as W,D as z,aa as U,a3 as Y,aj as Z,am as G,a1 as $}from"./p-DnrawQn3.js";import{P as X}from"./p-DPmnGTmg.js";import{b as Q,a as J,c as K}from"./p-Bt4GjEWL.js";import{a as tt,B as et}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{n as st}from"./p-BnjCmwMr.js";import{A as it,B as at,v as nt,C as rt,D as ot,E as ht,F as lt}from"./p-HT_4DkD0.js";import{B as ct}from"./p-2LVpxCS_.js";import"./p-CZfYo5-1.js";import{c as dt}from"./p-_-2E_vYf.js";import{s as ut,b as mt,d as bt}from"./p-BRnBHsdq.js";import{S as pt}from"./p-DcBvJu0k.js";import{u as ft,a as vt,b as yt}from"./p-C6o0liMT.js";import{d as gt,e as kt}from"./p-D8EGHc_m.js";import{A as wt}from"./p-CYQvLgSs.js";import{S as _t}from"./p-BqNNwq6C.js";import{P as xt}from"./p-B--N37zY.js";import"./p-B5vVjDc_.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";class Tt{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const Lt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new I(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e})),this.additional_questions=new I(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new I(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new C(x(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t,e,i,a,n;const r=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Additional Questions"),s("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_revenue,defaultValue:null==r?void 0:r.business_revenue,maskOptions:B.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==r?void 0:r.business_payment_volume,maskOptions:B.WHOLE})),s("div",{class:"col-12"},s("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==r?void 0:r.business_average_transaction_amount})),s("div",{class:"col-12"},s("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_when_service_received,options:Q,defaultValue:null==r?void 0:r.business_when_service_received})),s("div",{class:"col-12"},s("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_other_payment_details,defaultValue:null==r?void 0:r.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},Ct=class{constructor(e){t(this,e)}render(){return s("div",{key:"d0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9",class:"row gy-3"},s("div",{key:"02ed406f38558badf9f591e076b120d09c71f83b",class:"col-12"},s("form-control-file",{key:"11ff1dc68264b9e5aa561ffe19b423abc1a00c78",name:"voided_check",label:"Voided Check",documentType:r.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),s("div",{key:"71d26407522a75a54489155566c18af1a64c1417",class:"col-12"},s("form-control-file",{key:"7ea42e03a44c223a5fedc273e94e635e70d54f4b",name:"bank_statement",label:"Bank Statement",documentType:r.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},jt=class{constructor(e){t(this,e)}render(){var t,e,i,a,n,r;return s("div",{key:"d3445ce89732e19baea2e8f224c42011d5a03998",class:"row gy-3"},s("div",{key:"966e1d8ba6043b4f9b57ae0061ae94c177c12b48",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"314a4f7e181b978b2ff1fdbfdfc8d9484089829a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"45ac55707ce44b208adaf72e944ea3056810183a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"74ce58b36eb3a425d900d7bb0858bda18b2e341c",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"2562105aaaae00d9c46eb61d931a43927d96a8ce",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),s("div",{key:"4c7e6cba0ee1e2567dc5b608559b13ebd3fddd07",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Routing Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.routing_number)||""}):s("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},Ot=class{constructor(e){t(this,e)}render(){var t,e,i,a,n,r,o;return s("div",{key:"8de8f05777f72ecb1112328544e75be7cd929e8d",class:"row gy-3"},s("div",{key:"513fb78b434ba3aebe51b636f7494b54e437c65f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"37a1ef4ac58fbe1633a93020e786d546cd832867",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"fc8820e264d14ac3c5a1c6fd171b381c2b6d99e1",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"f183b1c5f6a8b0f905c916cd1715448f3e02d26f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"8366ebde2f319f6d910a34917f57ad43b3ee234f",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Transit Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.transit_number)||""}):s("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"5 digits"})),s("div",{key:"c91166337c2984048466014634f5d4e59ce2b40a",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Institution Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.institution_number)||""}):s("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"3 digits"})),s("div",{key:"ebce2f50ec265ed2fef7a0b3dae84d33036ad145",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},At=(t,e)=>t.some((t=>t.document_type===e)),Et=t=>t?{bank_name:ot.nullable(),nickname:rt.nullable(),account_owner_name:nt.nullable(),account_type:at.nullable(),account_number:it.nullable()}:{bank_name:ot.required("Enter bank name"),nickname:rt.required("Enter nickname"),account_owner_name:nt.required("Enter account owner name"),account_type:at.required("Select account type"),account_number:it.required("Enter account number")},It=(t,e)=>{if(e)return{voided_check:A().nullable(),bank_statement:A().nullable()};const s=At(t,r.voidedCheck),i=At(t,r.bankStatement),a=s||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:A().when("bank_statement",{is:t=>!t&&!a,then:t=>t.required(n),otherwise:t=>t.notRequired()}),bank_statement:A().when("voided_check",{is:t=>!t&&!a,then:t=>t.required(n),otherwise:t=>t.notRequired()})}},St={[S.USA]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Et(e)),(t=>t?{routing_number:lt.nullable()}:{routing_number:lt.required("Enter routing number")})(e)),It(t,e));return j().shape(s,[["voided_check","bank_statement"]])})(e,t),[S.CAN]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Et(e)),(t=>{const e=O().length(3,"Institution number must be 3 digits").matches(ht,"Enter valid institution number"),s=O().length(5,"Transit number must be 5 digits").matches(ht,"Enter valid transit number");return t?{institution_number:e.nullable(),transit_number:s.nullable()}:{institution_number:e.required("Enter institution number"),transit_number:s.required("Enter transit number")}})(e)),It(t,e));return j().shape(s,[["voided_check","bank_statement"]])})(e,t)},Ht=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new o,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,St[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new C(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))},this.storeFiles=t=>{const e=Array.from(t.detail.fileList),s=t.detail.document_type,i=e.map((t=>new h({file:t,document_type:s},this.businessId)));this.documentData[s]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new o,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new o,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async t=>{this.isLoading=!0;const e=t.record_data;return new Promise((s=>{this.postDocumentRecord({payload:e,onSuccess:e=>{s(this.handleDocRecordResponse(t,e))},onError:({error:t,code:e,severity:i})=>{this.errorEvent.emit({message:t,errorCode:e,severity:i}),s(!1)}})}))},this.handleDocRecordResponse=(t,e)=>e.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:e.error.message,severity:a.ERROR,data:e.error}),!1):(t.setPresignedUrl(e.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const e=await t.getFileData(),s=await fetch(t.presigned_url,{method:"PUT",body:e});return this.handleUploadResponse(s)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}),!1)}propChanged(){this.initializeApi()}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){"readonly"===this.viewMode?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new C(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.postBankAccount=b({authToken:this.authToken,service:new k}),this.postDocumentRecord=p({authToken:this.authToken,service:new w})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}get postPayload(){const t=this.formController.values.getValue();return new Tt(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(t){const{bank_accounts:e,documents:s,settings:i,platform_account_id:a}=t;e.length>0?this.bankAccount=new Tt(e[e.length-1]):(this.bankAccount=new Tt({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=s,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=a}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(t){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),t()}catch(t){this.errorEvent.emit({message:t,errorCode:n.POST_ERROR,severity:a.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((e=>{let s=!1;this.postBankAccount({payload:this.postPayload,onSuccess:e=>{t=e,s=!0},onError:({error:t,code:e,severity:i})=>{s=!1,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:tt.bankAccount}),this.isLoading=!1,e(s)}})}))}async refreshBankAccountData(){return new Promise((t=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode(),this.initializeFormController()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.isLoading=!1,t()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(t){const e=this.formController.getInitialValues();return s(this.country===S.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:e,errors:this.errors,inputHandler:this.inputHandler,formDisabled:t})}renderReadonlyView(){return s("div",null,this.renderBankAccountInputs(!0),s("div",{class:"mt-3"},s(ct,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:R},"Change Bank Account")))}renderPlaidView(){return s("div",{class:"mt-3"},s("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),s("div",{class:"mt-3"},s(ct,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:F},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return s("div",null,this.plaidAvailable&&s("div",{class:"mb-3"},s(ct,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:R},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),s("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&s(ct,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:R},"Cancel"),s(ct,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return s("fieldset",{class:"mt-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Document Uploads"),s("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),s("hr",{class:"mt-2"}),s("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),s("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?s(X,null):s("form",null,s("fieldset",{class:"mb-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Bank Account Info"),s("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),s("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},Dt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new H(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t(),this.isEditingTaxId=!1},onError:({error:t,code:s,severity:i,rawError:a})=>{e=t,a&&"object"==typeof a&&a.param&&this.formController.setFieldError(a.param,a.message),this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.errors[t]&&this.formController.clearFieldError(t),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new H(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const t=this.country===S.CAN?T(this.allowOptionalFields):L(this.allowOptionalFields);this.formController=new C(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t,e;const i=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Business Information")),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),s("div",{class:"col-12 col-md-8"},s("form-control-select",{name:"classification",label:"Business Classification",options:K,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-4"},s("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},!(null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4)||this.isEditingTaxId?s("form-control-number-masked",{name:"tax_id",label:dt[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:dt[this.country].taxIdHelpText}):s("div",null,s("label",{class:"form-label",part:q},dt[this.country].taxIdLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:W,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:P.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Vt=class{constructor(e){t(this,e),this.documents=[],this.isLoading=!1}render(){return this.isLoading?s(pt,{height:"50px"}):this.documents.length?s(i,null,s("div",{class:"card",part:z},s("div",{class:"card-body"},s("h5",{class:"card-title",part:M},"Documents Already on File"),s("div",{class:"table-responsive"},s("table",{class:"table table-sm table-borderless",part:U},s("thead",null,s("tr",null,s("th",{style:{width:"25%"},part:Y,scope:"col"},"File Name"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"File Type"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"Document Type"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"Date Uploaded"))),s("tbody",null,this.documents.sort(((t,e)=>t.document_type.localeCompare(e.document_type))).map(((t,e)=>s("tr",{class:0===e?"border-bottom border-top":"border-bottom"},s("td",{part:Z},t.file_name),s("td",{part:Z},t.file_type),s("td",{part:Z},ut(t.document_type)),s("td",{part:Z},`${mt(t.created_at)} - ${bt(t.created_at)}`))))))))),s("hr",null)):null}},Bt=class{constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(t,e)=>{if(null===t)return;const s=this.ownersPayload.findIndex((t=>t.id===e));-1!==s&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[s]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new D(t.data.representative||{}),t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:et.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((e=>e.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=t=>{this.representativeIsOwner=t,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((t=>""!==t.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const e=this.refs.map((t=>t.validate()));if(!(await Promise.all(e)).every((t=>t)))return;const s=this.refs.map((t=>t.submit()));(await Promise.all(s)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const e=t.detail,s=this.ownersPayload.map((t=>t.id===e.id?e:t));s.includes(e)||(s[this.ownersPayload.findIndex((t=>!t.id))]=e,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=s}render(){if(this.isLoading)return s(i,null,s(X,null));const t=this.ownersPayload.some((t=>t.id===this.representative.id)),e=null===this.representativeIsOwner&&!t;return s(i,null,s("div",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Owners"),s("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),s("hr",{class:"mt-2"}),e&&s("div",{class:"alert alert-warning mb-3",part:G},s("div",{class:"card-body"},s("div",{class:"d-flex align-items-center mb-3"},s("strong",null,"Is the representative of this business also an owner?")),s("div",{class:"d-flex gap-2"},s(ct,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),s(ct,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:e=>this.matchRef(e,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(ct,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},Pt=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{ft(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{vt(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i,a,n,r,o,h,l;return s("form",{key:"ef49167cc726b3d4efa128503553a77a7627ebee"},s("fieldset",{key:"3714ce7eab6e9cee062911564d1c2635b68dfc8b"},s("div",{key:"4f27236b0438e29d7449bf5e9f71c00c7245effa",class:"d-flex align-items-center gap-2"},s("legend",{key:"adc144da314549264571b245c5388ab56c1dbbf1",class:"mb-0",part:M},"Representative"),s("form-control-tooltip",{key:"bcc76add04febe984427103a594aa63cab17bd27",helpText:"The representative for your business needs to be someone who has significant control over managing your business's finance. You will have an opportunity to add owners later in the form."})),s("hr",{key:"98bfed19989ee57e451a7005f3e60af16cc5d3b5",class:"mt-2"}),s("div",{key:"8f5e0e3deed2627ecf9f77290f268c0e2ee68bfa",class:"row gy-3"},s("div",{key:"b1205284a54a608b9c3b6be386e134849c9c6b25",class:"col-12 col-md-8"},s("form-control-text",{key:"36fcd91ca263adfd9fb69dc88f15404f93a8bc13",name:"name",label:"Full Name",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"879337d3c6a120f5dc9de3cd3364b34b9c4689df",class:"col-12 col-md-4"},s("form-control-text",{key:"ff2e4d29e76b93693735b35cbaca4416f0cd28a0",name:"title",label:"Title",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"2a011b74b4c203ae4a309d7d76ea8fd0631a5f2c",class:"col-12 col-md-6"},s("form-control-text",{key:"1ef20c59829ed3abe81cc53355bbafd5d4894360",name:"email",label:"Email Address",defaultValue:null===(i=this.representativeDefaultValue)||void 0===i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"460dad175238fdfea8c79666343943a95aac0fd5",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"7bd3ad79f6da1d33e38c2246d9c0378c2ef8b7d7",name:"phone",label:"Phone Number",defaultValue:null===(a=this.representativeDefaultValue)||void 0===a?void 0:a.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:P.US})),s("div",{key:"cda84bfc9f88a35177a42b7f9ec4c58292600c0b",class:"col-12 col-md-4"},s("form-control-date",{key:"5ed66fabc97afc94a5839135add25dbcb5237900",name:"dob_full",label:"Birth Date",defaultValue:null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>yt(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"0e19619fd081ea9dacd0eb25388a4c7b2c993312",class:"col-12 col-md-8"},!(null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:dt[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(o=this.representativeDefaultValue)||void 0===o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:N[this.country],helpText:dt[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:q},dt[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:W,value:`****${null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingIdentification=!0,ft(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),s("div",{key:"6647390b209f5a630bf60e8952a7b0e70c92ca8a",class:"col-12"},s("identity-address-form",{key:"9755d0450fc8d83ba0a98a304455df346ff33e7f",errors:this.errors.address,defaultValues:null===(l=this.representativeDefaultValue)||void 0===l?void 0:l.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},Nt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new D(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}initializeForm(){const t=gt[this.country];t?(this.formController=new C(t("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:a.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get patchPayload(){return{representative:new D(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?s(X,null):s("business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Mt=class{constructor(s){t(this,s),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.formCompleted=e(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const t=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=t.data.terms_conditions_accepted}catch(t){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.sendData=async t=>{this.formLoading.emit(!0);try{const e=this.termsPayload,s=await this.api.post({endpoint:this.termsConditionsEndpoint,body:e,authToken:this.authToken});this.handleResponse(s,t)}catch(t){this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.inputHandler=(t,e)=>{this.acceptedTerms=e,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=wt(),this.formController=new C((t=>{const e=j({accepted:E().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),s=j({accepted:E().nullable()});return t?s:e})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(t,e){t.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}):e(),this.stepCompleteEvent.emit({response:t,formStep:tt.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:t}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:tt.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),t()):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get merchantAgreementLink(){return s("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return s("form",{key:"24b0a8ff0187894cf5e0f56e9e4b28c378e720cb"},s("fieldset",{key:"26fa9159dd6d61edd28b9443a10eeb981f150308"},s("legend",{key:"103bdecbc51f2cccd9105e2f9b271b60760618ec",part:M},"Terms and Conditions"),s("hr",{key:"dfd29fbe609a57d8160df7980ed0e63e75934a86"}),s("div",{key:"61e06597ec652c1d7c6e7e2bd8c9b653d061d076"},s("p",{key:"cd4def71580cd14d6edb5887221ebf6aa80cc2ea"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),s("br",{key:"e3c64733f11a4f702e686e6c5ae7acd7e6bd1c34"}),s("div",{key:"71bd74de3aee69805a2aa1297356ff8b8db3c76c",class:"row-gy-3"},s("div",{key:"94a28c13e3bbc1c89cd1b5ebde2e1732b48f99ea",class:"col-12"},s("form-control-checkbox",{key:"fee95fa42192fee1bbfd544307b4e1c11c0d97f4",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},Rt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const e=new V((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},e),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new V(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new C((0,kt[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t;const e=null===(t=this.formController)||void 0===t?void 0:t.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Legal Address of your Business"),s("form-control-tooltip",{helpText:"No PO Boxes."})),s("hr",{class:"mt-2"}),s("form-address-fields",{country:this.country,errors:this.errors,defaultValues:e,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Ft=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7)}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:t}){this.coreComponent.validateAndSubmit({onSuccess:t})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=f({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.patchOwner=v({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.postOwner=y({authToken:this.authToken,service:new _}))}render(){return s("owner-form-core",{key:"598c7413dbae853f432e64ac549025442083fbb9",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,country:this.country,ref:t=>this.coreComponent=t})}},qt=class{constructor(s){t(this,s),this.plaidVerificationSuccess=e(this,"plaidVerificationSuccess",7),this.plaidVerificationError=e(this,"plaidVerificationError",7),this.linkToken=null,this.linkTokenId=null,this.plaidLink=null,this.isAuthenticating=!1,this.isSuccess=!1,this.error=null,this.isLoading=!1,this.plaidService=new xt,this.abortController=null,this.timeoutId=null,this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:c[d.PLAID_LINK_TOKEN_FAILED],severity:l[d.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:d.PLAID_LINK_INIT_FAILED,message:c[d.PLAID_LINK_INIT_FAILED],severity:l[d.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,s,i;try{if(!this.authToken||!this.accountId)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please provide authToken and accountId.",severity:a.ERROR,retryable:!1,userAction:"Provide required props"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const t=await this.plaidService.getLinkTokenForVerification(this.authToken,this.businessId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=t.data.id}catch(a){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=d.PLAID_LINK_TOKEN_FAILED,r=c[n],o=!0;"AbortError"===a.name?(n=d.PLAID_TIMEOUT,r=c[n],o=!0):(null===(t=a.message)||void 0===t?void 0:t.includes("network"))||(null===(e=a.message)||void 0===e?void 0:e.includes("fetch"))?(n=d.PLAID_NETWORK_ERROR,r=c[n],o=!0):((null===(s=a.message)||void 0===s?void 0:s.includes("401"))||(null===(i=a.message)||void 0===i?void 0:i.includes("unauthorized")))&&(n=d.PLAID_INVALID_CREDENTIALS,r="Authentication failed. Please check your credentials.",o=!1),this.handleError({code:n,message:r,severity:l[n],originalError:a,retryable:o,userAction:o?"Click to try again":"Check your credentials"})}},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=async t=>{var e;this.isAuthenticating=!1,this.isLoading=!0,this.clearError();try{const s=await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken,this.businessId,{public_token:t,link_token_id:this.linkTokenId},null===(e=this.abortController)||void 0===e?void 0:e.signal);if(s.error)throw new Error("string"==typeof s.error?s.error:s.error.message||"Failed to verify bank account");this.isSuccess=!0,this.isLoading=!1,this.plaidVerificationSuccess.emit({publicToken:t,bankAccount:s.data})}catch(t){this.isLoading=!1,this.handleError({code:d.PLAID_AUTHENTICATION_FAILED,message:(null==t?void 0:t.message)||"Failed to verify bank account",severity:l[d.PLAID_AUTHENTICATION_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},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=d.PLAID_AUTHENTICATION_FAILED,s=c[e],i=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=d.PLAID_INVALID_CREDENTIALS,s=c[e],i=!0;break;case"ITEM_LOGIN_REQUIRED":e=d.PLAID_INVALID_CREDENTIALS,s="Your bank requires re-authentication. Please try again.",i=!0;break;case"ITEM_LOCKED":e=d.PLAID_ACCOUNT_LOCKED,s=c[e],i=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=d.PLAID_MAINTENANCE,s=c[e],i=!0;break;case"RATE_LIMIT_EXCEEDED":e=d.PLAID_RATE_LIMITED,s=c[e],i=!0;break;default:t.error_message&&(s=t.error_message)}this.handleError({code:e,message:s,severity:l[e],originalError:t,retryable:i,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.isLoading=!1,this.plaidVerificationError.emit(t),console.error("Plaid verification error:",t)},this.clearError=()=>{this.error&&(this.error=null)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.initializePlaidLink()},this.scriptRef.onerror=()=>{this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){const t=s("svg",{class:"plaid-logo-img",height:"20",width:"20",viewBox:"0 0 28 29",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline",marginLeft:"5px",marginRight:"5px",marginTop:"-2px"}},s("g",{fill:"#fff","fill-rule":"evenodd"},s("path",{d:"M25.7629 26.2628L28 17.5309L24.9691 14.5001L27.9999 11.4691L25.7628 2.73706L17.0309 0.5L14.0001 3.531L10.969 0.50014L2.23706 2.73734L0 11.4691L3.03128 14.4999L0.00014 17.531L2.2372 26.2629L10.9691 28.5L14.0001 25.469L17.031 28.4999L25.7629 26.2628ZM15.7321 23.7371L18.6186 20.8505L22.2912 24.5233L17.6956 25.7007L15.7321 23.7371ZM11.1136 9.88154L14.0003 6.99502L16.8868 9.8814L14.0001 12.7679L11.1136 9.88154ZM12.2682 14.5L9.38154 17.3865L6.49502 14.5L9.38154 11.6135L12.2682 14.5ZM18.6187 11.6133L21.5053 14.5L18.6186 17.3865L15.7321 14.5L18.6187 11.6133ZM16.8867 19.1186L14.0001 22.0051L11.1135 19.1185L14.0001 16.2319L16.8867 19.1186ZM10.3044 25.7007L5.70864 24.5233L9.38154 20.8504L12.2682 23.7371L10.3044 25.7007ZM4.76308 16.2319L7.6496 19.1185L3.9767 22.7914L2.7993 18.1957L4.76308 16.2319ZM3.9767 6.20836L7.64974 9.8814L4.76308 12.7681L2.7993 10.8041L3.9767 6.20836ZM12.2683 5.26294L9.38168 8.1496L5.70892 4.4767L10.3047 3.2993L12.2683 5.26294ZM17.6959 3.2993L22.2915 4.4767L18.6186 8.14946L15.7321 5.26294L17.6959 3.2993ZM23.2372 12.7681L20.3505 9.8814L24.0233 6.20878L25.2007 10.8046L23.2372 12.7681ZM24.0233 22.7914L20.3505 19.1186L23.2372 16.2321L25.2007 18.1957L24.0233 22.7914Z"})));return s(_t,null,s("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),s("div",null,s("div",{class:"mb-3"},s(ct,{variant:"primary",type:"button",onClick:t=>{t.preventDefault(),this.openPlaidLink()},disabled:this.isLoading,part:$},"Connect with Plaid ",t," (instant verification)")),(()=>this.error?s("div",{class:(this.error.severity===a.ERROR?"text-danger":this.error.severity===a.WARNING?"text-warning":"text-info")+" mt-2"},s("small",null,this.error.message),s("br",null),this.error.userAction&&s("small",{class:"text-muted"},this.error.userAction)):null)(),(()=>this.error?null:this.isLoading?s("div",{class:"text-info mt-2"},s("small",null,"Verifying bank account...")):this.isSuccess?s("div",{class:"text-success mt-2"},s("small",null,"✓ Bank account verified successfully")):this.isAuthenticating?s("div",{class:"text-info mt-2"},s("small",null,"Connecting to your bank...")):null)()))}};export{Lt as additional_questions_form_step,Ct as bank_account_document_form_inputs,jt as bank_account_form_inputs,Ot as bank_account_form_inputs_canada,Ht as business_bank_account_form_step,Dt as business_core_info_form_step,Vt as business_documents_on_file,Bt as business_owners_form_step,Pt as business_representative_form_inputs,Nt as business_representative_form_step,Mt as business_terms_conditions_form_step,Rt as legal_address_form_step,Ft as owner_form,qt as plaid_verification}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as i,g as a}from"./p-CV0Pyo1O.js";import{a7 as r,v as o,q as d,w as h,x as c,A as n,u as l,a0 as f}from"./p-DnrawQn3.js";import{F as b}from"./p-uCg79W3M.js";import{F as m}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";import{F as u}from"./p-CKiAlBsU.js";import{O as p}from"./p-BcNb9bVO.js";import{d as y}from"./p-D8EGHc_m.js";import{B as k}from"./p-2LVpxCS_.js";import{B as v}from"./p-XYgDHrVL.js";import{I as g,P as w}from"./p-CVaOFfrI.js";import{u as j,a as x,b as C}from"./p-C6o0liMT.js";import{c as T}from"./p-_-2E_vYf.js";import"./p-BFTU3MAI.js";import"./p-HT_4DkD0.js";import"./p-Bt4GjEWL.js";const V=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.disabled=!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.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?d:h}render(){return s(i,{key:"d2463dd8a7f976628a67b94401e833ed1c53d777"},s("div",{key:"2b77b2fa81d256a4fa52c85efce570cac62a4e31",class:"form-group d-flex flex-column"},s("label",{key:"baf3c9be24dd987907c234dd53e886ac6e3fc459",part:c,class:"form-label",htmlFor:this.name},this.label),s("input",{key:"9f456e006e074480dda19fa6433f19beb35e35bc",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}),s(b,{key:"82100020ced402e13591f6624e45f5f85aa6980f",helpText:this.helpText,name:this.name}),s(m,{key:"d41b38f4908ada125ff2344d23c837780ae057ba",errorText:this.errorText,name:this.name})))}get el(){return a(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},_=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownerSubmitted=e(this,"ownerSubmitted",7),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new p(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?v.updateOwner:v.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:v.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(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){let t=new p(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{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 u((0,y[this.country])("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}render(){return s("form",{key:"63cf9c7ab9031786f17ea4f3787deea081e305d3",onSubmit:this.validateAndSubmit},s("fieldset",{key:"cef59454c61515f702e846d43242f1576e604953"},s("legend",{key:"355974c342272cd90c6596129a83866f8ad20e37",class:"fw-semibold fs-5",part:n},this.formTitle),s("br",{key:"c78a4742ca2fa7bea462d4c7b1d3e73ccb8cccb9"}),s("div",{key:"ec96fba914ce8eea8223efab633873c79741e29b",class:"row gy-3"},s("owner-form-inputs",{key:"8b1b9118ac93457b38237387d478b3d084fad07d",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"b599ded9cecb9999e3c8b3310f0c70fd07c64690",class:"d-flex gap-2 justify-content-start"},s(k,{key:"54bcdf883415ada89b81b4826cfea23061d4fc60",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(k,{key:"eb990b891fe82108eae8c80da39e5ada7ef27f1e",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"7000dfde686b1879776ab63dcb6a203c0eb519c1"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},O=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{j(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{x(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i;return s("div",{key:"212e1849ea4415835cb4f792cf5799b606ccd170",class:"row gy-3"},s("div",{key:"bc904468596d8a2b6cf82f9cca153d1db7fd9be3",class:"col-12 col-md-8"},s("form-control-text",{key:"116f4a8124743a3bdd01489f7ac4964852d2f701",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"d1de51aa5d3760553012ddc586dc6068c456463f",class:"col-12 col-md-4"},s("form-control-text",{key:"542bd69f56380823a8a2fcf0f95df56a4802e52a",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:"f8230d52a4a685e358bf118d4f77849e8e23f58e",class:"col-12 col-md-6"},s("form-control-text",{key:"0d41fa107ba89a5a6a1dfe2b97d42a86feef3eb0",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"c403d5cf82cc89de42a31f3478e5cda3c2309dac",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"bc0e1c91619857bcac7776e686534763898bdd79",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:w.US})),s("div",{key:"43c3b72350a475defd393625a0d88e5720ab121c",class:"col-12 col-md-3"},s("form-control-date",{key:"4f1bd966e4a28fdcfc3539cb51b97e73bf7bf242",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>C(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"963e110d0f208730944fe7637ba0a3a9ada66a38",class:"col-12 col-md-3"},s("form-control-number",{key:"182586a1b86d351cb5063c0ca0ee578959a93369",name:"ownership_percentage",label:"% of Ownership",defaultValue:null===(t=this.ownerDefaultValue)||void 0===t?void 0:t.ownership_percentage,errorText:this.errors.ownership_percentage,inputHandler:this.inputHandler})),s("div",{key:"bf966123cd887a09b81e9e599118ee03cadabfe2",class:"col-12 col-md-6"},!(null===(e=this.ownerDefaultValue)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:T[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:g[this.country],helpText:T[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:c},T[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:l,value:`****${null===(i=this.ownerDefaultValue)||void 0===i?void 0:i.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:f,onClick:()=>{this.isEditingIdentification=!0,j(this.formController,{ssn_last4:null,identification_number:""})}},"Change")))),s("div",{key:"da39a950fb0f4042d6047a88db4fb1cf7a7b9d07",class:"col-12"},s("identity-address-form",{key:"7ef03a0303d6f62098b5c38d669648bd4557437f",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))}};export{V as form_control_number,_ as owner_form_core,O as owner_form_inputs}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{C as i,e as r}from"./p-CUI41_5y.js";import{J as o}from"./p-BnaR7f2G.js";import{c as n}from"./p-BJ7GFTiW.js";import{D as p}from"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-B5vVjDc_.js";import{D as c}from"./p-hhdRync5.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-BCgsLInF.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const m=class{constructor(e){t(this,e),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){n(),this.analytics=new o(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:e})=>async({onSuccess:r,onError:o})=>{var n;try{const c=await e.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:a(null===(n=c.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new p(c.data),pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:i.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:i.ERROR}))}render(){return e("justifi-dispute-management-core",{key:"934ece663ee7323be1157e67c566424081245b0c",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_dispute_management}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-CV0Pyo1O.js";import{S as r}from"./p-BqNNwq6C.js";import{S as f}from"./p-DcBvJu0k.js";import"./p-DnrawQn3.js";const o=class{constructor(t){s(this,t)}render(){return t(r,{key:"d19fcf55df4b5b001d31af93c263fef39fc0d160"},t(f,{key:"9ab49d76aa71146287fff2013050e008342f0275",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{o as justifi_skeleton}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i}from"./p-CV0Pyo1O.js";import{K as h,L as a,M as r,N as c,O as o,x as n}from"./p-DnrawQn3.js";const f=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.errorText="",this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?h:this.isFocused&&this.checked?a:this.checked?r:this.isFocused?c:o}render(){return e(i,{key:"8237875c1a682811ded25055266f441c6edc6776",class:"form-group d-flex flex-column"},e("div",{key:"310fe7054d414089f3a1e4c457c07e33cb2d55ff",class:"form-check"},e("input",{key:"5894a2e071758c9d647c25724a31b8a6f849353e",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"148b64863e27ad053a2e284f3c17ab994beeca55",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:n},this.label)),e("form-control-help-text",{key:"d46e307063145956af0b181fa8f18ecc9ebbc518",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"06e5867c703104a9c2d136305a663179c5bcb0f6",errorText:this.errorText,name:this.name}))}};export{f as form_control_radio}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{c as r,F as e}from"./p-CKiAlBsU.js";import{b as o,a,c as n}from"./p-BovgIz83.js";import{i as h,a as p,b as l,c as m}from"./p-D8EGHc_m.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as c,e as d}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import{C as j,B as u,b as v}from"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{J as f}from"./p-BnaR7f2G.js";import{B as b}from"./p-2LVpxCS_.js";import{S as C}from"./p-BqNNwq6C.js";import{H as w}from"./p-XrKLre8M.js";import"./p-CZfYo5-1.js";import{c as g}from"./p-BJ7GFTiW.js";import{S as B}from"./p-DcBvJu0k.js";import{B as y}from"./p-XYgDHrVL.js";import{m as _,a as x}from"./p-CR_-qIuN.js";import{B as D}from"./p-CsdYMTrc.js";import"./p-BFTU3MAI.js";import"./p-HT_4DkD0.js";import"./p-_-2E_vYf.js";import"./p-Bt4GjEWL.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-BCgsLInF.js";import"./p-CYQvLgSs.js";import"./p-DnrawQn3.js";import"./p-B5vVjDc_.js";const I=r(Object.assign(Object.assign({},o().fields),{legal_address:p(),additional_questions:a(),representative:h("representative")}));r(Object.assign(Object.assign({},n().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const L=I,O=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(B,{width:"25%"})),s("div",{class:"col-12"},s(B,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"50%"}),s(B,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"65%"}),s(B,{width:"35%"}))),S=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(B,{width:"40%",height:"40px"})),s(O,null),s(O,null),s(O,null)),k=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event",7),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!1,this.isSaving=!1,this.country=j.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new u(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new u(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){g(),this.analytics=new f(this),this.formController=new e(L),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=_({authToken:this.authToken,businessId:this.businessId,service:new D}),this.patchBusiness=x({authToken:this.authToken,businessId:this.businessId,service:new D}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=v.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(C,null,this.isLoading?s(S,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(w,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(b,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:y.submit}),isLoading:this.isSaving},"Submit")))))}};export{k as justifi_business_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e}from"./p-CV0Pyo1O.js";import{f as t,p as s,c as r}from"./p-Dm07nLGs.js";import{f as l,a as d}from"./p-DnrawQn3.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as o,a as c}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{P as p}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const f=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{t[a]=e},this.handleDateInput=(a,e)=>{const t=o(e,{setEndOfDay:!0});this.setParamsOnChange(a,t)}}componentWillLoad(){Object.entries({status:this.status,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([a,e])=>{e&&(s[a]=e)}))}get statusOptions(){return[{label:"All",value:""},{label:p.paid,value:"paid"},{label:p.failed,value:"failed"},{label:p.forwarded,value:"forwarded"},{label:p.scheduled,value:"scheduled"},{label:p.in_transit,value:"in_transit"},{label:p.canceled,value:"canceled"}]}render(){const a=Object.assign({},t);return e(i,{key:"cae6be7a9441ff6024548135f66a73694c53b10b"},e("table-filters-menu",{key:"a419bb5344248f9a857a9b21800c482a983e68e8",params:a,clearParams:r,part:l},e("div",{key:"ee4aa221a245a63e181d9f1e31a0b120cbe4ff2c",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"32ba66ccea590b297d27ec734c6e6b3da1d7ae0f",class:"p-2"},e("form-control-select",{key:"ff480f5fc8d38d0240d952b1cd689d4f5776e35d",name:"status",label:"Status",options:this.statusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.status||t.status||"",disabled:!!this.status,part:d})),e("div",{key:"3b3de6360d735ac8399d2e16538a00aa5736a6c1",class:"p-2"},e("form-control-date",{key:"f3f9fe5154fdf1d98becdcd4c8ed5a0099c8aa76",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:c(this.createdAfter,{showInputDate:!0})||c(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:d})),e("div",{key:"0e95676650aba436b67f9e0537a5f3467015c9e5",class:"p-2"},e("form-control-date",{key:"6aafa1c4d7cc1921559de295e3213307cc34ed54",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:c(this.createdBefore,{showInputDate:!0})||c(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:d})))))}};export{f as justifi_payouts_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as n}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const t=n();class i{async getLinkToken(n,i,o,e){return t.post({endpoint:`plaid/${i}/link`,body:{checkout_id:o},authToken:n,signal:e})}async getLinkTokenForVerification(n,i,o){return t.post({endpoint:`entities/plaid/${i}/link_token`,body:{},authToken:n,signal:o})}async getBankAccountData(n,i,o){return t.get({endpoint:`entities/plaid/${i}/bank_account`,authToken:n,signal:o})}async postPlaidVerifiedBankAccountData(n,i,o,e){return t.post({endpoint:`entities/plaid/${i}/bank_account`,body:o,authToken:n,signal:e})}async tokenizeBankAccount(n,i,o,e,a,s){const c=`plaid/${i}/tokenize`,p={public_token:o};return e&&(p.link_token_id=e),a&&(p.payment_method_group_id=a),t.post({endpoint:c,body:p,authToken:n,signal:s})}}export{i as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={name:"@justifi/webcomponents",version:"6.12.2"};export{e as p}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s;!function(s){s.won="won",s.lost="lost",s.underReview="under_review",s.needsResponse="needs_response"}(s||(s={}));class t{get needsResponse(){return this.status==s.needsResponse}get underReview(){return this.status==s.underReview}get won(){return this.status==s.won}get lost(){return this.status==s.lost}constructor(s){this.id=s.id,this.amount=s.amount,this.currency=s.currency,this.payment_id=s.payment_id,this.reason=s.reason,this.due_date=s.due_date,this.status=s.status,this.metadata=s.metadata,this.created_at=s.created_at,this.updated_at=s.updated_at,this.dispute_response=s.dispute_response?new i(s.dispute_response):void 0}}class i{constructor(s){this.additional_statement=s.additional_statement,this.cancellation_policy_disclosure=s.cancellation_policy_disclosure,this.cancellation_rebuttal=s.cancellation_rebuttal,this.customer_billing_address=s.customer_billing_address,this.customer_email_address=s.customer_email_address,this.customer_name=s.customer_name,this.customer_purchase_ip_address=s.customer_purchase_ip_address,this.duplicate_charge_explanation=s.duplicate_charge_explanation,this.product_description=s.product_description,this.refund_policy_disclosure=s.refund_policy_disclosure,this.refund_refusal_explanation=s.refund_refusal_explanation,this.service_date=s.service_date,this.shipping_address=s.shipping_address,this.shipping_carrier=s.shipping_carrier,this.shipping_date=s.shipping_date,this.shipping_tracking_number=s.shipping_tracking_number,this.duplicate_charge_original_payment_id=s.duplicate_charge_original_payment_id}}export{t as D,s as a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e,t;!function(e){e.nextStep="nextStep",e.previousStep="previousStep",e.cancelDispute="cancelDispute",e.respondToDispute="respondToDispute",e.submit="submit"}(e||(e={})),function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(t||(t={}));export{e as D}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./p-BCgsLInF.js";import{A as s}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const i=s();class e{async record(t){return i.post({endpoint:"analytics",body:t})}}class n{constructor(t){this.eventListeners=new Map,this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("storybook")||(this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{if("function"==typeof this.componentInstance.addEventListener){const s=s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),"error-event"===t&&{error:s.detail})});this.eventListeners.set(t,s),this.componentInstance.addEventListener(t,s)}}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventListeners.forEach(((t,s)=>{this.componentInstance.removeEventListener(s,t)})),this.eventListeners.clear()}}export{n as J}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as s,a as e}from"./p-CKiAlBsU.js";import{m as a,d as i,i as n,b as t,a as r,p as o,e as _,w as u,c,t as l,o as b,f as m,r as d,g as p}from"./p-HT_4DkD0.js";import{C as v}from"./p-BcNb9bVO.js";import{c as f}from"./p-_-2E_vYf.js";const h=e=>{const a=s({legal_name:c.required("Enter legal name"),website_url:u.required("Enter business website url"),email:_.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:t.required("Select business classification"),industry:n.required("Enter a business industry"),date_of_incorporation:i.required("Enter date of registration")}),b=s({legal_name:c.required("Enter legal name"),website_url:u.nullable(),email:_.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:t.nullable(),industry:n.nullable(),tax_id:l.nullable(),date_of_incorporation:i.nullable()});return e?b:a},E=i=>h(i).concat(s({classification:e().required("Select business classification"),tax_id:a(v.USA).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${f.USA.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),g=i=>h(i).concat(s({classification:e().required("Select business classification"),tax_id:a(v.CAN).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${f.CAN.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),w=e=>{const a=s({business_revenue:d.required("Enter business revenue"),business_payment_volume:p.required("Enter business payment volume"),business_average_transaction_amount:d.required("Enter average transaction amount"),business_when_service_received:m.required("Select when service is received"),business_other_payment_details:b.nullable()}),i=s({business_revenue:d.nullable(),business_payment_volume:p.nullable(),business_average_transaction_amount:d.nullable(),business_when_service_received:m.nullable(),business_other_payment_details:b.nullable()});return e?i:a};export{w as a,E as b,g as c}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as r}from"./p-CV0Pyo1O.js";import{z as t}from"./p-DnrawQn3.js";const o=o=>{const{errorText:e,name:s}=o;return e?r("small",{class:"form-text text-danger",id:`form-error-text-${s}`,part:t},e):null};export{o as F}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s}from"./p-CV0Pyo1O.js";import{p as r}from"./p-DnrawQn3.js";const a=()=>s("div",{class:"d-flex justify-content-center"},s("div",{class:"spinner-border",role:"status",part:r},s("span",{class:"visually-hidden"},"Loading...")));export{a as S}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t}from"./p-BRnBHsdq.js";import{a as i}from"./p-BH0Xfn-F.js";var s,e,n,a,r,o,h,c,d,u,l,p,f,m,y,v,_,k,g,w,b,P,A,C,S,U,x,B,T,D,E,F;!function(t){t.MISSING_PROPS="missing-props",t.FETCH_ERROR="fetch-error",t.PATCH_ERROR="patch-error",t.POST_ERROR="post-error",t.UNKNOWN_ERROR="unknown-error",t.TOKENIZE_ERROR="tokenize-error",t.COMPLETE_CHECKOUT_ERROR="complete-checkout-error",t.CHECKOUT_ALREADY_COMPLETED="checkout-already-completed",t.CHECKOUT_EXPIRED="checkout-expired",t.NOT_AUTHENTICATED="not-authenticated",t.INVALID_PARAMETER="invalid-parameter",t.PROVISIONING_REQUESTED="provisioning-already-requested",t.INVALID_REFUND_AMOUNT="invalid-refund-amount",t.VALIDATION_ERROR="validation-error"}(s||(s={})),function(t){t.INFO="info",t.WARNING="warning",t.ERROR="error"}(e||(e={})),function(t){t.NOT_AUTHENTICATED="Not authenticated. Please provide a valid auth token, checkout id, and account id.",t.CHECKOUT_ALREADY_COMPLETED="Checkout already completed. Please create a new checkout.",t.CHECKOUT_EXPIRED="Checkout expired. Please create a new checkout."}(n||(n={}));class z{constructor(t){this.payment_mode=a[t.payment_mode],this.payment_token=t.payment_token,this.payment_status=t.payment_status,this.payment_response=t.payment_response,this.payment_error_code=t.payment_error_code,this.payment_error_description=t.payment_error_description,this.checkout_id=t.checkout_id,this.additional_transactions=t.additional_transactions,this.payment_id=t.payment_id,this.payment_method_id=t.payment_method_id,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}}class I{constructor(t){var i;this.id=t.id,this.description=t.description,this.payment_intent_id=t.payment_intent_id,this.account_id=t.account_id,this.platform_account_id=t.platform_account_id,this.payment_amount=t.payment_amount,this.payment_client_id=t.payment_client_id,this.payment_description=t.payment_description,this.payment_methods=t.payment_methods,this.payment_method_group_id=t.payment_method_group_id,this.payment_settings=t.payment_settings,this.bnpl=t.bnpl,this.total_amount=t.total_amount,this.insurance_amount=t.insurance_amount,this.status=o[t.status],this.payment_currency=t.payment_currency,this.mode=t.mode,this.statement_descriptor=t.statement_descriptor,this.application_fees=t.application_fees,this.successful_payment_id=t.successful_payment_id,this.created_at=t.created_at,this.updated_at=t.updated_at,this.completions=null===(i=t.completions)||void 0===i?void 0:i.map((t=>new z(t)))}get payment_mode(){var t,i,s,e,n,r;let o;if(!this.completions||0===this.completions.length)return a.unknown;const h=this.completions.sort(((t,i)=>new Date(i.updated_at).getTime()-new Date(t.updated_at).getTime()))[0];return h.payment_mode?o=h.payment_mode:(null===(s=null===(i=null===(t=h.payment_response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.payment_method)||void 0===s?void 0:s.card)?o=a.card:(null===(r=null===(n=null===(e=h.payment_response)||void 0===e?void 0:e.data)||void 0===n?void 0:n.payment_method)||void 0===r?void 0:r.bank_account)&&(o=a.bank_account),o}formattedPaymentAmount(i){return t(i,this.payment_currency)}}!function(t){t.bnpl="Buy Now Pay Later",t.ecom="E-commerce",t.card="Card",t.bank_account="Bank Account",t.card_present="Card Present",t.apple_pay="Apple Pay",t.unknown=""}(a||(a={})),function(t){t.bnpl="bnpl",t.ecom="ecom",t.apple_pay="apple_pay"}(r||(r={})),function(t){t.created="created",t.completed="completed",t.attempted="attempted",t.expired="expired"}(o||(o={})),function(t){t.failed="failed",t.succeeded="succeeded"}(h||(h={})),function(t){t.automatic="automatic",t.manual="manual"}(c||(c={})),function(t){t.card="card",t.bankAccount="bankAccount",t.sezzle="sezzle",t.plaid="plaid",t.applePay="applePay"}(d||(d={})),function(t){t.card="Card",t.bankAccount="ACH",t.unknown="Unknown"}(u||(u={})),function(t){t.pending="pending",t.automatic="automatic",t.authorized="authorized",t.succeeded="succeeded",t.failed="failed",t.canceled="canceled",t.disputed="disputed",t.fully_refunded="fully_refunded",t.partially_refunded="partially_refunded"}(l||(l={})),function(t){t.usd="usd",t.cad="cad"}(p||(p={}));class q{constructor(t){this.card=t.card?new N(t.card):void 0,this.bank_account=t.bank_account?new M(t.bank_account):void 0}get payersName(){return this.card?this.card.name:this.bank_account?this.bank_account.name:null}get lastFourDigits(){return this.card?`**** ${this.card.acct_last_four}`:this.bank_account?`**** ${this.bank_account.acct_last_four}`:null}}class M{constructor(t){this.id=t.id,this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class N{constructor(t){this.id=t.id||"",this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class j{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.amount_disputed=t.amount_disputed,this.amount_refundable=t.amount_refundable,this.amount_refunded=t.amount_refunded,this.balance=t.balance,this.captured=t.captured,this.capture_strategy=t.capture_strategy,this.description=t.description,this.disputed=t.disputed,this.disputes=t.disputes,this.error_code=t.error_code,this.error_description=t.error_description,this.expedited=t.expedited,this.fee_amount=t.fee_amount,this.is_test=t.is_test,this.metadata=t.metadata,this.payment_method=new q(t.payment_method),this.payment_intent_id=t.payment_intent_id,this.refunded=t.refunded,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}get disputedStatus(){const t=this.disputes.some((t=>t.status===i.lost));return this.disputed?t?i.lost:"open":null}get payment_type(){return this.payment_method?this.payment_method.card?u.card:u.bankAccount:u.unknown}get payers_name(){return this.payment_method.payersName}get last_four_digits(){return this.payment_method.lastFourDigits}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.payment="payment",t.paymentFee="payment_fee",t.payout="payout",t.refund="refund",t.feeRefund="fee_refund",t.dispute="dispute",t.disputeFee="dispute_fee",t.disputeFeeRefund="dispute_fee_refund",t.disputeRefund="dispute_refund",t.applicationFeeReturned="application_fee_returned"}(f||(f={}));class R{constructor(t){this.id=t.id,this.amount=t.amount,this.balance=t.balance,this.currency=t.currency,this.financial_transaction_id=t.financial_transaction_id,this.payment_id=t.payment_id,this.payment_balance_txn_type=t.payment_balance_txn_type,this.source_id=t.source_id,this.source_type=t.source_type,this.created_at=t.created_at,this.updated_at=t.updated_at}get displayTransactionId(){return this.payment_balance_txn_type===f.paymentFee||this.payment_balance_txn_type===f.applicationFeeReturned?"--":this.source_id}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(m||(m={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(y||(y={}));class H{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.settlement_priority=t.settlement_priority||"standard"}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.fee="fee",t.payment="payment",t.payout="payout",t.sellerPaymentRefund="seller_payment_refund",t.disputeAmountCollected="dispute_amount_collected",t.disputeFeeCollected="dispute_fee_collected",t.sellerPayment="seller_payment",t.transfer="transfer",t.partnerPlatformProceedsCredit="partner_platform_proceeds_credit"}(v||(v={}));class L{constructor(t){this.id=t.id,this.account_id=t.account_id,this.payout_id=t.payout_id,this.financial_transaction_id=t.financial_transaction_id,this.amount=t.amount,this.fee=t.fee,this.net=t.net,this.currency=t.currency,this.source_id=t.source_id,this.description=t.description,this.txn_type=t.txn_type,this.created_at=t.created_at,this.available_on=t.available_on,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration",t.archived="archived"}(_||(_={})),function(t){t.verifone="verifone"}(k||(k={}));class V{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(g||(g={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed",t.in_progress="in_progress",t.on_hold="on_hold",t.canceled="canceled"}(w||(w={}));class Y{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||k.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(b||(b={}));class ${constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(P||(P={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(A||(A={}));class Q{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}!function(t){t.voidedCheck="voided_check",t.balanceSheet="balance_sheet",t.bankStatement="bank_statement",t.governmentId="government_id",t.profitAndLossStatement="profit_and_loss_statement",t.taxReturn="tax_return",t.other="other"}(C||(C={})),function(t){t.pending="pending",t.uploaded="uploaded",t.canceled="canceled",t.needed="needed"}(S||(S={}));class W{constructor(){this.voided_check=[],this.balance_sheet=[],this.bank_statement=[],this.government_id=[],this.profit_and_loss_statement=[],this.tax_return=[],this.other=[]}}class X{constructor(t,i){this.fileData=null,this.file=t.file,this.document_type=t.document_type,this.presigned_url=null,this.record_data={business_id:i,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}async getFileData(){if(this.fileData)return this.fileData;const t=new Promise(((t,i)=>{const s=new FileReader;s.onload=i=>{this.fileData=i.target.result,t(this.fileData)},s.onerror=()=>{i(new Error("Error reading file"))},s.readAsArrayBuffer(this.file)}));return await t}setPresignedUrl(t){this.presigned_url=t}}!function(t){t.succeeded="succeeded",t.failed="failed"}(U||(U={})),function(t){t.customerRequest="customer_request",t.duplicate="duplicate",t.fraudulent="fraudulent"}(x||(x={}));class G{constructor(t){this.amount=t.amount,this.reason=t.reason,this.description=t.description,this.metadata=t.metadata}}!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(B||(B={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(T||(T={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(D||(D={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(E||(E={}));class J{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||T.PLAIN,this.buttonStyle=t.buttonStyle||D.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class K{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,i,s,e;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(i=this.supportedNetworks)||void 0===i?void 0:i.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(e=this.total)||void 0===e?void 0:e.amount))}}class O{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var i;if(!this.isApplePaySupported())return!1;try{return await(null===(i=window.ApplePaySession)||void 0===i?void 0:i.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,i,s="final"){return{label:t,amount:this.formatAmount(i),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[E.SUPPORTS_3DS,E.SUPPORTS_EMV,E.SUPPORTS_CREDIT,E.SUPPORTS_DEBIT]}}!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"}(F||(F={}));const Z={[F.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[F.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[F.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[F.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[F.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[F.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[F.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[F.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[F.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[F.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[F.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[F.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[F.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},tt={[F.PLAID_SDK_LOAD_FAILED]:e.ERROR,[F.PLAID_LINK_INIT_FAILED]:e.ERROR,[F.PLAID_LINK_TOKEN_FAILED]:e.ERROR,[F.PLAID_AUTHENTICATION_FAILED]:e.ERROR,[F.PLAID_BANK_NOT_SUPPORTED]:e.WARNING,[F.PLAID_TOKEN_EXPIRED]:e.WARNING,[F.PLAID_NETWORK_ERROR]:e.WARNING,[F.PLAID_USER_CANCELLED]:e.INFO,[F.PLAID_TIMEOUT]:e.WARNING,[F.PLAID_INVALID_CREDENTIALS]:e.ERROR,[F.PLAID_ACCOUNT_LOCKED]:e.ERROR,[F.PLAID_MAINTENANCE]:e.WARNING,[F.PLAID_RATE_LIMITED]:e.WARNING};export{J as A,e as C,C as E,o as I,y as P,x as R,Q as S,w as T,r as a,j as b,g as c,_ as d,s as e,I as f,l as g,R as h,H as i,L as j,Y as k,V as l,$ as m,G as n,O as o,K as p,B as q,D as r,T as s,E as t,n as u,tt as v,Z as w,F as x,W as y,X as z}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as t}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const a=t();class n{async fetchPayouts(t,n,s){return a.get({authToken:n,endpoint:`account/${t}/payouts`,params:s})}async fetchPayout(t,n){return a.get({authToken:n,endpoint:`payouts/${t}`})}async fetchCSV(t,n){return a.get({authToken:n,endpoint:`reports/payouts/${t}`})}async fetchPayoutTransactions(t,n,s){return a.get({authToken:n,endpoint:"balance_transactions",params:s,headers:{"sub-account":t}})}}export{n as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./p-CV0Pyo1O.js";import{d as e,b as a}from"./p-BRnBHsdq.js";import{B as c,a as o}from"./p-pL4dNfsl.js";import{a3 as p,a4 as s}from"./p-DnrawQn3.js";const r="created_at,payment_amount,payment_description,payment_mode,status",d={created_at:()=>t("th",{part:p,scope:"col",title:"The date each checkout occurred"},"Processed On"),payment_amount:()=>t("th",{part:p,scope:"col",title:"The dollar amount of each checkout"},"Payment Amount"),payment_description:()=>t("th",{part:p,scope:"col",title:"The description of each checkout"},"Payment Description"),sub_account_name:()=>t("th",{part:p,scope:"col",title:"The sub account associated with the checkout"},"Sub Account"),payment_mode:()=>t("th",{part:p,scope:"col",title:"The payment mode of each checkout"},"Payment Mode"),status:()=>t("th",{part:p,scope:"col",title:"The current status of each checkout"},"Status")},n={created_at:(c,o)=>t("td",{part:s(o)},t("div",{class:"fw-bold"},a(c.created_at)),t("div",{class:"fw-bold"},e(c.created_at))),payment_amount:(e,a)=>t("td",{part:s(a)},e.formattedPaymentAmount(e.payment_amount)),payment_description:(e,a)=>t("td",{part:s(a)},e.payment_description),sub_account_name:(e,a)=>t("td",{part:s(a)},e.sub_account_name),payment_mode:(e,a)=>t("td",{part:s(a)},e.payment_mode),status:(e,a)=>t("td",{part:s(a)},t(o,Object.assign({},{created:{variant:c.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:c.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:c.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:c.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))};export{n as a,d as c,r as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as t}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as t}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,c){return e.get({endpoint:"checkouts",params:c,headers:{Account:t},authToken:o})}async complete(t,o,c){const s=`checkouts/${o}/complete`,n={payment_mode:c.payment_mode};return c.payment_token&&(n.payment_token=c.payment_token),e.post({endpoint:s,body:n,authToken:t})}}export{o as C}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,a as t}from"./p-CKiAlBsU.js";import{h as n,l as a,j as s,k as i,n as r,s as l,q as o,p as d,e as p,u as c,v as m,x as _}from"./p-HT_4DkD0.js";import{C as E}from"./p-BcNb9bVO.js";const b=r=>e(r?{line1:s.nullable(),line2:a.nullable(),city:n.nullable(),state:t().nullable(),postal_code:t().nullable()}:{line1:s.required("Enter street address"),line2:a.nullable(),city:n.required("Enter city"),state:t().required("Select state"),postal_code:i(E.USA).required("Enter postal code")}),f=r=>e(r?{line1:s.nullable(),line2:a.nullable(),city:n.nullable(),state:t().nullable(),postal_code:t().nullable()}:{line1:s.required("Enter street address"),line2:a.nullable(),city:n.required("Enter city"),state:t().required("Select province"),postal_code:i(E.CAN).required("Enter postal code")}),h={[E.USA]:b,[E.CAN]:f},u=(n,a)=>a?(n=>e({name:m.required(`Enter ${n} name`),title:c.nullable(),email:p.nullable(),phone:d.nullable(),dob_full:o(n).nullable(),ssn_last4:t().nullable(),identification_number:l.nullable(),ownership_percentage:r.nullable(),address:b(!0)}))(n):(n=>e({name:m.required(`Enter ${n} name`),title:c.required(`Enter ${n} title`),email:p.required(`Enter ${n} email`),phone:d.required("Enter phone number"),dob_full:o(n).required("Enter date of birth"),ssn_last4:t().nullable(),identification_number:l,ownership_percentage:r.nullable(),address:b(!1)}))(n),$=(n,a)=>a?(n=>e({name:m.required(`Enter ${n} name`),title:c.nullable(),email:p.nullable(),phone:d.nullable(),dob_full:o(n).nullable(),ssn_last4:t().nullable(),identification_number:_(E.CAN).nullable(),ownership_percentage:r.nullable(),address:f(!0)}))(n):(n=>e({name:m.required(`Enter ${n} name`),title:c.required(`Enter ${n} title`),email:p.required(`Enter ${n} email`),phone:d.required("Enter phone number"),dob_full:o(n).required("Enter date of birth"),ssn_last4:t().nullable(),identification_number:_(E.CAN),ownership_percentage:r.nullable(),address:f(!1)}))(n),y={[E.USA]:u,[E.CAN]:$};export{b as a,$ as b,f as c,y as d,h as e,u as i}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as l}from"./p-CV0Pyo1O.js";import{S as s}from"./p-DcBvJu0k.js";import"./p-CZfYo5-1.js";const i=()=>l("div",{class:"row gap-3"},l("div",{class:"col-12"},l(s,{width:"25%"})),l("div",{class:"col-12"},l(s,{width:"100%"})),l("div",{class:"col-12 d-flex gap-3"},l(s,{width:"50%"}),l(s,{width:"50%"})),l("div",{class:"col-12 d-flex gap-3"},l(s,{width:"65%"}),l(s,{width:"35%"}))),d=()=>l("div",{class:"row gap-5"},l("div",{class:"col-12"},l(s,{width:"40%",height:"40px"})),l(i,null),l(i,null),l(i,null));export{d as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{b as o,C as r}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as s,a as i}from"./p-B5vVjDc_.js";const t=({id:t,authToken:e,service:p})=>async({onSuccess:a,onError:n,final:c})=>{var m;try{const c=await p.fetchPayment(t,e);if(c.error){n({error:i(c.error),code:s(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR})}else a({payment:new o(c.data)})}catch(o){const t=s(null==o?void 0:o.code);n({error:i(o),code:t,severity:r.ERROR})}finally{c()}};export{t as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as n}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const t=n();class a{async fetchPayments(n,a,s){return t.get({endpoint:`account/${n}/payments`,params:s,authToken:a})}async fetchPayment(n,a){return t.get({endpoint:`payments/${n}`,authToken:a})}async fetchPaymentTransactions(n,a,s){return t.get({endpoint:`payments/${n}/payment_balance_transactions`,params:s,authToken:a})}}export{a as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./p-CV0Pyo1O.js";import{s}from"./p-DnrawQn3.js";const e=({component:e="div",height:o,width:r,className:a,styles:i={}})=>{const n=Object.assign(Object.assign({},i),{width:r,height:o});return t(e,{class:`${a} skeleton`,style:n,part:s,"aria-hidden":"true"})};export{e as S}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s}from"./p-CV0Pyo1O.js";import{b as t}from"./p-DnrawQn3.js";import{c as a}from"./p-D8GTwl9v.js";const r=a=>s("h2",{class:`header-2 ${null==a?void 0:a.class}`,part:t},a.text),o=a({}),{state:n,on:e}=o,i=a({}),{state:l}=i,p={},c=()=>{let s=!0;return Object.keys(n).forEach((t=>{null===n[t]?(l[t]=!0,s=!1):l[t]=!1})),{isValid:s}},m=(s,t)=>{const a=p.hasOwnProperty(s),r=p[s];if(!a)return p[s]=t,!1;const o=r!==t;return o&&(p[s]=t),o};export{r as H,l as a,e as b,m as h,n as i,c as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as r}from"./p-BcNb9bVO.js";import{C as o}from"./p-CUI41_5y.js";import{g as s,a as e}from"./p-B5vVjDc_.js";const t=({id:t,authToken:c,service:i})=>async({onSuccess:n,onError:a})=>{var v;try{const m=await i.fetchBusiness(t,c);if(m.error){return a({error:e(m.error),code:s(null===(v=m.error)||void 0===v?void 0:v.code),severity:o.ERROR})}n({business:new r(m.data)})}catch(r){const e=s(null==r?void 0:r.code);return a({error:r.message||r,code:e,severity:o.ERROR})}};export{t as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./p-CKiAlBsU.js";import{S as a,C as t}from"./p-BcNb9bVO.js";import{a as s}from"./p-_-2E_vYf.js";import{b as r,a as n}from"./p-Bt4GjEWL.js";const i=e=>""===e?null:e,l=/^\d+$/,d=/P\.?\s?O\.?\s?Box|Postal\sBox/i,o=e().email("Enter valid email").transform(i),u=e().matches(/^\d{10}$/,"Enter valid phone number").transform(i),c=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(i),m=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(i),b=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(i),h=e().transform(i),v=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").transform(i),E=e().matches(l,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(i),N=a=>e().matches(s[a].postalRegex,"Enter valid postal code").transform(i),p=a=>a===t.CAN?e().matches(l,"Enter valid SIN").length(s[a].identityDigits,"Enter valid SIN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SIN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SIN",(e=>"123456789"!==e)).transform(i):x,S=a=>a===t.CAN?e().matches(l,"Enter valid Business Number (BN)").length(s[a].taxIdDigits,"Enter valid Business Number (BN)").test("not-repeat","Enter valid Business Number (BN)",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid Business Number (BN)",(e=>"123456789"!==e)).transform(i):E,A=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(i),B=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(i),w=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").transform(i),g=a=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${a} must be at least 18 years old`,(e=>{const a=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),a<=t})).transform(i),x=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(i),$=e().matches(l,"Enter valid percentage").test("min","Percentage must be at least 0",(e=>!e||parseFloat(e)>=0)).test("max","Percentage must be at most 100",(e=>!e||parseFloat(e)<=100)).transform(i),y=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!d.test(e))).transform(i),f=e().max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!d.test(e))).transform(i),I=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").transform(i),D=e().oneOf(a.map((e=>e.value)),"Enter a 2-letter state abbreviation, such as CA").transform(i),j=e().matches(/^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$/,"Enter valid postal code").transform(i),C=e().matches(l,"Enter valid revenue").transform(i),P=e().matches(l,"Enter valid payment volume").transform(i),_=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(i),q=e().transform(i),Z=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(i),z=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(i),O=e().oneOf(n.map((e=>e.value)),"Select account type").transform(i),F=e().min(4,"Account number must be at least 4 digits").max(17,"Account number must be less than 17 digits").matches(l,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(i),T=e().length(9,"Routing number must be 9 digits").matches(l,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const a=Array.from(String(e),Number);return 9===a.length&&0==(3*(a[0]+a[3]+a[6])+7*(a[1]+a[4]+a[7])+(a[2]+a[5]+a[8]))%10})(e))).transform(i);export{F as A,O as B,z as C,Z as D,l as E,T as F,m as a,h as b,c,A as d,o as e,_ as f,P as g,I as h,v as i,y as j,N as k,f as l,S as m,$ as n,q as o,u as p,g as q,C as r,x as s,E as t,w as u,B as v,b as w,p as x,j as y,D as z}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as o}from"./p-CV0Pyo1O.js";import{A as r}from"./p-DnrawQn3.js";const s=s=>o("h3",{class:`header-3 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as o}from"./p-CV0Pyo1O.js";import{h as r}from"./p-DnrawQn3.js";const s=s=>o("h1",{class:`header-1 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as n,F as i}from"./p-CKiAlBsU.js";import{f as o}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{R as a,C as u,e as h,n as c}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{B as l}from"./p-2LVpxCS_.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-Dbg501Lu.js";import{m as p}from"./p-DWevPe7C.js";import{J as f}from"./p-BnaR7f2G.js";import{c as v}from"./p-BJ7GFTiW.js";import{g as y,a as j}from"./p-B5vVjDc_.js";import{A as w}from"./p-CYQvLgSs.js";import{S as b}from"./p-DcBvJu0k.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-DnrawQn3.js";import"./p-BCgsLInF.js";const C=t=>{const e=+t;return n().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:n().optional(),reason:n().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},B=[{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"}],I=w();class T{async postRefund(t,e,s,r){return I.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const S=w();class k{async postVoid(t,e,s){return S.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const x=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),A=()=>t(m,null,t("div",{class:"row gap-5"},t(x,null),t(x,null),t(x,null))),R=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new i(g())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new i(g(e)),this.formController.setInitialValues({amount:e}),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?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new c({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:n,onError:i,final:o})=>{var a;try{const o=await r.postVoid(s,e,t);if(o.error)return i({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});n(o)}catch(t){const e=y(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:u.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new k});return new Promise((e=>{let s,r=!1;const n=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:i})=>{r=!0,this.handleError(t,s,i),this.processRefund(n).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:n,onSuccess:i,onError:o,final:a})=>{var h;try{const a=await r.postRefund(s,e,t,n);if(a.error)return o({error:j(a.error),code:y(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});i(a)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{return a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new T});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(A,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,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:e.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:e.reason,inputHandler:this.inputHandler,options:B,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(l,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{R as justifi_refund_payment}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import{c as d,a as s}from"./p-BRnBHsdq.js";import{f as i,p as r,c as l}from"./p-Dw63wyhO.js";import{f as b,a as c}from"./p-DnrawQn3.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import{d as o}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{i[e]=a},this.handleDateInput=(e,a)=>{const t=d(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId,provider_id:this.providerId,serial_number:this.serialNumber,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:o.connected},{label:"Disconnected",value:o.disconnected},{label:"Unknown",value:o.unknown},{label:"Pending Configuration",value:o.pending_configuration},{label:"Archived",value:o.archived}]}render(){const e=Object.assign({},i);return a(f,{key:"77a3937540cd75a7cc51a90b1cd7c7c52ae870b2"},a("table-filters-menu",{key:"4a725bfe0b79d0046eea2f7b3e3fe295b5384b94",params:e,clearParams:l,part:b},a("div",{key:"0cb6fcedf45371c68b8b37e8b832ca3e9b48789e",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"602fc95acdd62112bc53f858073e936f9bf5e48d",class:"p-2"},a("form-control-text",{key:"c4e8dc476d2d8d80f2367ab6f8a5e5db17a72f15",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||i.terminal_id,disabled:!!this.terminalId,part:c})),a("div",{key:"e83b3b3ef5f1509286cabaee9faeb96cd7d9e15a",class:"p-2"},a("form-control-text",{key:"2f6eb9224740f327ce5019d93d879c231df8b0ee",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||i.terminal_order_id,disabled:!!this.terminalOrderId,part:c})),a("div",{key:"942179e72ce3b8fea5c2cd2dd28aeecd586bdb6c",class:"p-2"},a("form-control-text",{key:"adb7eaab71834c2c619a09f9053dd8374a8bdfcc",name:"provider_id",label:"Device ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.providerId||i.provider_id,disabled:!!this.providerId,part:c})),a("div",{key:"c15d630d0c3500d26720db63cbf90098b837ee24",class:"p-2"},a("form-control-text",{key:"93f4e6c1e5c8f7e853111e74e25946fd683c5a17",name:"serial_number",label:"Serial Number",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.serialNumber||i.serial_number,disabled:!!this.serialNumber,part:c})),a("div",{key:"6a269a0c2fb90fb4e00b05d4aeee3fff4ab4e967",class:"p-2"},a("form-control-select",{key:"f6d9e45354d5c3d8894fe442d0bef490bafb20de",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||i.status||"",disabled:!!this.terminalStatus,part:c})),a("div",{key:"ea70b109bd231bd085bb2cb8388d8010e0c5aa79",class:"p-2"},a("form-control-date",{key:"256cddfb0e68590bc8d8403aa8a033ad40d613fe",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:s(this.createdAfter||i.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:c})),a("div",{key:"1be9bf8d68c691f09d40db9c45d78ed923fb3d86",class:"p-2"},a("form-control-date",{key:"79d48b277064373e3faf999ae8771a44b35de1cb",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:s(this.createdBefore||i.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:c})))))}};export{n as justifi_terminals_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DcBvJu0k.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{e as c}from"./p-BRnBHsdq.js";import{c as r}from"./p-BJ7GFTiW.js";import"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-BCgsLInF.js";const d=i=>{const{isReady:a}=i;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"120px"}),e(t,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"110px"}),e(t,{height:"36px"}))))},n=class{constructor(e){i(this,e),this.isReady=!1}async componentWillLoad(){await a(),this.iframeOrigin=s.iframeOrigin,this.tabId=c(),r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((i=>{e.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return e&&i}async tokenize({clientId:e,paymentMethodMetadata:i,account:t}){return await this.accountNumberIframeElement.tokenize(e,i,t)}render(){return e("div",{key:"85e116539bb4721484d9877706ff93de1a68ec59"},e(d,{key:"b12a13d02b004e2957a55eb00fb38178dc283a92",isReady:this.isReady}),e("hidden-input",{key:"657ed7946158788e9291906ec0966eb3bd3c544c"}),e("div",{key:"321fddef9af616686d525af94dc4a65b5a4c18e6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"cee2dcc5bf8032ca95dc6b46e6a2bb47b371986b",class:"row mb-3"},e("iframe-input",{key:"50dfad1fc1eb41a87f2964e80d39036da1fc89ce",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),e("div",{key:"bd47ac6ff7c687ce9eb7e6ea2a66628392f73cdc",class:"row"},e("iframe-input",{key:"bbe98adda61bc72925e77714139b604d2959e156",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{n as bank_account_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-CV0Pyo1O.js";import{B as i}from"./p-2LVpxCS_.js";import"./p-DnrawQn3.js";const r=class{constructor(s){t(this,s),this.variant="primary",this.type="button"}render(){return s(i,{key:"5257c5d43fe6f14dddf688ad979e91c8594014a9",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle,hidden:this.hidden},this.text)}};export{r as internal_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import{f as s,p as r,c as l}from"./p-BPTtWj7E.js";import{f as i,a as d}from"./p-DnrawQn3.js";import{S as c}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import{c as o,a as p}from"./p-BRnBHsdq.js";import{T as b,c as n}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const f=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a},this.handleDateInput=(e,a)=>{const t=o(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore,company_name:this.companyName}).forEach((([e,a])=>{a&&(r[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:b.created},{label:"Completed",value:b.completed},{label:"Submitted",value:b.submitted},{label:"In Progress",value:b.in_progress},{label:"On Hold",value:b.on_hold},{label:"Canceled",value:b.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:n.boardingOnly},{label:"Boarding Shipping",value:n.boardingShipping}]}render(){const e=Object.assign({},s);return a(c,{key:"cc09bb58c13ab0b26d92eb164cf6bc43a3c96c63"},a("table-filters-menu",{key:"08369c471d891184e36dd6c5aae8842e0df5c01a",params:e,clearParams:l,part:i},a("div",{key:"addd8a1cf74ae9e80cc8e4374a36400204c81400",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"b74cf4d1d13a0a6250000c8f7f0845f4c907e488",class:"p-2"},a("form-control-select",{key:"b1b060b64f67695bb395488fa23dcbf6373b419b",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||s.order_status||"",disabled:!!this.orderStatus,part:d})),a("div",{key:"a3c06691181d01d6a664016b4add0784b23ab06c",class:"p-2"},a("form-control-select",{key:"376039e2f10fbcc9ed008611d4976cf6412c16a4",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||s.order_type||"",disabled:!!this.orderType,part:d})),a("div",{key:"f03c94412b7861d255dfdef98a4c2fad14e96cfa",class:"p-2"},a("form-control-date",{key:"d7588c4ecda9480881e0f67e0418b1e475db188c",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:p(this.createdAfter,{showInputDateTime:!0})||p(s.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:d})),a("div",{key:"76f0cee7430e846a479478c903d892ac05490787",class:"p-2"},a("form-control-date",{key:"ce0f99ebfa8a82111689ae6ee4cc1d8bd141d657",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:p(this.createdBefore,{showInputDateTime:!0})||p(s.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:d})),a("div",{key:"5c06fefb50c8c987a8e55623cba70a39cc64bbe1",class:"p-2"},a("form-control-text",{key:"0a24516bbf665784e5c13a16b0b38be2bafb684b",name:"company_name",label:"Company Name",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.companyName||s.company_name,disabled:!!this.companyName,part:d})))))}};export{f as justifi_terminal_orders_list_filters}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,F as e,r as i,c as t}from"./p-CV0Pyo1O.js";import{E as a}from"./p-x9fFFf7F.js";import{B as r}from"./p-CsdYMTrc.js";import{m as o}from"./p-GJyHX3us.js";import{C as n,e as l}from"./p-CUI41_5y.js";import{J as c}from"./p-BnaR7f2G.js";import{c as p}from"./p-BJ7GFTiW.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as h}from"./p-DcBvJu0k.js";import"./p-DnrawQn3.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-B5vVjDc_.js";import"./p-BCgsLInF.js";const m=()=>{const i=()=>s("div",{class:"mt-5"},s(h,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(h,null),s(h,null),s(h,null)),s("div",{class:"col-12 col-md-6"},s(h,null),s(h,null),s(h,null))));return s(e,null,s(i,null),s(i,null),s(i,null),s(i,null))},f=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event",7),this.loading=!0}componentWillLoad(){p(),this.analytics=new c(this),this.initializeGetBusiness()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetBusiness()}initializeGetBusiness(){this.businessId&&this.authToken?(this.getBusiness=o({id:this.businessId,authToken:this.authToken,service:new r}),this.fetchData()):(this.errorMessage="Invalid business id or auth token",this.errorEvent.emit({errorCode:l.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}updateOnPropChange(){this.getBusiness&&this.fetchData()}fetchData(){this.loading=!0,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.errorMessage=null},onError:({error:s,code:e,severity:i})=>{this.errorMessage=s,this.errorEvent.emit({errorCode:e,message:s,severity:i})},final:()=>{this.loading=!1}})}render(){return s(d,{key:"7ce48e6905cdbbf8f94470913ecfa3ef8dbb76c7"},this.loading&&s(m,{key:"7c3439e0c247436cd7951d3bdc32e7672c9f8447"}),!this.loading&&this.errorMessage&&a(this.errorMessage),!this.loading&&!this.errorMessage&&this.business&&s("justifi-details",{key:"bf57dacf2067f2704014ce3e002958e3306bba73",errorMessage:this.errorMessage},s("div",{key:"46d19a178ba0d33aa21a4f3900128e3e905731a9",slot:"detail-sections"},s("core-info-details",{key:"ac217a4cfe6b45810a85ca320760b7331f76e60b",business:this.business}),s("legal-address-details",{key:"1fc1a196a43bcf5f9eafd09bfe74c8bb7c409797",legalAddress:this.business.legal_address}),s("representative-details",{key:"1e0833606b129f69a05946726172963cbec05189",representative:this.business.representative}),s("owner-details",{key:"c974111dc67a8961ef6435c34843ca927ad8a7e5",owners:this.business.owners}),s("additional-questions-details",{key:"0951d284a373457e98a1dafc80231ec3ee057e0a",additionalQuestions:this.business.additional_questions}))))}static get watchers(){return{businessId:["propChanged"],authToken:["propChanged"],getBusiness:["updateOnPropChange"]}}};export{f as justifi_business_details}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as i}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{j as s,C as o,e as r}from"./p-CUI41_5y.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{J as n}from"./p-BnaR7f2G.js";import{c as h}from"./p-BJ7GFTiW.js";import{g as p,a as d}from"./p-B5vVjDc_.js";import{P as l}from"./p-CX36GHQP.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as T,g as j,h as v,i as g,j as k,k as C}from"./p-bn_huKYG.js";import{S as D}from"./p-BqNNwq6C.js";import{T as P}from"./p-CZfYo5-1.js";import{a as I}from"./p-BRnBHsdq.js";import{a3 as S,a4 as q}from"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-BCgsLInF.js";import"./p-CYQvLgSs.js";import"./p-CDf5H0TB.js";const B={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"},F={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},O[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},I(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},I(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},I(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.updated_at,{showTime:!0})))},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),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,B,F),h(),this.analytics=new n(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:r,onError:c,final:n})=>{var h;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:d(n.error),code:p(null===(h=n.error)||void 0===h?void 0:h.code),severity:o.ERROR}):r({balanceTransactions:n.data.map((t=>new s(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:d(t),code:e,severity:o.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(r.MISSING_PROPS,this.errorMessage,o.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:"6bcc0b4af31b1b1481caa3a2ea58f21e961b4777"},t(u,{key:"506239f8d1f08007c93d09b35973e773447b95f0"},t(m,{key:"ab46955207d861620abb1fe328ba8eb47bf6912e"},t(b,{key:"b7c20c0d180e208a8a8d585751180be5f979c4a8"},t(y,{key:"6f47150a981f137cb3633437744b36e6c9b1f3f0"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"eb7912643fe3a3d9f66a2becbb130ba8a1a33127"},t(w,{key:"c2f95846f4c90535695ebce26c82b90b3ae022fe",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"93c2764401380a7dad07907c9f264d991f0b8e9d",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"2ab2bcc9f9d2768a17a6e511d0ecf7a24a2ca4b1",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(v,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(g,{key:"d5c76e1db68cebd0acac42f607a7602db3ab967a"},t(k,{key:"28d6eed555117e50a852c899085b634ba1ff1ccb"},t(C,{key:"b4eceba9f0a705ee8824aeb313b1505752b9a53e",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"ba042ec0410830443db71fbeb8d90162ce761996",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payout_transactions_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-CYQvLgSs.js";import{C as r,e as o}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-B5vVjDc_.js";import{J as c}from"./p-BnaR7f2G.js";import{c as l}from"./p-BJ7GFTiW.js";import{c as h}from"./p-BArmtmkq.js";import{p as d,f as p,r as u,j as v}from"./p-BRnBHsdq.js";import{v as m,i as y,a as f,H as j}from"./p-DkdzUTnl.js";import{t as _,z as g}from"./p-DnrawQn3.js";import{S as k}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-DcBvJu0k.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-BCgsLInF.js";import"./p-DkoufM1t.js";import"./p-HXpYMWUU.js";const C=e();class b{async fetchQuote(s,t){return C.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return C.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),q=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new b};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(k,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{q as justifi_season_interruption_insurance}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as i}from"./p-CV0Pyo1O.js";import{S as l}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const s=class{constructor(i){r(this,i)}async getValues(){var r,i;return null!==(i=null===(r=this.billingFormFullRef)||void 0===r?void 0:r.getValues())&&void 0!==i?i:{}}async validate(){var r,i;return null!==(i=null===(r=this.billingFormFullRef)||void 0===r?void 0:r.validate())&&void 0!==i?i:{isValid:!1,errors:{}}}render(){return i(l,{key:"22594318b6f851014d8cb569d5307a3e74e4af35"},i("billing-form-full",{key:"48c616c3ca6cf8160e2c0df4c136bbbc200393aa",legend:this.legend,ref:r=>this.billingFormFullRef=r}))}};export{s as justifi_billing_form_full}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,r as i,c as t}from"./p-CV0Pyo1O.js";import{a9 as e,a8 as r,a1 as o,t as l}from"./p-DnrawQn3.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n}from"./p-BJ7GFTiW.js";import{J as a}from"./p-BnaR7f2G.js";import{m as h,C as c,k as v,c as u,e as p}from"./p-CUI41_5y.js";import{B as m}from"./p-CsdYMTrc.js";import{B as f}from"./p-BcNb9bVO.js";import{m as w}from"./p-GJyHX3us.js";import{S as y}from"./p-DcBvJu0k.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g,a as x}from"./p-B5vVjDc_.js";import{T as j}from"./p--e0ff06z.js";import{l as b}from"./p-BRnBHsdq.js";import"./p-BCgsLInF.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";const B=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(y,{width:"25%"})),s("div",{class:"col-12"},s(y,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"50%"}),s(y,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"65%"}),s(y,{width:"35%"}))),C=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(y,{width:"40%",height:"40px"})),s(B,null)),S=()=>s("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},s("div",{class:"d-flex align-items-center gap-3"},s(y,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),s("div",{class:"flex-grow-1"},s("div",{class:"d-flex row flex-row"},s("div",{class:"col-6 flex-column"},s(y,null),s(y,{width:"60%"})),s("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},s(y,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),s(y,{width:"80px",height:"32px"}),s(y,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),s("div",{class:"mt-4"},s("div",{class:"d-flex flex-column gap-2"},s(y,null),s(y,null)))))),k=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event",7),this.submitted=t(this,"submit-event",7),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new v({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?u.boardingShipping:u.boardingOnly}),n(),this.analytics=new a(this),this.loadData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}handleError(s,i,t){this.error={message:s,code:i,severity:t},this.errorEvent.emit({errorCode:i,message:s,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",p.MISSING_PROPS,c.ERROR)}initializeGetBusiness(){w({id:this.businessId,authToken:this.authToken,service:new m})({onSuccess:({business:s})=>{this.business=new f(s),this.loading.business=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:s,authToken:i,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,n;try{const a=await t.fetchTerminalModels(s,i);if(a.error)return r({error:x(a.error),code:g(null===(n=a.error)||void 0===n?void 0:n.code),severity:c.ERROR});e({terminals:(null===(l=null===(o=a.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((s=>new h(s))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(s){const i=g(null==s?void 0:s.code);return r({error:s.message||s,code:i,severity:c.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new j})({onSuccess:({terminals:s,orderLimit:i})=>{this.terminalModels=s,this.orderLimit=i,this.loading.terminals=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.loading.terminals=!1}})}submitOrder(){const s=(({authToken:s,service:i,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await i.orderTerminals(s,e,t);if(d.error)return o({error:x(d.error),code:g(null===(l=d.error)||void 0===l?void 0:l.code),severity:c.ERROR});{const{data:s}=d;r({data:s})}}catch(s){const i=g(null==s?void 0:s.code);return o({error:s.message||s,code:i,severity:c.ERROR})}})({authToken:this.authToken,service:new j});this.submitting=!0,s({terminalOrder:this.order.payload,onSuccess:({data:s})=>{this.submitted.emit(s),this.submitting=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.submitting=!1}})}onSelectedQuantityChange(s){this.order.updateTerminal(s.detail.modelName,s.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return s("div",null,this.loading.business&&s(C,null),this.loading.terminals&&s("div",{class:"mt-5"},s(S,null),s(S,null),s(S,null)))}renderBusinessDetails(){var i,t,o,l,d,n,a,h;if(!this.loading.business&&this.business)return s("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},s("div",{class:"row"},s("div",{class:"col-12"},s("h2",{part:r},this.business.legal_name))),s("div",{class:"row"},s("div",{class:"col-6"},s("h5",{part:e},"Representative:"),s("div",null,s("div",null,null===(t=null===(i=this.business)||void 0===i?void 0:i.representative)||void 0===t?void 0:t.name),s("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),s("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),s("div",null,b(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),s("div",{class:"col-6"},s("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),s("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",s("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return s("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((i=>s("terminal-quantity-selector",{modelName:i.model_name,description:i.description,imageUrl:i.image_url,helpUrl:i.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return s("div",{class:"mt-3"},s("div",{class:"text-end"},"Order limit: ",this.orderLimit),s("div",{class:"d-flex justify-content-end mt-3"},s("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return s(d,{key:"1dc7e86cd02a1d549ee19b6e24dec5278af70e44"},s("div",{key:"a6c3f18e4ad62606aa04c9a71ff4c949a6cc407f",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{k as justifi_order_terminals}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-DnrawQn3.js";import{B as d}from"./p-2LVpxCS_.js";import{S as c}from"./p-BqNNwq6C.js";import{S as o}from"./p-DcBvJu0k.js";import"./p-CZfYo5-1.js";import{C as n,e as h}from"./p-CUI41_5y.js";import{g as p,a as f}from"./p-B5vVjDc_.js";import{D as l}from"./p-hhdRync5.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b}from"./p-BJ7GFTiW.js";import{J as y}from"./p-BnaR7f2G.js";import"./p-HXpYMWUU.js";import"./p-BH0Xfn-F.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BCgsLInF.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"a6dbf060e1e5a39e7fe7f3112c6e034a59f5a928"},this.isLoading&&s("div",{key:"eaa14797c7580a555496bf7e8932eeac73496bcb",style:{marginBottom:"8px"}},s(o,{key:"bb1ffea882722815cd2b13918106b353f009c96a",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"b60948cb4edaf5a4de1d67a09099153fea963b16",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"0a4138f385131b03888d013057ef93e9052c1fa2",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"85c4b8c9377e2b835508a9cb1be63054bc79cd43",part:a},s("h1",{key:"5ae89800fb1483aa05a69f065bc800992404e4d3",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"75c85bf9609b8727d1397c9d6a2540af93e1a253"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"c4595f142ec169b5bf0f1010ba6632714f886b83",part:a},s("h1",{key:"ca612f94c53ab7f33a30ac4a1504a4335f19c381",class:"h4",part:r},"This payment is disputed"),s("p",{key:"7160eb7a6adc283b34815dce378b4184b08c6834"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"9a06a5d966d7fcafe87e5c9103440f23f8e064cc",class:"h5"},"Dispute details"),s("div",{key:"cf72240182797f37cdcc6af724cf898757da825d",class:"d-table gap-2"},s("div",{key:"b834b58994ad1a512e527fd59614c6164c0bd496",class:"d-table-row gap-2"},s("span",{key:"3f305bf8b5683003e02fba3dc75b2f5500a548e9",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"57b3dabcfa8db14ecd7b3c7ddedbdd280f5552d1",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"3c138f8f5af1d0a0ae47489ec2bed97236b3334a",class:"d-table-row gap-2"},s("span",{key:"7e121a904798c9dc9da1d622ba9c270ee17df4b6",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"aa10e2315d8bfef4e7a4972fef48b4dd08685a65",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"e304065263a80702ab79ee850dc1323616eb3468",class:"d-table-row gap-2"},s("span",{key:"4ea490a9617e179edf1a2eb1180e9eb807262ad7",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"44da82cf86775600312b4915361b246841073ef6",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"4fbc80ef5dc90b0f78d6617e0776d7a7c1371ea2",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"3a65ea6fdf5f0ea4b18cc9fee6dbebea6a0d3708",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"56a4adb004c1663beb045f69c69e9e61c5a93e6d",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"d29034e2e03b098fafced8ae7bd8b0c04b429b8e",part:a},s("h1",{key:"1f46bde8fa553508a6f42bb2e9f9ea5847ffadb3",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"687de84072f9bc1ff40504abebcfe066fddff933"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"e7934860b19cc5b7d6564adbd7ca19acbe2eef4d",part:a},s("h1",{key:"994928d139ef6027a7ca1bb9bb33a3c645610c64",class:"h4",part:r},"This payment was disputed"),s("p",{key:"9ab997a8c0e615d5090ec19ce56d83dbabbc10cf"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"1e31aed9becfeffeccdf604c93bc9eeb88431cf7",part:a},s("h1",{key:"9959904c6c8ff6a3b09fd5f53b1a500ffce9af70",class:"h4",part:r},"This payment was disputed"),s("p",{key:"e31b5e2bcd90955000d6950aa316e8b58b0e3065"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"13eedd8da825613c7d060cf1426c949a7c233d17"},s("justifi-dispute-response-core",{key:"3a05c657309a72761033e064aa91866a2855c5a0","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"c08c10977c1623e1bc7a86b81fe1dd865a2e51ed",class:"row gy-3"},s("div",{key:"227c651ce1a06865edb4eb2c5339b3123b6a4db5",class:"col-12"},s("h1",{key:"7c880d92b985d125d286c8443fcb4005a937c070",class:"h4",part:r},"Counter dispute")),s("div",{key:"96413bfd5d67f298811f7ec5f63789be2b6b3dd6",class:"col-12"},this.currentStepComponent),s("div",{key:"7beb58f7a362798a498c72d5bd7ae274dd84e596",class:"col-12"},s("div",{key:"78a4a3671c0b50199b2ca5ed09f9d42b0cc0624f",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
|