@justifi/webcomponents 6.1.1 → 6.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Business-DCRzZf0w.js → Business-DWHy_-z9.js} +299 -9
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +132 -0
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-additional-questions-schema-b8P-0T0O.js → business-additional-questions-schema-CetDMUp7.js} +26 -4
- package/dist/cjs/{business-form-options-CMII7nIK.js → business-form-options-e9UFw4P-.js} +1 -1
- package/dist/cjs/business-identity-schema-Cd0tvfJr.js +101 -0
- package/dist/cjs/{business.service-Cj_NUZsr.js → business.service-DRZurAMP.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-CEZpYUNV.js → check-pkg-version-DHOBcjoo.js} +2 -2
- package/dist/cjs/{checkout.service-Bc8L9ixO.js → checkout.service-vZbSE3A3.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -4
- package/dist/cjs/country-config-MCOhn8o3.js +68 -0
- package/dist/cjs/{custom-popper_2.cjs.entry.js → custom-popper.cjs.entry.js} +2 -22
- package/dist/cjs/{dispute.service-DhO_tuDc.js → dispute.service-DV9a61Tu.js} +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +25 -15
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +119 -0
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-select_2.cjs.entry.js → form-control-select_3.cjs.entry.js} +23 -4
- package/dist/cjs/{form-input-masks-DgXd0f4V.js → form-input-masks-BnNFJ3IJ.js} +9 -4
- package/dist/cjs/{get-business-o5jPq_ME.js → get-business-D9ZHyPem.js} +1 -1
- package/dist/cjs/{get-payment-details-BinT-ZEP.js → get-payment-details-AYzxPu-X.js} +1 -1
- package/dist/cjs/{get-subaccounts-BoTVdl7v.js → get-subaccounts-C_KD197w.js} +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/{input-handlers-DYl_0IwC.js → input-handlers-D6QMwPTB.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +121 -64
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +17 -18
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +8 -10
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +16 -17
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -7
- package/dist/cjs/justifi-business-form.cjs.entry.js +16 -12
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +14 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -7
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +6 -8
- package/dist/cjs/justifi-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -7
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +7 -9
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -5
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +7 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +22 -13
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -7
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +36 -21
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -7
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +5 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -6
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +5 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +6 -8
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -7
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -5
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +3 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +5 -7
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -4
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +6 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-D2S7GRvh.js → package-BacF7Q_h.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
- package/dist/cjs/payment-details-core.cjs.entry.js +9 -11
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-C9thkR4g.js → payment.service-1t60I69m.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -4
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payout.service-CGZxpQMq.js → payout.service-CQEXfufW.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +2 -4
- package/dist/cjs/{schema-validations-Bj7eYNO8.js → schema-validations-0mjPveQ0.js} +45 -6
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -5
- package/dist/cjs/{terminal-orders-table-7ew1vCKk.js → terminal-orders-table-B4ZXHj3w.js} +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-BkKxH-k4.js → terminal.service-BlW-CJ67.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +2 -4
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/BankAccount.js +4 -0
- package/dist/collection/api/Business.js +16 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +7 -6
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +36 -4
- package/dist/collection/components/business-forms/business-form/business-form.js +6 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +46 -9
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +32 -10
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +26 -6
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +29 -3
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +48 -6
- package/dist/collection/components/business-forms/owner-form/owner-form.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +88 -0
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +2 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +50 -0
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.js +36 -5
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +47 -7
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +43 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +33 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +101 -0
- package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +35 -10
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +26 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +39 -20
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +34 -6
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/test/mockBusiness.js +52 -0
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +41 -19
- package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +74 -39
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +27 -4
- package/dist/collection/components/business-forms/schemas/business-form-schema.js +7 -4
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +53 -24
- package/dist/collection/components/business-forms/schemas/schema-validations.js +41 -4
- package/dist/collection/components/business-forms/utils/country-config.js +47 -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 +2 -2
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- 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 +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +3 -4
- 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/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- 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 +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +3 -4
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/details/details.js +1 -1
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/collection/utils/country-codes.js +5 -0
- package/dist/collection/utils/form-input-masks.js +8 -0
- package/dist/collection/utils/province-options.js +20 -0
- package/dist/docs.json +1129 -147
- package/dist/esm/{Api-DhiA2e_P.js → Api-K9QH1Aki.js} +1 -1
- package/dist/esm/{Business-BCoP0TAV.js → Business-B5rtFhtR.js} +290 -3
- package/dist/esm/{Refund-B-iOTRxz.js → Refund-L_muwEAh.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/{badge-CtdO-tEY.js → badge-B8fF98jp.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +125 -0
- package/dist/esm/bank-account-form.entry.js +5 -5
- package/dist/esm/{business-additional-questions-schema-9FAJSx_D.js → business-additional-questions-schema-DSvdNuI1.js} +26 -5
- package/dist/esm/business-details-core.entry.js +3 -3
- package/dist/esm/{business-form-options-CgssATyg.js → business-form-options-D6s5H4RI.js} +2 -2
- package/dist/esm/business-identity-schema-mN4VhA1v.js +94 -0
- package/dist/esm/{business.service-D55OVyco.js → business.service-BJcGEUDH.js} +3 -3
- package/dist/esm/{button-DtTaQHMK.js → button-DZoLTGMB.js} +1 -1
- package/dist/esm/card-form.entry.js +5 -5
- package/dist/esm/{check-pkg-version-Ba95SWgY.js → check-pkg-version-D2zmagAo.js} +4 -4
- package/dist/esm/{checkout.service-fwbqSq8g.js → checkout.service-aymuZDC9.js} +3 -3
- package/dist/esm/checkouts-list-core.entry.js +9 -11
- package/dist/esm/{checkouts-table-B6gGDtOr.js → checkouts-table-B8k-Aylm.js} +3 -3
- package/dist/esm/country-config-BQ4D46Lb.js +64 -0
- package/dist/esm/{custom-popper_2.entry.js → custom-popper.entry.js} +3 -22
- package/dist/esm/{dispute.service-Cdq3_yRo.js → dispute.service-DiPbsswm.js} +3 -3
- package/dist/esm/form-alert_5.entry.js +25 -15
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-bprS-t9d.js → form-control-error-text-BmD6bGbR.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-Bvnp-IAG.js → form-control-help-text-DbIhIcc6.js} +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +6 -6
- package/dist/esm/form-control-monetary.entry.js +6 -6
- package/dist/esm/form-control-number-masked_3.entry.js +115 -0
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/{form-control-select_2.entry.js → form-control-select_3.entry.js} +25 -7
- package/dist/esm/{form-input-masks-B-iV5cYd.js → form-input-masks-CVaOFfrI.js} +9 -3
- package/dist/esm/{get-business-Crb6P-iI.js → get-business-Xt7B5dSo.js} +1 -1
- package/dist/esm/{get-payment-details-sGoWyAat.js → get-payment-details-DcC5v85s.js} +2 -2
- package/dist/esm/{get-subaccounts-BsJSlShO.js → get-subaccounts-CMJMDwSP.js} +3 -3
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{header-1-C1Hnxki8.js → header-1-umkpdspt.js} +1 -1
- package/dist/esm/{header-3-Bq8fpjm-.js → header-3-CD5K5vCa.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +7 -7
- package/dist/esm/{input-handlers-CX6mSvOM.js → input-handlers-D3y0TzH9.js} +1 -1
- package/dist/esm/{insurance-state-CVme82j7.js → insurance-state-sR5DrCdu.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +127 -70
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +22 -23
- package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
- package/dist/esm/justifi-apple-pay_8.entry.js +16 -18
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +22 -23
- package/dist/esm/justifi-business-details.entry.js +10 -12
- package/dist/esm/justifi-business-form.entry.js +23 -19
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +15 -7
- package/dist/esm/justifi-checkout.entry.js +9 -11
- package/dist/esm/justifi-checkouts-list-filters.entry.js +5 -7
- package/dist/esm/justifi-checkouts-list.entry.js +12 -14
- package/dist/esm/justifi-details.entry.js +3 -3
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +8 -10
- package/dist/esm/justifi-dispute-notification_3.entry.js +13 -15
- package/dist/esm/justifi-gross-payment-chart.entry.js +8 -10
- package/dist/esm/justifi-order-terminals.entry.js +12 -14
- package/dist/esm/justifi-owner-form_3.entry.js +27 -18
- package/dist/esm/justifi-payment-details.entry.js +10 -12
- package/dist/esm/justifi-payment-provisioning-core.entry.js +38 -23
- package/dist/esm/justifi-payment-provisioning.entry.js +8 -10
- package/dist/esm/justifi-payment-transactions-list.entry.js +11 -13
- package/dist/esm/justifi-payments-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payments-list.entry.js +12 -14
- package/dist/esm/justifi-payout-details.entry.js +9 -11
- package/dist/esm/justifi-payout-transactions-list.entry.js +11 -13
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +13 -15
- package/dist/esm/justifi-refund-payment.entry.js +11 -13
- package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -11
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +6 -8
- package/dist/esm/justifi-terminal-orders-list.entry.js +10 -12
- package/dist/esm/justifi-terminals-list-filters.entry.js +5 -7
- package/dist/esm/justifi-terminals-list.entry.js +12 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-Csfiax9X.js → package-C7cvPZSk.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +4 -4
- package/dist/esm/{parts-xDbRW9xn.js → parts-Dj_zevuD.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +16 -18
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/{payment.service-BoQ1MW1k.js → payment.service-C0xnydJ8.js} +3 -3
- package/dist/esm/payments-list-core.entry.js +10 -12
- package/dist/esm/{payments-status-cvtVmtY5.js → payments-status-CzazNnFv.js} +1 -1
- package/dist/esm/{payments-table-D_BlyU1F.js → payments-table-BPKxBAJ0.js} +3 -3
- package/dist/esm/payout-details-core.entry.js +10 -10
- package/dist/esm/{payout.service-xcBdom3q.js → payout.service-Cl4yxnrx.js} +3 -3
- package/dist/esm/payouts-list-core.entry.js +10 -12
- package/dist/esm/{payouts-status-D-vjrqBb.js → payouts-status-rKlX41bK.js} +1 -1
- package/dist/esm/{payouts-table-Clj8YGLV.js → payouts-table-C6ZDcd_-.js} +3 -3
- package/dist/esm/{schema-validations-B9dmY7ME.js → schema-validations-BFoU1cR8.js} +41 -6
- package/dist/esm/{skeleton-B8EUwt4b.js → skeleton-BEoPu3My.js} +1 -1
- package/dist/esm/{spinner-CYXkn1fh.js → spinner-Ac-w5zWg.js} +1 -1
- package/dist/esm/{table-Bj20uWfu.js → table-BCwizIf9.js} +2 -2
- package/dist/esm/table-filters-menu.entry.js +3 -3
- package/dist/esm/terminal-orders-list-core.entry.js +9 -11
- package/dist/esm/{terminal-orders-table-DzBpIW8i.js → terminal-orders-table-BBQsoUh8.js} +5 -5
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/{terminal.service-l6zTIPZ3.js → terminal.service-mwaS-Mbj.js} +3 -3
- package/dist/esm/terminals-list-core.entry.js +9 -11
- package/dist/esm/{terminals-table-BMS5tazC.js → terminals-table-ByiFdTfy.js} +3 -3
- package/dist/esm/{utils-BOijEGPV.js → utils-CIaHqjQt.js} +1 -1
- package/dist/esm/{utils-DRwofES0.js → utils-KBIYAa0D.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +290 -3
- package/dist/module/additional-questions.js +2 -2
- 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-canada.d.ts +11 -0
- package/dist/module/bank-account-form-inputs-canada.js +6 -0
- package/dist/module/bank-account-form-inputs-canada2.js +68 -0
- package/dist/module/bank-account-form-inputs2.js +9 -2
- package/dist/module/bank-account-form.js +2 -2
- package/dist/module/bank-account-read-only-value.d.ts +11 -0
- package/dist/module/bank-account-read-only-value.js +6 -0
- package/dist/module/bank-account-read-only-value2.js +33 -0
- package/dist/module/bank-account.js +2 -2
- package/dist/module/billing-form-full.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +1 -1
- package/dist/module/business-address-schema.js +40 -20
- package/dist/module/business-bank-account-form-step-core.js +101 -48
- package/dist/module/business-bank-account-form-step.js +18 -5
- package/dist/module/business-core-info-form-step-core.js +22 -7
- package/dist/module/business-core-info-form-step.js +2 -1
- package/dist/module/business-core-info-schema.js +26 -5
- package/dist/module/business-core-info.js +12 -4
- package/dist/module/business-identity-schema.js +52 -25
- package/dist/module/business-owners-form-step-core.js +20 -13
- package/dist/module/business-owners-form-step.js +22 -15
- package/dist/module/business-representative-form-inputs.js +34 -17
- package/dist/module/business-representative-form-step-core.js +29 -18
- package/dist/module/business-representative-form-step.js +24 -17
- package/dist/module/business-representative.js +37 -19
- 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 +1 -1
- package/dist/module/country-config.js +64 -0
- 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 +2 -2
- 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 +65 -0
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary-provisioning2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/form-input-masks.js +9 -3
- package/dist/module/get-business.js +1 -1
- 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 +16 -14
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/input-handlers.js +1 -1
- package/dist/module/justifi-business-form.js +41 -29
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +2 -2
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-form-address-fields.d.ts +11 -0
- package/dist/module/justifi-form-address-fields.js +6 -0
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +3 -3
- package/dist/module/justifi-payment-provisioning.js +67 -49
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-radio-list-item2.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 +2 -2
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/legal-address-form-step-core.js +26 -19
- package/dist/module/legal-address-form-step.js +16 -9
- package/dist/module/legal-address-form.js +18 -15
- package/dist/module/modular-checkout.js +1 -1
- package/dist/module/owner-form-core2.js +23 -15
- package/dist/module/owner-form-inputs2.js +34 -15
- package/dist/module/owner-form.js +20 -13
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +3 -3
- 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 +104 -69
- package/dist/module/payment-provisioning-form-buttons.js +1 -1
- package/dist/module/payment-provisioning-form-steps.js +75 -54
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- 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 +41 -6
- package/dist/module/shipping-details.js +2 -2
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +2 -2
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/module/tokenize-payment-method.js +1 -1
- package/dist/types/api/BankAccount.d.ts +6 -0
- package/dist/types/api/Business.d.ts +9 -0
- package/dist/types/components/business-forms/business-form/business-core-info/business-core-info.d.ts +3 -0
- package/dist/types/components/business-forms/business-form/business-form.d.ts +2 -0
- package/dist/types/components/business-forms/business-form/business-representative/business-representative.d.ts +4 -1
- package/dist/types/components/business-forms/business-form/legal-address-form/legal-address-form.d.ts +2 -0
- package/dist/types/components/business-forms/owner-form/identity-address/identity-address-form.d.ts +2 -0
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +2 -0
- package/dist/types/components/business-forms/owner-form/owner-form-inputs.d.ts +3 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.d.ts +7 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.d.ts +5 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.d.ts +5 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +3 -0
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.d.ts +3 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.d.ts +8 -0
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +4 -2
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/test/mockBusiness.d.ts +12 -0
- package/dist/types/components/business-forms/schemas/business-address-schema.d.ts +54 -2
- package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +14 -16
- package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +67 -3
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +165 -7
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +122 -2
- package/dist/types/components/business-forms/schemas/schema-validations.d.ts +5 -0
- package/dist/types/components.d.ts +119 -10
- package/dist/types/utils/country-codes.d.ts +4 -0
- package/dist/types/utils/form-input-masks.d.ts +1 -0
- package/dist/types/utils/province-options.d.ts +5 -0
- package/dist/webcomponents/p-005a79d5.entry.js +1 -0
- package/dist/webcomponents/p-07f7aaf6.entry.js +1 -0
- package/dist/webcomponents/p-0926c397.entry.js +1 -0
- package/dist/webcomponents/p-14e26a6c.entry.js +1 -0
- package/dist/webcomponents/{p-0eb69f41.entry.js → p-1c362f36.entry.js} +1 -1
- package/dist/webcomponents/{p-0217783c.entry.js → p-221ec54e.entry.js} +4 -4
- package/dist/webcomponents/p-24621c40.entry.js +1 -0
- package/dist/webcomponents/p-33bf5532.entry.js +1 -0
- package/dist/webcomponents/p-3467fa38.entry.js +1 -0
- package/dist/webcomponents/p-3af0b0ad.entry.js +1 -0
- package/dist/webcomponents/p-3b43f8c0.entry.js +1 -0
- package/dist/webcomponents/p-3f7703bf.entry.js +1 -0
- package/dist/webcomponents/p-4180a11b.entry.js +1 -0
- package/dist/webcomponents/p-4d243123.entry.js +1 -0
- package/dist/webcomponents/p-4d6e0ebe.entry.js +1 -0
- package/dist/webcomponents/p-5277f2a6.entry.js +1 -0
- package/dist/webcomponents/p-54cea29e.entry.js +1 -0
- package/dist/webcomponents/{p-7c8deca8.entry.js → p-580f3bb6.entry.js} +1 -1
- package/dist/webcomponents/p-641100ac.entry.js +1 -0
- package/dist/webcomponents/p-65090485.entry.js +1 -0
- package/dist/webcomponents/p-66833631.entry.js +1 -0
- package/dist/webcomponents/p-68aeb5bd.entry.js +1 -0
- package/dist/webcomponents/p-694b24e5.entry.js +1 -0
- package/dist/webcomponents/p-6a247ab5.entry.js +1 -0
- package/dist/webcomponents/p-6a910d9b.entry.js +1 -0
- package/dist/webcomponents/p-6d61092c.entry.js +1 -0
- package/dist/webcomponents/p-72f5e234.entry.js +1 -0
- package/dist/webcomponents/p-7498759d.entry.js +1 -0
- package/dist/webcomponents/p-82723f07.entry.js +1 -0
- package/dist/webcomponents/p-86372164.entry.js +1 -0
- package/dist/webcomponents/{p-b608add9.entry.js → p-8896ab68.entry.js} +1 -1
- package/dist/webcomponents/p-89052ce0.entry.js +1 -0
- package/dist/webcomponents/{p-ClvhB3WW.js → p-890S0Nwr.js} +1 -1
- package/dist/webcomponents/{p-37a93597.entry.js → p-8a156528.entry.js} +1 -1
- package/dist/webcomponents/p-8a68be8f.entry.js +1 -0
- package/dist/webcomponents/p-91b09245.entry.js +1 -0
- package/dist/webcomponents/p-9ce44689.entry.js +1 -0
- package/dist/webcomponents/p-B5rtFhtR.js +1 -0
- package/dist/webcomponents/{p-CEk3bv0x.js → p-B9MN_vv4.js} +1 -1
- package/dist/webcomponents/p-BIcS6lTe.js +1 -0
- package/dist/webcomponents/{p-BBx_EQqR.js → p-BRbqaU66.js} +1 -1
- package/dist/webcomponents/{p-Bgnhf5c9.js → p-BS7OgSQe.js} +1 -1
- package/dist/webcomponents/p-BT473_5I.js +1 -0
- package/dist/webcomponents/p-BXMAoCNA.js +1 -0
- package/dist/webcomponents/{p-B6IWa9Ph.js → p-BYrSeoci.js} +1 -1
- package/dist/webcomponents/{p-CCmDcLao.js → p-BdmYH_IK.js} +1 -1
- package/dist/webcomponents/p-BkaPXFTl.js +1 -0
- package/dist/webcomponents/{p-hbWSMN3O.js → p-Bm8T-MOQ.js} +1 -1
- package/dist/webcomponents/p-BwBb2Opu.js +1 -0
- package/dist/webcomponents/p-C6g4MbnB.js +1 -0
- package/dist/webcomponents/{p-1ydcg9ti.js → p-C77ElQ41.js} +1 -1
- package/dist/webcomponents/p-C7cvPZSk.js +1 -0
- package/dist/webcomponents/p-CJ9qo7_g.js +1 -0
- package/dist/webcomponents/{p-C98BC5W5.js → p-CPKSE7M4.js} +1 -1
- package/dist/webcomponents/{p-yH3TC3ZQ.js → p-CPpUGsw5.js} +1 -1
- package/dist/webcomponents/p-CQQ0H4Pb.js +1 -0
- package/dist/webcomponents/p-CTAOJGVx.js +1 -0
- package/dist/webcomponents/p-CVaOFfrI.js +1 -0
- package/dist/webcomponents/p-CVtpEQBE.js +1 -0
- package/dist/webcomponents/{p-l8F_7Ihw.js → p-CeSmGv6o.js} +1 -1
- package/dist/webcomponents/p-D9Yus-je.js +1 -0
- package/dist/webcomponents/p-DIdnZUSh.js +1 -0
- package/dist/webcomponents/{p-CH8Y3GSr.js → p-DSCBoCn-.js} +1 -1
- package/dist/webcomponents/p-DfKxeSrC.js +1 -0
- package/dist/webcomponents/{p-xDbRW9xn.js → p-Dj_zevuD.js} +1 -1
- package/dist/webcomponents/p-DqPvh0aN.js +1 -0
- package/dist/webcomponents/p-DxVCqvBt.js +1 -0
- package/dist/webcomponents/p-DxnXyWPn.js +1 -0
- package/dist/webcomponents/p-Dy3-IlQ3.js +1 -0
- package/dist/webcomponents/p-Dyk0thEr.js +1 -0
- package/dist/webcomponents/p-DzWLLt4t.js +1 -0
- package/dist/webcomponents/{p-CmBCj61h.js → p-F6TcNeK4.js} +1 -1
- package/dist/webcomponents/{p-au49QgoI.js → p-IYf7zn5J.js} +1 -1
- package/dist/webcomponents/{p-C0wTyoTh.js → p-UUJudj_5.js} +1 -1
- package/dist/webcomponents/{p-0cac8468.entry.js → p-a2344efb.entry.js} +1 -1
- package/dist/webcomponents/p-a42ec25b.entry.js +1 -0
- package/dist/webcomponents/p-a81f9fc3.entry.js +1 -0
- package/dist/webcomponents/p-b4b5dd24.entry.js +1 -0
- package/dist/webcomponents/p-b72794e3.entry.js +1 -0
- package/dist/webcomponents/p-be53e425.entry.js +1 -0
- package/dist/webcomponents/p-c4d919be.entry.js +1 -0
- package/dist/webcomponents/p-c4fb2fe8.entry.js +1 -0
- package/dist/webcomponents/p-c6e64ed5.entry.js +1 -0
- package/dist/webcomponents/p-c796f813.entry.js +1 -0
- package/dist/webcomponents/p-c8656d20.entry.js +1 -0
- package/dist/webcomponents/{p-0cf71cbd.entry.js → p-c8e94ab9.entry.js} +1 -1
- package/dist/webcomponents/p-c9bed02a.entry.js +1 -0
- package/dist/webcomponents/p-cca865be.entry.js +1 -0
- package/dist/webcomponents/p-cd108cae.entry.js +1 -0
- package/dist/webcomponents/p-cd20dc8f.entry.js +1 -0
- package/dist/webcomponents/p-cfd3035e.entry.js +1 -0
- package/dist/webcomponents/p-d1e99aac.entry.js +1 -0
- package/dist/webcomponents/p-d50f8328.entry.js +1 -0
- package/dist/webcomponents/p-d7558874.entry.js +1 -0
- package/dist/webcomponents/p-d8bef4b7.entry.js +1 -0
- package/dist/webcomponents/p-d8c2cea4.entry.js +1 -0
- package/dist/webcomponents/p-d8ef1d2b.entry.js +1 -0
- package/dist/webcomponents/p-e4e6f3b8.entry.js +1 -0
- package/dist/webcomponents/p-e60e7f6a.entry.js +1 -0
- package/dist/webcomponents/{p-2d9b817b.entry.js → p-ea746fa0.entry.js} +1 -1
- package/dist/webcomponents/p-f222426b.entry.js +1 -0
- package/dist/webcomponents/p-f72f67ef.entry.js +1 -0
- package/dist/webcomponents/p-fdf5a349.entry.js +1 -0
- package/dist/webcomponents/{p-C8k7a6D-.js → p-i--LPP1s.js} +1 -1
- package/dist/webcomponents/p-sCHf--Vc.js +1 -0
- package/dist/webcomponents/{p-DdZLLkQ5.js → p-ty1sI-fI.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +13 -13
- package/LICENSE +0 -21
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +0 -112
- package/dist/cjs/business-identity-schema-aFUle0C9.js +0 -51
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +0 -107
- package/dist/cjs/helpers-B5OCqlIM.js +0 -35
- package/dist/cjs/state-options-CIT9xdTz.js +0 -246
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +0 -107
- package/dist/esm/business-identity-schema-CDJzknbg.js +0 -48
- package/dist/esm/form-control-number-masked_2.entry.js +0 -104
- package/dist/esm/helpers-Mu7LQT-w.js +0 -29
- package/dist/esm/state-options-BX8GieXu.js +0 -244
- package/dist/module/helpers.js +0 -29
- package/dist/module/state-options.js +0 -244
- package/dist/webcomponents/p-000d6b5d.entry.js +0 -1
- package/dist/webcomponents/p-0256af65.entry.js +0 -1
- package/dist/webcomponents/p-0af5269e.entry.js +0 -1
- package/dist/webcomponents/p-0f16c00f.entry.js +0 -1
- package/dist/webcomponents/p-0f47f052.entry.js +0 -1
- package/dist/webcomponents/p-1872ee94.entry.js +0 -1
- package/dist/webcomponents/p-281ea1f6.entry.js +0 -1
- package/dist/webcomponents/p-2b568e8e.entry.js +0 -1
- package/dist/webcomponents/p-2d300faa.entry.js +0 -1
- package/dist/webcomponents/p-328117e4.entry.js +0 -1
- package/dist/webcomponents/p-32978110.entry.js +0 -1
- package/dist/webcomponents/p-40c3d17c.entry.js +0 -1
- package/dist/webcomponents/p-44ec2d88.entry.js +0 -1
- package/dist/webcomponents/p-44f9739e.entry.js +0 -1
- package/dist/webcomponents/p-47997bc2.entry.js +0 -1
- package/dist/webcomponents/p-50701f16.entry.js +0 -1
- package/dist/webcomponents/p-5235230f.entry.js +0 -1
- package/dist/webcomponents/p-526b7442.entry.js +0 -1
- package/dist/webcomponents/p-5aae36f3.entry.js +0 -1
- package/dist/webcomponents/p-5bd3d86e.entry.js +0 -1
- package/dist/webcomponents/p-5c0c35ac.entry.js +0 -1
- package/dist/webcomponents/p-78cb62a8.entry.js +0 -1
- package/dist/webcomponents/p-7dc9ef8a.entry.js +0 -1
- package/dist/webcomponents/p-7eb4b9b4.entry.js +0 -1
- package/dist/webcomponents/p-84551ee4.entry.js +0 -1
- package/dist/webcomponents/p-854b3db0.entry.js +0 -1
- package/dist/webcomponents/p-8663e8bd.entry.js +0 -1
- package/dist/webcomponents/p-8S_ROmnq.js +0 -1
- package/dist/webcomponents/p-8b3245c4.entry.js +0 -1
- package/dist/webcomponents/p-8ca21fab.entry.js +0 -1
- package/dist/webcomponents/p-8f8dfd4b.entry.js +0 -1
- package/dist/webcomponents/p-9365c7c2.entry.js +0 -1
- package/dist/webcomponents/p-9ad7d724.entry.js +0 -1
- package/dist/webcomponents/p-B-iV5cYd.js +0 -1
- package/dist/webcomponents/p-BX8GieXu.js +0 -1
- package/dist/webcomponents/p-BjNuRWXK.js +0 -1
- package/dist/webcomponents/p-BlJnA265.js +0 -1
- package/dist/webcomponents/p-BoQ6_4Ks.js +0 -1
- package/dist/webcomponents/p-C9EQ459H.js +0 -1
- package/dist/webcomponents/p-C9iide2W.js +0 -1
- package/dist/webcomponents/p-CCLgieAN.js +0 -1
- package/dist/webcomponents/p-Csfiax9X.js +0 -1
- package/dist/webcomponents/p-D0Peuz-m.js +0 -1
- package/dist/webcomponents/p-D6BImiVi.js +0 -1
- package/dist/webcomponents/p-DH8F0bsw.js +0 -1
- package/dist/webcomponents/p-DQZ5VHTZ.js +0 -1
- package/dist/webcomponents/p-DWn9BiNn.js +0 -1
- package/dist/webcomponents/p-DfV3dFDB.js +0 -1
- package/dist/webcomponents/p-Dt-vy9Le.js +0 -1
- package/dist/webcomponents/p-NAjz1Xfo.js +0 -1
- package/dist/webcomponents/p-PSJOKMWp.js +0 -1
- package/dist/webcomponents/p-RQzxYnz_.js +0 -1
- package/dist/webcomponents/p-T2yENPvU.js +0 -1
- package/dist/webcomponents/p-a10ae013.entry.js +0 -1
- package/dist/webcomponents/p-a8ad5f5c.entry.js +0 -1
- package/dist/webcomponents/p-a8e8d944.entry.js +0 -1
- package/dist/webcomponents/p-aa14cc74.entry.js +0 -1
- package/dist/webcomponents/p-ae8ae5bb.entry.js +0 -1
- package/dist/webcomponents/p-b3094b8f.entry.js +0 -1
- package/dist/webcomponents/p-baf0d3e7.entry.js +0 -1
- package/dist/webcomponents/p-bb53e2e9.entry.js +0 -1
- package/dist/webcomponents/p-bdf293f6.entry.js +0 -1
- package/dist/webcomponents/p-c089fb5f.entry.js +0 -1
- package/dist/webcomponents/p-c6dc30e2.entry.js +0 -1
- package/dist/webcomponents/p-d0a2035f.entry.js +0 -1
- package/dist/webcomponents/p-d1bceac6.entry.js +0 -1
- package/dist/webcomponents/p-d37d752e.entry.js +0 -1
- package/dist/webcomponents/p-d4476052.entry.js +0 -1
- package/dist/webcomponents/p-da1fb2a3.entry.js +0 -1
- package/dist/webcomponents/p-ddc0b742.entry.js +0 -1
- package/dist/webcomponents/p-e6011271.entry.js +0 -1
- package/dist/webcomponents/p-e6be4e19.entry.js +0 -1
- package/dist/webcomponents/p-eaefb320.entry.js +0 -1
- package/dist/webcomponents/p-ec9514f8.entry.js +0 -1
- package/dist/webcomponents/p-f11a74c3.entry.js +0 -1
- package/dist/webcomponents/p-f705fc49.entry.js +0 -1
- package/dist/webcomponents/p-fedfe376.entry.js +0 -1
- package/dist/webcomponents/p-ffefa09c.entry.js +0 -1
- package/dist/webcomponents/p-h5pyZngT.js +0 -1
- package/dist/webcomponents/p-tYuXMkCd.js +0 -1
- package/dist/webcomponents/p-wQgEEOq_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as i,r as e,H as t}from"./p-DOjVAAtq.js";import{S as a}from"./p-BIcS6lTe.js";import{w as s,c}from"./p-a6tcNl_T.js";import{b as r}from"./p-BS7OgSQe.js";import"./p-Dj_zevuD.js";import"./p-DdMxswn1.js";import"./p-HXpYMWUU.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(a,{height:"18px",width:"120px"}),i(a,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(a,{height:"18px",width:"110px"}),i(a,{height:"36px"}))))},o=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=c.iframeOrigin,this.tabId=r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return i&&e}async tokenize(i,e,t){return this.accountNumberIframeElement.tokenize(i,e,t)}render(){return i(t,{key:"1c142c117694002871cfcb0f9c419febda59ee1b"},i(n,{key:"06ee99086ab92d21f098bc266d9a3860cf0cfee3",isReady:this.isReady}),i("div",{key:"f1ff30c399806c07854701c45698ee3b2a4d1492",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"b9225fef945018fea713a58bf0f2d58b24069826",class:"row mb-3"},i("iframe-input",{key:"116526dcaa3325b9f9de8c70f6a0dafdf9ec7ced",inputId:"accountNumber",ref:i=>this.accountNumberIframeElement=i,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),i("div",{key:"ef4856499b18125170f6b1117981cab79aa69914",class:"row"},i("iframe-input",{key:"ed3c4988a2eb856450f36ff225a91104f5c10422",inputId:"routingNumber",ref:i=>this.routingNumberIframeElement=i,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{o as bank_account_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,r as t,c as i}from"./p-DOjVAAtq.js";import{A as e}from"./p-ty1sI-fI.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-CeSmGv6o.js";import{c as h}from"./p-DGsXKF67.js";import{p as d,f as p,r as u,j as v}from"./p-BS7OgSQe.js";import{v as m,i as y,a as f,H as j}from"./p-DxnXyWPn.js";import{D as _,E as g}from"./p-Dj_zevuD.js";import{S as C}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as k}from"./p-BIcS6lTe.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-C7cvPZSk.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const w=e();class S{async fetchQuote(s,t){return w.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return w.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const b=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(k,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(k,{width:"70%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"100%"})),s("div",{class:"col-12"},s(k,{width:"80%"}))),T=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){c(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new S};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(C,null,this.isLoading?s(b,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{T as justifi_season_interruption_insurance}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as n,J as p}from"./p-CeSmGv6o.js";import{C as h}from"./p-B9MN_vv4.js";import{m,S as u}from"./p-CTAOJGVx.js";import{S as d}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-F6TcNeK4.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-C7cvPZSk.js";import"./p-ty1sI-fI.js";import"./p-Bm8T-MOQ.js";import"./p-Dj_zevuD.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){n(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:n,onError:p})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return p({error:a(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);n({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"f20c74e616c92115985587dc56d6ef62e86fbf02"},i("checkouts-list-core",{key:"e3afd6af4d8db35f4119d93cc550a1827e1d52cb",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as i,H as s,g as n}from"./p-DOjVAAtq.js";import{A as a}from"./p-ty1sI-fI.js";import{S as o}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{S as r}from"./p-BIcS6lTe.js";import{c as l,o as c,g as h,a as d}from"./p-DGsXKF67.js";import{D as u,r as p}from"./p-Dj_zevuD.js";import{f as y}from"./p-BS7OgSQe.js";import{H as m}from"./p-BXMAoCNA.js";import{H as v,b as M,h as b,i as f}from"./p-DxnXyWPn.js";import{H as g}from"./p-Dyk0thEr.js";import{J as k,c as w}from"./p-CeSmGv6o.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as j,a as A,b as T}from"./p-Cjcsf8ku.js";import{I as P}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as N,a as E}from"./p-D2muobcE.js";import{C as I}from"./p-B9MN_vv4.js";import{P as C,a as D,b as S}from"./p-DCIW8z1f.js";import{C as O}from"./p-ZpPDShvP.js";import"./p-DdMxswn1.js";import"./p-C7cvPZSk.js";var x,L,z,_,R;!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(x||(x={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(L||(L={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(z||(z={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(_||(_={}));class U{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||L.PLAIN,this.buttonStyle=t.buttonStyle||z.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class B{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,e,i,s;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(e=this.supportedNetworks)||void 0===e?void 0:e.length)&&(null===(i=this.total)||void 0===i?void 0:i.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class Y{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var e;if(!this.isApplePaySupported())return!1;try{return await(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,e,i="final"){return{label:t,amount:this.formatAmount(e),type:i}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[_.SUPPORTS_3DS,_.SUPPORTS_EMV,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT]}}!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"}(R||(R={}));class F{constructor(){this.api=a()}initialize(t){if(this.applePayConfig=new U(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 s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return Y.isApplePaySupported()&&Y.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await Y.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 s=new B(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:R.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:R.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,s){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,s);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:R.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const a=n.payment,o=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:Y.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),r=await this.processPayment(i,s,o);r.success?(this.currentSession.completePayment({status:x.STATUS_SUCCESS}),t({success:!0,token:a.token,paymentMethodId:r.data.id})):(console.error("PSP reported payment failure:",r.data),this.currentSession.completePayment({status:x.STATUS_FAILURE}),e({success:!1,error:{code:R.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:x.STATUS_FAILURE}),e({success:!1,error:{code:R.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:x.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:R.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:R.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",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:Y.getDefaultMerchantCapabilities(),supportedNetworks:Y.getDefaultSupportedNetworks(),total:Y.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const Q=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(r,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},V=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case z.WHITE:t+=" apple-pay-button-white";break;case z.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case L.BUY:t+=" apple-pay-button-type-buy";break;case L.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 ")),H=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted"),this.applePayCompleted=i(this,"applePayCompleted"),this.applePayCancelled=i(this,"applePayCancelled"),this.applePayError=i(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=L.PLAIN,this.buttonStyle=z.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:l.paymentCurrency,merchantCapabilities:[_.SUPPORTS_3DS,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT],supportedNetworks:Y.getDefaultSupportedNetworks(),total:Y.createLineItem(l.paymentDescription,l.paymentAmount)},s=await this.applePayService.startPaymentSession(i,l.authToken,l.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||H.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:H.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(l.paymentAmount)&&Boolean(l.paymentCurrency)&&Boolean(l.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:l.paymentAmount,paymentCurrency:l.paymentCurrency,hasAuthToken:Boolean(l.authToken),accountId:l.accountId}),this.applePayError.emit({error:this.error,code:H.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=Y.isApplePaySupported(),this.canMakePayments=Y.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:H.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:H.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 F,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:H.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?Y.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!l.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(o,null,l.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(Q,{isLoading:this.isLoading}),e&&t(V,{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 "))}};H.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const W=class{constructor(t){e(this,t)}render(){return t(o,{key:"a0cf2d923a1283aeac48837faf25aa8ca100adbe"},t("section",{key:"dd98da2e82a8a68606c3cee9a9f4ab54a618dea5"},t("div",{key:"1a4ca7e0cfd24d3ffa7c4d639ae6ecc01ab04ae0"},t("div",{key:"01291cd64ac310a23f9bb8e6a7a0bde3ab36755c",part:u},null==l?void 0:l.paymentDescription),t("div",{key:"7a1fdb4d579a119618c2afd9226834fba41449e1"},t("span",{key:"9ec7e265476839a663a52116bb64424aeafc5bcf",part:u},"Total")," ",t("span",{key:"72b6ba530ba51d9f6b41c35c843b7fada598de40",part:u},y(+(null==l?void 0:l.totalAmount)))))))}},Z=class{constructor(t){e(this,t),this.levels={h1:m,h2:v,h3:g},this.level="h1"}render(){return t(o,{key:"ec45e1573823ebeb47a129e02e063bab9d08b154"},t(this.levels[this.level],{key:"fc977d49c84906de818d9c4e17fb9a55c5ed8832",text:this.text,class:this.class}))}},q=a();class G{async getLinkToken(t,e,i,s){return q.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,n,a){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),n&&(r.payment_method_group_id=n),q.post({endpoint:o,body:r,authToken:t,signal:a})}}const X=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new G,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(l.paymentToken=s,l.selectedPaymentMethod={type:C.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:A.TOKENIZE_ERROR,severity:j.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:j.ERROR})},this.handleApplePayCancelled=()=>{l.paymentToken=void 0,l.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),l.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new I};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var a;try{const o=await i.fetchCheckout(t,e);if(o.error)return n({error:E(o.error),code:N(null===(a=o.error)||void 0===a?void 0:a.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=N(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:a})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return a({error:E(r.error),code:N(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});n({checkout:r.data})}catch(t){const e=N(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),c((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new k(this),w(),l.authToken=this.authToken,this.fetchCheckout(),M("set",(t=>{const e=f[t];void 0!==e&&b(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==P.completed?t.status!==P.expired||this.errorEvent.emit({message:T.CHECKOUT_EXPIRED,errorCode:A.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:T.CHECKOUT_ALREADY_COMPLETED,errorCode:A.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:T.NOT_AUTHENTICATED,errorCode:A.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,n,a,o;l.accountId=t.account_id,l.checkoutLoaded=!0,l.paymentMethods=t.payment_methods.map((t=>new D(t))),l.paymentMethodGroupId=t.payment_method_group_id,l.paymentDescription=t.payment_description,l.totalAmount=t.total_amount,l.paymentAmount=t.payment_amount,l.bnplEnabled=t.payment_settings.bnpl_payments,l.insuranceEnabled=t.payment_settings.insurance_payments,l.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,l.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,l.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,l.bnplProviderMode=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_mode,l.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,l.bnplProviderCheckoutUrl=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:h(),selectedPaymentMethod:l.selectedPaymentMethod,savedPaymentMethods:l.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},a=Object.assign(Object.assign({},t),n),o=Object.assign({accountId:l.accountId,payment_method_group_id:void 0},a);l.savePaymentMethod&&(o.payment_method_group_id=l.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:l.accountId}));return r.error?r:(l.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){l.selectedPaymentMethod=t,l.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];l.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===C.NEW_CARD,n=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===C.NEW_BANK_ACCOUNT;if((s||n)&&(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:A.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,a;const o=await this.validate();if(!l.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:A.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===C.NEW_CARD,c=(null===(i=l.selectedPaymentMethod)||void 0===i?void 0:i.type)===C.NEW_BANK_ACCOUNT,h=(null===(s=l.selectedPaymentMethod)||void 0===s?void 0:s.type)===C.PLAID;if(r||c){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:A.TOKENIZE_ERROR,severity:j.ERROR})}if(h&&!l.paymentToken){const t=l.plaidPublicToken,e=l.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:A.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(l.authToken,l.accountId,t,e||void 0,l.savePaymentMethod?l.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:A.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,a=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);l.paymentToken=a}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:A.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:A.VALIDATION_ERROR,severity:j.ERROR});if(!l.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:A.TOKENIZE_ERROR,severity:j.ERROR});let d;d={payment_mode:(t=>{switch(t){case C.NEW_CARD:case C.SAVED_CARD:case C.NEW_BANK_ACCOUNT:case C.SAVED_BANK_ACCOUNT:case C.PLAID:return S.ECOM;case C.SEZZLE:return S.BNPL;case C.APPLE_PAY:return S.APPLE_PAY;default:return}})(null===(a=l.selectedPaymentMethod)||void 0===a?void 0:a.type),payment_token:l.paymentToken},this.completeCheckout({payment:d,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:A.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return t(s,{key:"c0267323f405ad4fbcbac4481aeb5286dc98161b"})}get hostEl(){return n(this)}};var J;!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"}(J||(J={}));const K={[J.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[J.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[J.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[J.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[J.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[J.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[J.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[J.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[J.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[J.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[J.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[J.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[J.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},$={[J.PLAID_SDK_LOAD_FAILED]:j.ERROR,[J.PLAID_LINK_INIT_FAILED]:j.ERROR,[J.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[J.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[J.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[J.PLAID_TOKEN_EXPIRED]:j.WARNING,[J.PLAID_NETWORK_ERROR]:j.WARNING,[J.PLAID_USER_CANCELLED]:j.INFO,[J.PLAID_TIMEOUT]:j.WARNING,[J.PLAID_INVALID_CREDENTIALS]:j.ERROR,[J.PLAID_ACCOUNT_LOCKED]:j.ERROR,[J.PLAID_MAINTENANCE]:j.WARNING,[J.PLAID_RATE_LIMITED]:j.WARNING},tt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new G,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{l.authToken&&l.accountId&&l.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:J.PLAID_SDK_LOAD_FAILED,message:K[J.PLAID_SDK_LOAD_FAILED],severity:$[J.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:J.PLAID_LINK_TOKEN_FAILED,message:K[J.PLAID_LINK_TOKEN_FAILED],severity:$[J.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:J.PLAID_LINK_INIT_FAILED,message:K[J.PLAID_LINK_INIT_FAILED],severity:$[J.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!l.authToken||!l.accountId)return void this.handleError({code:J.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(l.authToken,l.accountId,l.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&&(l.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let a=J.PLAID_LINK_TOKEN_FAILED,o=K[a],r=!0;"AbortError"===t.name?(a=J.PLAID_TIMEOUT,o=K[a],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"))?(a=J.PLAID_NETWORK_ERROR,o=K[a],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(a=J.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:a,message:o,severity:$[a],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 J.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return J.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return J.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return J.PLAID_RATE_LIMITED;case"maintenance":return J.PLAID_MAINTENANCE;case"not_authenticated":return J.PLAID_INVALID_CREDENTIALS;default:return J.PLAID_LINK_TOKEN_FAILED}return J.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,l.selectedPaymentMethod={type:C.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),l.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=J.PLAID_AUTHENTICATION_FAILED,i=K[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=J.PLAID_INVALID_CREDENTIALS,i=K[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=J.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=J.PLAID_ACCOUNT_LOCKED,i=K[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=J.PLAID_MAINTENANCE,i=K[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=J.PLAID_RATE_LIMITED,i=K[e],s=!0;break;case"INVALID_REQUEST":e=J.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=J.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const a=t.error_message.toLowerCase();a.includes("not supported")||a.includes("unsupported")?(e=J.PLAID_BANK_NOT_SUPPORTED,i=K[e],s=!1,n="Try a different payment method"):(a.includes("expired")||a.includes("timeout"))&&(e=J.PLAID_TOKEN_EXPIRED,i=K[e],s=!0)}this.handleError({code:e,message:i,severity:$[e],originalError:t,retryable:s,userAction:n}),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=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===C.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)!==C.PLAID&&(l.selectedPaymentMethod={type:C.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:J.PLAID_SDK_LOAD_FAILED,message:K[J.PLAID_SDK_LOAD_FAILED],severity:$[J.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===C.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return l.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,l.selectedPaymentMethod={type:C.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(l.selectedPaymentMethod={type:C.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==l.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(o,{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===j.ERROR?"text-danger":this.error.severity===j.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"]}}},et=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),l.selectedPaymentMethod={id:t.id,type:t.type},l.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===C.SAVED_CARD&&l.disableCreditCard||t===C.SAVED_BANK_ACCOUNT&&l.disableBankAccount)}componentWillLoad(){l.paymentMethods.length||console.warn("No saved payment methods available."),l.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return l.disablePaymentMethodGroup?null:t(o,null,t("div",{class:"saved-payment-methods"},l.paymentMethods.length?l.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:p,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:l.paymentToken===(null==e?void 0:e.id),label:`${O[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},it=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"}}),st=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=C.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(l.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:l.bnplProviderClientId,apiMode:l.bnplProviderMode,apiVersion:l.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:l.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(){l.selectedPaymentMethod={type:C.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return l.bnplEnabled?t(o,{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 ",it),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"},y(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)}},nt={[C.NEW_BANK_ACCOUNT]:"New bank account",[C.NEW_CARD]:"New credit or debit card"},at="Payment form not ready",ot="Validation error",rt=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){w(),this.analytics=new k(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,l.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:A.TOKENIZE_ERROR,message:ot}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(A.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:A.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:at}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||l.authToken,account:this.accountId||l.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||l.authToken||this.emitError({errorCode:A.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||l.accountId||this.emitError({errorCode:A.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=C.NEW_BANK_ACCOUNT,l.selectedPaymentMethod={type:C.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=C.NEW_CARD,l.selectedPaymentMethod={type:C.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(C.NEW_CARD),this.disableBankAccount||t.push(C.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:j.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",at);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||ot;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||l.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!l.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(e){const i=this.selectedPaymentMethod===e&&void 0===l.selectedPaymentMethod.id;return t("div",{class:"payment-method"},t("justifi-radio-list-item",{name:"paymentMethodType",value:e,checked:i,label:nt[e],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(e))}renderSelectedPaymentMethodForm(e){return t("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(e),t("div",{class:"mt-4"},t("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:e})),t("div",{class:"mt-4"},t("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(e){return t(e===C.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return t(o,{key:"0d3168166bba767403d0efb85f26c408adb4c93e"},t("form",{key:"8ac12f8171da6907c83039173cbc7a009e662bb7"},t("fieldset",{key:"d88ea01b37a9ab0b7ff756577d2d17430853408b"},t("div",{key:"ac750c1faf2ac05279c0912527f0c468551bf738",class:"row gy-3"},t("div",{key:"dedef72db299486b3141a47ed6df93dc799270e9",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),t("div",{key:"4d34febc61916210214166f94b9d38a24c6978d8",class:"col-12"},t("justifi-button",{key:"ce02121b93611d8e780b5c483bfe384ce4e7ed7c",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{H as justifi_apple_pay,W as justifi_checkout_summary,Z as justifi_header,X as justifi_modular_checkout,tt as justifi_plaid_payment_method,et as justifi_saved_payment_methods,st as justifi_sezzle_payment_method,rt as justifi_tokenize_payment_method}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,H as i}from"./p-DOjVAAtq.js";import{I as e}from"./p-Ce_F4E0f.js";import{C as r}from"./p-CVaOFfrI.js";import{a4 as h,l as o,V as c,b as n,U as l,a as f}from"./p-Dj_zevuD.js";import{F as d}from"./p-Dy3-IlQ3.js";import{F as p}from"./p-D9Yus-je.js";import"./p-CZfYo5-1.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.maskOptions=r.DECIMAL,this.initializeIMask=()=>{this.textInput&&(this.imask=e(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=h;return this.errorText&&(t=n),this.disabled&&(t=l),this.isFocused&&(t=f),t}render(){return a(i,{key:"12d04cf0bc1dbc85acd1006148c411e00941ab70"},a("div",{key:"08d92fd3c4c764295cf291fc983f63ab58e4312e",class:"form-group d-flex flex-column"},a("label",{key:"1c7bddbfc094535558b24d3988dafe91f0cbde0a",part:o,class:"form-label",htmlFor:this.name},this.label),a("div",{key:"a1dfb4ab2de228f7ad138c12eb37403e9578c001",class:"input-group"},a("span",{key:"94e9009f2a6c782798dccaf6dfae472391f43078",class:"input-group-text",part:c},"$"),a("input",{key:"ebbc696bc1b695d20a758039465ae37a66be974a",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),a(d,{key:"58f0977b34ab42051b1d4af9e5754d57d60e2fb5",helpText:this.helpText,name:this.name}),a(p,{key:"b3cdaa58f30edb185e2c89bca5d02a86c52cc8d0",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_monetary_provisioning}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-DOjVAAtq.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-CeSmGv6o.js";import{D as n}from"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-i--LPP1s.js";import"./p-C7cvPZSk.js";import"./p-ty1sI-fI.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:a(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new n(c.data),pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"60b2220edc8d7862cda6388040e7b1f9434100fc",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_dispute_management}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as i,h as t}from"./p-DOjVAAtq.js";import{c as o,J as e}from"./p-CeSmGv6o.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as p,a}from"./p-5aA7gjr5.js";import{B as h}from"./p-DIdnZUSh.js";import{A as m}from"./p-ty1sI-fI.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-C7cvPZSk.js";import"./p-D2muobcE.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";const d=m();class c{async postProvisioning(s,i,t){return d.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const u=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){o(),this.analytics=new e(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=p({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new c})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"41e96a931c082212f43bdd84dd5c948fac1eddfc",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{u as justifi_payment_provisioning}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-DOjVAAtq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c,d as o,e as n,f as p,g as d,h as u,i as b,j as m,k as f,l as g}from"./p-UUJudj_5.js";import{T as j}from"./p-CZfYo5-1.js";import{c as y,a as k}from"./p-F6TcNeK4.js";import{o as l,g as C}from"./p-lKnUT24T.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-Dj_zevuD.js";import"./p-CVtpEQBE.js";import"./p-Bm8T-MOQ.js";const S=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new a(this.checkouts,this.columns,y,k),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"a227a356ba08e39e4b60849d8615a5b1cd845739"},e(r,{key:"51b96d4be5773975397eadfc6c3c0ec983bdb38f"},e(h,{key:"868cf524b90bcc2671fc487dc5c7f9c71756d24f"},e(c,{key:"3bc7b727e4e3c8f0a61b55993c965779c0fac73b"},this.checkoutsTable.columnData.map((t=>t)))),e(o,{key:"06adebe1455360d37d3eed7a27af2698b35047b4"},e(n,{key:"241f49bd2ed6d3548e286de8f75f1cc92ffae23f",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"9739415d15f73457aa5125c85be88566e70d233b",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"43b1fa74ba01c89b2d22fc238295c343bf6379b6",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(b,{key:"3a4b974a07bbe7d0fe246ad93724be2bec449166"},e(m,{key:"6ec16663674ea87026fc3400d164fa2d9907c35a"},e(f,{key:"1eb2943ba2e6885a1a520430eb257e7499553c80",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"d4719b9e2166d0577e620a5575303294127833a9",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{S as checkouts_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,H as i}from"./p-DOjVAAtq.js";import{I as a}from"./p-Ce_F4E0f.js";import{b as d,U as o,a as r,c as l,l as c}from"./p-Dj_zevuD.js";import{F as n}from"./p-D9Yus-je.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-B5rtFhtR.js";import{n as f}from"./p-BnjCmwMr.js";import{b as u,c as b}from"./p-DfKxeSrC.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=a(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,i=s.getAttribute("name"),a=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:i,value:a})},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(i,{key:"df43b2ce1fa351d04852fbc8a93ee14eeacab874"},s("div",{key:"e3b22cde550073e8ccac88ce2f6a0533cae6d781",class:"form-group d-flex flex-column"},s("div",{key:"c42151be8f9311c197a972dd5d0c15e09b884690",class:"d-flex align-items-start gap-2"},s("label",{key:"603866f6c5202290c07490a7a3303b1fce13e375",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"878b2797d1acb8030f5881c47f08c647e605b335",helpText:this.helpText})),s("input",{key:"04e22f86c574d85190c55ee828c4df02c4652b91",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(n,{key:"57b6c4a907ae8089981faaf2359a8120963d875f",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,a,d,o,r,l,c,n,m;const v=b[this.country],p=u[this.country];return s(i,{key:"429dd1250553f6d25f9db6d6c1379af0290718c6"},s("div",{key:"91b9d7199bea1620c7614efd25c0421d3f85c19d",class:"row gy-3"},s("div",{key:"13dd91b17d387ef9c8bc97b44a273f0984758a3a",class:"col-12"},s("form-control-text",{key:"52ecc715696aed27a6f4329971e90e90ebb971fa",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:"64bc39361d02b10c75dfc8389915ce192b9f7606",class:"col-12"},s("form-control-text",{key:"a835f2f9706664dd195daa5436fe49aea2c54968",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(a=this.defaultValues)||void 0===a?void 0:a.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"ef9b02103d0d1469da092d8965d021b049e54cb5",class:"col-12"},s("form-control-text",{key:"9263360f47c6e833a904aab2e8b30d4a35d50e75",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:"4609534e39659ed47350e68a64fee58616320da4",class:"col-12"},s("form-control-select",{key:"a7f94fa5ea2642cae82729951198771fd1f31380",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:"eadf0a6e2e2cfbe8e476ba8abb25eab4b2b005fb",class:"col-12"},s("form-control-text",{key:"2708d2a47c8afccc470203775d494683f133174b",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.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?f: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(i,{key:"c9b75fa8c884fb755cd26be4433022f278794e4e"},s("justifi-form-address-fields",{key:"2f9cfa3fc695de214d9203c680e6cb115d714b82",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{r as t,c as s,h as e,H as a}from"./p-DOjVAAtq.js";import{b as i,U as o,a as r,c as h,l as f,V as n}from"./p-Dj_zevuD.js";import{F as d}from"./p-Dy3-IlQ3.js";import{F as l}from"./p-D9Yus-je.js";import"./p-CZfYo5-1.js";import{f as c}from"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";const p=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>c(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,e=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(e),this.inputHandler(s,e),this.formControlInput.emit({name:s,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return e(a,{key:"befed81330399d097413f8b769d01df6b315d707"},e("div",{key:"570688783902a60e43689dc542e69008d52ee376",class:"form-group d-flex flex-column"},e("label",{key:"0def0a1b40891a7f6ca3d8886e0b32197beab464",part:f,class:"form-label",htmlFor:this.name},this.label),e(d,{key:"637edfe671dabaed1b82ce8f2b165ca2a574522b",name:this.name,helpText:this.helpText}),e("div",{key:"6b38281e577bfb6f8dfacc29574a3b0cb9183c56",class:"input-group"},e("span",{key:"63d1f8596630e7f3922e02f099b9298ff83bb487",class:"input-group-text",part:n},"$"),e("input",{key:"a23391ec4ede5bd11d7d2e552eac76544aa855ae",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),e(l,{key:"5f8175edeff6bc80c9f2fb815d89205d69b413a3",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as s,c as e}from"./p-DOjVAAtq.js";import{a as i,c as r,b as o}from"./p-C6g4MbnB.js";import{F as n,c as a,a as h,b as l}from"./p-DiJD6Iqx.js";import{A as c,C as d,e as u,R as m,f as p}from"./p-B5rtFhtR.js";import{C as f,P as b}from"./p-CVaOFfrI.js";import{G as v,l as y,U as g,_}from"./p-Dj_zevuD.js";import{S as w}from"./p-BIcS6lTe.js";import"./p-CZfYo5-1.js";import{b as j,r as x,s as O,c as k}from"./p-CPpUGsw5.js";import{a as C,B as S}from"./p-XYgDHrVL.js";import{E as T,l as D,m as E}from"./p-CPKSE7M4.js";import{B as L,C as B,z as H,D as P,E as V,F as A,G as W}from"./p-DxVCqvBt.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as I,a as F}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{c as q}from"./p-DfKxeSrC.js";import{B as U}from"./p-CJ9qo7_g.js";import{d as M,e as R}from"./p-DzWLLt4t.js";import"./p-BFTU3MAI.js";import"./p-BS7OgSQe.js";import"./p-DdMxswn1.js";class Y{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const G=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"25%"})),t("div",{class:"col-12"},t(w,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"50%"}),t(w,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"65%"}),t(w,{width:"35%"}))),N=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(w,{width:"40%",height:"40px"})),t(G,null),t(G,null),t(G,null)),X=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new c(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:C.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s})),this.additional_questions=new c(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const h=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Additional Questions"),t("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business’ estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==h?void 0:h.business_revenue,maskOptions:f.WHOLE})),t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==h?void 0:h.business_payment_volume,maskOptions:f.WHOLE})),t("div",{class:"col-12"},t("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:j,defaultValue:null==h?void 0:h.business_when_service_received})),t("div",{class:"col-12"},t("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:x,defaultValue:null==h?void 0:h.business_recurring_payments})),t("div",{class:"col-12",hidden:!this.recurringPayments},t("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==h?void 0:h.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),t("div",{class:"col-12"},t("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:O,defaultValue:null==h?void 0:h.business_seasonal})),t("div",{class:"col-12"},t("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==h?void 0:h.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},z=(t,s)=>t.some((t=>t.document_type===s)),J=t=>t?{bank_name:V.nullable(),nickname:P.nullable(),account_owner_name:H.nullable(),account_type:B.nullable(),account_number:L.nullable()}:{bank_name:V.required("Enter bank name"),nickname:P.required("Enter nickname"),account_owner_name:H.required("Enter account owner name"),account_type:B.required("Select account type"),account_number:L.required("Enter account number")},K=(t,s)=>{if(s)return{voided_check:l().nullable(),bank_statement:l().nullable()};const e=z(t,T.voidedCheck),i=z(t,T.bankStatement),r=e||i,o="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:l().when("bank_statement",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()}),bank_statement:l().when("voided_check",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()})}},Q={[d.USA]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},J(s)),(t=>t?{routing_number:W.nullable()}:{routing_number:W.required("Enter routing number")})(s)),K(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t),[d.CAN]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},J(s)),(t=>{const s=h().length(3,"Institution number must be 3 digits").matches(A,"Enter valid institution number"),e=h().length(5,"Transit number must be 5 digits").matches(A,"Enter valid transit number");return t?{institution_number:s.nullable(),transit_number:e.nullable()}:{institution_number:s.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(s)),K(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t)},Z=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new D,this.isLoading=!1,this.getSchema=()=>(0,Q[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new n(this.getSchema()),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))},this.storeFiles=t=>{const s=Array.from(t.detail.fileList),e=t.detail.document_type,i=s.map((t=>new E({file:t,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.bank_accounts.length>0?this.bankAccount=new Y(t.data.bank_accounts[0]):(this.bankAccount=new Y({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=t.data.documents},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async t=>{this.isLoading=!0;const s=t.record_data;return new Promise((e=>{this.postDocumentRecord({payload:s,onSuccess:s=>{e(this.handleDocRecordResponse(t,s))},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(t,s)=>s.error?(this.errorEvent.emit({errorCode:F.POST_ERROR,message:s.error.message,severity:I.ERROR,data:s.error}),!1):(t.setPresignedUrl(s.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const s=await t.getFileData(),e=await fetch(t.presigned_url,{method:"PUT",body:s});return this.handleUploadResponse(e)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:F.POST_ERROR,message:t.error.message,severity:I.ERROR,data:t.error}),!1)}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){this.existingBankAccount?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){const t=this.formController.values.getValue();return new Y(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}async sendData(t){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;t()}catch(t){this.errorEvent.emit({message:t,errorCode:F.POST_ERROR,severity:I.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((s=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:s=>{t=s,e=!0},onError:({error:t,code:s,severity:i})=>{e=!1,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:C.bankAccount}),this.isLoading=!1,s(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",{class:"mb-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Bank Account Info"),t("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),t("hr",{class:"mt-2"}),t(this.country===d.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),t("fieldset",{class:"mt-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Document Uploads"),t("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),t("hr",{class:"mt-2"}),t("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),t("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{isLoading:["watchHandler"]}}},$=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new u(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t(),this.isEditingTaxId=!1},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:C.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new u(this.formController.values.getValue()).payload}componentWillLoad(){const t=this.country===d.CAN?r(this.allowOptionalFields):o(this.allowOptionalFields);this.formController=new n(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e;const i=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Business Information")),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),t("div",{class:"col-12"},t("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),t("div",{class:"col-12 col-md-8"},t("form-control-select",{name:"classification",label:"Business Classification",options:k,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-4"},t("form-control-date",{name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:q[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:q[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:y},q[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:g,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:_,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),t("div",{class:"col-12"},t("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:b.US})))))}},tt=class{constructor(t){s(this,t),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(t,s)=>{const e=this.refs.findIndex((t=>t===s));-1!==e&&(this.refs[e]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:C.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:S.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((s=>s.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)}}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const s=this.refs.map((t=>t.validate()));if(!(await Promise.all(s)).every((t=>t)))return;const e=this.refs.map((t=>t.submit()));(await Promise.all(e)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const s=t.detail,e=this.ownersPayload.map((t=>t.id===s.id?s:t));e.includes(s)||(e[this.ownersPayload.findIndex((t=>!t.id))]=s,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?t(N,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Owners"),t("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},this.ownersPayload.map((s=>t("justifi-owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(U,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},st=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new m(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:C.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new m(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,M[this.country])("representative",this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(N,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}},et=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const s=new p((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},s),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:C.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new p(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,R[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:s,inputHandler:this.inputHandler})))}};export{X as justifi_additional_questions_form_step_core,Z as justifi_business_bank_account_form_step_core,$ as justifi_business_core_info_form_step_core,tt as justifi_business_owners_form_step_core,st as justifi_business_representative_form_step_core,et as justifi_legal_address_form_step_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as o}from"./p-DOjVAAtq.js";import{C as s}from"./p-ZpPDShvP.js";import{r as a}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,H as o}from"./p-DOjVAAtq.js";import{C as s}from"./p-ZpPDShvP.js";import{r as a}from"./p-Dj_zevuD.js";import"./p-HXpYMWUU.js";const r=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var t,e,r;return i(o,{key:"2636f9038b83a384a2a3bc4bbc7695ff237a6584",class:"payment-method"},i("div",{key:"2995201b40f93a916fe6a32c2d27bc43cd22d8d1",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},i("form-control-radio",{key:"7f8382f0d3cbc596c329fc32badc6c4b40e4493f",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${s[null===(e=this.paymentMethodOption)||void 0===e?void 0:e.brand]||""} *${null===(r=this.paymentMethodOption)||void 0===r?void 0:r.acct_last_four}`})))}};export{r as justifi_saved_payment_method}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as r}from"./p-DOjVAAtq.js";import{P as i}from"./p-DqPvh0aN.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as m}from"./p-CeSmGv6o.js";import{S as h}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import{d}from"./p-BYrSeoci.js";import"./p-ty1sI-fI.js";import"./p-BS7OgSQe.js";import"./p-DdMxswn1.js";import"./p-C7cvPZSk.js";import"./p-BdmYH_IK.js";import"./p-Bm8T-MOQ.js";import"./p-Dj_zevuD.js";const f=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,d;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:n(m.error),code:a(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"600a899641ac8e2bbada4cc2f7f5c8477f16f5c9"},r("payments-list-core",{key:"903ca5197fd56b9f0dfb141d09f92e27cd35f651",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payments_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as a}from"./p-DOjVAAtq.js";import{X as c,Y as s,Z as d}from"./p-Dj_zevuD.js";const i=class{constructor(a){e(this,a),this.selectedQuantityChange=t(this,"selectedQuantityChange"),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return a("div",{key:"3e2c9aac5322205108924c346a1f5bed41a673e6",class:"rounded shadow-sm card p-2",part:d},a("div",{key:"010ef8e5ecacabdbde46e15c01b68bc89450f8c2",class:"d-flex gap-3"},a("div",{key:"9a7a9215dffbe59d9a3ebee2ed40bfea1f838e7a",class:"d-flex align-items-center"},a("img",{key:"51e5919f4c76ac372f6caaca35d5e16bc99c4766",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:c})),a("div",{key:"23c5c813f0a427bef785d8f48d03ffa4c6d94aad",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},a("div",{key:"2eb6df9a235030b347dcea3e398961761586b36e",class:"row"},a("div",{key:"cb5daf84d7ba9c1f41b3d2a78ae5c5d90cfc6817",class:"col-6 d-flex gap-2"},this.modelName,a("form-control-tooltip",{key:"fdeb46a05efdab7bd1ff5c1540f968cd9a868bec",helpText:this.description})),a("div",{key:"f89be0d4e9ec16363acac6706a122657219746bf",class:"col-6 d-flex justify-content-end align-items-center"},a("button",{key:"55c367a543f03d0e05835781a7e775497be0d782",class:"p-0 minus btn",onClick:this.removeUnit,part:s},"-"),a("div",{key:"77cabef1a1f3c912dca9d90e4f63e9004e20c829",class:"w-25 text-center"},this.selectedQuantity),a("button",{key:"2ecc0d4c5022045e618049fc3edcf9f07d882f64",class:"p-0 plus btn",onClick:this.addUnit,part:s},"+"))))))}};export{i as terminal_quantity_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-DOjVAAtq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as h,a as o,b as c,c as n,d as p,e as d,f,g as m,h as u,i as b,j as g,k as y,l as j}from"./p-UUJudj_5.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-BkaPXFTl.js";import{o as S,g as v}from"./p-NwmOm8Pg.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-Dj_zevuD.js";import"./p-CVtpEQBE.js";import"./p-IYf7zn5J.js";import"./p-Bm8T-MOQ.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),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 h(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),S("set",(()=>{this.pagingParams={}})),S("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=v();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:"cdf6daaa40985bc3925c6f5d5b618102f5168ee0"},e(o,{key:"52e74b98af14199c22442fe8b70d2af8c48da931"},e(c,{key:"65e21eb180a339b71f861c9130e89ad55cda138c"},e(n,{key:"b1e2c439fdce4d235fa54560d1952ee84bdfbffa"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"c3113938a3c99f1fe52b7526f9e3d4a0f3f36ba5"},e(d,{key:"eda682acb4f576e34d0068ca2ebbec0561bec0e8",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(f,{key:"4aee9df94af9135ab87ce32fc3fb3eec4c27990f",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(m,{key:"413d3362c4c3fd0dbae32b7c56d3c45a0f228285",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(b,{key:"8d528bd87a55c41dc3327dfff1aaed84593b70c3"},e(g,{key:"1cd949eaafefe2fadfebcd1320cf4d47f8401d47"},e(y,{key:"057e0a48bf6e2fe35754eb11a53b0179adb08e1f",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"7eb638922c2403586e6737e8696aced00d0188ea",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{w 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-DOjVAAtq.js";import{F as r}from"./p-D9Yus-je.js";import{i as o,b as l,a as h,U as c,c as n,l as f}from"./p-Dj_zevuD.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur")}render(){return s(a,{key:"4d69131cba0d3529b5e8d3344085400a0e491f7a",exportparts:"label,input,input-invalid"},s("div",{key:"91ef14e863262efef2ca6478dddcbe06fed2c3de",class:"form-group d-flex flex-column"},s("div",{key:"46fab1c0db5685d8ea5f84f1517a129894a4ba62",class:"d-flex align-items-start gap-2"},s("label",{key:"e43d7049b5ce9265e27d30e6edca60b877ce7207",part:"label",class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"4a6298c1b36cf0bbef8ebb383398168cf99af362",helpText:this.helpText})),s("input",{key:"1ec274c8399390dcc08b708218485be030df3e4a",type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?"input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onBlur:()=>this.formControlBlur.emit(),onChange:()=>this.errorText=""}),s(r,{key:"154e2193272229f617555a5a1804c334d5214d53",errorText:this.errorText,name:this.name})))}get el(){return i(this)}},b=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("textarea");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?o:this.errorText?l:this.isFocused?h:this.disabled?c:n}render(){return s(a,{key:"8b45f46328cd09457814bf8d9f474a1f1f1b4384"},s("div",{key:"a10735e0d15b641d2ab79ca6930cb22e91c89147",class:"form-group d-flex flex-column"},s("label",{key:"fc72fe91f841c8fe1525eb87fc270492660d1932",part:f,class:"form-label",htmlFor:this.name},this.label),s("textarea",{key:"237ec248e7c68d97dcb035984783347bb6eb1092",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",disabled:this.disabled}),s("form-control-help-text",{key:"e12fd273b27a74c07de1f043dc7cdb927c8b19d8",helpText:this.helpText,name:this.name}),s("form-control-error-text",{key:"e5e0fec72f54ddde7e72c465f8c97fef2df0ef85",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_file_v2,b as form_control_textarea}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-DOjVAAtq.js";import{E as r}from"./p-DSCBoCn-.js";import{B as o}from"./p-DIdnZUSh.js";import{m as e}from"./p-sCHf--Vc.js";import{C as p,a as m}from"./p-Cjcsf8ku.js";import{c as n,J as h}from"./p-CeSmGv6o.js";import"./p-Dj_zevuD.js";import"./p-ty1sI-fI.js";import"./p-a6tcNl_T.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CPKSE7M4.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-C7cvPZSk.js";const a=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){n(),this.analytics=new h(this),this.initializeGetBusiness()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:m.MISSING_PROPS,message:this.errorMessage,severity:p.ERROR});this.getBusiness=e({id:this.businessId,authToken:this.authToken,service:new o})}render(){return this.errorMessage?r(this.errorMessage):i("business-details-core",{getBusiness:this.getBusiness,"onError-event":this.handleErrorEvent})}};export{a as justifi_business_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,r as t,c as i}from"./p-DOjVAAtq.js";import{c as e,F as r}from"./p-DiJD6Iqx.js";import{b as o,a,c as h}from"./p-C6g4MbnB.js";import{i as n,a as p,b as l,c as m}from"./p-DzWLLt4t.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as c,a as d}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import{C as j,B as u,b as f}from"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as v,J as b}from"./p-CeSmGv6o.js";import{B as C}from"./p-CJ9qo7_g.js";import{S as g}from"./p-BhCH9S0e.js";import{H as w}from"./p-BXMAoCNA.js";import"./p-CZfYo5-1.js";import{S}from"./p-BIcS6lTe.js";import{B as y}from"./p-XYgDHrVL.js";import{m as B,b as x}from"./p-5aA7gjr5.js";import{B as D}from"./p-DIdnZUSh.js";import"./p-BFTU3MAI.js";import"./p-DxVCqvBt.js";import"./p-DfKxeSrC.js";import"./p-CPpUGsw5.js";import"./p-DdMxswn1.js";import"./p-BS7OgSQe.js";import"./p-C7cvPZSk.js";import"./p-ty1sI-fI.js";import"./p-Dj_zevuD.js";import"./p-D2muobcE.js";const I=e(Object.assign(Object.assign({},o().fields),{legal_address:p(),additional_questions:a(),representative:n("representative")}));e(Object.assign(Object.assign({},h().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const O=I,_=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(S,{width:"25%"})),s("div",{class:"col-12"},s(S,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(S,{width:"50%"}),s(S,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(S,{width:"65%"}),s(S,{width:"35%"}))),k=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(S,{width:"40%",height:"40px"})),s(_,null),s(_,null),s(_,null)),q=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event"),this.clickEvent=i(this,"click-event"),this.errorEvent=i(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.country=j.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new u(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new u(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){v(),this.analytics=new b(this),this.formController=new r(O),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=B({authToken:this.authToken,businessId:this.businessId,service:new D}),this.patchBusiness=x({authToken:this.authToken,businessId:this.businessId,service:new D}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=f.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(g,null,this.isLoading?s(k,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(w,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(C,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:y.submit}),isLoading:this.isSaving},"Submit")))))}};export{q as justifi_business_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-DOjVAAtq.js";import"./p-a6tcNl_T.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{g as n}from"./p-CPKSE7M4.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as o,J as c}from"./p-CeSmGv6o.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-DqPvh0aN.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as j,g,h as T,i as k,j as v,k as w}from"./p-UUJudj_5.js";import{S as C}from"./p-BhCH9S0e.js";import{T as S}from"./p-CZfYo5-1.js";import{a as D}from"./p-BS7OgSQe.js";import{S as E,T as F}from"./p-Dj_zevuD.js";import"./p-DdMxswn1.js";import"./p-C7cvPZSk.js";import"./p-ty1sI-fI.js";import"./p-CVtpEQBE.js";const I={created_at:()=>t("th",{part:E,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:E,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:E,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:E,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:E,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:E,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:E,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:E,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:E,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:E,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:E,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},R={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},x={created_at:(e,a)=>t("td",{part:F(a)},t("div",{class:"fw-bold"},D(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},D(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:F(a)},R[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:F(a)},e.id),amount:(e,a)=>t("td",{part:F(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:F(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:F(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:F(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:F(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:F(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:F(a)},e.source_id),source_type:(e,a)=>t("td",{part:F(a)},e.source_type)},P=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,I,x),o(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:i,onSuccess:r,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(t,e,i);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:c.data.map((t=>new n(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:h(t),code:e,severity:s.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(i.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"f5a7946c22e065b9fb73c42f2e8bd338fe9f5b75"},t(l,{key:"3cac49cde086dc78b15583ab2725a6196987c123"},t(u,{key:"7588b31adad3bd0804a95a61e656af24faf21857"},t(m,{key:"56d2e0f7b65f621e23db4f04b1768427553d077b"},t(y,{key:"7be2399aa3dda6337c94e4e9d95e1d1d73b0702e"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"e30961bb03921a1cb491c7fcd09df51eafbad3a6"},t(_,{key:"c26d53a4901ce5e3e42ff05ad627f08020a7a71c",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"5ed524b2d07316bad2814328f02ddefe1f263fc6",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(g,{key:"99cf81edbf8fde0cf96c55f62bd9dca3342d958d",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(k,{key:"816ce49013c603d64af1b8534e062df6dabde41b"},t(v,{key:"96786a7547c39275184c44d7da55069802ca8c22"},t(w,{key:"204328804873c7ff440cbeb889948dc0365d508c",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"4a4ecc86248e59d8e5cf3982a49abf514fe073a8",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{P as justifi_payment_transactions_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-DOjVAAtq.js";import{f as t,p as s,c as r}from"./p-0fgTPVV0.js";import{q as l,u as d,v as i,w as o,x as p}from"./p-Dj_zevuD.js";import{S as b}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";import"./p-a6tcNl_T.js";import{c,a as f}from"./p-BS7OgSQe.js";import"./p-Cjcsf8ku.js";import{T as n,b as m}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-DdMxswn1.js";import"./p-HXpYMWUU.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=c(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:n.created},{label:"Completed",value:n.completed},{label:"Submitted",value:n.submitted},{label:"In Progress",value:n.in_progress},{label:"On Hold",value:n.on_hold},{label:"Canceled",value:n.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:m.boardingOnly},{label:"Boarding Shipping",value:m.boardingShipping}]}render(){const e=Object.assign({},t);return a(b,{key:"1df2679852a2c3795bd5c9a90ec2d08ea124ab63"},a("table-filters-menu",{key:"2836ae98e62ac6ee5dbb00b2d5115b0b49795576",params:e,clearParams:r,part:l},a("div",{key:"bd993ac7ed2e2b6a83d787dc2456ab4184bf85a7",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"b03fc2cdd1931f0dbf7873735152f277c823498b",class:"p-2"},a("form-control-select",{key:"8796b887cda1645323a68de9ab34cfefbb144fbe",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||t.order_status||"",disabled:!!this.orderStatus,part:d})),a("div",{key:"575764ad238bba204780582d45e694fb57fca521",class:"p-2"},a("form-control-select",{key:"4dd9fb99dc251fc519d9484cd9820b190effa1de",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||t.order_type||"",disabled:!!this.orderType,part:i})),a("div",{key:"4581e4f414e0acf62b61f3b343ec0dbc462aeb71",class:"p-2"},a("form-control-date",{key:"2c9373178da8fdd87f99843cb18634b00fbc7724",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:f(this.createdAfter,{showInputDateTime:!0})||f(t.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:o})),a("div",{key:"882a33df41cdf11e5a0ec84ffefdb8eab8026a19",class:"p-2"},a("form-control-date",{key:"2915ce84bbf61c73548112f8fdb894593f0c5695",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:f(this.createdBefore,{showInputDateTime:!0})||f(t.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:p})))))}};export{u as justifi_terminal_orders_list_filters}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-DOjVAAtq.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as h,c as a}from"./p-B5rtFhtR.js";import{D as n}from"./p-Dj_zevuD.js";import{S as c}from"./p-BhCH9S0e.js";import{H as d}from"./p-BXMAoCNA.js";import"./p-CZfYo5-1.js";import{B as p}from"./p-XYgDHrVL.js";const f=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event"),this.loading=!1,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=a(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}),s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),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:p.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.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`${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(c,{key:"f7206f7fa5c0b2052b524737e86b622f92dcd07e"},i("div",{key:"65cd3a37191f1bdef3380b1c5ceebc260b846b6a",class:"row gap-3"},i(d,{key:"05fd7dff0691a80ad7c1dc9152a5fd4d851a292d",text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{key:"57f9b35aa0a1fa2205a43cb90c274fa211f7c359",businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),i("div",{key:"94fd88a0aa9114677a2a1325e14bd059a08b6d72",class:"d-flex justify-content-between align-items-center"},i("div",{key:"bb0ba1762a15c92dbb71f98722b01b1b0324ebcf",class:"d-flex align-items-center",part:n},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{key:"a3cab2c2c655a1bc6d1771c7b759e2b0adc971b0",currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{f as justifi_payment_provisioning_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-DOjVAAtq.js";import{c as t,a as c,F as i}from"./p-DiJD6Iqx.js";import{an as d}from"./p-Dj_zevuD.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:c().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,c=t.name,i=t.files;a[c]=[];for(const e of i)a[c].push(new n(e,c))},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 i(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"a03e78a3610b5bf23bf9611ed2225e839da41c5d"},a("div",{key:"235029013598b89a4d92c06cc468b1fb4147fc4c",class:"row gy-3"},a("div",{key:"f18cdb52f20817dc6dc3d16e91b4fee09ccda690",class:"col-12"},a("h2",{key:"37a18cbc0027cb3fd170fa5afad295d57cfc0f19",class:"h5",part:d},"Additional Evidence")),a("div",{key:"9cc4ef86508b8232e343f46fc64ccc78b42ac22f",class:"col-12"},a("form-control-textarea",{key:"93fb66f2e4ee72b58ff53c5010b1e5e16e9abbd7",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:"cb3fe8f241e08df1984fc47820e723f00d34641d",class:"col-12"},a("form-control-file-v2",{key:"eeae63012b624078bfc3fa34553ed7aa8288a24b",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:c().nullable(),cancellation_rebuttal:c().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 i(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"37c63086ec0dece44992be20f44d0b0f06ce3996"},a("div",{key:"0aab4b70d17ce769d847470b74cd2f0946845ed2",class:"row gy-3"},a("div",{key:"7cacadffe3a11231d9791dd3b536686e7cc2d539",class:"col-12"},a("h2",{key:"09c8227375b4231c4135a18d31667f069c5c847d",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"4636e5b456294e6493e09859cf4d001d7e7b6c1a",class:"col-12"},a("form-control-textarea",{key:"e5e7be99ae8b18016c28388e7d165321b7aae062",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:"0885ca69088851f240ae22b5106a9989b4321f96",class:"col-12"},a("form-control-textarea",{key:"80ebcdae7bbf223109820735dacb4d2a8c1c8809",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:"3ddc4eaa4f086eee2758c2b53172a0f43622e741",class:"col-12"},a("form-control-file-v2",{key:"cb975ba4e455d2fc5959319a781a084b5af7b9f8",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.cancellation_policy}))))}},u=t({customer_name:c().nullable(),customer_email_address:c().nullable(),customer_billing_address:c().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 i(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i,s;return a("div",{key:"858dcd8508a6ef974faf5b97c04cbd224cea93c0"},a("div",{key:"7aef1bf1aaf5838e8f555b9f8680bc89f255d52c",class:"row gy-3"},a("div",{key:"f206b1c9958b39b242dfe2c899a0a98f16731dff",class:"col-12"},a("h2",{key:"92916cf3952026ce406e52ac70be08cbb9c0e2a4",class:"h5",part:d},"Customer Details")),a("div",{key:"f80d3f7624484c70380035ad1bed0c292d7524b6",class:"col-12"},a("form-control-text",{key:"1f762101dcda20301e4207e26e32d0d9808f141e",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:"dc7b267094e7ff05194b96d5886788f56e31cae6",class:"col-12"},a("form-control-text",{key:"64abb76bb8f9cf640bb4b367facb43355194db2d",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:"8774802d03a56029ee6611820b077496c0032d9e",class:"col-12"},a("form-control-textarea",{key:"2ffdd3ece9bbd6f7206508d96ba6a09e9b51e7e3",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"481cc546dcf904bd2414c096aafe9b034be548c2",class:"col-12"},a("form-control-file-v2",{key:"763c89f78cf205bdf5f30cce01d8d96debfd12b0",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.customer_signature})),a("div",{key:"bf358ed8e708f439877de74f18cb488b3fe65ecd",class:"col-12"},a("form-control-file-v2",{key:"e4c72136e11514b2dddac44a584b343a1846b077",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:c().nullable(),duplicate_charge_explanation:c().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 i(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"a2c44551e8089f9d9f30e99e93c146c160e78f45"},a("div",{key:"9eb60cf652ebfbb37336a350552666b30bd87e1d",class:"row gy-3"},a("div",{key:"ec776dee0a386b87851aca4a275b5aec09f2f78a",class:"col-12"},a("h2",{key:"e6c60f82ded8750f7211ffa7b2790d8572bf67c7",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"6380b5a5be60a61d3bb2adcffad781388da2b6d2",class:"col-12"},a("form-control-text",{key:"b976b506913584ae88d35a30cfc42efb6a20a9e7",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:"f9ae261fbe01a5f4de3491b8ac2c7a1cd59a184d",class:"col-12"},a("form-control-textarea",{key:"cd3bf73a8374411113068c310b14101e8d9ab7fe",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:"f730411437abd1c6a5950e7a768390df2ea2102e",class:"col-12"},a("form-control-file-v2",{key:"8021ee00e94803edf3eb27ec834e05353ba985d5",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:c().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 i(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"b7ccea47ef4631e72192680468e9b5c370089766"},a("div",{key:"b33edf7018fe897a1b6d66edfbdf696fe4c4ad5d",class:"row gy-3"},a("div",{key:"3f191923eb587c7efcdeec93afa830f7045e5ca5",class:"col-12"},a("h2",{key:"6019125067e94159de463ff467f3a26a83efadb6",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"36169fba21ebe835eccbbdfa61665dbbf1922d22",class:"col-12"},a("form-control-text",{key:"5cdd785662b43d8ac46b7ffa165fbf7b1d3008ae",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:"b2b3fdabb36b09c369c887779519000b1f9eb40e",class:"col-12"},a("form-control-file-v2",{key:"f112588b597277444e3d826cd8d94f8699dafc22",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:c().nullable(),service_date:c().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 i(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"116c8109ff66ee49f71dd2942afd87802f0a7c55"},a("div",{key:"ad46e75181ecd8c30ba60c11f4d841ced13e77f0",class:"row gy-3"},a("div",{key:"7247495b2134d3abe73c65f115f82467b0ffbb74",class:"col-12"},a("h2",{key:"c9e1e882662d10242bf287c426fa976580521af8",class:"h5",part:d},"Product & Service Details")),a("div",{key:"4bf80f0e5bbf2fa8f2722bcf55f21339afb6e650",class:"col-12"},a("form-control-text",{key:"0c29fe5584bcaf6329efa1d24eb1a731459a99f6",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:"5a9338d6d046ecc9e9df64cab31c7ba50ce88e7d",class:"col-12"},a("form-control-date",{key:"51e2d0983faf533fa188e0d679446c2b1b17a9ee",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:"237e39cb91eef0d6e5ddcb6c0ff0d4bccb64cfe2",class:"col-12"},a("form-control-file-v2",{key:"5eee43125a7ded5640735f25c9713fc98666df98",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.service_documentation}))))}},x=t({refund_policy_disclosure:c().nullable(),refund_refusal_explanation:c().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 i(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i;return a("div",{key:"70c6484a73b7bb3c794703f08eee51aaedc564f2"},a("div",{key:"26743bb218cfdaaf8f99f75582afc06b45a45584",class:"row gy-3"},a("div",{key:"d9fca9e6a0985cf2c8746b54f26c8fcd4c198382",class:"col-12"},a("h2",{key:"428b73ad90c7f6b73980ff51ce7936dd7fe40217",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"7cbca206b3d9aa7669242b33fdd84712f6d6a49d",class:"col-12"},a("form-control-textarea",{key:"5d7cadc32a5c6f95c0cefc89eb81e1f5d62dafac",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:"bd1bfcea8114595f34bb477c88d18dc9d4094821",class:"col-12"},a("form-control-textarea",{key:"cb08d0e1e206079e97929d4008fc8f5d7561b342",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:"b692266abea088b1818ade9243ffff67d556a196",class:"col-12"},a("form-control-file-v2",{key:"79fe63b4949a3181a4afffffb8ab5676c175774c",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.refund_policy})),a("div",{key:"ce43bc526887e61e58c30aed49e75d23c04d74d1",class:"col-12"},a("form-control-file-v2",{key:"6f743b261c533985aedc5d3dc0d4e706f9ad9a71",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.receipt}))))}},O=t({shipping_carrier:c().nullable(),shipping_tracking_number:c().nullable(),shipping_date:c().nullable(),shipping_address:c().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 i(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i,s;return a("div",{key:"0cf5535a17c98e536665690e19857e6cad62a6dd"},a("div",{key:"bb42bc4f9732c68b59d29b520fa8b72cf0169d60",class:"row gy-3"},a("div",{key:"aff7c671db0b966b128ab05ff574be7f65ae89ae",class:"col-12"},a("h2",{key:"8910100bf94d4ac11f8a252c03d8fa09b4b016ac",class:"h5",part:d},"Shipping Details")),a("div",{key:"392d3d1ca2fb607d3e82b35813e5a39254bb5598",class:"col-12"},a("form-control-text",{key:"c857a5e60c66a1476c509937ccf5907ddb8bb69b",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:"e98ee583d1333752dc20a8aa34d06680910d868b",class:"col-12"},a("form-control-text",{key:"07a9d25aac27fe726cfb216e77c937678f7fa592",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:"f58bb675c12b21dfcabf0e0ef1194627b5652d29",class:"col-12"},a("form-control-date",{key:"546063536d78767b2e81ae7c686a7e761602ee3b",label:"Date Shipped",name:"shipping_date",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"c197611cc502e5cfaf67461eee9cb606d9cdc14a",class:"col-12"},a("form-control-textarea",{key:"2afe4380f738553f308aec1c747152e9f6289d26",label:"Shipping Address",name:"shipping_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"98b0312297d02c4146ad6db2ce3b52235b8c9bb2",class:"col-12"},a("form-control-file-v2",{key:"1781b796e35fdeb9a11485273cc667fca33dedd4",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 a,h as e,H as s}from"./p-DOjVAAtq.js";import{E as c}from"./p-CLHwhyvu.js";import{aa as t,ab as i,ac as b,ad as d,ae as f}from"./p-Dj_zevuD.js";const n=class{constructor(e){a(this,e),this.paging=c,this.params={}}render(){return e(s,{key:"67ec7328221f28064498ebc359ec2100b33df423"},e("nav",{key:"503d4f3c3e236797a1ef6309edb00d8d0c2be345","aria-label":"Table pagination",class:"d-flex justify-content-end gap-3"},e("ul",{key:"9573011f1775928268a0b0932890a6c25050e3fe",class:"pagination m-0"},e("li",{key:"0247aa3068849046f8282124e7e168c381fd6340",class:"page-item "+(this.paging.has_previous?"":" disabled")},e("button",{key:"5608ce502116c96e9400fdfeb0cfb4e64bc25a55",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickPrevious(this.paging.start_cursor)},part:this.paging.has_previous?t:i},e("span",{key:"7c08295d1c5edd4950bb577272a8745e3cd3d692",class:"me-1",part:b},"«"),e("span",{key:"cd766ba6a6e6c31509442537a4f8345f2cd16251",part:d},"Previous"))),e("li",{key:"54c810056bc6d74be7245a47f54c8d4b75068feb",class:"page-item "+(this.paging.has_next?"":" disabled")},e("button",{key:"5ff8d8621accf87017980b527823640061b27c18",class:"page-link",onClick:a=>{a.preventDefault(),this.paging.handleClickNext(this.paging.end_cursor)},part:this.paging.has_next?t:i},e("span",{key:"2dc934a96eb1be000eb7e016507ddc926c68db2a",part:d},"Next"),e("span",{key:"4e7cbcbfd2e29969f2019eacde0a24d07a72cbb3",class:"ms-1",part:f},"»"))))))}};export{n as pagination_menu}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t}from"./p-DOjVAAtq.js";import{r as o}from"./p-Dj_zevuD.js";import{S as s}from"./p-BhCH9S0e.js";import"./p-CZfYo5-1.js";const c=class{constructor(t){e(this,t)}render(){return t(s,{key:"e9d2508bca7640c281b2d7c1240d906f91118027",class:"payment-method"},t("div",{key:"e6cc572415e9eea51645081c70463b51effcd7ef",class:"radio-list-item p-3",part:o,onClick:this.clickHandler,hidden:this.radioButtonHidden},t("form-control-radio",{key:"e57c30cc26f956eedf5511bd8f8c028b4bf08fee",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{c as payment_method_option}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a}from"./p-DOjVAAtq.js";import{c as i,l as r,b as o,U as h,a as
|
|
1
|
+
import{r as t,c as e,h as s,H as a}from"./p-DOjVAAtq.js";import{c as i,l as r,b as o,U as h,a as c}from"./p-Dj_zevuD.js";import{F as l}from"./p-D9Yus-je.js";import"./p-CZfYo5-1.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=c),t}render(){return s(a,{key:"8e5820c8f07562ce28e3b95c4948cb7c311d48d6"},s("div",{key:"1dd0cbd495d132064808cc81bc272b92f7df95af",class:"form-group d-flex flex-column"},s("div",{key:"82f27392fd4bdbb106db3ea4219eeb75d99a7c78",class:"d-flex gap-2"},s("label",{key:"a6ab3679c84b6f22e4c27ac4cb9764e77f97eed3",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"f481b59809157482acd955d8f2bdb60e5a91e164",helpText:this.helpText})),s("input",{key:"6803e25bbd12858678fa08a8230ca91268541624",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(l,{key:"0237d93c756aaea690eda467b0497ce2c0d8c904",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_date}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as n,h as e}from"./p-DOjVAAtq.js";var r="top",i="bottom",o="right",a="left",u="auto",f=[r,i,o,a],c="start",s="end",d="viewport",l="popper",p=f.reduce((function(t,n){return t.concat([n+"-"+c,n+"-"+s])}),[]),h=[].concat(f,[u]).reduce((function(t,n){return t.concat([n,n+"-"+c,n+"-"+s])}),[]),v=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function b(t){return t?(t.nodeName||"").toLowerCase():null}function m(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function y(t){return t instanceof m(t).Element||t instanceof Element}function w(t){return t instanceof m(t).HTMLElement||t instanceof HTMLElement}function x(t){return"undefined"!=typeof ShadowRoot&&(t instanceof m(t).ShadowRoot||t instanceof ShadowRoot)}function O(t){return t.split("-")[0]}var g=Math.max,j=Math.min,k=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function A(){return!/^((?!chrome|android).)*safari/i.test(M())}function E(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),i=1,o=1;n&&w(t)&&(i=t.offsetWidth>0&&k(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&k(r.height)/t.offsetHeight||1);var a=(y(t)?m(t):window).visualViewport,u=!A()&&e,f=(r.left+(u&&a?a.offsetLeft:0))/i,c=(r.top+(u&&a?a.offsetTop:0))/o,s=r.width/i,d=r.height/o;return{width:s,height:d,top:c,right:f+s,bottom:c+d,left:f,x:f,y:c}}function q(t){var n=E(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function B(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&x(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function P(t){return m(t).getComputedStyle(t)}function L(t){return["table","td","th"].indexOf(b(t))>=0}function R(t){return((y(t)?t.ownerDocument:t.document)||window.document).documentElement}function S(t){return"html"===b(t)?t:t.assignedSlot||t.parentNode||(x(t)?t.host:null)||R(t)}function W(t){return w(t)&&"fixed"!==P(t).position?t.offsetParent:null}function T(t){for(var n=m(t),e=W(t);e&&L(e)&&"static"===P(e).position;)e=W(e);return e&&("html"===b(e)||"body"===b(e)&&"static"===P(e).position)?n:e||function(t){var n=/firefox/i.test(M());if(/Trident/i.test(M())&&w(t)&&"fixed"===P(t).position)return null;var e=S(t);for(x(e)&&(e=e.host);w(e)&&["html","body"].indexOf(b(e))<0;){var r=P(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function C(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function H(t,n,e){return g(t,j(n,e))}function I(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function z(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function D(t){return t.split("-")[1]}var V={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _(t){var n,e=t.popper,u=t.popperRect,f=t.placement,c=t.variation,d=t.offsets,l=t.position,p=t.gpuAcceleration,h=t.adaptive,v=t.roundOffsets,b=t.isFixed,y=d.x,w=void 0===y?0:y,x=d.y,O=void 0===x?0:x,g="function"==typeof v?v({x:w,y:O}):{x:w,y:O};w=g.x,O=g.y;var j=d.hasOwnProperty("x"),M=d.hasOwnProperty("y"),A=a,E=r,q=window;if(h){var B=T(e),L="clientHeight",S="clientWidth";B===m(e)&&"static"!==P(B=R(e)).position&&"absolute"===l&&(L="scrollHeight",S="scrollWidth"),(f===r||(f===a||f===o)&&c===s)&&(E=i,O-=(b&&B===q&&q.visualViewport?q.visualViewport.height:B[L])-u.height,O*=p?1:-1),f!==a&&(f!==r&&f!==i||c!==s)||(A=o,w-=(b&&B===q&&q.visualViewport?q.visualViewport.width:B[S])-u.width,w*=p?1:-1)}var W,C=Object.assign({position:l},h&&V),H=!0===v?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:k(t.x*r)/r||0,y:k(e*r)/r||0}}({x:w,y:O},m(e)):{x:w,y:O};return w=H.x,O=H.y,Object.assign({},C,p?((W={})[E]=M?"0":"",W[A]=j?"0":"",W.transform=(q.devicePixelRatio||1)<=1?"translate("+w+"px, "+O+"px)":"translate3d("+w+"px, "+O+"px, 0)",W):((n={})[E]=M?O+"px":"",n[A]=j?w+"px":"",n.transform="",n))}var F={passive:!0},U={left:"right",right:"left",bottom:"top",top:"bottom"};function G(t){return t.replace(/left|right|bottom|top/g,(function(t){return U[t]}))}var J={start:"end",end:"start"};function K(t){return t.replace(/start|end/g,(function(t){return J[t]}))}function N(t){var n=m(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Q(t){return E(R(t)).left+N(t).scrollLeft}function X(t){var n=P(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function Y(t){return["html","body","#document"].indexOf(b(t))>=0?t.ownerDocument.body:w(t)&&X(t)?t:Y(S(t))}function Z(t,n){var e;void 0===n&&(n=[]);var r=Y(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=m(r),a=i?[o].concat(o.visualViewport||[],X(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(Z(S(a)))}function $(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tt(t,n,e){return n===d?$(function(t,n){var e=m(t),r=R(t),i=e.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;var c=A();(c||!c&&"fixed"===n)&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:u+Q(t),y:f}}(t,e)):y(n)?function(t,n){var e=E(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):$(function(t){var n,e=R(t),r=N(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=g(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=g(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Q(t),f=-r.scrollTop;return"rtl"===P(i||e).direction&&(u+=g(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(R(t)))}function nt(t){var n,e=t.reference,u=t.element,f=t.placement,d=f?O(f):null,l=f?D(f):null,p=e.x+e.width/2-u.width/2,h=e.y+e.height/2-u.height/2;switch(d){case r:n={x:p,y:e.y-u.height};break;case i:n={x:p,y:e.y+e.height};break;case o:n={x:e.x+e.width,y:h};break;case a:n={x:e.x-u.width,y:h};break;default:n={x:e.x,y:e.y}}var v=d?C(d):null;if(null!=v){var b="y"===v?"height":"width";switch(l){case c:n[v]=n[v]-(e[b]/2-u[b]/2);break;case s:n[v]=n[v]+(e[b]/2-u[b]/2)}}return n}function et(t,n){void 0===n&&(n={});var e=n.placement,a=void 0===e?t.placement:e,u=n.strategy,c=void 0===u?t.strategy:u,s=n.boundary,p=void 0===s?"clippingParents":s,h=n.rootBoundary,v=void 0===h?d:h,m=n.elementContext,x=void 0===m?l:m,O=n.altBoundary,k=void 0!==O&&O,M=n.padding,A=void 0===M?0:M,q=I("number"!=typeof A?A:z(A,f)),L=t.rects.popper,W=t.elements[k?x===l?"reference":l:x],C=function(t,n,e,r){var i="clippingParents"===n?function(t){var n=Z(S(t)),e=["absolute","fixed"].indexOf(P(t).position)>=0&&w(t)?T(t):t;return y(e)?n.filter((function(t){return y(t)&&B(t,e)&&"body"!==b(t)})):[]}(t):[].concat(n),o=[].concat(i,[e]),a=o.reduce((function(n,e){var i=tt(t,e,r);return n.top=g(i.top,n.top),n.right=j(i.right,n.right),n.bottom=j(i.bottom,n.bottom),n.left=g(i.left,n.left),n}),tt(t,o[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(y(W)?W:W.contextElement||R(t.elements.popper),p,v,c),H=E(t.elements.reference),D=nt({reference:H,element:L,placement:a}),V=$(Object.assign({},L,D)),_=x===l?V:H,F={top:C.top-_.top+q.top,bottom:_.bottom-C.bottom+q.bottom,left:C.left-_.left+q.left,right:_.right-C.right+q.right},U=t.modifiersData.offset;if(x===l&&U){var G=U[a];Object.keys(F).forEach((function(t){var n=[o,i].indexOf(t)>=0?1:-1,e=[r,i].indexOf(t)>=0?"y":"x";F[t]+=G[e]*n}))}return F}function rt(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,u=void 0===a?h:a,c=D(n.placement),s=c?o?p:p.filter((function(t){return D(t)===c})):f,d=s.filter((function(t){return u.indexOf(t)>=0}));0===d.length&&(d=s);var l=d.reduce((function(n,o){return n[o]=et(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[O(o)],n}),{});return Object.keys(l).sort((function(t,n){return l[t]-l[n]}))}var it={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,f=t.name;if(!n.modifiersData[f]._skip){for(var s=e.mainAxis,d=void 0===s||s,l=e.altAxis,p=void 0===l||l,h=e.fallbackPlacements,v=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,w=e.flipVariations,x=void 0===w||w,g=e.allowedAutoPlacements,j=n.options.placement,k=O(j),M=h||(k!==j&&x?function(t){if(O(t)===u)return[];var n=G(t);return[K(t),n,K(n)]}(j):[G(j)]),A=[j].concat(M).reduce((function(t,e){return t.concat(O(e)===u?rt(n,{placement:e,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:g}):e)}),[]),E=n.rects.reference,q=n.rects.popper,B=new Map,P=!0,L=A[0],R=0;R<A.length;R++){var S=A[R],W=O(S),T=D(S)===c,C=[r,i].indexOf(W)>=0,H=C?"width":"height",I=et(n,{placement:S,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),z=C?T?o:a:T?i:r;E[H]>q[H]&&(z=G(z));var V=G(z),_=[];if(d&&_.push(I[W]<=0),p&&_.push(I[z]<=0,I[V]<=0),_.every((function(t){return t}))){L=S,P=!1;break}B.set(S,_)}if(P)for(var F=function(t){var n=A.find((function(n){var e=B.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return L=n,"break"},U=x?3:1;U>0&&"break"!==F(U);U--);n.placement!==L&&(n.modifiersData[f]._skip=!0,n.placement=L,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ot(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function at(t){return[r,o,i,a].some((function(n){return t[n]>=0}))}function ut(t,n,e){void 0===e&&(e=!1);var r,i,o=w(n),a=w(n)&&function(t){var n=t.getBoundingClientRect(),e=k(n.width)/t.offsetWidth||1,r=k(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=R(n),f=E(t,a,e),c={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!e)&&(("body"!==b(n)||X(u))&&(c=(r=n)!==m(r)&&w(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:N(r)),w(n)?((s=E(n,!0)).x+=n.clientLeft,s.y+=n.clientTop):u&&(s.x=Q(u))),{x:f.left+c.scrollLeft-s.x,y:f.top+c.scrollTop-s.y,width:f.width,height:f.height}}function ft(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var ct={placement:"bottom",modifiers:[],strategy:"absolute"};function st(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function dt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?ct:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ct,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],c=!1,s={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;d(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:y(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(n)};var a,c,l=function(t){var n=ft(t);return v.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),c=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return u.orderedModifiers=l.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:s,options:void 0===n?{}:n});f.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!c){var t=u.elements,n=t.reference,e=t.popper;if(st(n,e)){u.rects={reference:ut(n,T(e),"fixed"===u.options.strategy),popper:q(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:s})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){s.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),c=!0}};if(!st(t,n))return s;function d(){f.forEach((function(t){return t()})),f=[]}return s.setOptions(r).then((function(t){!c&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var lt=dt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=m(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,F)})),u&&f.addEventListener("resize",e.update,F),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,F)})),u&&f.removeEventListener("resize",e.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=nt({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,c={placement:O(n.placement),variation:D(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,_(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,_(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];w(i)&&b(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});w(r)&&b(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,u=void 0===i?[0,0]:i,f=h.reduce((function(t,e){return t[e]=function(t,n,e){var i=O(t),u=[a,r].indexOf(i)>=0?-1:1,f="function"==typeof e?e(Object.assign({},n,{placement:t})):e,c=f[0],s=f[1];return c=c||0,s=(s||0)*u,[a,o].indexOf(i)>=0?{x:s,y:c}:{x:c,y:s}}(e,n.rects,u),t}),{}),c=f[n.placement],s=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c.x,n.modifiersData.popperOffsets.y+=s),n.modifiersData[e]=f}},it,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name,f=e.mainAxis,s=void 0===f||f,d=e.altAxis,l=void 0!==d&&d,p=e.tether,h=void 0===p||p,v=e.tetherOffset,b=void 0===v?0:v,m=et(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=O(n.placement),w=D(n.placement),x=!w,k=C(y),M="x"===k?"y":"x",A=n.modifiersData.popperOffsets,E=n.rects.reference,B=n.rects.popper,P="function"==typeof b?b(Object.assign({},n.rects,{placement:n.placement})):b,L="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),R=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,S={x:0,y:0};if(A){if(s){var W,I="y"===k?r:a,z="y"===k?i:o,V="y"===k?"height":"width",_=A[k],F=_+m[I],U=_-m[z],G=h?-B[V]/2:0,J=w===c?E[V]:B[V],K=w===c?-B[V]:-E[V],N=n.elements.arrow,Q=h&&N?q(N):{width:0,height:0},X=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[I],Z=X[z],$=H(0,E[V],Q[V]),tt=x?E[V]/2-G-$-Y-L.mainAxis:J-$-Y-L.mainAxis,nt=x?-E[V]/2+G+$+Z+L.mainAxis:K+$+Z+L.mainAxis,rt=n.elements.arrow&&T(n.elements.arrow),it=null!=(W=null==R?void 0:R[k])?W:0,ot=_+nt-it,at=H(h?j(F,_+tt-it-(rt?"y"===k?rt.clientTop||0:rt.clientLeft||0:0)):F,_,h?g(U,ot):U);A[k]=at,S[k]=at-_}if(l){var ut,ft=A[M],ct="y"===M?"height":"width",st=ft+m["x"===k?r:a],dt=ft-m["x"===k?i:o],lt=-1!==[r,a].indexOf(y),pt=null!=(ut=null==R?void 0:R[M])?ut:0,ht=lt?st:ft-E[ct]-B[ct]-pt+L.altAxis,vt=lt?ft+E[ct]+B[ct]-pt-L.altAxis:dt,bt=h&<?function(t,n,e){var r=H(t,n,e);return r>e?e:r}(ht,ft,vt):H(h?ht:st,ft,h?vt:dt);A[M]=bt,S[M]=bt-ft}n.modifiersData[u]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,u=t.name,c=t.options,s=e.elements.arrow,d=e.modifiersData.popperOffsets,l=O(e.placement),p=C(l),h=[a,o].indexOf(l)>=0?"height":"width";if(s&&d){var v=function(t,n){return I("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:z(t,f))}(c.padding,e),b=q(s),m="y"===p?r:a,y="y"===p?i:o,w=e.rects.reference[h]+e.rects.reference[p]-d[p]-e.rects.popper[h],x=d[p]-e.rects.reference[p],g=T(s),j=g?"y"===p?g.clientHeight||0:g.clientWidth||0:0,k=j/2-b[h]/2+(w/2-x/2),M=H(v[m],k,j-b[h]-v[y]);e.modifiersData[u]=((n={})[p]=M,n.centerOffset=M-k,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&B(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=et(n,{elementContext:"reference"}),u=et(n,{altBoundary:!0}),f=ot(a,r),c=ot(u,i,o),s=at(f),d=at(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:s,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":d})}}]});const pt=class{constructor(e){t(this,e),this.showEvent=n(this,"showEvent"),this.hideEvent=n(this,"hideEvent"),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1}componentDidLoad(){this.popperInstance=lt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.show.bind(this)),this.anchorRef.addEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.addEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.addEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.show.bind(this)),this.anchorRef.addEventListener("blur",this.hide.bind(this)))}disconnectedCallback(){"click"===this.trigger?window.removeEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.removeEventListener("mouseenter",this.show.bind(this)),this.anchorRef.removeEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.removeEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.removeEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.removeEventListener("focus",this.show.bind(this)),this.anchorRef.removeEventListener("blur",this.hide.bind(this)))}handleClick(t){const n=t.composedPath(),e=n.includes(this.anchorRef),r=n.includes(this.popperContentRef);!this.isOpen&&e?this.show():(this.isOpen&&!r||this.isOpen&&e)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return e("div",{key:"3258d815eae7b31323a8c1bca81d46f51fa684de"},e("style",{key:"4ef14405fc58db08baacc2d760484150eb9ba937"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),e("div",{key:"15e316884fbac8bb31d9ce1d60cf81d6346b13a1",class:"popper-content",ref:t=>this.popperContentRef=t},e("slot",{key:"c6ea5b2e88b6cad1e87d82310b8d74e5b4bb6b67"})))}};export{pt as custom_popper}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-DOjVAAtq.js";import{B as e,a as i}from"./p-
|
|
1
|
+
import{h as t}from"./p-DOjVAAtq.js";import{B as e,a as i}from"./p-Bm8T-MOQ.js";import{S as a,T as r}from"./p-Dj_zevuD.js";import{h as n}from"./p-BS7OgSQe.js";const o="nickname,provider_serial_number,status",c={nickname:()=>t("th",{part:a,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:a,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:a,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:a,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:a,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:a,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:a,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:a,scope:"col",title:"The current status of each terminal"},"Status")},s={nickname:(e,i)=>t("td",{part:r(i)},e.nickname),model_name:(e,i)=>t("td",{part:r(i)},e.model_name),id:(e,i)=>t("td",{part:r(i)},e.id),provider:(e,i)=>t("td",{part:r(i)},n(e.provider)),provider_serial_number:(e,i)=>t("td",{part:r(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:r(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:r(i)},e.sub_account_name),status:(a,n)=>t("td",{part:r(n)},t(i,Object.assign({},{connected:{variant:e.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:e.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:e.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:e.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:e.SECONDARY,title:"This terminal is archived",text:"Archived"}}[a.status])))};export{s as a,o as d,c as t}
|