@justifi/webcomponents 6.7.2 → 6.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-QUTWjGTy.js → Api-CVbEWBG6.js} +1 -1
- package/dist/cjs/{Business-DWHy_-z9.js → Business-uoeKyW_a.js} +5 -0
- package/dist/cjs/{GooglePay-BwiJ_80p.js → GooglePay-CbKCUEfb.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-Cc87HAsf.js → badge-DkOPisAV.js} +2 -2
- package/dist/cjs/bank-account-document-form-inputs_8.cjs.entry.js +29 -26
- package/dist/cjs/bank-account-form.cjs.entry.js +7 -7
- package/dist/cjs/{business-additional-questions-schema-Y1mXnwUT.js → business-additional-questions-schema-BtOuMq_U.js} +5 -3
- package/dist/cjs/business-details-core.cjs.entry.js +7 -7
- package/dist/cjs/{business-form-options-e9UFw4P-.js → business-form-options-D1r-wJpo.js} +1 -1
- package/dist/cjs/{business-identity-schema-D_OO0Suf.js → business-identity-schema-CMvq6f8m.js} +6 -2
- package/dist/cjs/{business.service-q93NsTG_.js → business.service-DR4Ce5XV.js} +3 -3
- package/dist/cjs/{button-fUPGXjU_.js → button-C2p1BMP-.js} +2 -2
- package/dist/cjs/card-form.cjs.entry.js +7 -7
- package/dist/cjs/{check-pkg-version-BG-Rfkh5.js → check-pkg-version-Bs_9oZb4.js} +4 -4
- package/dist/cjs/{checkout.service-CwelwhrT.js → checkout.service-CQqd4X4y.js} +3 -3
- package/dist/cjs/checkouts-list-core.cjs.entry.js +14 -14
- package/dist/cjs/{payments-list-params-state-DfZySwaC.js → checkouts-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{checkouts-table-BBtqxG2F.js → checkouts-table-DftTbgXr.js} +3 -3
- package/dist/cjs/{config-state-CYoBVAca.js → config-state-BIgGhhe9.js} +1 -1
- package/dist/cjs/{country-config-MCOhn8o3.js → country-config-DGi9t3Ma.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +6 -6
- package/dist/cjs/{dispute.service-q5ha39uN.js → dispute.service-aok1_zRv.js} +3 -3
- package/dist/cjs/form-alert_5.cjs.entry.js +11 -11
- package/dist/cjs/form-control-checkbox.cjs.entry.js +11 -8
- package/dist/cjs/form-control-date.cjs.entry.js +7 -7
- package/dist/cjs/{form-control-error-text-Dg_65HGK.js → form-control-error-text-BC5aRpfl.js} +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +17 -10
- package/dist/cjs/{form-control-help-text-tB5u1-5M.js → form-control-help-text-B2yMic8i.js} +2 -2
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +12 -8
- package/dist/cjs/form-control-monetary.cjs.entry.js +8 -8
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +13 -11
- package/dist/cjs/{owner-form-core_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +71 -18
- package/dist/cjs/form-control-radio.cjs.entry.js +9 -6
- package/dist/cjs/form-control-select_2.cjs.entry.js +11 -11
- package/dist/cjs/{get-business-D9ZHyPem.js → get-business-CtsxSYA6.js} +1 -1
- package/dist/cjs/{get-payment-details-DidIAK2i.js → get-payment-details-tCICJHBb.js} +3 -3
- package/dist/cjs/{get-subaccounts-BE_wcfM7.js → get-subaccounts-BcsCQAVN.js} +4 -4
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +6 -6
- package/dist/cjs/{header-1-Bqejh9no.js → header-1-B-nd_U7n.js} +2 -2
- package/dist/cjs/{header-3-DQ649Me2.js → header-3--BEJGMFA.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +10 -10
- package/dist/cjs/{index-mmd0OhmD.js → index-W-zoNiyM.js} +90 -21
- package/dist/cjs/index-p7cvUYAE.js +4450 -0
- package/dist/cjs/{input-handlers-D6QMwPTB.js → input-handlers-DaRKFvGI.js} +1 -1
- package/dist/cjs/{insurance-state-DsGnIHMM.js → insurance-state-CiVJ5e26.js} +3 -3
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -23
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +78 -57
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +10 -10
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +34 -34
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-business-form.cjs.entry.js +22 -22
- package/dist/cjs/justifi-checkout.cjs.entry.js +15 -15
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -10
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +16 -16
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +11 -11
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +25 -25
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11 -11
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +17 -17
- package/dist/cjs/justifi-payment-details.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +23 -11
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +16 -16
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list.cjs.entry.js +16 -16
- package/dist/cjs/justifi-payout-details.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +16 -16
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +16 -16
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +4 -4
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +14 -14
- package/dist/cjs/justifi-skeleton.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +16 -16
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-Df5lTFe6.js → package-DcGEg97O.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +2 -2
- package/dist/cjs/{parts-BVbaniVM.js → parts-BsBVknuf.js} +1 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +20 -20
- package/dist/cjs/payment-method-option.cjs.entry.js +4 -4
- package/dist/cjs/payment-provisioning-loading-B3hvtd9o.js +12 -0
- package/dist/cjs/{payment.service-CyHFdJ7n.js → payment.service-B4ACB8Q3.js} +3 -3
- package/dist/cjs/payments-list-core.cjs.entry.js +15 -15
- package/dist/cjs/{payouts-list-params-state-DfZySwaC.js → payments-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{payments-status-BP4u31jU.js → payments-status-BAR25wA6.js} +2 -2
- package/dist/cjs/{payments-table-CWXVhECV.js → payments-table-BLJ54fGU.js} +3 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +13 -13
- package/dist/cjs/{payout.service-Half-hdB.js → payout.service-qVbNnemO.js} +3 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +15 -15
- package/dist/cjs/{checkouts-list-params-state-DfZySwaC.js → payouts-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{payouts-status-CM5Zy-0J.js → payouts-status-uZAaS1RP.js} +2 -2
- package/dist/cjs/{payouts-table-ZLTcfkUm.js → payouts-table-C4jZJ8rq.js} +3 -3
- package/dist/cjs/{schema-validations-Bf2mk2xU.js → schema-validations-DYYDrVol.js} +19 -3
- package/dist/cjs/{skeleton-B8dzxFFr.js → skeleton-BGGMhPJj.js} +2 -2
- package/dist/cjs/{spinner-jHyLNCGO.js → spinner-CV2CNXOQ.js} +2 -2
- package/dist/cjs/{styled-host-D5g7INLE.js → styled-host-DAi5SuFa.js} +1 -1
- package/dist/cjs/{table-CrtpRwGN.js → table-eTN_pRIP.js} +3 -3
- package/dist/cjs/table-filters-menu.cjs.entry.js +4 -4
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +14 -14
- package/dist/cjs/{terminal-orders-list-params-state-DfZySwaC.js → terminal-orders-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{terminal-orders-table-DT53anT3.js → terminal-orders-table-C2jG4WQa.js} +6 -6
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +4 -4
- package/dist/cjs/{terminal.service-CFt55QNO.js → terminal.service-D1ohedi-.js} +3 -3
- package/dist/cjs/terminals-list-core.cjs.entry.js +14 -14
- package/dist/cjs/terminals-list-params-state-vGJZ6Oe2.js +22 -0
- package/dist/cjs/{terminals-table-DahpSz98.js → terminals-table-DZz8k4tP.js} +3 -3
- package/dist/cjs/{utils-CMiA4X7s.js → utils-T6hRmGuY.js} +2 -2
- package/dist/cjs/webcomponents.cjs.js +30 -3
- package/dist/collection/api/Business.js +2 -0
- package/dist/collection/api/Identity.js +3 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +1 -1
- package/dist/collection/components/business-details/business-details-core.js +2 -2
- package/dist/collection/components/business-details/business-details.js +2 -2
- package/dist/collection/components/business-details/core-info-details/core-info-details.js +1 -1
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +1 -1
- package/dist/collection/components/business-details/owner-details/owner-details.js +1 -1
- package/dist/collection/components/business-details/representative-details/representative-details.js +1 -1
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +4 -4
- package/dist/collection/components/business-forms/business-form/business-form.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +4 -4
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +3 -3
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +5 -5
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +6 -6
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +7 -7
- package/dist/collection/components/business-forms/owner-form/owner-form.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +5 -5
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +5 -5
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +35 -7
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +6 -6
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +19 -11
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +20 -8
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +7 -7
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +6 -6
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -3
- package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +2 -0
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +5 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +15 -0
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/checkout.js +23 -4
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-payment-method.js +3 -3
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +4 -4
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/checkouts-list.js +3 -3
- package/dist/collection/components/dispute-management/dispute-management-core.js +4 -4
- package/dist/collection/components/dispute-management/dispute-management.js +3 -3
- package/dist/collection/components/dispute-management/dispute-notification.js +5 -5
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +4 -4
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +2 -2
- package/dist/collection/components/filters/table-filters-menu.js +3 -3
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +2 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +2 -2
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +7 -7
- package/dist/collection/components/modular-checkout/modular-checkout.js +3 -3
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +3 -0
- package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +6 -6
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +4 -4
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +5 -5
- package/dist/collection/components/payment-details/payment-details-core.js +9 -9
- package/dist/collection/components/payment-details/payment-details.js +2 -2
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +3 -3
- package/dist/collection/components/payments-list/payments-list-core.js +3 -3
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +3 -3
- package/dist/collection/components/payout-details/payout-details-core.js +5 -5
- package/dist/collection/components/payout-details/payout-details.js +2 -2
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +3 -3
- package/dist/collection/components/payouts-list/payouts-list-core.js +5 -5
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +3 -3
- package/dist/collection/components/refund-payment/refund-payment.js +3 -3
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +3 -3
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +3 -3
- package/dist/collection/components/terminals-list/terminals-list-core.js +4 -4
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +3 -3
- package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
- package/dist/collection/ui-components/custom-popper/custom-popper.js +3 -3
- package/dist/collection/ui-components/details/details.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +16 -10
- package/dist/collection/ui-components/form/form-control-date.js +5 -5
- package/dist/collection/ui-components/form/form-control-file-v2.js +16 -8
- package/dist/collection/ui-components/form/form-control-file.js +16 -10
- package/dist/collection/ui-components/form/form-control-monetary.js +5 -5
- package/dist/collection/ui-components/form/form-control-number-masked.js +14 -10
- package/dist/collection/ui-components/form/form-control-number.js +10 -8
- package/dist/collection/ui-components/form/form-control-radio.js +18 -12
- package/dist/collection/ui-components/form/form-control-select.js +6 -6
- package/dist/collection/ui-components/form/form-control-text.js +5 -5
- package/dist/collection/ui-components/form/form-control-textarea.js +19 -11
- package/dist/collection/ui-components/form/form-helpers/form-alert/form-alert.js +2 -2
- package/dist/collection/ui-components/form/form-helpers/form-control-help-text/form-control-help-text.js +2 -2
- package/dist/collection/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.js +1 -1
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +6 -6
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +2 -2
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +577 -277
- package/dist/esm/{Api-Dln8a6No.js → Api-ohkSjyhl.js} +1 -1
- package/dist/esm/{Business-B5rtFhtR.js → Business-CHJTjG_5.js} +5 -0
- package/dist/esm/{GooglePay-NNHE-OLJ.js → GooglePay-5EiPffHy.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/{badge-DtrH25ss.js → badge-BW9VFFkp.js} +2 -2
- package/dist/esm/bank-account-document-form-inputs_8.entry.js +29 -26
- package/dist/esm/bank-account-form.entry.js +7 -7
- package/dist/esm/{business-additional-questions-schema-woG5-pgK.js → business-additional-questions-schema-DQb10ehS.js} +5 -3
- package/dist/esm/business-details-core.entry.js +7 -7
- package/dist/esm/{business-form-options-D6s5H4RI.js → business-form-options-Bm89rMmk.js} +1 -1
- package/dist/esm/{business-identity-schema-B7VTDF4j.js → business-identity-schema-CaMnpPqx.js} +7 -3
- package/dist/esm/{business.service-BrUSam2T.js → business.service-C7smiL6_.js} +3 -3
- package/dist/esm/{button-Bpf3VX8Q.js → button-DMeChykB.js} +2 -2
- package/dist/esm/card-form.entry.js +7 -7
- package/dist/esm/{check-pkg-version-c_8fDHCB.js → check-pkg-version-DIZ2yD72.js} +4 -4
- package/dist/esm/{checkout.service-Bxt1qPaY.js → checkout.service-CYq6KXZv.js} +3 -3
- package/dist/esm/checkouts-list-core.entry.js +14 -14
- package/dist/esm/{checkouts-list-params-state-gllzDQAb.js → checkouts-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{checkouts-table-CB4GdlcZ.js → checkouts-table-B9YTe5fJ.js} +3 -3
- package/dist/esm/{config-state-C2NXATwF.js → config-state-kKn89dp1.js} +1 -1
- package/dist/esm/{country-config-BQ4D46Lb.js → country-config-CQxaTFuP.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +6 -6
- package/dist/esm/{dispute.service-DYRYxxaT.js → dispute.service-D7Dv8LTn.js} +3 -3
- package/dist/esm/form-alert_5.entry.js +11 -11
- package/dist/esm/form-control-checkbox.entry.js +11 -8
- package/dist/esm/form-control-date.entry.js +7 -7
- package/dist/esm/{form-control-error-text-BZYykCDp.js → form-control-error-text-CTQxgr7_.js} +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +17 -10
- package/dist/esm/{form-control-help-text-D-p66Yxr.js → form-control-help-text-B-aaeX6n.js} +2 -2
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +12 -8
- package/dist/esm/form-control-monetary.entry.js +8 -8
- package/dist/esm/form-control-number-masked_3.entry.js +13 -11
- package/dist/esm/{owner-form-core_2.entry.js → form-control-number_3.entry.js} +71 -19
- package/dist/esm/form-control-radio.entry.js +9 -6
- package/dist/esm/form-control-select_2.entry.js +11 -11
- package/dist/esm/{get-business-Xt7B5dSo.js → get-business-BAmwId14.js} +1 -1
- package/dist/esm/{get-payment-details-BJ1PLhJZ.js → get-payment-details-CPJZp31y.js} +3 -3
- package/dist/esm/{get-subaccounts-CzGHjlUF.js → get-subaccounts-CqMFocN0.js} +4 -4
- package/dist/esm/gross-payment-chart-core.entry.js +6 -6
- package/dist/esm/{header-1-WwkF5F9y.js → header-1-DFMANSXo.js} +2 -2
- package/dist/esm/{header-3-C5jS39cE.js → header-3-Ck64YtdM.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +10 -10
- package/dist/esm/index-CV0Pyo1O.js +4434 -0
- package/dist/esm/{index-B-fWxE5e.js → index-cDVGjRkU.js} +90 -21
- package/dist/esm/{input-handlers-D3y0TzH9.js → input-handlers-AgwQ-yKX.js} +1 -1
- package/dist/esm/{insurance-state-C11WKZU6.js → insurance-state-DQ3xzFpR.js} +3 -3
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +23 -23
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +72 -51
- package/dist/esm/justifi-additional-statement_8.entry.js +10 -10
- package/dist/esm/justifi-apple-pay_8.entry.js +34 -34
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +10 -10
- package/dist/esm/justifi-business-details.entry.js +13 -13
- package/dist/esm/justifi-business-form.entry.js +22 -22
- package/dist/esm/justifi-checkout.entry.js +15 -15
- package/dist/esm/justifi-checkouts-list-filters.entry.js +10 -10
- package/dist/esm/justifi-checkouts-list.entry.js +16 -16
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +4 -4
- package/dist/esm/justifi-dispute-management-core.entry.js +3 -3
- package/dist/esm/justifi-dispute-management.entry.js +11 -11
- package/dist/esm/justifi-dispute-notification_3.entry.js +25 -25
- package/dist/esm/justifi-gross-payment-chart.entry.js +11 -11
- package/dist/esm/justifi-order-terminals.entry.js +17 -17
- package/dist/esm/justifi-payment-details.entry.js +14 -14
- package/dist/esm/justifi-payment-provisioning-core.entry.js +23 -11
- package/dist/esm/justifi-payment-provisioning.entry.js +11 -11
- package/dist/esm/justifi-payment-transactions-list.entry.js +16 -16
- package/dist/esm/justifi-payments-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payments-list.entry.js +16 -16
- package/dist/esm/justifi-payout-details.entry.js +12 -12
- package/dist/esm/justifi-payout-transactions-list.entry.js +16 -16
- package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payouts-list.entry.js +17 -17
- package/dist/esm/justifi-refund-payment.entry.js +16 -16
- package/dist/esm/justifi-saved-payment-method.entry.js +4 -4
- package/dist/esm/justifi-season-interruption-insurance.entry.js +14 -14
- package/dist/esm/justifi-skeleton.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +10 -10
- package/dist/esm/justifi-terminal-orders-list.entry.js +14 -14
- package/dist/esm/justifi-terminals-list-filters.entry.js +9 -9
- package/dist/esm/justifi-terminals-list.entry.js +16 -16
- package/dist/esm/justifi-tokenize-payment-method.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-BzT9OxlN.js → package-ZkBwsSuI.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +2 -2
- package/dist/esm/{parts-sA8HBfkI.js → parts-DrquDBSk.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +20 -20
- package/dist/esm/payment-method-option.entry.js +4 -4
- package/dist/esm/payment-provisioning-loading-DU0pNyqx.js +10 -0
- package/dist/esm/{payment.service-BoGemgMw.js → payment.service-BGf8F56_.js} +3 -3
- package/dist/esm/payments-list-core.entry.js +15 -15
- package/dist/esm/{payments-list-params-state-gllzDQAb.js → payments-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{payments-status-CADg1cD0.js → payments-status-Bn-MvMcF.js} +2 -2
- package/dist/esm/{payments-table-C6zHWwGO.js → payments-table-CF3_zGnh.js} +3 -3
- package/dist/esm/payout-details-core.entry.js +13 -13
- package/dist/esm/{payout.service-BSG50wqN.js → payout.service-Co3xg-7j.js} +3 -3
- package/dist/esm/payouts-list-core.entry.js +15 -15
- package/dist/esm/{payouts-list-params-state-gllzDQAb.js → payouts-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{payouts-status-4VDQvaYV.js → payouts-status-ehZrz-Xx.js} +2 -2
- package/dist/esm/{payouts-table-BU5XbzB9.js → payouts-table-CGZJfsje.js} +3 -3
- package/dist/esm/{schema-validations-iamDi5JD.js → schema-validations-jBrJ0mYI.js} +19 -4
- package/dist/esm/{skeleton-Dtt56Fl3.js → skeleton-D9UXuoik.js} +2 -2
- package/dist/esm/{spinner-DikooWuI.js → spinner-ACMfJh3a.js} +2 -2
- package/dist/esm/{styled-host-DhOcKWqZ.js → styled-host-D6byRazK.js} +1 -1
- package/dist/esm/{table-1hqe6s5m.js → table-BbMG2jg9.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +4 -4
- package/dist/esm/terminal-orders-list-core.entry.js +14 -14
- package/dist/esm/{terminal-orders-list-params-state-gllzDQAb.js → terminal-orders-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{terminal-orders-table-BsVBelxB.js → terminal-orders-table-uNYLd8i5.js} +6 -6
- package/dist/esm/terminal-quantity-selector.entry.js +4 -4
- package/dist/esm/{terminal.service-YKfi6Mr9.js → terminal.service-Cxs-IO0Z.js} +3 -3
- package/dist/esm/terminals-list-core.entry.js +14 -14
- package/dist/esm/terminals-list-params-state-CiGfmyWW.js +16 -0
- package/dist/esm/{terminals-table-CXJTn-0I.js → terminals-table-B-7FR4ug.js} +3 -3
- package/dist/esm/{utils-CgFsPVsv.js → utils-DhCv62Pi.js} +2 -2
- package/dist/esm/webcomponents.js +31 -4
- package/dist/module/Business.js +5 -0
- package/dist/module/additional-questions.js +1 -1
- package/dist/module/additional-statement.js +2 -2
- package/dist/module/bank-account-billing-form-simple.js +1 -1
- package/dist/module/bank-account-document-inputs.js +1 -1
- package/dist/module/bank-account-form-inputs-canada2.js +1 -1
- package/dist/module/bank-account-form-inputs2.js +1 -1
- package/dist/module/bank-account-form.js +2 -2
- package/dist/module/bank-account-read-only-value2.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/business-additional-questions-form-step.js +2 -2
- package/dist/module/business-additional-questions-schema.js +3 -1
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-bank-account-form-step.js +1 -1
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-details-core2.js +1 -1
- package/dist/module/business-identity-schema.js +5 -1
- package/dist/module/business-owners-form-step.js +41 -7
- package/dist/module/business-representative-form-inputs.js +2 -2
- package/dist/module/business-representative.js +2 -2
- package/dist/module/business-terms-conditions-form-step.js +1 -1
- package/dist/module/button.js +1 -1
- package/dist/module/cancellation-policy.js +2 -2
- package/dist/module/card-billing-form-simple.js +1 -1
- package/dist/module/card-form.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkouts-list-core2.js +2 -2
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details.js +2 -2
- package/dist/module/details.js +1 -1
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-notification.js +3 -3
- package/dist/module/dispute-response-core.js +2 -2
- package/dist/module/dispute-response.js +1 -1
- package/dist/module/duplicate-charge.js +2 -2
- package/dist/module/electronic-evidence.js +2 -2
- package/dist/module/form-address-fields.js +1 -1
- package/dist/module/form-control-checkbox2.js +5 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +4 -1
- package/dist/module/form-control-file2.js +5 -2
- package/dist/module/form-control-monetary-provisioning2.js +6 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +4 -2
- package/dist/module/form-control-number.js +1 -84
- package/dist/module/form-control-number2.js +87 -0
- package/dist/module/form-control-radio2.js +5 -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 +6 -2
- package/dist/module/google-pay.js +2 -2
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/identity-address-form.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/index2.js +90 -21
- package/dist/module/internal-tokenize-payment-method2.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +3 -3
- package/dist/module/justifi-checkouts-list-filters.js +3 -3
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-provisioning.js +27 -21
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list-filters.js +3 -3
- package/dist/module/justifi-payments-list.js +1 -1
- 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 +1 -1
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +2 -2
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/legal-address-form.js +1 -1
- package/dist/module/modular-checkout.js +1 -1
- package/dist/module/owner-form-core2.js +11 -5
- package/dist/module/owner-form-inputs2.js +13 -7
- package/dist/module/owner-form.js +11 -5
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-core.js +41 -23
- package/dist/module/payment-provisioning-form-buttons.js +1 -1
- package/dist/module/payment-provisioning-form-steps.js +27 -21
- package/dist/module/payments-list-core2.js +2 -2
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +2 -2
- package/dist/module/product-or-service.js +2 -2
- package/dist/module/refund-policy.js +2 -2
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/schema-validations.js +16 -1
- package/dist/module/shipping-details.js +2 -2
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +2 -2
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +2 -2
- package/dist/module/terminal-quantity-selector2.js +2 -2
- package/dist/module/terminals-list-core2.js +2 -2
- package/dist/types/api/Business.d.ts +4 -0
- package/dist/types/api/Identity.d.ts +4 -0
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +4 -0
- package/dist/types/components/business-forms/payment-provisioning/form-control-monetary-provisioning.d.ts +3 -3
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +1 -0
- package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +2 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +12 -0
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +10 -0
- package/dist/types/components/business-forms/schemas/schema-validations.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +19 -0
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +3 -0
- package/dist/types/components.d.ts +378 -240
- package/dist/types/ui-components/form/form-control-checkbox.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-file-v2.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-file.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-number-masked.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-number.d.ts +1 -1
- package/dist/types/ui-components/form/form-control-radio.d.ts +3 -3
- package/dist/types/ui-components/form/form-control-textarea.d.ts +2 -2
- package/dist/webcomponents/p-001ce9f8.entry.js +1 -0
- package/dist/webcomponents/{p-36a0af30.entry.js → p-0467df5d.entry.js} +1 -1
- package/dist/webcomponents/p-0f6fa1c0.entry.js +1 -0
- package/dist/webcomponents/p-0fb3fd77.entry.js +1 -0
- package/dist/webcomponents/{p-d0c4b0ea.entry.js → p-172b0c96.entry.js} +1 -1
- package/dist/webcomponents/p-198d2941.entry.js +1 -0
- package/dist/webcomponents/p-1dbf3473.entry.js +1 -0
- package/dist/webcomponents/p-1eefdd41.entry.js +1 -0
- package/dist/webcomponents/p-252bd81d.entry.js +1 -0
- package/dist/webcomponents/p-265a7cb3.entry.js +1 -0
- package/dist/webcomponents/p-2e7143b8.entry.js +1 -0
- package/dist/webcomponents/p-32fac30b.entry.js +1 -0
- package/dist/webcomponents/p-393c9065.entry.js +1 -0
- package/dist/webcomponents/p-3d2495df.entry.js +1 -0
- package/dist/webcomponents/p-4165281d.entry.js +1 -0
- package/dist/webcomponents/p-4786d1ea.entry.js +1 -0
- package/dist/webcomponents/p-493e73a9.entry.js +1 -0
- package/dist/webcomponents/p-4d7a2565.entry.js +1 -0
- package/dist/webcomponents/p-50cc771a.entry.js +1 -0
- package/dist/webcomponents/p-50f16cca.entry.js +1 -0
- package/dist/webcomponents/p-52203b01.entry.js +1 -0
- package/dist/webcomponents/p-53be30e9.entry.js +1 -0
- package/dist/webcomponents/p-55e63bdd.entry.js +1 -0
- package/dist/webcomponents/p-5af4bb01.entry.js +1 -0
- package/dist/webcomponents/p-639e5ce9.entry.js +1 -0
- package/dist/webcomponents/p-65f4681c.entry.js +1 -0
- package/dist/webcomponents/p-66e8b443.entry.js +1 -0
- package/dist/webcomponents/p-6ed0be7f.entry.js +1 -0
- package/dist/webcomponents/p-7184c2f8.entry.js +1 -0
- package/dist/webcomponents/p-73b9cc29.entry.js +1 -0
- package/dist/webcomponents/p-782ccafb.entry.js +1 -0
- package/dist/webcomponents/p-79d1d6b3.entry.js +1 -0
- package/dist/webcomponents/{p-897b794b.entry.js → p-7b4e9ae8.entry.js} +2 -2
- package/dist/webcomponents/p-7c4fa66f.entry.js +1 -0
- package/dist/webcomponents/p-7ec771bc.entry.js +1 -0
- package/dist/webcomponents/{p-1a327b0e.entry.js → p-7fdfc2c8.entry.js} +1 -1
- package/dist/webcomponents/p-86db9040.entry.js +1 -0
- package/dist/webcomponents/{p-725319f3.entry.js → p-931ea171.entry.js} +1 -1
- package/dist/webcomponents/{p-20af8597.entry.js → p-99065f37.entry.js} +1 -1
- package/dist/webcomponents/p-9ce5fcb6.entry.js +1 -0
- package/dist/webcomponents/p-9d844936.entry.js +1 -0
- package/dist/webcomponents/p-AMVhBsGv.js +1 -0
- package/dist/webcomponents/{p-B4xdk4mG.js → p-APob2Eta.js} +1 -1
- package/dist/webcomponents/p-B8CPGGs6.js +1 -0
- package/dist/webcomponents/{p-CPpUGsw5.js → p-BAu40WfT.js} +1 -1
- package/dist/webcomponents/p-BPTtWj7E.js +1 -0
- package/dist/webcomponents/{p-Dit3fZpU.js → p-BXdZKjdB.js} +1 -1
- package/dist/webcomponents/p-BZ4YUsyP.js +1 -0
- package/dist/webcomponents/{p-CV8xqdt6.js → p-Bhk8tHxs.js} +1 -1
- package/dist/webcomponents/p-BhvkOTYA.js +1 -0
- package/dist/webcomponents/p-BqL4QuAa.js +1 -0
- package/dist/webcomponents/{p-BP2sTIQV.js → p-BqNNwq6C.js} +1 -1
- package/dist/webcomponents/p-Bz97Ujvk.js +1 -0
- package/dist/webcomponents/{p-C77ElQ41.js → p-C-LV3hNf.js} +1 -1
- package/dist/webcomponents/p-C3E-JbVM.js +1 -0
- package/dist/webcomponents/{p-BMJe4lzg.js → p-CAZzU98o.js} +1 -1
- package/dist/webcomponents/p-CGKWIBVk.js +1 -0
- package/dist/webcomponents/p-CHJTjG_5.js +1 -0
- package/dist/webcomponents/{p-DUmUUj9r.js → p-COcg4_A3.js} +1 -1
- package/dist/webcomponents/{p-C2Senazf.js → p-CQ36pja3.js} +1 -1
- package/dist/webcomponents/p-CV0Pyo1O.js +2 -0
- package/dist/webcomponents/{p-DfKxeSrC.js → p-Ce785aMx.js} +1 -1
- package/dist/webcomponents/p-CpGEMRkH.js +1 -0
- package/dist/webcomponents/{p-CBbwdoSa.js → p-CruQSM5j.js} +1 -1
- package/dist/webcomponents/p-D0PhRMmy.js +1 -0
- package/dist/webcomponents/p-D4EBPNuU.js +1 -0
- package/dist/webcomponents/{p-sCHf--Vc.js → p-D81X4BBI.js} +1 -1
- package/dist/webcomponents/p-D8GTwl9v.js +1 -0
- package/dist/webcomponents/{p-Dlrq1iZf.js → p-DBOsYeYk.js} +1 -1
- package/dist/webcomponents/p-DDjKoqh6.js +1 -0
- package/dist/webcomponents/{p-11wdbrqX.js → p-DLLFAj4z.js} +1 -1
- package/dist/webcomponents/p-DOnVHzNq.js +1 -0
- package/dist/webcomponents/{p-tGDdRx0W.js → p-DVJaoI_m.js} +1 -1
- package/dist/webcomponents/p-DaZF_q9T.js +1 -0
- package/dist/webcomponents/p-Dm07nLGs.js +1 -0
- package/dist/webcomponents/{p-BrRsgB8S.js → p-DpkIbI5R.js} +1 -1
- package/dist/webcomponents/p-DrquDBSk.js +1 -0
- package/dist/webcomponents/p-Dw63wyhO.js +1 -0
- package/dist/webcomponents/{p-D6bKoyRc.js → p-JO-3z7ao.js} +1 -1
- package/dist/webcomponents/{p-CCxsFwC4.js → p-MBH9QO2m.js} +1 -1
- package/dist/webcomponents/p-NO0z-S2W.js +1 -0
- package/dist/webcomponents/{p-W9WWoLzT.js → p-YYXsr-bI.js} +1 -1
- package/dist/webcomponents/p-ZkBwsSuI.js +1 -0
- package/dist/webcomponents/p-_LSWCi-4.js +1 -0
- package/dist/webcomponents/p-a20bddd2.entry.js +1 -0
- package/dist/webcomponents/p-a3510078.entry.js +1 -0
- package/dist/webcomponents/p-a4834220.entry.js +1 -0
- package/dist/webcomponents/p-a9b493c1.entry.js +1 -0
- package/dist/webcomponents/p-a9ecaf0f.entry.js +1 -0
- package/dist/webcomponents/p-b2371f43.entry.js +1 -0
- package/dist/webcomponents/p-bc56446a.entry.js +1 -0
- package/dist/webcomponents/p-c11512e7.entry.js +1 -0
- package/dist/webcomponents/p-c5afb831.entry.js +1 -0
- package/dist/webcomponents/{p-f37f3e94.entry.js → p-c7c79332.entry.js} +1 -1
- package/dist/webcomponents/p-c90f7ed6.entry.js +1 -0
- package/dist/webcomponents/p-ca8d78af.entry.js +1 -0
- package/dist/webcomponents/p-d0d6d1cc.entry.js +1 -0
- package/dist/webcomponents/p-d55c348b.entry.js +1 -0
- package/dist/webcomponents/p-d7fa8461.entry.js +1 -0
- package/dist/webcomponents/p-dff12534.entry.js +1 -0
- package/dist/webcomponents/p-e11c7df0.entry.js +1 -0
- package/dist/webcomponents/p-e1a8785d.entry.js +1 -0
- package/dist/webcomponents/p-e54cdb00.entry.js +1 -0
- package/dist/webcomponents/p-e5651bb1.entry.js +1 -0
- package/dist/webcomponents/p-e926be0d.entry.js +1 -0
- package/dist/webcomponents/p-e9daf75f.entry.js +1 -0
- package/dist/webcomponents/p-ea0cd47d.entry.js +1 -0
- package/dist/webcomponents/p-f13c4a88.entry.js +1 -0
- package/dist/webcomponents/p-f5f46f2d.entry.js +1 -0
- package/dist/webcomponents/p-mhEMV8M-.js +1 -0
- package/dist/webcomponents/p-sPEyLX4E.js +1 -0
- package/dist/webcomponents/p-wqq-X93m.js +1 -0
- package/dist/webcomponents/{p-DGGjRqDa.js → p-y-FoILTI.js} +1 -1
- package/dist/webcomponents/{p-yyedWKWX.js → p-y8av3w9x.js} +1 -1
- package/dist/webcomponents/p-ztF3Y786.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +8 -12
- package/dist/cjs/form-control-number.cjs.entry.js +0 -58
- package/dist/cjs/index-BhI7cJcE.js +0 -1891
- package/dist/cjs/terminals-list-params-state-DfZySwaC.js +0 -22
- package/dist/esm/form-control-number.entry.js +0 -56
- package/dist/esm/index-DwYM91AU.js +0 -1879
- package/dist/esm/terminals-list-params-state-gllzDQAb.js +0 -16
- package/dist/webcomponents/p-016b3e4c.entry.js +0 -1
- package/dist/webcomponents/p-035a4adc.entry.js +0 -1
- package/dist/webcomponents/p-06cae9e2.entry.js +0 -1
- package/dist/webcomponents/p-06f81525.entry.js +0 -1
- package/dist/webcomponents/p-0935600b.entry.js +0 -1
- package/dist/webcomponents/p-0ab9a3ae.entry.js +0 -1
- package/dist/webcomponents/p-0b7c4ed5.entry.js +0 -1
- package/dist/webcomponents/p-0bb616fc.entry.js +0 -1
- package/dist/webcomponents/p-138ada4a.entry.js +0 -1
- package/dist/webcomponents/p-148d3327.entry.js +0 -1
- package/dist/webcomponents/p-1575ca68.entry.js +0 -1
- package/dist/webcomponents/p-1e761d96.entry.js +0 -1
- package/dist/webcomponents/p-20e85114.entry.js +0 -1
- package/dist/webcomponents/p-2cb9edad.entry.js +0 -1
- package/dist/webcomponents/p-2d4a2d26.entry.js +0 -1
- package/dist/webcomponents/p-368b37ad.entry.js +0 -1
- package/dist/webcomponents/p-3a3935a3.entry.js +0 -1
- package/dist/webcomponents/p-3f14d0c4.entry.js +0 -1
- package/dist/webcomponents/p-4d2589b2.entry.js +0 -1
- package/dist/webcomponents/p-511e80a4.entry.js +0 -1
- package/dist/webcomponents/p-5996879d.entry.js +0 -1
- package/dist/webcomponents/p-5a748e49.entry.js +0 -1
- package/dist/webcomponents/p-5c6727ae.entry.js +0 -1
- package/dist/webcomponents/p-622af881.entry.js +0 -1
- package/dist/webcomponents/p-6454626a.entry.js +0 -1
- package/dist/webcomponents/p-64ebff16.entry.js +0 -1
- package/dist/webcomponents/p-66713269.entry.js +0 -1
- package/dist/webcomponents/p-679b36b5.entry.js +0 -1
- package/dist/webcomponents/p-71577fa1.entry.js +0 -1
- package/dist/webcomponents/p-77754a65.entry.js +0 -1
- package/dist/webcomponents/p-7ec4838f.entry.js +0 -1
- package/dist/webcomponents/p-88a8741b.entry.js +0 -1
- package/dist/webcomponents/p-899b981b.entry.js +0 -1
- package/dist/webcomponents/p-8c4b502d.entry.js +0 -1
- package/dist/webcomponents/p-8df30672.entry.js +0 -1
- package/dist/webcomponents/p-911b3d63.entry.js +0 -1
- package/dist/webcomponents/p-97b8bf5c.entry.js +0 -1
- package/dist/webcomponents/p-9b74a642.entry.js +0 -1
- package/dist/webcomponents/p-9b8aee30.entry.js +0 -1
- package/dist/webcomponents/p-9e94c9ef.entry.js +0 -1
- package/dist/webcomponents/p-B5rtFhtR.js +0 -1
- package/dist/webcomponents/p-BOqOio4U.js +0 -1
- package/dist/webcomponents/p-BUsqF4-J.js +0 -1
- package/dist/webcomponents/p-BYsgavgS.js +0 -1
- package/dist/webcomponents/p-BhqSAzpT.js +0 -1
- package/dist/webcomponents/p-BzT9OxlN.js +0 -1
- package/dist/webcomponents/p-C9VmfRis.js +0 -1
- package/dist/webcomponents/p-CK_XkZku.js +0 -1
- package/dist/webcomponents/p-CQGIjIgZ.js +0 -1
- package/dist/webcomponents/p-CZ3F1ZAT.js +0 -1
- package/dist/webcomponents/p-CgiDds_u.js +0 -1
- package/dist/webcomponents/p-CsgUIrv8.js +0 -1
- package/dist/webcomponents/p-D032AB34.js +0 -1
- package/dist/webcomponents/p-DATDsXcA.js +0 -1
- package/dist/webcomponents/p-DKGn-ILd.js +0 -1
- package/dist/webcomponents/p-DOcRWTul.js +0 -1
- package/dist/webcomponents/p-DY_3dcgR.js +0 -1
- package/dist/webcomponents/p-DdJYXOQX.js +0 -1
- package/dist/webcomponents/p-DmdEjScI.js +0 -1
- package/dist/webcomponents/p-DwYM91AU.js +0 -2
- package/dist/webcomponents/p-RTAZ4tdd.js +0 -1
- package/dist/webcomponents/p-Ty7R7tsw.js +0 -1
- package/dist/webcomponents/p-U3nU15el.js +0 -1
- package/dist/webcomponents/p-Uqevvbqm.js +0 -1
- package/dist/webcomponents/p-VRubcA-q.js +0 -1
- package/dist/webcomponents/p-a0b4c42b.entry.js +0 -1
- package/dist/webcomponents/p-af7c219d.entry.js +0 -1
- package/dist/webcomponents/p-b0f0d53c.entry.js +0 -1
- package/dist/webcomponents/p-b752c5bc.entry.js +0 -1
- package/dist/webcomponents/p-bbff6196.entry.js +0 -1
- package/dist/webcomponents/p-c0c36187.entry.js +0 -1
- package/dist/webcomponents/p-c920dc54.entry.js +0 -1
- package/dist/webcomponents/p-cdf1e61c.entry.js +0 -1
- package/dist/webcomponents/p-d077569e.entry.js +0 -1
- package/dist/webcomponents/p-d7b1b7b5.entry.js +0 -1
- package/dist/webcomponents/p-dc6c9c79.entry.js +0 -1
- package/dist/webcomponents/p-e4335938.entry.js +0 -1
- package/dist/webcomponents/p-e805b011.entry.js +0 -1
- package/dist/webcomponents/p-ecbc83bf.entry.js +0 -1
- package/dist/webcomponents/p-f30c939f.entry.js +0 -1
- package/dist/webcomponents/p-f56d7b4c.entry.js +0 -1
- package/dist/webcomponents/p-f99403d8.entry.js +0 -1
- package/dist/webcomponents/p-fb644da6.entry.js +0 -1
- package/dist/webcomponents/p-fc4b27ec.entry.js +0 -1
- package/dist/webcomponents/p-fe43449c.entry.js +0 -1
- package/dist/webcomponents/p-giyZ3C4E.js +0 -1
- package/dist/webcomponents/p-sA8HBfkI.js +0 -1
- package/docs/.eslintrc.cjs +0 -17
- package/docs/changelog/index.mdx +0 -17
- package/docs/entities/businessdetails/index.mdx +0 -143
- package/docs/entities/businessform/index.mdx +0 -241
- package/docs/entities/index.mdx +0 -19
- package/docs/entities/payment-provisioning/index.mdx +0 -128
- package/docs/frameworks/angular/index.mdx +0 -112
- package/docs/frameworks/index.mdx +0 -18
- package/docs/frameworks/react/index.mdx +0 -125
- package/docs/frameworks/vue/index.mdx +0 -102
- package/docs/helpers/PartsTable.js +0 -50
- package/docs/helpers/PropsTable.js +0 -56
- package/docs/helpers/index.ts +0 -3
- package/docs/helpers/version.js +0 -32
- package/docs/introduction/index.mdx +0 -125
- package/docs/merchant-tools/checkouts-list/index.mdx +0 -97
- package/docs/merchant-tools/gross-payments-chart/index.mdx +0 -83
- package/docs/merchant-tools/index.mdx +0 -25
- package/docs/merchant-tools/order-terminals/index.mdx +0 -84
- package/docs/merchant-tools/payment-details/index.mdx +0 -132
- package/docs/merchant-tools/payment-transactions-list/index.mdx +0 -85
- package/docs/merchant-tools/payments-list/index.mdx +0 -109
- package/docs/merchant-tools/payout-details/index.mdx +0 -84
- package/docs/merchant-tools/payout-transactions-list/index.mdx +0 -84
- package/docs/merchant-tools/payouts-list/index.mdx +0 -92
- package/docs/merchant-tools/terminal-orders-list/index.mdx +0 -85
- package/docs/merchant-tools/terminals-list/index.mdx +0 -93
- package/docs/modular-checkout/complete-examples/index.mdx +0 -20
- package/docs/modular-checkout/index.mdx +0 -20
- package/docs/modular-checkout/introduction/index.mdx +0 -102
- package/docs/modular-checkout/sub-components/apple-pay.mdx +0 -106
- package/docs/modular-checkout/sub-components/bank-account-form.mdx +0 -167
- package/docs/modular-checkout/sub-components/card-form.mdx +0 -178
- package/docs/modular-checkout/sub-components/index.mdx +0 -23
- package/docs/modular-checkout/sub-components/payment-method-options.mdx +0 -87
- package/docs/modular-checkout/sub-components/plaid-payment-method.mdx +0 -158
- package/docs/modular-checkout/sub-components/saved-payment-methods.mdx +0 -183
- package/docs/modular-checkout/sub-components/season-interruption-insurance.mdx +0 -221
- package/docs/modular-checkout/sub-components/sezzle-payment-method.mdx +0 -183
- package/docs/modular-checkout/sub-components/summary.mdx +0 -111
- package/docs/payment-facilitation/dispute-management/index.mdx +0 -99
- package/docs/payment-facilitation/index.mdx +0 -21
- package/docs/payment-facilitation/refund-payment/index.mdx +0 -241
- package/docs/payment-facilitation/tokenize-payment-method/index.mdx +0 -350
- package/docs/payment-facilitation/unified-fintech-checkout/342/204/242/index.mdx +0 -150
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as e,h as t,H as a}from"./p-CV0Pyo1O.js";import{a1 as i,a2 as c,a3 as h,a4 as r,a5 as o,V as f}from"./p-DrquDBSk.js";import{F as d}from"./p-wqq-X93m.js";import{F as m}from"./p-CGKWIBVk.js";import"./p-CZfYo5-1.js";const n=class{constructor(t){s(this,t),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=s=>{s.preventDefault();const e=s.target,t=e.getAttribute("name");this.inputHandler(t,e.checked),this.formControlInput.emit({name:t,value:e.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?i:this.isFocused&&this.checked?c:this.isFocused?h:this.checked?r:o}render(){return t(a,{key:"56962751d91674cfeb2716ba90bb9e9751ea4f66"},t("div",{key:"e3bb3cac2bf8ae03fc72558b3c00ef32ee56f61d",class:"form-group d-flex flex-column"},t("div",{key:"7be82e8be1da073c8f0e5ca7d609ce1d29c82c5e",class:"form-check"},t("input",{key:"f6b5f0ed365937feeb6ee0d885c55a27f21eaec0",ref:s=>this.checkboxElement=s,type:"checkbox",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),t("label",{key:"dda8703d86506cdd5a3b3549f3c54296830ff20f",class:"form-check-label",htmlFor:this.name,part:f},this.label)),t(d,{key:"a4260e0cc463ad937128d46a3eb251191319473d",helpText:this.helpText,name:this.name}),t(m,{key:"de41ad6865a3d0414fa850ee5439cc11abf31f4f",errorText:this.errorText,name:this.name})))}};export{n as form_control_checkbox}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-Dw63wyhO.js";import{w as l,x as d,y as o,z as p}from"./p-DrquDBSk.js";import{S as c}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{d as n}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:n.connected},{label:"Disconnected",value:n.disconnected},{label:"Unknown",value:n.unknown},{label:"Pending Configuration",value:n.pending_configuration},{label:"Archived",value:n.archived}]}render(){const e=Object.assign({},s);return a(c,{key:"146cbb4a0639065d7723a263949eedc218d34b63"},a("table-filters-menu",{key:"1b8e6fb88510892460f2abc033ce789873e242ab",params:e,clearParams:r,part:l},a("div",{key:"23fbd301095d1b64e93d0fef917685b93f1217a9",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"c6b956c17ee92cc991cb6adc5011e8039e210f6b",class:"p-2"},a("form-control-text",{key:"fc3df51433901eb7a499941e3ef525401c7cd5ca",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:d})),a("div",{key:"390b8a12e9a381cdf4747562ee4d7607255df3ce",class:"p-2"},a("form-control-text",{key:"92305b137d07d2ee8a351019599bb000d7d32cdd",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:o})),a("div",{key:"3197e7bf6a95621246281898d3e6d66625c30646",class:"p-2"},a("form-control-select",{key:"92dc3fb1ef44a0e9d9a455c5fa7a6fe5ee075395",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status||"",disabled:!!this.terminalStatus,part:p})))))}};export{m as justifi_terminals_list_filters}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import{p as a}from"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{T as i,a as r,b as h,c as o,d as p,e as n,f as c,g as f,h as m,i as d,j as b,k as u,l as j}from"./p-CAZzU98o.js";import{T as y}from"./p-CZfYo5-1.js";import{p as g,a as k}from"./p-D4EBPNuU.js";import{o as l,g as C}from"./p-Dm07nLGs.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ztF3Y786.js";import"./p-YYXsr-bI.js";import"./p-BZ4YUsyP.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.payments=[],this.loading=!0,this.paging=a,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.payments.find((t=>t.id===s));this.clickEvent.emit({name:y.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.paymentsTable=new i(this.payments,this.columns,g,k),this.getPayments&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:s})=>{this.payments=t,this.paging=s,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get paymentParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"eb58d94f9f02d02bf56853584b2b12aee0f0dca9"},e(r,{key:"7e7c87dcf9e29d794c08e92651e1193fe3d7c43d"},e(h,{key:"72b94512ebd04d2e335ab367243ff6592498e8d4"},e(o,{key:"6bdadafc7fd2c2a4923863e210200c7f420b1fca"},this.paymentsTable.columnData.map((t=>t)))),e(p,{key:"1caebc2a526ba1ffd644ef96b405fb24e91d34e1"},e(n,{key:"4044eeb77a3d4fff96581606e0ea8d2b1b13e361",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),e(c,{key:"32a36ee549168ca1e2004c6a99536e74be682b82",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),e(f,{key:"e758a6866400f50a092750ee44a0f3119b3aeb1f",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((t,s)=>e(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(d,{key:"aa36701c1221977bc66e4f47d4bc2dce135bbd2c"},e(b,{key:"9ac2f55f7a6415a32def730f6208b1f9a6ff2356"},e(u,{key:"6abc831c8425a7f637cb3f6af9fccf0d83a61210",colSpan:this.paymentsTable.columnData.length},e("pagination-menu",{key:"863948eab08693a881603199c7d964543b3bd455",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as payments_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as r}from"./p-CV0Pyo1O.js";import{A as o}from"./p-y8av3w9x.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{E as n}from"./p-COcg4_A3.js";import{c,J as h}from"./p-DLLFAj4z.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ZkBwsSuI.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const j=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){c(),this.analytics=new h(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const c=await r.fetchGrossVolumeChartData(s,t);c.error?e({error:p(c.error),code:a(null===(n=c.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(c.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:p(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_gross_payment_chart}
|
|
@@ -0,0 +1 @@
|
|
|
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{C as s,a as o}from"./p-Cjcsf8ku.js";import{i as r}from"./p-DpkIbI5R.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{c as n,J as p}from"./p-DLLFAj4z.js";import{g as d,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-Bz97Ujvk.js";import{T as f,l as u,a as m,b,c as y,d as w,e as _,f as j,g as k,h as v,i as T,j as g,k as D}from"./p-CAZzU98o.js";import{S as C}from"./p-BqNNwq6C.js";import{T as I}from"./p-CZfYo5-1.js";import{a as P}from"./p-B09GVew-.js";import{P as S,Q as q}from"./p-DrquDBSk.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-ZkBwsSuI.js";import"./p-y8av3w9x.js";import"./p-ztF3Y786.js";const O={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},A={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"},E={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)},A[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},P(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},P(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},P(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.updated_at,{showTime:!0})))},F=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:I.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:I.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:I.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,O,E),n(),this.analytics=new p(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:i,onSuccess:o,onError:c,final:n})=>{var p;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:s.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=d(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{n()}})({accountId:i.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(C,{key:"0a993aa9157e9ea6f75a4c745dd2751ab22d0623"},t(u,{key:"56a300b72bb39bf9aa4d9829f1634e5a48b71b15"},t(m,{key:"7d3f9fc3159ea7568bd2904ed74a5d90198eecb7"},t(b,{key:"106703b0ed82206aca0b18a1217fbdad9316cca0"},t(y,{key:"3d01490dc673358566747dd3aac4c61d1f8681f9"},this.transactionsTable.columnData.map((t=>t)))),t(w,{key:"a1bf3cc192ef3434ff4626390f33361a984e276f"},t(_,{key:"edaf059907492b9911bfe11f6ae476711db7200f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"b75807ecc951d0e62993b905246c3e58d676bb7c",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(k,{key:"7d759684cb4f42733028e734479ba2000495dcee",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(T,{key:"a657e7edf27d011926e2228b7a55ba6fb05f9dff"},t(g,{key:"c1c592833f527432b53d42cca3a70637065b1918"},t(D,{key:"b4dba89aa35e7632a9442ad3e804cdd3946377f7",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"935a7f48b344774fb6058de565a135ae70deb80e",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{F as justifi_payout_transactions_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as r}from"./p-
|
|
1
|
+
import{r as t,h as r}from"./p-CV0Pyo1O.js";const s=class{constructor(r){t(this,r)}render(){return this.helpText?r("small",{class:"form-text text-muted",id:`form-help-text-${this.name}`},this.helpText):null}};export{s as form_control_help_text}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,H as a}from"./p-CV0Pyo1O.js";import{a6 as i,a7 as h,a8 as r,a9 as c,aa as o,V as f}from"./p-DrquDBSk.js";const l=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?i:this.isFocused&&this.checked?h:this.checked?r:this.isFocused?c:o}render(){return e(a,{key:"8cb1ec6909bc2cf40e12a9571c2eafccf26b11ae",class:"form-group d-flex flex-column"},e("div",{key:"c87254a83f9e5c025d956b1267430481eddc8611",class:"form-check"},e("input",{key:"c688c8ee6fb43bc1766196c54f097b6f020682dc",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:"4a73f2c14311e08485bd8da49fb46dea05e50e26",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:f},this.label)),e("form-control-help-text",{key:"e1e539af6cf24db6dd6411eea872a174a5a4e80c",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"fa206e7d1300cc9ef5386efb26e5a2d4eedab149",errorText:this.errorText,name:this.name}))}};export{l as form_control_radio}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a,r as e,H as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DaZF_q9T.js";import{w as s,c}from"./p-DVJaoI_m.js";import{b as r}from"./p-B09GVew-.js";import"./p-DrquDBSk.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const o=e=>{const{isReady:i}=e;return i?null:a("div",{class:"container-fluid p-0"},a("div",{class:"row mb-3"},a("div",{class:"col-12 align-content-end"},a(t,{height:"18px",width:"120px"}),a(t,{height:"36px"}))),a("div",{class:"row"},a("div",{class:"col-12 align-content-end"},a(t,{height:"18px",width:"110px"}),a(t,{height:"36px"}))))},n=class{constructor(a){e(this,a),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=c.iframeOrigin,this.tabId=r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((a=>new Promise((e=>{a.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const a=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return a&&e}async tokenize(a,e,i){return this.accountNumberIframeElement.tokenize(a,e,i)}render(){return a(i,{key:"a104b2e88e818472d0158990ccf2cac6d7315616"},a(o,{key:"1ed1ac87a66aedf6a7528247e0ff3a803c74e4c3",isReady:this.isReady}),a("div",{key:"a96c05c60c51f97c8abb7dc6a8cfebc940ea1513",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},a("div",{key:"3d168fd241702b30f0c8727d3c0aae65c20b69aa",class:"row mb-3"},a("iframe-input",{key:"dc1da989b1577ed62b3eeafd33128aca38e4610d",inputId:"accountNumber",ref:a=>this.accountNumberIframeElement=a,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),a("div",{key:"1179ae9d6b9f476bb01a1ee4f4edd7da6f22f635",class:"row"},a("iframe-input",{key:"7e79b383876be1711a2e21ab7462f86281ebf28c",inputId:"routingNumber",ref:a=>this.routingNumberIframeElement=a,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{n as bank_account_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-DiJD6Iqx.js";import{f as o}from"./p-B09GVew-.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{B as c}from"./p-BqL4QuAa.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-y-FoILTI.js";import{m as p}from"./p-D0PhRMmy.js";import{c as f,J as y}from"./p-DLLFAj4z.js";import{g as v,a as j}from"./p-D2muobcE.js";import{A as w}from"./p-y8av3w9x.js";import{S as b}from"./p-DaZF_q9T.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ZkBwsSuI.js";const I=t=>{const e=+t;return i().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}))},T=t=>{if(t)return r({amount:I(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},k=[{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"}],D=w();class C{async postRefund(t,e,s,r){return D.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const S=w();class g{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(){f(),this.analytics=new y(this),this.initializeApi(),this.formController=new n(T())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.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 n(T(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 l({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(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const 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:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:v(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=v(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new g});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).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:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:v(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=v(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new C});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:k,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(c,{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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as i,H as n,g as s}from"./p-CV0Pyo1O.js";import{A as o}from"./p-y8av3w9x.js";import{A as a,o as r,p as l,q as c,r as h,s as d,c as p,t as u,G as y,u as g,v as b,w as m,x as f,y as v,z as M,B as w,D as k,I as P,F as x,H as E}from"./p-DpkIbI5R.js";import{S as j}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as A}from"./p-DaZF_q9T.js";import{B as T,r as N}from"./p-DrquDBSk.js";import{f as C}from"./p-B09GVew-.js";import{P as I,a as D,b as S}from"./p-DkoufM1t.js";import{H as L}from"./p-sPEyLX4E.js";import{H as O,b as z,h as R,i as _}from"./p-B8CPGGs6.js";import{H as U}from"./p-C3E-JbVM.js";import{J as B,c as G}from"./p-DLLFAj4z.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as Y,a as F,b as V}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as H,a as Q}from"./p-D2muobcE.js";import{C as q}from"./p-NO0z-S2W.js";import{C as Z}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-ZkBwsSuI.js";var W;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(W||(W={}));class J{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const n=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:n.id&&!!n.data.token,data:n}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const n=new l(t);if(!n.isValid){const t=[];throw n.countryCode||t.push("countryCode"),n.currencyCode||t.push("currencyCode"),n.merchantCapabilities&&0!==n.merchantCapabilities.length||t.push("merchantCapabilities"),n.supportedNetworks&&0!==n.supportedNetworks.length||t.push("supportedNetworks"),n.total&&n.total.label&&n.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=n,new Promise(((t,s)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),s({success:!1,error:{code:W.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,n),this.setupSessionEventHandlers(t,s,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),s({success:!1,error:{code:W.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,n){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,n);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:W.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async s=>{try{const o=s.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,n,a);l.success?(this.currentSession.completePayment({status:c.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:c.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",n="USD"){return{countryCode:i,currencyCode:n,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case h.WHITE:t+=" apple-pay-button-white";break;case h.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case d.BUY:t+=" apple-pay-button-type-buy";break;case d.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted",7),this.applePayCompleted=i(this,"applePayCompleted",7),this.applePayCancelled=i(this,"applePayCancelled",7),this.applePayError=i(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=h.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:p.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(p.paymentDescription,p.paymentAmount)},n=await this.applePayService.startPaymentSession(i,p.authToken,p.accountId);n.success?this.applePayCompleted.emit({success:!0,token:n.token,paymentMethodId:n.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:n.error}),this.applePayError.emit({error:(null===(t=n.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=n.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(p.paymentAmount)&&Boolean(p.paymentCurrency)&&Boolean(p.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:p.paymentAmount,paymentCurrency:p.paymentCurrency,hasAuthToken:Boolean(p.authToken),accountId:p.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!p.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(j,null,p.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(X,{isLoading:this.isLoading}),e&&t($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(t){e(this,t)}render(){return t(j,{key:"28a1a324b8cdf2dea0aafe91fbdd3679482e76f8"},t("section",{key:"e8ffe2fdd1592a0b762647fdab94ee5e21436a93"},t("div",{key:"099fbfb449066290cdcd113b0de5f87334777a0e"},t("div",{key:"c78325957b4e00299366b8e9efe6fd6e86da3b97",part:T},null==p?void 0:p.paymentDescription),t("div",{key:"d077da888b03a34e540f66ebaa57502fe22be7c4"},t("span",{key:"d4f7ddd24e10302222679a9f73c3b5ed305267a7",part:T},"Total")," ",t("span",{key:"1f5d7b6b0cce64eea04879e7767ff87ce5a64069",part:T},C(+(null==p?void 0:p.totalAmount)))))))}};class et{constructor(){this.api=o()}initialize(t){if(this.googlePayConfig=new y(t),!this.googlePayConfig.isValid)throw new Error("Invalid Google Pay configuration provided");if(this.googlePayClient=g.createGooglePayClient(this.googlePayConfig.environment),!this.googlePayClient)throw new Error("Failed to create Google Pay client")}async processPayment(t,e,i){try{const n=await this.api.post({endpoint:"google_pay/process_token",authToken:t,body:i,headers:{"sub-account":e}});return{success:n.id&&!!n.data.token,data:n}}catch(t){throw new Error("Google Pay payment processing failed")}}isAvailable(){return g.isGooglePaySupported()&&!!this.googlePayClient}async canMakePayments(){if(!this.googlePayClient||!this.googlePayConfig)return!1;try{const t=g.createBasePaymentDataRequest();return(await this.googlePayClient.isReadyToPay(t)).result}catch(t){return!1}}async startPaymentSession(t,e,i){var n;if(!this.googlePayConfig||!this.googlePayClient)throw new Error("Google Pay not initialized. Call initialize() first.");if(!this.isAvailable())throw new Error("Google Pay is not available on this device/browser");const s=new b(t);if(!s.isValid)throw new Error("Invalid payment data request provided");try{const t=await this.googlePayClient.loadPaymentData(s),o=null===(n=null==t?void 0:t.paymentMethodData)||void 0===n?void 0:n.tokenizationData,a=(()=>{if((null==o?void 0:o.token)&&"string"==typeof o.token)try{return JSON.parse(o.token)}catch(t){return o}return o})(),r={protocolVersion:null==a?void 0:a.protocolVersion,signature:null==a?void 0:a.signature,intermediateSigningKey:(null==a?void 0:a.intermediateSigningKey)?{signedKey:a.intermediateSigningKey.signedKey,signatures:a.intermediateSigningKey.signatures}:void 0,signedMessage:null==a?void 0:a.signedMessage},l=await this.processPayment(e,i,r);return l.success?{success:!0,paymentData:t,paymentMethodId:l.data.id}:{success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:"Payment processing failed"}}}catch(t){if(t&&"object"==typeof t&&"statusCode"in t){const e=t;switch(e.statusCode){case"CANCELED":return{success:!1,error:{code:"USER_CANCELLED",message:"User cancelled the Google Pay session"}};case"DEVELOPER_ERROR":return{success:!1,error:{code:"DEVELOPER_ERROR",message:"Google Pay configuration error"}};default:return{success:!1,error:{code:"PAYMENT_ERROR",message:e.statusMessage||"Google Pay payment failed"}}}}return{success:!1,error:{code:"PAYMENT_ERROR",message:t instanceof Error?t.message:"Google Pay payment failed"}}}}createButton(t){if(!this.googlePayClient||!this.googlePayConfig)return null;try{return this.googlePayClient.createButton({onClick:t.onClick,buttonType:t.buttonType,buttonSizeMode:t.buttonSizeMode,buttonColor:t.buttonColor,buttonLocale:t.buttonLocale})}catch(t){return null}}prefetchPaymentData(t){if(!this.googlePayClient)return;const e=new b(t);if(e.isValid)try{this.googlePayClient.prefetchPaymentData(e)}catch(t){}}static createPaymentDataRequest(t,e,i="US",n="USD",s,o){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[g.createPaymentMethodData()],transactionInfo:{countryCode:i,currencyCode:n,totalPriceStatus:"FINAL",totalPrice:g.formatAmount(t),totalPriceLabel:e},merchantInfo:{merchantName:s,merchantId:o}}}getGooglePayConfig(){return this.googlePayConfig}getGooglePayClient(){return this.googlePayClient}}const it=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},nt=e=>t("div",{class:"google-pay-button-container"},t("button",Object.assign({class:(()=>{let t="google-pay-button";switch(t+=e.buttonStyle===f.WHITE?" google-pay-button-white":" google-pay-button-black",e.buttonType){case v.BUY:t+=" google-pay-button-type-buy";break;case v.BOOK:t+=" google-pay-button-type-book";break;case v.CHECKOUT:t+=" google-pay-button-type-checkout";break;case v.DONATE:t+=" google-pay-button-type-donate";break;case v.ORDER:t+=" google-pay-button-type-order";break;case v.PAY:t+=" google-pay-button-type-pay";break;case v.SUBSCRIBE:t+=" google-pay-button-type-subscribe";break;default:t+=" google-pay-button-type-plain"}return t+=e.buttonSizeMode===m.FILL?" google-pay-button-fill":" google-pay-button-static",(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:(()=>{const t={};return e.buttonSizeMode===m.FILL?(t.width="100%",t.minWidth="200px"):t.width=e.width||"200px",t.height=e.height||"48px",t})(),onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Google Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing...")),t("div",{class:"google-pay-button-content"},t("svg",{width:"41",height:"17",xmlns:"http://www.w3.org/2000/svg"},t("g",{fill:"none","fill-rule":"evenodd"},t("path",{d:"M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z",fill:"#FFF"}),t("path",{d:"M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944",fill:"#4285F4"}),t("path",{d:"M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703",fill:"#34A853"}),t("path",{d:"M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z",fill:"#FABB05"}),t("path",{d:"M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774",fill:"#E94235"}))))),t("style",null,"\n .google-pay-button-container {\n display: block;\n position: relative;\n }\n\n .google-pay-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.25px;\n line-height: 16px;\n outline: none;\n padding: 0 20px;\n position: relative;\n min-width: 140px;\n min-height: 48px;\n }\n\n /* Button styles */\n .google-pay-button.google-pay-button-black {\n background-color: #000;\n color: #fff;\n }\n\n .google-pay-button.google-pay-button-white {\n background-color: #fff;\n color: #3c4043;\n }\n\n /* Button content */\n .google-pay-button-content {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n }\n\n .google-g-logo {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .pay-text {\n font-family: 'Google Sans', arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n margin-left: 8px;\n }\n\n /* Button types - text content handled by ::before pseudo-element */\n .google-pay-button-type-buy .google-pay-button-content::before {\n content: 'Buy with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-book .google-pay-button-content::before {\n content: 'Book with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-checkout .google-pay-button-content::before {\n content: 'Checkout with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-donate .google-pay-button-content::before {\n content: 'Donate with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-order .google-pay-button-content::before {\n content: 'Order with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-pay .google-pay-button-content::before {\n content: 'Pay with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-subscribe .google-pay-button-content::before {\n content: 'Subscribe with';\n margin-right: 8px;\n }\n\n /* Size modes */\n .google-pay-button.google-pay-button-fill {\n width: 100%;\n min-width: 200px;\n }\n\n .google-pay-button.google-pay-button-static {\n width: auto;\n }\n\n /* Hover and focus states */\n .google-pay-button:hover:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:focus:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:active:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n transform: translateY(1px);\n }\n\n /* Disabled state */\n .google-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .google-pay-button.disabled:hover,\n .google-pay-button.disabled:focus,\n .google-pay-button.disabled:active {\n box-shadow: none;\n transform: none;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .google-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),st=class{constructor(t){e(this,t),this.googlePayCancelled=i(this,"googlePayCancelled",7),this.googlePayCompleted=i(this,"googlePayCompleted",7),this.googlePayStarted=i(this,"googlePayStarted",7),this.unsubscribes=[],this.canMakePayments=!1,this.error=null,this.isAvailable=!1,this.isLoading=!0,this.isProcessing=!1,this.buttonSizeMode=m.FILL,this.buttonStyle=f.BLACK,this.buttonType=v.PLAIN,this.countryCode="US",this.disabled=!1,this.environment=M.PRODUCTION,this.merchantId="gateway:justifi",this.merchantName="justifi",this.showSkeleton=!0,this.handleGooglePayClick=async()=>{var t;if(!this.isProcessing&&!this.disabled&&this.isAvailable&&this.canMakePayments)try{this.isProcessing=!0,this.error=null,this.googlePayStarted.emit();const e=this.createPaymentDataRequest(),i=await this.googlePayService.startPaymentSession(e,p.authToken,p.accountId);i.success?this.googlePayCompleted.emit({success:!0,paymentData:i.paymentData,paymentMethodId:i.paymentMethodId}):(this.googlePayCompleted.emit({success:!1,error:i.error}),"USER_CANCELLED"===(null===(t=i.error)||void 0===t?void 0:t.code)&&this.googlePayCancelled.emit())}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.googlePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}watchConfigChange(){this.initializeGooglePay()}componentWillLoad(){this.googlePayService=new et}componentDidLoad(){const t=w("paymentAmount",(()=>{this.prefetchPaymentData()}));"function"==typeof t&&this.unsubscribes.push(t);const e=w("paymentCurrency",(()=>{this.prefetchPaymentData()}));"function"==typeof e&&this.unsubscribes.push(e);const i=w("paymentDescription",(()=>{this.prefetchPaymentData()}));"function"==typeof i&&this.unsubscribes.push(i)}disconnectedCallback(){this.unsubscribes.forEach((t=>{try{t()}catch(t){}})),this.unsubscribes=[]}async getSupportedAuthMethods(){return this.isAvailable?g.getDefaultAuthMethods():[]}async getSupportedNetworks(){return this.isAvailable?g.getDefaultSupportedNetworks():[]}async handleSelectionClick(){p.selectedPaymentMethod={type:I.GOOGLE_PAY}}async isSupported(){return this.isAvailable&&this.canMakePayments}async prefetchPaymentData(){if(!this.isAvailable||!this.canMakePayments)return;const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}async initializeGooglePay(){try{if(this.isLoading=!0,this.error=null,!p.paymentAmount)return this.error="Missing required Google Pay configuration",void(this.isLoading=!1);if(this.googlePayService.initialize({environment:this.environment,merchantId:this.merchantId,merchantName:this.merchantName,buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode}),this.isAvailable=this.googlePayService.isAvailable(),!this.isAvailable)return this.error="Google Pay is not supported on this device",void(this.isLoading=!1);if(this.canMakePayments=await this.googlePayService.canMakePayments(),!this.canMakePayments)return this.error="Google Pay is not available for payments",void(this.isLoading=!1);const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}catch(t){this.error=t instanceof Error?t.message:"Failed to initialize Google Pay"}finally{this.isLoading=!1}}createPaymentDataRequest(){return et.createPaymentDataRequest(p.paymentAmount,p.paymentDescription,this.countryCode,p.paymentCurrency,this.merchantName,this.merchantId)}render(){const e=!this.isLoading&&!!this.error,i=!this.isLoading&&!this.error&&!this.isAvailable,n=!this.isLoading&&!this.error&&this.isAvailable&&!this.canMakePayments,s=!this.isLoading&&!this.error&&this.isAvailable&&this.canMakePayments;return t(j,{key:"03db34814fb208f95cb962dac7bbf39a7f866009"},p.checkoutLoaded&&t("script",{key:"1e3f05585ba986de8fe31561e889395a263ef78d",async:!0,src:"https://pay.google.com/gp/p/js/pay.js",onLoad:()=>{this.initializeGooglePay()}}),t("div",{key:"dbc0bef2cc8ecc090a2e47c07857721777f2a4d0",class:"google-pay-container"},t(it,{key:"c8424c307933e7dff09f91789e5f360107ad9455",isLoading:this.isLoading}),e&&t("div",{key:"dc6809b02f90607f14c178adbdb55b146eb7c40d",class:"google-pay-error",role:"alert","data-testid":"gp-error"},t("span",{key:"5cbc697930caa6306d0a60dcbe47eb402f53787d",class:"error-icon"},"⚠️"),t("span",{key:"893a51db871fbb32a06c6bea5b58c46b48a1ab68",class:"error-message"},this.error)),i&&t("div",{key:"db1f743883ac3137172a298fdc8f5e0ed6b1c0be",class:"google-pay-unavailable","data-testid":"gp-device-unavailable"},t("span",{key:"5037803646e5a493cf7676a7d07918c265eabf4a",class:"unavailable-message"},"Google Pay is not available on this device")),n&&t("div",{key:"c7d519a57bf52b788b5e55ebb9ae229756f72316",class:"google-pay-unavailable","data-testid":"gp-payments-unavailable"},t("span",{key:"bfd35ea4231cef3d06191fccd0e42ed5d6779261",class:"unavailable-message"},"Google Pay is not available for payments")),s&&t(nt,{key:"f4888ea57c3ac49199ffb8e0b6d4c1ba6ba84ec3","data-testid":"gp-button",buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleGooglePayClick})),t("style",{key:"620c1c8a982f52d7b7793ef5ce92587eb3ec3284"},"\n .google-pay-container {\n width: 100%;\n }\n\n .google-pay-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n }\n\n .google-pay-unavailable {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n color: #6b7280;\n font-size: 14px;\n }\n\n .error-icon {\n font-size: 16px;\n }\n \n "))}static get watchers(){return{merchantId:["watchConfigChange"],environment:["watchConfigChange"]}}},ot=class{constructor(t){e(this,t),this.levels={h1:L,h2:O,h3:U},this.level="h1"}render(){return t(j,{key:"b9dfbfab147a15030ec8b2cb39ccd1c476e7c0be"},t(this.levels[this.level],{key:"9ee20ed2fb2916a433cb158ce082505fbc367c4f",text:this.text,class:this.class}))}},at=o();class rt{async getLinkToken(t,e,i,n){return at.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:n})}async tokenizeBankAccount(t,e,i,n,s,o){const a=`plaid/${e}/tokenize`,r={public_token:i};return n&&(r.link_token_id=n),s&&(r.payment_method_group_id=s),at.post({endpoint:a,body:r,authToken:t,signal:o})}}const lt=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.checkoutChangedEvent=i(this,"checkout-changed",7),this.plaidService=new rt,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:n}=t.detail||{};e&&i?(p.paymentToken=i,p.selectedPaymentMethod={type:I.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:n&&n.message||"Google Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})},this.handleGooglePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:n,error:s}=t.detail;e&&i?(p.paymentToken=n,p.selectedPaymentMethod={type:I.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",s),this.errorEvent.emit({message:(null==s?void 0:s.message)||"Apple Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:Y.ERROR})},this.handleApplePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),p.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new q};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:n,onError:s})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return s({error:Q(a.error),code:H(null===(o=a.error)||void 0===o?void 0:o.code),severity:Y.ERROR});n({checkout:a.data})}catch(t){const e=H(null==t?void 0:t.code);return s({error:t.message||t,code:e,severity:Y.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:n,onSuccess:s,onError:o})=>{var a;try{const r=await i.complete(t,e,n);if(r.error)return o({error:Q(r.error),code:H(null===(a=r.error)||void 0===a?void 0:a.code),severity:Y.ERROR});s({checkout:r.data})}catch(t){const e=H(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:Y.ERROR})}})(t),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new B(this),G(),p.authToken=this.authToken,this.fetchCheckout(),z("set",(t=>{const e=_[t];void 0!==e&&R(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==P.completed?t.status!==P.expired||this.errorEvent.emit({message:V.CHECKOUT_EXPIRED,errorCode:F.CHECKOUT_EXPIRED,severity:Y.ERROR}):this.errorEvent.emit({message:V.CHECKOUT_ALREADY_COMPLETED,errorCode:F.CHECKOUT_ALREADY_COMPLETED,severity:Y.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:V.NOT_AUTHENTICATED,errorCode:F.NOT_AUTHENTICATED,severity:Y.ERROR})}updateStore(t){var e,i,n,s,o,a,r;p.accountId=t.account_id,p.checkoutLoaded=!0,p.paymentMethods=t.payment_methods.map((t=>new D(t))),p.paymentMethodGroupId=t.payment_method_group_id,p.paymentDescription=t.payment_description,p.totalAmount=t.total_amount,p.paymentAmount=t.payment_amount,p.bnplEnabled=t.payment_settings.bnpl_payments,p.insuranceEnabled=t.payment_settings.insurance_payments,p.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,p.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,p.googlePayEnabled=null===(n=t.payment_settings)||void 0===n?void 0:n.google_payments,p.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,p.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,p.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,p.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:x(),selectedPaymentMethod:p.selectedPaymentMethod,savedPaymentMethods:p.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,n;const s=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),s),a=Object.assign({accountId:p.accountId,payment_method_group_id:void 0},o);p.savePaymentMethod&&(a.payment_method_group_id=p.paymentMethodGroupId);const r=await(null===(n=this.paymentMethodFormRef)||void 0===n?void 0:n.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:p.accountId}));return r.error?r:(p.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){p.selectedPaymentMethod=t,p.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];p.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const n=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.NEW_CARD,s=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_BANK_ACCOUNT;if((n||s)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,n,s,o;const a=await this.validate();if(!p.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});const r=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_CARD,l=(null===(i=p.selectedPaymentMethod)||void 0===i?void 0:i.type)===I.NEW_BANK_ACCOUNT,c=(null===(n=p.selectedPaymentMethod)||void 0===n?void 0:n.type)===I.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}if(c&&!p.paymentToken){const t=p.plaidPublicToken,e=p.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(p.authToken,p.accountId,t,e||void 0,p.savePaymentMethod?p.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});const n=null==i?void 0:i.data,o=(null===(s=null==n?void 0:n.bank_account)||void 0===s?void 0:s.token)||(null==n?void 0:n.token)||(null==n?void 0:n.id);p.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});if(!p.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});let h;if(h={payment_mode:(t=>{switch(t){case I.NEW_CARD:case I.SAVED_CARD:case I.NEW_BANK_ACCOUNT:case I.SAVED_BANK_ACCOUNT:case I.PLAID:return S.ECOM;case I.SEZZLE:return S.BNPL;case I.APPLE_PAY:return S.APPLE_PAY;case I.GOOGLE_PAY:return S.GOOGLE_PAY;default:return}})(null===(o=p.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:p.paymentToken},this.preCompleteHook){const t=E();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:h,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:F.COMPLETE_CHECKOUT_ERROR,severity:Y.ERROR})}})}render(){return t(n,{key:"ee341d8d78767a80e2627ea5244ba46ca63cd8df"})}get hostEl(){return s(this)}};var ct;!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"}(ct||(ct={}));const ht={[ct.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[ct.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[ct.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[ct.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[ct.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[ct.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[ct.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[ct.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[ct.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[ct.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[ct.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[ct.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[ct.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},dt={[ct.PLAID_SDK_LOAD_FAILED]:Y.ERROR,[ct.PLAID_LINK_INIT_FAILED]:Y.ERROR,[ct.PLAID_LINK_TOKEN_FAILED]:Y.ERROR,[ct.PLAID_AUTHENTICATION_FAILED]:Y.ERROR,[ct.PLAID_BANK_NOT_SUPPORTED]:Y.WARNING,[ct.PLAID_TOKEN_EXPIRED]:Y.WARNING,[ct.PLAID_NETWORK_ERROR]:Y.WARNING,[ct.PLAID_USER_CANCELLED]:Y.INFO,[ct.PLAID_TIMEOUT]:Y.WARNING,[ct.PLAID_INVALID_CREDENTIALS]:Y.ERROR,[ct.PLAID_ACCOUNT_LOCKED]:Y.ERROR,[ct.PLAID_MAINTENANCE]:Y.WARNING,[ct.PLAID_RATE_LIMITED]:Y.WARNING},pt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.plaidError=i(this,"plaidError",7),this.plaidErrorRecovered=i(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new rt,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{p.authToken&&p.accountId&&p.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:ht[ct.PLAID_LINK_TOKEN_FAILED],severity:dt[ct.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:ct.PLAID_LINK_INIT_FAILED,message:ht[ct.PLAID_LINK_INIT_FAILED],severity:dt[ct.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,n,s;try{if(!p.authToken||!p.accountId)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:Y.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(p.authToken,p.accountId,p.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(p.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=ct.PLAID_LINK_TOKEN_FAILED,a=ht[o],r=!0;"AbortError"===t.name?(o=ct.PLAID_TIMEOUT,a=ht[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=ct.PLAID_NETWORK_ERROR,a=ht[o],r=!0):((null===(n=t.message)||void 0===n?void 0:n.includes("401"))||(null===(s=t.message)||void 0===s?void 0:s.includes("unauthorized")))&&(o=ct.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:dt[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return ct.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return ct.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return ct.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return ct.PLAID_RATE_LIMITED;case"maintenance":return ct.PLAID_MAINTENANCE;case"not_authenticated":return ct.PLAID_INVALID_CREDENTIALS;default:return ct.PLAID_LINK_TOKEN_FAILED}return ct.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:Y.INFO}),p.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=ct.PLAID_AUTHENTICATION_FAILED,i=ht[e],n=!0,s="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=ct.PLAID_INVALID_CREDENTIALS,i=ht[e],n=!0;break;case"ITEM_LOGIN_REQUIRED":e=ct.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",n=!0;break;case"ITEM_LOCKED":e=ct.PLAID_ACCOUNT_LOCKED,i=ht[e],n=!1,s="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=ct.PLAID_MAINTENANCE,i=ht[e],n=!0;break;case"RATE_LIMIT_EXCEEDED":e=ct.PLAID_RATE_LIMITED,i=ht[e],n=!0;break;case"INVALID_REQUEST":e=ct.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",n=!0;break;case"PLAID_ERROR":e=ct.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",n=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=ct.PLAID_BANK_NOT_SUPPORTED,i=ht[e],n=!1,s="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=ct.PLAID_TOKEN_EXPIRED,i=ht[e],n=!0)}this.handleError({code:e,message:i,severity:dt[e],originalError:t,retryable:n,userAction:s}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)!==I.PLAID&&(p.selectedPaymentMethod={type:I.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return p.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(p.selectedPaymentMethod={type:I.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=w("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==p.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(j,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===Y.ERROR?"text-danger":this.error.severity===Y.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},ut=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),p.selectedPaymentMethod={id:t.id,type:t.type},p.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===I.SAVED_CARD&&p.disableCreditCard||t===I.SAVED_BANK_ACCOUNT&&p.disableBankAccount)}componentWillLoad(){p.paymentMethods.length||console.warn("No saved payment methods available."),p.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return p.disablePaymentMethodGroup?null:t(j,null,t("div",{class:"saved-payment-methods"},p.paymentMethods.length?p.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:N,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:p.paymentToken===(null==e?void 0:e.id),label:`${Z[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},yt=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),gt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=I.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(p.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:p.bnplProviderClientId,apiMode:p.bnplProviderMode,apiVersion:p.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:p.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){p.selectedPaymentMethod={type:I.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return p.bnplEnabled?t(j,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",yt),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},C(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{K as justifi_apple_pay,tt as justifi_checkout_summary,st as justifi_google_pay,ot as justifi_header,lt as justifi_modular_checkout,pt as justifi_plaid_payment_method,ut as justifi_saved_payment_methods,gt as justifi_sezzle_payment_method}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-DiJD6Iqx.js";import{ao as d}from"./p-DrquDBSk.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"d52503cf5815f53c655754d07b1bc1cc7401d07f"},a("div",{key:"b7c4c06c3bd77afbd5cd9f96158eaf3161425f0b",class:"row gy-3"},a("div",{key:"33836b54b773763a8657afc90331cc67045d4b71",class:"col-12"},a("h2",{key:"fef897d53f97e665210ead7210041dcf5ce816a1",class:"h5",part:d},"Additional Evidence")),a("div",{key:"26afd31b03e4d399e4c6032ea9c1bdee54d830be",class:"col-12"},a("form-control-textarea",{key:"4fd907f2de7d8239d9665583d88b656aa0e0a311",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"7775cf2e4ee5d27a1c703a9bd3710f6ec2b2f09f",class:"col-12"},a("form-control-file-v2",{key:"7155276e45b54d1c70ba37a778d8ebc69a626b8f",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"7e324ceb101b39f115b802eaaba72bc1244d944f"},a("div",{key:"09051fac8c49c6ffc52e37d5027a353a8e4fe8ae",class:"row gy-3"},a("div",{key:"6c8c50593dca3155a708ec25f3189be54df3e3b9",class:"col-12"},a("h2",{key:"bdffa3a4ea564d715c377ffe2b97c7ec59600ed5",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"376a234708050ff8079db49dd42e28eabbd2d5ce",class:"col-12"},a("form-control-textarea",{key:"2b6a803b276cf3c73e2a3745cd09c9b797265127",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"52d22aae6cca0dd3215d545957d130564ae673e5",class:"col-12"},a("form-control-textarea",{key:"170191a065345416f68bb0abfa72b59318c65ed6",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"cb5e7e12104574a061139fd882c9da41e8ffadbb",class:"col-12"},a("form-control-file-v2",{key:"7c09d5592ac3584e134f8a1a3d0aeca0c2cf4373",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"2a284179b0e885a49328aea3de640ac89a721a50"},a("div",{key:"aa7da787c2438af27988aa66ee14a980f3b06b9b",class:"row gy-3"},a("div",{key:"7866c966658406e25a7a96f8b625dff4cd01fae9",class:"col-12"},a("h2",{key:"16232b46708a785c70fb1160d45f71457517f146",class:"h5",part:d},"Customer Details")),a("div",{key:"fa470479d54a9c68543f01f5aa8168b31345c558",class:"col-12"},a("form-control-text",{key:"b0908d5cf478b70081ae376f52f37539cfe6cd4f",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"a74a0dc1a29526fc24a4ed85b51152679f6cf557",class:"col-12"},a("form-control-text",{key:"e212808991ff68e64ef07fe216b30d9ef53f1876",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"588cd9e061aeb50c7b1a427cf961a594b20543e2",class:"col-12"},a("form-control-textarea",{key:"03792e2bd58e6f83605bd6d8694ecd52c69f7bf9",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"e82bcb4a124a371349a61446ed80bfc2ddff6447",class:"col-12"},a("form-control-file-v2",{key:"177fd69a1d5fd956e875651f28f3b52673ca7b3b",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"0e1b09ec74a570e5eae6378c0789147b2a8a9f41",class:"col-12"},a("form-control-file-v2",{key:"07eaaa242425f54482c5bf1c45bbb64b7b0eb032",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"bfd32a0d9ae4fb268939513d5206912e6e60b499"},a("div",{key:"2c41e7c7b33d711a7a4c76c4a3fccb569e9e9a44",class:"row gy-3"},a("div",{key:"5cc774a79845c5899c1d34e402db5876cbf3e438",class:"col-12"},a("h2",{key:"4f26c3cd1e6035100d9837bfbc9e8fda96b4b04e",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"e8f259b79ad4b0378ba9608499407e1f5506e962",class:"col-12"},a("form-control-text",{key:"abe5a8f45e4839d6c22e7a43b2561148226fa3f9",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"73f01e8f48b828b4469bd9a12ed20373e3a68ffe",class:"col-12"},a("form-control-textarea",{key:"9d2779988e2fc60c4284a874b512a214a2f84831",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"77393e15774fbce72f9051414a8d92c07a7b8a00",class:"col-12"},a("form-control-file-v2",{key:"c89b9fe51f969e0eeaf34a0a1d5aa3e94374d26d",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"6d2edd78d7560d7f4c1b649b6682d9565642a471"},a("div",{key:"943bb135558ddd1b77584348e1dc7a78eea9bf95",class:"row gy-3"},a("div",{key:"114e921a4f2cfdb130c9a8fde298a8ffe2744662",class:"col-12"},a("h2",{key:"d2e5515b640557162bb8856fdc1bbd778b4cdab1",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"99e45755978c66b8ba8bd4ac3c57015900fc4aaf",class:"col-12"},a("form-control-text",{key:"f2d9724bfdd36297a72240d0709b777acc41566d",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"fedc63aa2a66f0b65dd10bdb80973031813a5106",class:"col-12"},a("form-control-file-v2",{key:"4c83a23b83af34e14575673377a1ed5ec6af0c63",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"39e0aa0809a7f31075914992db63b4692e90c8f7"},a("div",{key:"22ac8468a1f393d953674eb9df6ad8b8b841c809",class:"row gy-3"},a("div",{key:"b1f46f086d396273166299dd8bd529e79107f13a",class:"col-12"},a("h2",{key:"e1fdc1f37af032ae5f5616339e314185d9934f3d",class:"h5",part:d},"Product & Service Details")),a("div",{key:"1a23b1efc62e0d3b9d024794839fd471a50386ff",class:"col-12"},a("form-control-text",{key:"309456cdc1d555c6a650701fbea26e86f6c361e8",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"d4ca284ae38f394ee2ab89133648bf8948ccd4db",class:"col-12"},a("form-control-date",{key:"af3d48ac5b43ece0163f6ea35f5da50894790167",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"fd55750e38937249a235870dd447efa9be17f19b",class:"col-12"},a("form-control-file-v2",{key:"c8c8bd2bb80a4dfc4b28907433673ed60bfedf8d",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"7cee5ba256884cd7c605ecf15bb053491638d152"},a("div",{key:"532fbf2796589fa07689891b645689251775fdd4",class:"row gy-3"},a("div",{key:"3b09609d869fc9e88759cedb6dcf1f8a568e0d93",class:"col-12"},a("h2",{key:"0322bce2a6c761e4c49f5c0fd7a200b3255c5dee",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"260dec4ba14d062998001f13ed26108b0eb45e56",class:"col-12"},a("form-control-textarea",{key:"0ed21b81a6a708708179b3a163bb816b9d0a497e",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"2c1877075ada904c565f4556c7fe00021d85b137",class:"col-12"},a("form-control-textarea",{key:"58b3c47e543a2f7a82010b47772b22329de8ed0e",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"990fe61c90b2be5d198d31fb0c5165fbbcc8d96e",class:"col-12"},a("form-control-file-v2",{key:"6f725675ab78150e3005754475577f96d796a0d0",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"65eb12d67c8d84e55bc590454222b0cb8c17512f",class:"col-12"},a("form-control-file-v2",{key:"f8dae47642c8c41c079180075f89ebc9ca7812a7",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"42e223f71b2bbb47452c42ef5fa3461c33fb1f05"},a("div",{key:"202b32fe04059d34bbcc422a4d8a426148fffa4c",class:"row gy-3"},a("div",{key:"4508298a411269d447989c859b9f916f3d288c38",class:"col-12"},a("h2",{key:"732705ee8f3e8d3ebce839e33b7ef3a5ca108224",class:"h5",part:d},"Shipping Details")),a("div",{key:"c373e96c63ed7398315f000250749fed7ee6b2ef",class:"col-12"},a("form-control-text",{key:"7e4ce2f7ad55c07f4c67b8f80940e94d76d16f43",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"08e2067843ce83058c73c4673c88b8d1968d81a0",class:"col-12"},a("form-control-text",{key:"5ed369c9064edd5fafc3c3a0142bcace1c3beaee",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"fcfe5349a3f9d61039c61de7b1f70e517d479b09",class:"col-12"},a("form-control-date",{key:"fecafa215e1f4c042e54f34db584503fed7fbe35",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"d87378a61c76bf5fb331f02fe6960abbed4d3d59",class:"col-12"},a("form-control-textarea",{key:"1acffdfd447400ef9627359c0a892b93d4ba1a1c",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"28ebefe8f6db158dc76ca9b8ab86f12a7a968b82",class:"col-12"},a("form-control-file-v2",{key:"7f4ba4acd413eb070a6126f43ab4bb77f3ac12ba",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{Z as a,_ as d,$ as c}from"./p-DrquDBSk.js";const i=class{constructor(s){e(this,s),this.selectedQuantityChange=t(this,"selectedQuantityChange",7),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return s("div",{key:"6c16fd3a1395cb82b69375f6e6fb091d42e1bd99",class:"rounded shadow-sm card p-2",part:c},s("div",{key:"e73fe313fc49f5dd8bc8bca3180fd806747e49c3",class:"d-flex gap-3"},s("div",{key:"e75c2a6da1ffd955a8cab24100583ce38b4dd330",class:"d-flex align-items-center"},s("img",{key:"7b594fe1865469d42f8254feb2c12d28b31ef989",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:a})),s("div",{key:"18c0cd8bc776930ef9b4a4008d910f424a3bd656",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},s("div",{key:"baf639254b2680ba75f94ef4a3d75dd8f1b54e1e",class:"row"},s("div",{key:"11a64a1e27ed0e8fbea16be80b4d4d80d7df890f",class:"col-6 d-flex gap-2"},this.modelName,s("form-control-tooltip",{key:"56335954554376a7567ee0c93788e2c59f262697",helpText:this.description})),s("div",{key:"41d72163835bbb8e4d9ad34041992c98d16bfaa3",class:"col-6 d-flex justify-content-end align-items-center"},s("button",{key:"0ded08f5b17466ad5b8cec4368405ac4005151b7",class:"p-0 minus btn",onClick:this.removeUnit,part:d},"-"),s("div",{key:"908aa227cd293fd778f02cdd778af4e609a1926f",class:"w-25 text-center"},this.selectedQuantity),s("button",{key:"3d1cc03e9f3cde322632f560c5e9f149617d61fc",class:"p-0 plus btn",onClick:this.addUnit,part:d},"+"))))))}};export{i as terminal_quantity_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-B09GVew-.js";import{B as a,am as d}from"./p-DrquDBSk.js";import{B as r}from"./p-BqL4QuAa.js";import{S as o}from"./p-BqNNwq6C.js";import{S as c}from"./p-DaZF_q9T.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as u}from"./p-BXdZKjdB.js";import{D as l}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-DLLFAj4z.js";import"./p-HXpYMWUU.js";import"./p-y8av3w9x.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-DpkIbI5R.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-ZkBwsSuI.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}},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 u})({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:l.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,u,l,b;return s(o,{key:"f73a27de0f7e01960cfe78a5b81b021b22eaf2c6"},this.isLoading&&s("div",{key:"ca2c47a78d302e09cd60434eb2a0146787f7ac45",style:{marginBottom:"8px"}},s(c,{key:"e7c3318f1ecaae82727ec3620e5ba65f25692552",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"3313a4d5ba47766076e5c13cde8f1500fdcfa4a0",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"94d2c92beaf52499cea87b3e04a37284898ce4d9",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"fe66f1d00863607cbb457953c4880e4bdc4442ae",part:a},s("h1",{key:"1cf8c42bdb942391c65e67db8a0da0ff4c618249",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"18643d72965f197edcf40c2053325df9dedf47fb"},"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:"096b7b976ddebd49a6ab5067ef5b4f07e06e145d",part:a},s("h1",{key:"06010bc9881b4cd9bd91399784ff9169e730784f",class:"h4",part:d},"This payment is disputed"),s("p",{key:"aca40b62cfe60ca69ebecd59d9d1c5c3cfd1b227"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"81f1fe8ec625b44d7bf251f4fbf5a4ac1dea2a41",class:"h5"},"Dispute details"),s("div",{key:"b5269224135805abb32164911ef682ed9524a35b",class:"d-table gap-2"},s("div",{key:"b90a2c3028003119fdb23f6e0cd8a3f965f9d58b",class:"d-table-row gap-2"},s("span",{key:"24967d47583c83333966ad788e8d4d388f32bf3a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"a1bc338abb575e5dc496bec2f7199d36d3015d68",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:"c45e0cc9efcf743d9b981d17d9628b243892d27e",class:"d-table-row gap-2"},s("span",{key:"d326adc2bfe3fbd9d67fc4d9d82e1545490d274a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"eaa16df97b9fd1b4963c2561bc5b7eb7892dafb4",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:"58999fa8fd18509f29d7233ca7255e2a033139b3",class:"d-table-row gap-2"},s("span",{key:"b35f041be173d792e81c3da3992104a0ede2bf91",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"eea5132a629528830dd6a3c68ca773848c89cb95",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:"f4975381aad6ed61a674e7a907632790e0ecf399",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"875c8fe451dbf7bb3817be6ab2ab3b919bb6b783",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"a4725c6ee3c18785e91d5ce82c3fbdb35029040a",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(u=this.dispute)||void 0===u?void 0:u.underReview)&&s("div",{key:"d02264536dd7f23a7beea17feb42bd6923551b23"},s("h1",{key:"ed9411ef96ba5aa6f3a84b622c3b8a07990352ef",class:"h4"},"This payment is disputed and under review"),s("p",{key:"6cd2edfa3e2f5cf3beccbb4fcaef09997c1d00fd"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"f1fbf9b5fddf71bde59e76456fda138b306df968"},s("h1",{key:"8763399559fd6ead94c3b20e7ea5a81243eeb19c",class:"h4"},"This payment was disputed"),s("p",{key:"840285c4091a71fc719b3c9184aaffef0ab48be7"},"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:"b453c75a2fba5e8145c62d0d89b75d7757375ba1"},s("h1",{key:"5d17f60d1e60a001edf80d9f0ded44c41cd394a6",class:"h4"},"This payment was disputed"),s("p",{key:"221cdcd0a330f02dff18dd7f8875ace480be68ed"},"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:d,final:r=()=>{}})=>{var o;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new u})):(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(o,{key:"68bf041be58383d3df181d84e0773bb71fd4ed96"},s("justifi-dispute-response-core",{key:"76af71dd1a21bedf10406aa2cd6d93bfad5b5746","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:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.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:"8b0f0f810ad0bbc57489862ae5159fae8cbad746",class:"row gy-3"},s("div",{key:"ca6e73df82123a344b4a28efae395e8b9c931258",class:"col-12"},s("h1",{key:"bb78dcfd69d0b747cf1b1865bf463518ae18b442",class:"h4",part:d},"Counter dispute")),s("div",{key:"7179e0a6fdb89024d613f897db2cf313255494fd",class:"col-12"},this.currentStepComponent),s("div",{key:"9219e8b3213c494adef926077f35c298588053c0",class:"col-12"},s("div",{key:"73c2fd1a8440c19f468610ec02a7cfa6eddecb7e",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{T as o,a as h,b as c,c as n,d as p,e as d,f as b,g as f,h as u,i as m,j as y,k as g,l as j}from"./p-CAZzU98o.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-JO-3z7ao.js";import{o as v,g as w}from"./p-AMVhBsGv.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ztF3Y786.js";import"./p-CQ36pja3.js";import"./p-BZ4YUsyP.js";const S=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),v("set",(()=>{this.pagingParams={}})),v("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=w();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"106115f5b509ac388b3c9fcafd5e0134d24eabc1"},e(h,{key:"4d193726de80df14bb301afd62bfac3d89f8f731"},e(c,{key:"a4d8c4999914cd32ad0489da5bc1ff4df86d244f"},e(n,{key:"4a04850c9c4cdd51e982fd42f1e52c8a7df73b3b"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"f28c5a7025eb3b46d90533de90fd2bc1cfe579cc"},e(d,{key:"35aa368d7767266d4e510dfb834c505702e3c2cc",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(b,{key:"291cf0d9ab6027f80399eb1ef7febe5dfdabb83a",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(f,{key:"b474ebbd3e107ceb206071ab86bcb13abc0cc93b",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(m,{key:"10c5bd014ea446529d6e0a0a4fd7b6afd755a7b6"},e(y,{key:"067c3b4eb307ce47f95435e7c1a3f8c767311be8"},e(g,{key:"1afeba1dabdb38698372ca4d1ec6e0b4acad5429",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"fb8d3b9b964a702ea9fc6185bcf9c4f6916b497e",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{S as payouts_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s,H as a,g as i}from"./p-CV0Pyo1O.js";import{U as o,V as r,R as h,S as c,T as l}from"./p-DrquDBSk.js";import{F as n}from"./p-CGKWIBVk.js";import"./p-CZfYo5-1.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=h),this.disabled&&(t=c),this.isFocused&&(t=l),t}render(){var t;return s(a,{key:"649b0ca4cb24c5a179ac01db344d53ac4481dbbd"},s("div",{key:"1976f3076b0cd47ead27e9acc9c71bda01623e56",class:"form-group d-flex flex-column"},s("div",{key:"1610a472997ce0d6c8bb8e3e9e43096cfa442dc3",class:"d-flex align-items-start gap-2"},s("label",{key:"a25d6b0d6d2b51d8e2c61afe945eb9fe3ab0e6d6",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"e9a891ffdb7910ac1ac6b94e98042e87f4ae0ad1",helpText:this.helpText})),s("select",{key:"c56535aeb6701fbcb21fc64fdf449f23f8ea8876",ref:t=>this.selectElement=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>s("option",{value:t.value},t.label)))),s(n,{key:"441e66367708e5653b483acd6a9834da391a6a0c",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},f=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?h:this.disabled?c:this.isFocused?l:o}render(){return s(a,{key:"ab2547726a7cdf84fae2970e14e5e22164a8db9f"},s("div",{key:"2ca8d50630ae66298384e3e574cec92be7eb2120",class:"form-group d-flex flex-column"},s("div",{key:"6683fc8418f4f59db60b3d94eca0795b2f7ec23e",class:"d-flex align-items-start gap-2"},s("label",{key:"46c5670107fff83d643b23e6b570199c21c39c07",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"7c42abe6644ef89c0c964717a5fedb63993beed8",helpText:this.helpText})),s("input",{key:"c484eaa0ad7e01299ece5fcd5b783a7bdedb4dc4",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(n,{key:"e5f1a634eaa8684106d500245282685016dd38c2",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_select,f as form_control_text}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as h,c as n}from"./p-CHJTjG_5.js";import{B as a}from"./p-DrquDBSk.js";import{S as p}from"./p-BqNNwq6C.js";import{H as m}from"./p-sPEyLX4E.js";import"./p-CZfYo5-1.js";import{B as u}from"./p-XYgDHrVL.js";import{P as c}from"./p-DOnVHzNq.js";import"./p-DaZF_q9T.js";const l=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.currentStep=0,this.country=o.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new h(t.data);this.businessProvisioned=n(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:u.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(p,null,this.businessLoading?i(c,null):i("div",{class:"row gap-3"},i(m,{text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),i("div",{class:"d-flex justify-content-between align-items-center"},i("div",{class:"d-flex align-items-center",part:a},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{l as justifi_payment_provisioning_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import{f as d,p as s,c as i}from"./p-Dm07nLGs.js";import{f as l,g as r,t as f,h as p,i as b,j as o}from"./p-DrquDBSk.js";import{S as c}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n,a as m}from"./p-B09GVew-.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=n(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}render(){const e=Object.assign({},d);return a(c,{key:"b15957bb15b290d70e7861c34050677fabd9264d"},a("table-filters-menu",{key:"df4025d8caf104173172efa54452fb0d55c01c2a",params:e,clearParams:i,part:l},a("div",{key:"c02dd26d5abb1d3fe60496f12a119ad5c88131a0",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"dcf37cf67a1778511554079ead35eb8291d87798",class:"p-2"},a("form-control-text",{key:"6d788162b3b1f909ac57613e45b45e750535ee3d",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:r})),a("div",{key:"375b1391dd75fe06853ff956cf2f0d91bc2518d2",class:"p-2"},a("form-control-text",{key:"2199451d90e6700f43d2b36d32266c3ab4ae9bd1",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:f})),a("div",{key:"f7bbcda32b31b5bbba4d7989abcdef277f20f063",class:"p-2"},a("form-control-select",{key:"a1cba32a8ed38289b6ab742f9fef56197d982c50",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:p})),a("div",{key:"680861d7bd03ee4e44bd52f6aa824fe8852d9ead",class:"p-2"},a("form-control-date",{key:"30edd201892f53356092530cd354105f031cbd09",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:m(this.createdAfter,{showInputDateTime:!0})||m(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:b})),a("div",{key:"7825e4f52adf5ef3c1eece2e9b1daa29b637ee14",class:"p-2"},a("form-control-date",{key:"a7e7e98599926d4d5fd10e589ba80b09cd30f65c",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:m(this.createdBefore,{showInputDateTime:!0})||m(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:o})))))}};export{u as justifi_payments_list_filters}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import{p as a}from"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{T as i,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as u,i as f,j as m,k as b,l as g}from"./p-CAZzU98o.js";import{T as j}from"./p-CZfYo5-1.js";import{c as k,a as y}from"./p-CruQSM5j.js";import{o as l,g as C}from"./p-CpGEMRkH.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ztF3Y786.js";import"./p-BZ4YUsyP.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=a,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new i(this.checkouts,this.columns,k,y),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"54239d9ac3afe4d4594d523f9b84b5bf852190b7"},e(r,{key:"0c466e435625f08326fc521690c055648a0d3a6e"},e(h,{key:"6ac0b1a9bf3d42eb5bac5910f341c84a75d15eaa"},e(o,{key:"171cc43a933be88dcfe2385414d6368755a66a00"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"238b814cfb2e27fa0ae0aee319da04fb7a9da477"},e(n,{key:"3e73b173a14edea582ee06caa248dd31bf7e8971",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"cd2ec244aa3663f4255f245727790c30c28438f7",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"e2f458e70836a01cca79aa6e43c7d8a89bfa593d",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"97d1c34429fba943a752e9ece7348dd19d742c68"},e(m,{key:"252e8f76070a8a6a531c710cf36117a04625271a"},e(b,{key:"a3fcfa5e6a90cac15348a387f65fa5b7ed2517f8",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"e4fa2774647748fd12c3742b3dd078aee8fdf483",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as checkouts_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,c as s,h as t}from"./p-CV0Pyo1O.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as o,J as e}from"./p-DLLFAj4z.js";import{d as a}from"./p-APob2Eta.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{j as c}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as m,a as h}from"./p-D2muobcE.js";import{A as d}from"./p-y8av3w9x.js";import"./p-ZkBwsSuI.js";import"./p-DrquDBSk.js";import"./p-B09GVew-.js";import"./p-BZ4YUsyP.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";const l=d();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const j=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){o(),this.analytics=new e(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:o,onError:e,final:a})=>{var p,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return e({error:h(a.error),code:m(null===(d=a.error)||void 0===d?void 0:d.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);o({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return e({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"17a9377febcbca64657924ae5d1445794fdb523f"},t("terminal-orders-list-core",{key:"3a32beb7e9d119b92cdc8cf130ab4fea1ceb8ef6",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{j as justifi_terminal_orders_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{c as r}from"./p-D8GTwl9v.js";import{al as s,R as a,T as c,U as d,V as u}from"./p-DrquDBSk.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-CGKWIBVk.js";import{p as h}from"./p-ZkBwsSuI.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:b}=m,g=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();b("fontStyles",e);const n=await this.getFocusedStyles();b("focused",n);const t=await this.getFocusedAndInvalidStyles();b("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?s:this.errorText?a:this.isFocused?c:d}render(){return n(t,{key:"c6c8c76cdec2790f60ee19c527731ba6f9117b75"},n("input",{key:"9af6445a3380f6e31e287558dc3cbd0822db6a21",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,s="[iFrameSizer]",a=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){W(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function b(e,n,t){e.removeEventListener(n,t,!1)}function g(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,g(e))}function v(e,n){x("info",e,n,g(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(A),T(P),l("onResized",A)}),A,"init")}function t(e){var n=Number(u[P]["max"+e]),t=Number(u[P]["min"+e]),i=e.toLowerCase(),o=Number(A[i]);p(P,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(P,"Set "+i+" to min value")),o>n&&(o=n,p(P,"Set "+i+" to max value")),A[i]=""+o}function i(e){return W.slice(W.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(P),{x:Math.floor(Number(n.left)+Number(a.x)),y:Math.floor(Number(n.top)+Number(a.y))}}function c(e){var n=e?r(A.iframe):{x:0,y:0},t={x:Number(A.width)+n.x,y:Number(A.height)+n.y};p(P,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(a=t,d(),p(P,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(P,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",a)?j():T(P)}function f(e){var n={};if(0===Number(A.width)&&0===Number(A.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:A.width,y:A.height};l(e,{iframe:A.iframe,screenX:Number(n.x),screenY:Number(n.y),type:A.type})}function l(e,n){return S(P,e,n)}var m,g,y,x,I,z,W=e.data,A={},P=null;"[iFrameResizerChild]Ready"===W?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():s===(""+W).slice(0,13)&&W.slice(13).split(":")[0]in u?(x=(y=W.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(I),A={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[P=A.id]&&(u[P].loaded=!0),(g=A.type in{true:1,false:1,undefined:1})&&p(P,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return u[e]||(n=!1,k(A.type+" No settings for "+e+". Message was: "+W)),n}(P)&&(p(P,"Received: "+W),m=!0,null===A.iframe&&(k(P,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[P]&&u[P].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(P,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(P,"Checking connection is from: "+(n=u[P]&&u[P].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[P]&&u[P].firstRun&&u[P]&&(u[P].firstRun=!1),A.type){case"close":F(A.iframe);break;case"message":m=i(6),p(P,"onMessage passed: {iframe: "+A.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:A.iframe,message:JSON.parse(m)}),p(P,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[P].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[P]&&u[P].iframe,P),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",b)}var t=P;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[P]&&u[P].stopPageInfo&&(u[P].stopPageInfo(),delete u[P].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",s=decodeURIComponent(t),(h=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(h),p(P,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),a={x:e.x,y:e.y},d(),p(P,"--")):window.top===window.self?p(P,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(P,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(A);break;case"init":n(),l("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?k("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,s,h,m}())):v(P,"Ignored: "+W)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}S(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===a&&p(n,"Get page position: "+(a={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+a.y)}function T(e){null!==a&&(window.scrollTo(a.x,a.y),p(e,"Set page position: "+a.x+","+a.y),j())}function j(){a=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),A(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function W(t,r){function s(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(s,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),a=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",a,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",a,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function A(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function P(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),A((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),W(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),A((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",P),w(document,"-webkit-visibilitychange",P),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?s:this.isValid?this.isFocused?c:d:a}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"a330cb0cec7fbdf46c0e6e7c40be6997b2c4cd5f",class:"form-group d-flex flex-column"},n("div",{key:"66458b65ed76bfe0e0dea194433f22b03f912135",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"9b8ed47bde6743810d6bd3efa14bd1dd55ce2753",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"f3b3cdd705bda6f52d4f491be6c3f85df1182386",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"b0f70e44bdf8c959bdae70e8b487fad62d1b5f36",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"72e6383af686f07b9f40b125a8502c56aaa40310",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{g as hidden_input,I as iframe_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{I as i}from"./p-Ce_F4E0f.js";import{R as d,S as o,T as r,U as l,V as c}from"./p-DrquDBSk.js";import{F as f}from"./p-CGKWIBVk.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-CHJTjG_5.js";import{n}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-Ce785aMx.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"b9cd5f622f3473b22f48ee939884199f4102aa02"},s("div",{key:"c7ac55bf53f9b069a0f1997faee9df04b5efc48f",class:"form-group d-flex flex-column"},s("div",{key:"344f29000db4d633073536530f3fd312a7c65000",class:"d-flex align-items-start gap-2"},s("label",{key:"c58e246347c2bb8da3dafa10aeca23290ebdcbd2",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"7a32bf62aea68cca9a86f07e28ca58a0f386fdf4",helpText:this.helpText})),s("input",{key:"033f6ab25c31f4386733195a281de935b39aa7e5",ref:e=>this.textInput=e,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:"text",disabled:this.disabled}),s(f,{key:"9238f8d110a09bed1f5172991ed951399ea520b3",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,c,f,m;const v=u[this.country],p=b[this.country];return s(a,{key:"8dabbee93e0f319db333ada6c20af49ed6131b8d"},s("div",{key:"4b308ca9fa92321e5f60f3e4d9ab1c4e60cbd703",class:"row gy-3"},s("div",{key:"9c25eec2effd7caed70a3f02f6a780513fae930c",class:"col-12"},s("form-control-text",{key:"6c2ae178c2122d1f6085906690adadf98cb0774b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"eba53a69fc4c869014ef8b7bf6ff9b1d8f5be566",class:"col-12"},s("form-control-text",{key:"11c743ce2388173c41cb16f1865fe58b2015d6bb",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"2025c9bb15286f5c3e4693b596372a7dff730ce8",class:"col-12"},s("form-control-text",{key:"5e0e40fd028d12b88cb15a38906738320e30aeca",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"5ec53f357907749c9abdcf568c027b71faad19fa",class:"col-12"},s("form-control-select",{key:"b9eef22eb507ffbd58c26bffa41b5b225925297c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"7456cd4f6b62b59bc9289ca3721440083e9aa4f3",class:"col-12"},s("form-control-text",{key:"c483c93d0f09d5ded3c11145216273ba75822009",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?n:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"1b644425472c68880a9be150d52029a64d75ea26"},s("justifi-form-address-fields",{key:"d5e95bc81c654d00a0fcac4760705bd21b3b8c8d",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,a as t}from"./p-DiJD6Iqx.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-BhvkOTYA.js";import{C as E}from"./p-CHJTjG_5.js";const h=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")}),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 province"),postal_code:i(E.CAN).required("Enter postal code")}),f={[E.USA]:h,[E.CAN]:b},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:h(!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:h(!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: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:_(E.CAN),ownership_percentage:r.nullable(),address:b(!1)}))(n),y={[E.USA]:u,[E.CAN]:$};export{h as a,$ as b,b as c,y as d,f as e,u as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as o}from"./p-CV0Pyo1O.js";import{C as r}from"./p-DrquDBSk.js";const s=s=>o("h1",{class:`header-1 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t}from"./p-CV0Pyo1O.js";import{B as r}from"./p-DrquDBSk.js";const e=e=>{const{helpText:o,name:m}=e;return o?t("small",{class:"form-text text-muted",id:`form-help-text-${m}`,part:r},o):null};export{e as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-y8av3w9x.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";const n=t();class a{async fetchPayments(t,a,s){return n.get({endpoint:`account/${t}/payments`,params:s,authToken:a})}async fetchPayment(t,a){return n.get({endpoint:`payments/${t}`,authToken:a})}async fetchPaymentTransactions(t,a,s){return n.get({endpoint:`payments/${t}/payment_balance_transactions`,params:s,authToken:a})}}export{a as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as n,c as a}from"./p-
|
|
1
|
+
import{w as n,c as a}from"./p-DVJaoI_m.js";import{g as t}from"./p-B09GVew-.js";const o=()=>{async function o(o){const{authToken:e,endpoint:s,method:r,params:i,body:p,signal:c,headers:d}=o;await n();const h=`${a.apiOrigin}/v1/${s}`,u=i?`${h}?${new URLSearchParams(i)}`:h,m=await async function(n){return n?{Authorization:`Bearer ${n}`,"Idempotency-Key":t(),"Content-Type":"application/json"}:{"Content-Type":"application/json"}}(e),y=Object.assign(Object.assign({},m),d),T=await fetch(u,{method:r,headers:y,body:p,signal:c});if(T)return 204===T.status?{}:T.json();!function(n){console.error(`Error fetching from ${n}`)}(u)}return{get:async function(n){const{authToken:a,endpoint:t,params:e,signal:s,headers:r}=n;return o({authToken:a,endpoint:t,method:"GET",params:e,signal:s,headers:r})},post:async function(n){const{authToken:a,endpoint:t,body:e,params:s,signal:r,headers:i}=n;return o({authToken:a,endpoint:t,method:"POST",params:s,body:JSON.stringify(e),signal:r,headers:i})},put:async function(n){const{authToken:a,endpoint:t,body:e,params:s,signal:r}=n;return o({authToken:a,endpoint:t,method:"PUT",params:s,body:JSON.stringify(e),signal:r})},patch:async function(n){const{authToken:a,endpoint:t,body:e,params:s,signal:r}=n;return o({authToken:a,endpoint:t,method:"PATCH",params:s,body:JSON.stringify(e),signal:r})},destroy:async function(n){const{authToken:a,endpoint:t,params:e,signal:s}=n;return o({authToken:a,endpoint:t,method:"DELETE",params:e,signal:s})}}};export{o as A}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s}from"./p-CV0Pyo1O.js";import{O as r}from"./p-DrquDBSk.js";const o=()=>s("div",{class:"d-flex justify-content-center"},s("div",{class:"spinner-border",role:"status",part:r},s("span",{class:"visually-hidden"},"Loading...")));export{o as S}
|