@adyen/adyen-platform-experience-web 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-DCDtBphj.cjs → angle-right-K64mXtoy.cjs} +2 -2
- package/dist/{angle-right-DCDtBphj.cjs.map → angle-right-K64mXtoy.cjs.map} +1 -1
- package/dist/{checkmark-BUtjcpAC.cjs → checkmark-BFOfQ4U3.cjs} +2 -2
- package/dist/{checkmark-BUtjcpAC.cjs.map → checkmark-BFOfQ4U3.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-CtUhQzOt.cjs → checkmark-circle-fill-BV2FvQh0.cjs} +2 -2
- package/dist/{checkmark-circle-fill-CtUhQzOt.cjs.map → checkmark-circle-fill-BV2FvQh0.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-Cpdn8YWp.cjs → checkmark-square-fill-B6rUSLy6.cjs} +2 -2
- package/dist/{checkmark-square-fill-Cpdn8YWp.cjs.map → checkmark-square-fill-B6rUSLy6.cjs.map} +1 -1
- package/dist/{chevron-down-CEgNjZK_.cjs → chevron-down-Cwk2F1N2.cjs} +2 -2
- package/dist/{chevron-down-CEgNjZK_.cjs.map → chevron-down-Cwk2F1N2.cjs.map} +1 -1
- package/dist/{chevron-left-BgN_rxGR.cjs → chevron-left-3kfyOgH8.cjs} +2 -2
- package/dist/{chevron-left-BgN_rxGR.cjs.map → chevron-left-3kfyOgH8.cjs.map} +1 -1
- package/dist/{chevron-right-Jwt5BuB-.cjs → chevron-right-DlSewmYP.cjs} +2 -2
- package/dist/{chevron-right-Jwt5BuB-.cjs.map → chevron-right-DlSewmYP.cjs.map} +1 -1
- package/dist/{chevron-up-B_O0vmIX.cjs → chevron-up-DcHOD7ve.cjs} +2 -2
- package/dist/{chevron-up-B_O0vmIX.cjs.map → chevron-up-DcHOD7ve.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-DztEPGun.cjs → copy-DmBUwp7_.cjs} +2 -2
- package/dist/{copy-DztEPGun.cjs.map → copy-DmBUwp7_.cjs.map} +1 -1
- package/dist/{cross-B9ojc3kB.cjs → cross-JGXC9RPo.cjs} +2 -2
- package/dist/{cross-B9ojc3kB.cjs.map → cross-JGXC9RPo.cjs.map} +1 -1
- package/dist/{cross-circle-fill-Dy_LlcFp.cjs → cross-circle-fill-CepPVSd-.cjs} +2 -2
- package/dist/{cross-circle-fill-Dy_LlcFp.cjs.map → cross-circle-fill-CepPVSd-.cjs.map} +1 -1
- package/dist/da-DK-DzyB6ApY.cjs +2 -0
- package/dist/da-DK-DzyB6ApY.cjs.map +1 -0
- package/dist/de-DE-C_manCYP.cjs +2 -0
- package/dist/de-DE-C_manCYP.cjs.map +1 -0
- package/dist/{download-DsN3U6Xn.cjs → download-BToMR9ry.cjs} +2 -2
- package/dist/{download-DsN3U6Xn.cjs.map → download-BToMR9ry.cjs.map} +1 -1
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +1 -1
- package/dist/es/components/external/DisputeManagement/DisputeManagementElement.js +18 -0
- package/dist/es/components/external/DisputeManagement/components/AcceptDisputeFlow/AcceptDisputeFlow.js +82 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFileUpload.js +212 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFlow.js +21 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeReason.js +128 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeResponse.js +37 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDocumentUpload.js +60 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/SelectAndUploadOptionalDoc.js +108 -0
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/constants.js +13 -0
- package/dist/es/components/external/DisputeManagement/components/DisputeDetails/DisputeDetails.js +38 -0
- package/dist/es/components/external/DisputeManagement/components/DisputeDetailsContainer/DisputeDetailsContainer.js +14 -0
- package/dist/es/components/external/DisputeManagement/components/DisputesData/DisputeData.js +212 -0
- package/dist/es/components/external/DisputeManagement/components/DisputesData/DisputeDataProperties.js +196 -0
- package/dist/es/components/external/DisputeManagement/components/DisputesData/DisputeIssuerComments.js +56 -0
- package/dist/es/components/external/DisputeManagement/components/DisputesData/constants.js +44 -0
- package/dist/es/components/external/DisputeManagement/context/dispute/context.js +105 -0
- package/dist/es/components/external/DisputeManagement/utils/index.js +22 -0
- package/dist/es/components/external/DisputesOverview/DisputesOverviewElement.js +25 -0
- package/dist/es/components/external/DisputesOverview/components/DisputeManagementModal/DisputeManagementModal.js +53 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesContainer/DisputesContainer.js +21 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesOverview/DisputesOverview.js +214 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesOverview/constants.js +7 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesTable/DisputeStatusTag.js +14 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesTable/DisputesTable.js +178 -0
- package/dist/es/components/external/DisputesOverview/components/DisputesTable/constants.js +4 -0
- package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +6 -6
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +1 -1
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +9 -9
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +138 -122
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionStatusTag.js +23 -0
- package/dist/es/components/external/TransactionDetails/components/constants.js +17 -21
- package/dist/es/components/external/TransactionDetails/components/utils.js +10 -16
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +16 -12
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +7 -2
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +12 -12
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +63 -37
- package/dist/es/components/internal/Button/constants.js +10 -9
- package/dist/es/components/internal/Button/hooks/useButton.js +43 -33
- package/dist/es/components/internal/Card/Card.js +61 -31
- package/dist/es/components/internal/Card/constants.js +11 -8
- package/dist/es/components/internal/DataGrid/DataGrid.js +45 -42
- package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +41 -34
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +24 -23
- package/dist/es/components/internal/FormFields/FileInput/FileInput.js +53 -0
- package/dist/es/components/internal/FormFields/FileInput/components/Dropzone.js +142 -0
- package/dist/es/components/internal/FormFields/FileInput/components/UploadedFile.js +37 -0
- package/dist/es/components/internal/FormFields/FileInput/constants.js +12 -0
- package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +21 -20
- package/dist/es/components/internal/FormFields/Select/Select.js +49 -47
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +34 -32
- package/dist/es/components/internal/Icon/Icon.js +8 -7
- package/dist/es/components/internal/Modal/ModalContent/ModalContent.js +9 -9
- package/dist/es/components/internal/Popover/Popover.js +99 -83
- package/dist/es/components/internal/Popover/PopoverContainer.js +36 -0
- package/dist/es/components/internal/Popover/types.js +2 -2
- package/dist/es/components/internal/Popover/utils/utils.js +23 -23
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +22 -22
- package/dist/es/components/internal/StatusBox/StatusBox.js +18 -0
- package/dist/es/components/internal/StatusBox/constants.js +11 -0
- package/dist/es/components/internal/StatusBox/useStatusBox.js +17 -0
- package/dist/es/components/internal/StatusBox/utils.js +9 -0
- package/dist/es/components/internal/Tabs/Tabs.js +47 -0
- package/dist/es/components/internal/Tag/Tag.js +7 -7
- package/dist/es/components/internal/Tooltip/Tooltip.js +28 -32
- package/dist/es/components/utils/disputes/actionNeeded.js +26 -0
- package/dist/es/components/utils/disputes/constants.js +45 -0
- package/dist/es/components/utils/disputes/getDisputesErrorMessage.js +36 -0
- package/dist/es/config/disputes/defenseDocumentConfig.json.js +233 -0
- package/dist/es/config/disputes/defenseReasonConfig.json.js +225 -0
- package/dist/es/constants/dateFormats.js +29 -15
- package/dist/es/core/ConfigContext/session/utils/sessionAwareComponentAvailability/helpers/componentAvailabilityRegistry.js +11 -9
- package/dist/es/core/Http/http.js +14 -14
- package/dist/es/core/Http/utils.js +43 -30
- package/dist/es/core/core.js +1 -1
- package/dist/es/hooks/element/usePopoverPositioner.js +152 -79
- package/dist/es/hooks/useBalanceAccountSelection.js +33 -13
- package/dist/es/hooks/useCommitAction/useCommitAction.js +21 -21
- package/dist/es/hooks/useTabbedControl.js +61 -44
- package/dist/es/hooks/useTableColumns.js +24 -23
- package/dist/es/hooks/useTrackedRef.js +19 -0
- package/dist/es/images/icons/plus.svg.js +6 -0
- package/dist/es/index.js +30 -26
- package/dist/es/translations/da-DK.json.js +654 -166
- package/dist/es/translations/de-DE.json.js +682 -194
- package/dist/es/translations/en-US.json.js +664 -176
- package/dist/es/translations/es-ES.json.js +665 -177
- package/dist/es/translations/fi-FI.json.js +686 -198
- package/dist/es/translations/fr-FR.json.js +661 -173
- package/dist/es/translations/it-IT.json.js +690 -202
- package/dist/es/translations/nl-NL.json.js +686 -198
- package/dist/es/translations/no-NO.json.js +666 -178
- package/dist/es/translations/pt-BR.json.js +690 -202
- package/dist/es/translations/sv-SE.json.js +693 -205
- package/dist/es/utils/file/size.js +22 -0
- package/dist/es/utils/file/upload.js +15 -0
- package/dist/es-ES-D4yWVVk4.cjs +2 -0
- package/dist/es-ES-D4yWVVk4.cjs.map +1 -0
- package/dist/{external-link-DgHiKqPL.cjs → external-link-BRDaK3Bx.cjs} +2 -2
- package/dist/{external-link-DgHiKqPL.cjs.map → external-link-BRDaK3Bx.cjs.map} +1 -1
- package/dist/fi-FI-ziHSaIAM.cjs +2 -0
- package/dist/fi-FI-ziHSaIAM.cjs.map +1 -0
- package/dist/{filter-C7stlLTD.cjs → filter-DXSSpM1j.cjs} +2 -2
- package/dist/{filter-C7stlLTD.cjs.map → filter-DXSSpM1j.cjs.map} +1 -1
- package/dist/fr-FR-B-twXuu4.cjs +2 -0
- package/dist/fr-FR-B-twXuu4.cjs.map +1 -0
- package/dist/index-BKTWT4wv.cjs +12 -0
- package/dist/index-BKTWT4wv.cjs.map +1 -0
- package/dist/{info-filled-Bk8waEjd.cjs → info-filled-CqqSx6ab.cjs} +2 -2
- package/dist/{info-filled-Bk8waEjd.cjs.map → info-filled-CqqSx6ab.cjs.map} +1 -1
- package/dist/it-IT-CNU9GJon.cjs +2 -0
- package/dist/it-IT-CNU9GJon.cjs.map +1 -0
- package/dist/{minus-circle-outline-8LuhQHmx.cjs → minus-circle-outline-C_OF3LwJ.cjs} +2 -2
- package/dist/{minus-circle-outline-8LuhQHmx.cjs.map → minus-circle-outline-C_OF3LwJ.cjs.map} +1 -1
- package/dist/nl-NL-CWr5RWqD.cjs +2 -0
- package/dist/nl-NL-CWr5RWqD.cjs.map +1 -0
- package/dist/no-NO-CU-dleiK.cjs +2 -0
- package/dist/no-NO-CU-dleiK.cjs.map +1 -0
- package/dist/plus-CW8c0zs1.cjs +2 -0
- package/dist/plus-CW8c0zs1.cjs.map +1 -0
- package/dist/{plus-circle-outline-x53czuRo.cjs → plus-circle-outline-DJ6zGU6z.cjs} +2 -2
- package/dist/{plus-circle-outline-x53czuRo.cjs.map → plus-circle-outline-DJ6zGU6z.cjs.map} +1 -1
- package/dist/pt-BR-DJUsdwmX.cjs +2 -0
- package/dist/pt-BR-DJUsdwmX.cjs.map +1 -0
- package/dist/{square-BzY0pIfq.cjs → square-2HAeIvAR.cjs} +2 -2
- package/dist/{square-BzY0pIfq.cjs.map → square-2HAeIvAR.cjs.map} +1 -1
- package/dist/sv-SE-Btn3_SAD.cjs +2 -0
- package/dist/sv-SE-Btn3_SAD.cjs.map +1 -0
- package/dist/{trash-can-oPrHRWRq.cjs → trash-can-BLQ5Pm8W.cjs} +2 -2
- package/dist/{trash-can-oPrHRWRq.cjs.map → trash-can-BLQ5Pm8W.cjs.map} +1 -1
- package/dist/types/components/external/DisputeManagement/DisputeManagementElement.d.ts +10 -0
- package/dist/types/components/external/DisputeManagement/DisputeManagementElement.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/AcceptDisputeFlow/AcceptDisputeFlow.d.ts +4 -0
- package/dist/types/components/external/DisputeManagement/components/AcceptDisputeFlow/AcceptDisputeFlow.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFileUpload.d.ts +3 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFileUpload.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFlow.d.ts +4 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFlow.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeReason.d.ts +2 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeReason.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeResponse.d.ts +4 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeResponse.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDocumentUpload.d.ts +8 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDocumentUpload.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/SelectAndUploadOptionalDoc.d.ts +15 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/SelectAndUploadOptionalDoc.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/constants.d.ts +5 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/constants.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/types.d.ts +6 -0
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/types.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputeDetails/DisputeDetails.d.ts +4 -0
- package/dist/types/components/external/DisputeManagement/components/DisputeDetails/DisputeDetails.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputeDetailsContainer/DisputeDetailsContainer.d.ts +5 -0
- package/dist/types/components/external/DisputeManagement/components/DisputeDetailsContainer/DisputeDetailsContainer.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeData.d.ts +12 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeData.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeDataProperties.d.ts +12 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeDataProperties.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeIssuerComments.d.ts +5 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeIssuerComments.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/constants.d.ts +28 -0
- package/dist/types/components/external/DisputeManagement/components/DisputesData/constants.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/context/dispute/context.d.ts +31 -0
- package/dist/types/components/external/DisputeManagement/context/dispute/context.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/index.d.ts +3 -0
- package/dist/types/components/external/DisputeManagement/index.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/types.d.ts +18 -0
- package/dist/types/components/external/DisputeManagement/types.d.ts.map +1 -0
- package/dist/types/components/external/DisputeManagement/utils/index.d.ts +9 -0
- package/dist/types/components/external/DisputeManagement/utils/index.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/DisputesOverviewElement.d.ts +9 -0
- package/dist/types/components/external/DisputesOverview/DisputesOverviewElement.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputeManagementModal/DisputeManagementModal.d.ts +17 -0
- package/dist/types/components/external/DisputesOverview/components/DisputeManagementModal/DisputeManagementModal.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesContainer/DisputesContainer.d.ts +4 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesContainer/DisputesContainer.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesOverview/DisputesOverview.d.ts +9 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesOverview/DisputesOverview.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesOverview/constants.d.ts +5 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesOverview/constants.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/DisputeStatusTag.d.ts +7 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/DisputeStatusTag.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/DisputesTable.d.ts +49 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/DisputesTable.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/constants.d.ts +2 -0
- package/dist/types/components/external/DisputesOverview/components/DisputesTable/constants.d.ts.map +1 -0
- package/dist/types/components/external/DisputesOverview/index.d.ts +2 -0
- package/dist/types/components/external/DisputesOverview/index.d.ts.map +1 -0
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionStatusTag.d.ts +8 -0
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionStatusTag.d.ts.map +1 -0
- package/dist/types/components/external/TransactionDetails/components/utils.d.ts +0 -2
- package/dist/types/components/external/TransactionDetails/components/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/hooks/useTransaction/useTransaction.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts +0 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts +3 -3
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts +4 -4
- package/dist/types/components/external/index.d.ts +2 -0
- package/dist/types/components/external/index.d.ts.map +1 -1
- package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts +4 -2
- package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts.map +1 -1
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +91 -2
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
- package/dist/types/components/internal/Button/constants.d.ts +1 -0
- package/dist/types/components/internal/Button/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Button/hooks/useButton.d.ts +1 -0
- package/dist/types/components/internal/Button/hooks/useButton.d.ts.map +1 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -0
- package/dist/types/components/internal/Button/types.d.ts.map +1 -1
- package/dist/types/components/internal/Card/Card.d.ts +2 -1
- package/dist/types/components/internal/Card/Card.d.ts.map +1 -1
- package/dist/types/components/internal/Card/constants.d.ts +3 -0
- package/dist/types/components/internal/Card/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Card/types.d.ts +2 -0
- package/dist/types/components/internal/Card/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/types.d.ts +1 -0
- package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts.map +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts +2 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/FileInput/FileInput.d.ts +7 -0
- package/dist/types/components/internal/FormFields/FileInput/FileInput.d.ts.map +1 -0
- package/dist/types/components/internal/FormFields/FileInput/components/Dropzone.d.ts +7 -0
- package/dist/types/components/internal/FormFields/FileInput/components/Dropzone.d.ts.map +1 -0
- package/dist/types/components/internal/FormFields/FileInput/components/UploadedFile.d.ts +5 -0
- package/dist/types/components/internal/FormFields/FileInput/components/UploadedFile.d.ts.map +1 -0
- package/dist/types/components/internal/FormFields/FileInput/constants.d.ts +10 -0
- package/dist/types/components/internal/FormFields/FileInput/constants.d.ts.map +1 -0
- package/dist/types/components/internal/FormFields/FileInput/types.d.ts +29 -0
- package/dist/types/components/internal/FormFields/FileInput/types.d.ts.map +1 -0
- package/dist/types/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +4 -4
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -2
- package/dist/types/components/internal/FormFields/Select/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/index.d.ts +2 -2
- package/dist/types/components/internal/Icon/Icon.d.ts +1 -0
- package/dist/types/components/internal/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/PopoverContainer.d.ts +6 -0
- package/dist/types/components/internal/Popover/PopoverContainer.d.ts.map +1 -0
- package/dist/types/components/internal/Popover/types.d.ts +10 -3
- package/dist/types/components/internal/Popover/types.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/utils/utils.d.ts +1 -1
- package/dist/types/components/internal/Popover/utils/utils.d.ts.map +1 -1
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/components/internal/SegmentedControl/types.d.ts +6 -6
- package/dist/types/components/internal/SegmentedControl/types.d.ts.map +1 -1
- package/dist/types/components/internal/StatusBox/StatusBox.d.ts +22 -0
- package/dist/types/components/internal/StatusBox/StatusBox.d.ts.map +1 -0
- package/dist/types/components/internal/StatusBox/constants.d.ts +9 -0
- package/dist/types/components/internal/StatusBox/constants.d.ts.map +1 -0
- package/dist/types/components/internal/StatusBox/useStatusBox.d.ts +16 -0
- package/dist/types/components/internal/StatusBox/useStatusBox.d.ts.map +1 -0
- package/dist/types/components/internal/StatusBox/utils.d.ts +9 -0
- package/dist/types/components/internal/StatusBox/utils.d.ts.map +1 -0
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
- package/dist/types/components/internal/Tabs/Tabs.d.ts +5 -0
- package/dist/types/components/internal/Tabs/Tabs.d.ts.map +1 -0
- package/dist/types/components/internal/Tabs/types.d.ts +14 -0
- package/dist/types/components/internal/Tabs/types.d.ts.map +1 -0
- package/dist/types/components/internal/Tag/Tag.d.ts +2 -1
- package/dist/types/components/internal/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/internal/Tag/types.d.ts +1 -1
- package/dist/types/components/internal/Tag/types.d.ts.map +1 -1
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +9 -1
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/components/utils/disputes/actionNeeded.d.ts +16 -0
- package/dist/types/components/utils/disputes/actionNeeded.d.ts.map +1 -0
- package/dist/types/components/utils/disputes/constants.d.ts +43 -0
- package/dist/types/components/utils/disputes/constants.d.ts.map +1 -0
- package/dist/types/components/utils/disputes/getDisputesErrorMessage.d.ts +5 -0
- package/dist/types/components/utils/disputes/getDisputesErrorMessage.d.ts.map +1 -0
- package/dist/types/components/utils/getErrorMessage.d.ts.map +1 -1
- package/dist/types/constants/dateFormats.d.ts +3 -0
- package/dist/types/constants/dateFormats.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/context.d.ts +483 -2
- package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts +966 -4
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts +483 -2
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/utils/sessionAwareComponentAvailability/helpers/componentAvailabilityRegistry.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/types.d.ts +4 -1
- package/dist/types/core/ConfigContext/types.d.ts.map +1 -1
- package/dist/types/core/Http/http.d.ts.map +1 -1
- package/dist/types/core/Http/utils.d.ts +3 -0
- package/dist/types/core/Http/utils.d.ts.map +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts +6 -3
- package/dist/types/hooks/element/usePopoverPositioner.d.ts.map +1 -1
- package/dist/types/hooks/useBalanceAccountSelection.d.ts +3 -2
- package/dist/types/hooks/useBalanceAccountSelection.d.ts.map +1 -1
- package/dist/types/hooks/useCommitAction/useCommitAction.d.ts.map +1 -1
- package/dist/types/hooks/useCustomColumnsData.d.ts +1 -1
- package/dist/types/hooks/useDefaultOverviewFilterParams.d.ts +1 -1
- package/dist/types/hooks/useDefaultOverviewFilterParams.d.ts.map +1 -1
- package/dist/types/hooks/useModalDetails/index.d.ts +2 -0
- package/dist/types/hooks/useModalDetails/index.d.ts.map +1 -0
- package/dist/types/hooks/useTabbedControl.d.ts +8 -9
- package/dist/types/hooks/useTabbedControl.d.ts.map +1 -1
- package/dist/types/hooks/useTableColumns.d.ts +4 -2
- package/dist/types/hooks/useTableColumns.d.ts.map +1 -1
- package/dist/types/hooks/useTrackedRef.d.ts +9 -0
- package/dist/types/hooks/useTrackedRef.d.ts.map +1 -0
- package/dist/types/translations/index.d.ts +488 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/endpoints.d.ts +3 -2
- package/dist/types/types/api/endpoints.d.ts.map +1 -1
- package/dist/types/types/api/models/disputes.d.ts +12 -0
- package/dist/types/types/api/models/disputes.d.ts.map +1 -0
- package/dist/types/types/api/models/transactions.d.ts +3 -0
- package/dist/types/types/api/models/transactions.d.ts.map +1 -1
- package/dist/types/types/api/resources/DisputesResource.d.ts +575 -0
- package/dist/types/types/api/resources/DisputesResource.d.ts.map +1 -0
- package/dist/types/types/api/resources/SetupResource.d.ts +10 -10
- package/dist/types/types/api/resources/SetupResource.d.ts.map +1 -1
- package/dist/{upload-CEAJdOXV.cjs → upload-C9Z9qRuS.cjs} +2 -2
- package/dist/{upload-CEAJdOXV.cjs.map → upload-C9Z9qRuS.cjs.map} +1 -1
- package/dist/{warning-BzXJLvmN.cjs → warning-CIRG3GTY.cjs} +2 -2
- package/dist/{warning-BzXJLvmN.cjs.map → warning-CIRG3GTY.cjs.map} +1 -1
- package/dist/{warning-filled-P8HTOKkP.cjs → warning-filled-3hD1yAKv.cjs} +2 -2
- package/dist/{warning-filled-P8HTOKkP.cjs.map → warning-filled-3hD1yAKv.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/da-DK-DAJvnb2s.cjs +0 -2
- package/dist/da-DK-DAJvnb2s.cjs.map +0 -1
- package/dist/de-DE-DFMmcoWN.cjs +0 -2
- package/dist/de-DE-DFMmcoWN.cjs.map +0 -1
- package/dist/es/components/external/TransactionDetails/components/details/TransactionStatusBox.js +0 -53
- package/dist/es/style/index.scss.js +0 -1
- package/dist/es-ES-DWJu_JsZ.cjs +0 -2
- package/dist/es-ES-DWJu_JsZ.cjs.map +0 -1
- package/dist/fi-FI-MXUK5vu0.cjs +0 -2
- package/dist/fi-FI-MXUK5vu0.cjs.map +0 -1
- package/dist/fr-FR-NK-BqBuh.cjs +0 -2
- package/dist/fr-FR-NK-BqBuh.cjs.map +0 -1
- package/dist/index-ejbaSyzM.cjs +0 -12
- package/dist/index-ejbaSyzM.cjs.map +0 -1
- package/dist/it-IT-CckThmyL.cjs +0 -2
- package/dist/it-IT-CckThmyL.cjs.map +0 -1
- package/dist/nl-NL-73Hql9dE.cjs +0 -2
- package/dist/nl-NL-73Hql9dE.cjs.map +0 -1
- package/dist/no-NO-C5RVnfc6.cjs +0 -2
- package/dist/no-NO-C5RVnfc6.cjs.map +0 -1
- package/dist/pt-BR-DR3yYVRn.cjs +0 -2
- package/dist/pt-BR-DR3yYVRn.cjs.map +0 -1
- package/dist/sv-SE-C92aO-iv.cjs +0 -2
- package/dist/sv-SE-C92aO-iv.cjs.map +0 -1
- package/dist/types/components/external/TransactionDetails/components/details/TransactionStatusBox.d.ts +0 -8
- package/dist/types/components/external/TransactionDetails/components/details/TransactionStatusBox.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";var hf=Object.defineProperty;var dl=e=>{throw TypeError(e)};var pf=(e,t,n)=>t in e?hf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>pf(e,typeof t!="symbol"?t+"":t,n),ia=(e,t,n)=>t.has(e)||dl("Cannot "+n);var m=(e,t,n)=>(ia(e,t,"read from private field"),n?n.call(e):t.get(e)),$=(e,t,n)=>t.has(e)?dl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,s)=>(ia(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),X=(e,t,n)=>(ia(e,t,"access private method"),n);var Un=(e,t,n,s)=>({set _(r){k(e,t,r,n)},get _(){return m(e,t,s)}});const M=require("classnames"),Sa="test",ff=e=>{var t;return(t=e==null?void 0:e.replace)==null?void 0:t.call(e,/([^\/])$/,"$1/")},mf=e=>e==null?void 0:e.replace(/^([^\/])/,"/$1"),_f=(()=>{const e={test:"https://platform-components-external-test.adyen.com/platform-components-external/api/",live:"https://platform-components-external-live.adyen.com/platform-components-external/api/"};return t=>e[t??Sa]||e[Sa]})(),is=Function.prototype.bind.bind(Function.prototype.call),gf=async()=>{},po=e=>e,ue=()=>{},Tf=is(Object.prototype.toString),yf=e=>Tf(e).slice(8,-1),Vd=e=>(Object.keys(e).forEach(t=>{const n=e[t];n&&typeof n=="object"&&!Object.isFrozen(n)&&Vd(n)}),Object.freeze(e)),Ea=e=>e===!!e,ee=e=>typeof e=="function",zo=e=>e===null,xe=e=>e==null,pr=e=>typeof e=="number",vi=e=>yf(e)==="Object",Ot=e=>typeof e=="string",Af=e=>typeof e=="symbol",oe=e=>e===void 0,Dt=(e,t,n)=>(Math.min(e,n)!==e&&([e,n]=[n,e]),Math.max(e,Math.min(t,n))),Mr=e=>!Af(e)&&e===~~e,ts=e=>pr(e)&&1/e===0,zd=(e,t)=>{if(Number.isInteger(e)&&Number.isInteger(t))return e+Math.floor((t-e)/2);throw TypeError(`Expects 2 integer values: [${e}, ${t}]`)},fo=(e,t)=>(e%t+t)%t,ul="abort",vf="signal is aborted without reason",Ts=(e,t=e)=>Ea(e)?e:!!t,Ve=e=>e===!0,tn=e=>e!==!1,Rf=e=>!1,Na=e=>!0,K=(e,t=!1)=>({writable:Ve(t),enumerable:!0,value:e}),Ae=(e,t=!0)=>({enumerable:tn(t),get:e}),Qt=is(Object.prototype.hasOwnProperty),as=(e,t)=>e===t||!(e===e||t===t);if(!Qt(AbortSignal.prototype,"reason"))try{Object.defineProperty(AbortSignal.prototype,"reason",{...Ae(function(){return this.aborted?xr():void 0},!0),configurable:!0})}catch{}Qt(AbortSignal.prototype,"throwIfAborted")||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason??xr()});const xr=(e=vf)=>new DOMException(e,"AbortError"),Xd=(e,t)=>{if(!as(e.reason,t))try{Object.defineProperty(e,"reason",K(t))}catch{}return e},Cf=(e=xr())=>{if("abort"in AbortSignal)return AbortSignal.abort(e);const t=new AbortController,n=oe(e)?xr():e,{signal:s}=t;return t.abort(n),Xd(s,n),s},Ri=e=>{if("any"in AbortSignal)return AbortSignal.any(e);let t=new Set,n=new AbortController;const{signal:s}=n;let r=function(){t.forEach(i=>i.removeEventListener(ul,r)),t.clear();const a=(this==null?void 0:this.reason)??xr();n.abort(a),Xd(s,a),n=t=r=void 0};e:{const a=Symbol("<NIL_EXCEPTION>");let i=a;t:{try{for(const c of e){if(!mo(c))throw new TypeError("Failed to convert value to 'AbortSignal'");if(c.aborted)break t;t.add(c)}}catch(c){i=c;break t}t.forEach(c=>c.addEventListener(ul,r));break e}if(r.call(s),i!==a)throw i}return s},mo=e=>e instanceof AbortSignal,Se=Object.freeze([]),z=Object.freeze(Object.create(null)),rr=Promise.resolve();Promise.race(Se);const Ln=function(e,...t){return new Promise(n=>n(e.call(this,...t)))},Sf=(e,t,n)=>{let s=t.get(e);return oe(s)&&ee(n)&&(oe(s=n(e,t))||t.set(e,s)),s},Gn=(e,t=Se)=>{const n=`${e||""}`.trim(),s=n?n.split(/(?:\s*,\s*)+/).filter(po):Se;return s.length?s:t},Tr=(e,t,n)=>e.includes(t)?t:xe(t)?e[0]:e.includes(n)?n:e[0],hl=is(Array.prototype.some),Kd=function e(t,n,s=new Set){for(const r of n)Array.isArray(r)?e(t,r,s):(t&&s.delete(r),s.add(r));return s};is(Kd,void 0,!1);is(Kd,void 0,!0);const ic=(...e)=>{const[t]=e,s=(e.length>=2?new Date(...e):t instanceof Date?t:new Date(Ot(t)||Number.isFinite(t)?t:void 0)).getTime();return Number.isFinite(s)?s:void 0},Ef=3,Nf=e=>e<=1?0:Math.floor(Math.log(e)/Math.log(1024)),Df=e=>{let t=0,n=Math.max(0,Math.round(e));return n>999&&(t=Dt(1,Nf(n),Ef),n=Math.round(Number((n/1024**t).toPrecision(3))*10)/10),{scale:t,size:n}},Zd=e=>{const{scale:t,size:n}=Df(e);switch(t){case 0:return`${n} byte${n===1?"":"s"}`;case 1:return`${n} KB`;case 2:return`${n} MB`;case 3:return`${n} GB`}},bf=e=>{const t=new Set;if(e!=null&&e.items)for(const n of e.items){if(n.kind!=="file")continue;const s=n.getAsFile();s&&t.add(s)}return Array.from(t.size===0?new Set((e==null?void 0:e.files)??t):t)},Rn=(()=>{let e=Date.now();return(t="adyen-pe")=>`${t}-${++e}`})(),Ci=(()=>{const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";return()=>e.replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t=="x"?n:n&3|8).toString(16)})})(),Br=(e,t=z)=>vi(e)?e:Br(t,z),fr=is(Object.create,void 0),de=is(fr,void 0,null),Si=(e=z)=>Object.freeze({...e,defineProperty:Na,set:Na}),Of=e=>e&&(e==null?void 0:e.length)>0?`${e[0].toUpperCase()}${e.slice(1)}`:e,Da=e=>xe(e)||Ot(e)&&/^\s*$/.test(e),If="/setup",Pf=Ve(void 0),pl=(()=>{let e=0;if(Number.isFinite(e)&&(e=Math.max(0,~~e)))return e})();class ba extends Error{constructor(n,s,r,a){super(r);Y(this,"type");Y(this,"errorCode");Y(this,"requestId");this.type=n,this.name=n,this.errorCode=a,this.requestId=s}}const kf=/^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;var $r=(e=>(e.HTTP_ERROR="HTTP_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.CANCEL="CANCEL",e.IMPLEMENTATION_ERROR="IMPLEMENTATION_ERROR",e.ERROR="ERROR",e.EXPIRED_TOKEN="EXPIRED_TOKEN",e))($r||{});const wf=e=>{switch(e){case 401:return"EXPIRED_TOKEN";default:return"HTTP_ERROR"}},Lf=e=>{var t;return(t=e.headers.get("Content-Type"))==null?void 0:t.split(";",1)[0]},Ff=e=>{const n=(e.headers.get("Content-Disposition")??"").replace(kf,"$2$3");return decodeURIComponent(n)},Mf=(e,t)=>{switch(t){case"application/json":return JSON.stringify(e);case"multipart/form-data":return e instanceof FormData?e:new FormData;default:return String(e)}},xf=e=>{var a;const{headers:t=[],method:n="GET"}=e,s="1.6.1",r=((a=e.contentType)==null?void 0:a.toLowerCase())??"application/json";return{method:n,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*",...t,...r&&r!=="multipart/form-data"&&{"Content-Type":r},"SDK-Version":s},redirect:"follow",signal:e.signal,referrerPolicy:"no-referrer-when-downgrade",...n==="POST"&&e.body&&{body:Mf(e.body,r)}}};function Bf({message:e,level:t,errorCode:n,type:s="NETWORK_ERROR",requestId:r}){switch(t){case"silent":break;case"info":case"warn":console[t](e);break;case"error":default:throw new ba(s,r,e,n)}}function $f(e){return e&&e.errorCode&&e.type&&(e.detail||e.invalidFields)&&e.status}function Uf(e){const t=new URLSearchParams;for(const n of Object.keys(e)){const s=e[n];xe(s)||(Array.isArray(s)?s.forEach(r=>t.append(n,r)):t.set(n,String(s)))}return t}const Qd=e=>{let t,n,s;const r=()=>{if(oe(t))return;const d=t.abort.bind(t);t=void 0,d()},a=()=>(s=new Promise((d,l)=>{if(n.addEventListener("abort",function u(){n.removeEventListener("abort",u),l(e)}),n.aborted)throw e}),s.catch(ue),s),i=()=>(oe(t)&&(t=new AbortController,n=t.signal,s=a()),c),c=de({abort:K(r),promise:Ae(()=>s),reason:K(e),refresh:K(i),signal:Ae(()=>n)});return i()},Jd=()=>{let e,t,n;const s=()=>{const a=n??ue,i=new Promise((c,d)=>{n=c,t=d});return a(e=i),r},r=de({promise:Ae(()=>e),refresh:K(s),reject:K(a=>t(a)),resolve:K(a=>n(a))});return s()},_o=e=>{const t=Qd(),n=Jd();let s;return Object.defineProperties(function(...a){oe(s)?n.refresh():t.abort();const i=Ln.call(this,e,t.refresh().signal,...a);return(async()=>{let c=s===(s=i);try{const d=await i.finally(()=>{c=s===i,c&&(s=void 0)});c&&n.resolve(d)}catch(d){c&&n.reject(d)}})(),i},{abort:K(t.abort),promise:Ae(()=>n.promise),refresh:K(()=>void n.refresh())})};class Hf{constructor(t){Y(this,"_endpoints",z);Y(this,"_extraConfig",z);Y(this,"_revokeEndpointsProxy",ue);Y(this,"_beforeHttp",async()=>{await this._refreshPromisor.promise.catch(ue)});Y(this,"_refreshPromisor",_o((t,n)=>{const s=mo(n)?Ri([n,t]):t;return this._fetchSetupEndpoint(s)}));this._session=t;let n;this.refresh=s=>(this._refreshPromisor(s).catch(ue),n??(n=this._refreshPromisor.promise.finally(()=>n=void 0).then(({endpoints:r,...a})=>{this._resetEndpoints(),{proxy:this._endpoints,revoke:this._revokeEndpointsProxy}=this._getEndpointsProxy(r),this._extraConfig=Vd(a)})))}get endpoints(){return this._endpoints}get extraConfig(){return this._extraConfig}_fetchSetupEndpoint(t){return this._session.http(null,{method:"POST",path:If,errorLevel:"fatal",loadingContext:this.loadingContext,signal:t})}_getEndpointsProxy(t){const n=new Set(Object.keys(t)),s=de();return Proxy.revocable(z,Si({get:(r,a,i)=>n.has(a)?(s[a]??(s[a]=(()=>{const{method:c="GET",url:d}=t[a];if(!oe(d||void 0))return(...l)=>{const u=this._getHttpOptions(c,d,...l);return this._session.http(this._beforeHttp,u)}})()),s[a]):Reflect.get(r,a,i)}))}_getHttpOptions(t,n,...s){const{loadingContext:r}=this,[a,i]=s,{path:c,query:d}=Br(i),l=d&&Uf(d);if(vi(c))for(const u of Object.keys(c))n=n.replace(`{${u}}`,c[u]);return{loadingContext:r,...a,method:t,params:l,path:n}}_resetEndpoints(){this._revokeEndpointsProxy(),this._revokeEndpointsProxy=ue,this._endpoints=z}}const eu=Symbol("Error<SESSION_EXPIRED>"),Wf=Symbol("Error<SESSION_FACTORY_UNAVAILABLE>"),Gf=Symbol("Error<SESSION_HTTP_UNAVAILABLE>"),Yf=Symbol("Error<SESSION_INVALID>"),tu=Symbol("Error<SESSION_REFRESH_ABORTED>"),Ei="_sessionExpired",nu="_sessionReady",qf="_sessionRefreshed",jf="_sessionRefreshingEnd",Vf="_sessionRefreshingStart",su="_session.deadline",ru="_session.ready",ou="_session.refreshingEnd",iu="_session.refreshingStart",zf=async e=>{const{specification:t}=e.context,n=await Ln(async()=>{const s=t.autoRefresh;return ee(s)?s.call(t,e.session):s}).catch(Rf);return Ve(n)},Xf=e=>{let t=e.context.emitter.on(Ei,()=>r(!1)),n,s=_o(async(c,d=!1)=>{n=c;const l=Ve(d)||await zf(e);n===c&&l&&e.pending&&!e.refreshing&&e.refresh(n).catch(ue)}),r=(c=!1)=>{e.refreshing||s(c)},a=()=>{t(),s.abort(),s=n=t=void 0,r=a=ue};return Object.defineProperties((c=!1)=>r(c),{destruct:Ae(()=>a,!1)})},fl=1e3,Kf=2147483647,Zf=(e,t=fl,n=!1)=>{var u;let s=new AbortController,r=Dt(0,~~t,Kf),a=Ve(n);Number.isFinite(r)||(r=fl);const i=((u=document.timeline)==null?void 0:u.currentTime)??performance.now(),c=()=>{s==null||s.abort(),s=void 0},d=h=>{!s||s.signal.aborted||(l(h),e(h))},l=h=>{let p=0;if(!a){const f=h-i,T=Math.round(f/r)*r;p=i+T+r-performance.now()}setTimeout(()=>requestAnimationFrame(d),p)};return l(i),a=!1,de({cancel:K(c),delay:K(t),signal:K(s.signal)})},Qf=e=>{const t={},n=Object.getOwnPropertyDescriptors(e);for(const s of Object.keys(e)){const{get:r,value:a}=n[s];t[s]=Ae(r||(ee(a)?a.bind(e):()=>a))}return de(t)},Jf=()=>{const e={idle:null,resume:null},t={};for(const n of Object.keys(e))t[n]={get:()=>e[n]??ue,set:s=>{xe(s)?e[n]=null:ee(s)&&s!==e[n]&&(e[n]=s)}};return de(t)},au=Symbol("<<UNSUBSCRIBE>>"),cs=e=>e===au,go=e=>{let t;const n=Qf(e),s=Jf(),r=new Map,a=new WeakMap,i=()=>Object.freeze({...n}),c=()=>r.size===0,d=u=>{if(c())return;if(cs(u)){const p=[];return r.forEach((f,T)=>{p.push(T);const g=a.get(T);for(;f--;)g==null||g()}),p.forEach(f=>f(u)),!0}const h=t;t=i();for(const p of Object.keys(t))if(!as(t[p],h[p]))return r.forEach((f,T)=>T(t)),!0;return!1},l=u=>{if(!ee(u))return ue;const h=Sf(u,a,()=>{let f=()=>{const T=r.get(u)||0;T===1?(f=void 0,r.delete(u),a.delete(u),c()&&(t=void 0,s.idle())):T>1&&r.set(u,T-1)};return()=>{f==null||f()}}),p=c();return r.set(u,(r.get(u)||0)+1),p&&(t=i(),s.resume()),u(t),h};return de({idle:Ae(c),on:K(s),cancelSubscriptions:K(()=>d(au)),requestNotification:K(()=>d()),snapshot:Ae(()=>t??i()),subscribe:K(l)})},ac=(()=>{let e;const{cancelSubscriptions:t,requestNotification:n,subscribe:s,on:r}=go({now:()=>Date.now()});return r.resume=()=>{e=Zf(n,1e3,!1)},r.idle=()=>{e==null||e.cancel(),e=void 0},de({cancelSubscriptions:K(t),subscribe:K(s)})})(),cc=()=>{const e=new class extends EventTarget{},t=(s,...r)=>{const[a]=r;r.length&&oe(a)&&console.warn("Unexpected value `undefined` provided for event detail.\n Turn off this warning by doing either of the following:\n (1) omit the optional event detail parameter.\n (2) explicitly pass `null` for the event detail parameter (instead of `undefined`).\n");const i=new CustomEvent(s,de({bubbles:K(!1),cancelable:K(!1),detail:K(a??null)}));return e.dispatchEvent(i)},n=(s,r)=>{if(!ee(r))return ue;const a=i=>r.call(null,de({detail:K(i.detail),timeStamp:K(i.timeStamp),type:K(i.type)}));return e.addEventListener(s,a),()=>e.removeEventListener(s,a)};return de({emit:K(t),on:K(n)})},em=(e,t)=>{let n,s=1/0,r,a;const i=Qd(),c=cc(),d=()=>{n==null||n.removeEventListener("abort",d),s=1/0,a==null||a(),i.refresh(),c.emit(su)},l=_o(async(h,p)=>{r=h;const f=await Ln(()=>{const g=t.deadline;return ee(g)?g.call(t,p,h):g}).catch(ue);if(r!==h)return;const T=(Array.isArray(f)?f:[f]).filter(g=>g||g===0);if(T.length>0){let g=!1,y=new Set;for(const _ of T)if(mo(_)){if(g=_.aborted)break;y.add(_)}else if(s=Math.min(s,ic(_)??1/0),g=s<=Date.now())break;g||(g=y.size<1&&!Number.isFinite(s)),g?n??(n=Cf()):(n=Ri([...y,i.signal]),n.addEventListener("abort",d),u()),T.length=0,y.clear()}else n=void 0}),u=()=>{if(!Number.isFinite(s))return;let h=ac.subscribe(p=>{if(cs(p))return d();p.now>=s&&i.abort()});a=()=>{h==null||h(),h=a=void 0}};return de({elapse:K(i.abort),elapsed:Ae(()=>n&&n.aborted),on:K(c.on),refresh:K(l.bind(void 0)),signal:Ae(()=>i.signal)})},tm=(e,t)=>{let n=!1,s,r,a=!0,i;const c=Symbol("<next_session>"),d=cc();function l(f){var T;try{(T=t.assert)==null||T.call(t,f)}catch{throw Yf}}function u(f){if(!ee(f))throw Wf}const h=_o((f,T)=>{if(!r)r=f;else return p(mo(T)?Ri([T,f]):f)}),p=async f=>{let T=c;try{n=!1,r=f,a&&await(s??(s=(async()=>{await rr,a=!1,d.emit(iu)})())),u(t.onRefresh),T=await Ln(()=>t.onRefresh(i,f)).finally(()=>{if(f.aborted)throw tu})}finally{if(r===f)try{T!==c&&(l(T),i=T,d.emit(ru))}finally{s=void 0,a=!0,d.emit(ou)}}};return e.on(Ei,()=>n=!s),h(),de({context:K(de({emitter:K(e),specification:K(t)})),on:K(d.on),pending:Ae(()=>n),promise:Ae(()=>h.promise),refresh:K(h.bind(void 0)),refreshing:Ae(()=>!!s),session:Ae(()=>i),signal:Ae(()=>r)})};class nm{constructor(t){Y(this,"_session");Y(this,"_autofresh");Y(this,"_deadline");Y(this,"_refresher");Y(this,"_eventEmitter",cc());this._specification=t,this._deadline=em(this._eventEmitter,this._specification),this._refresher=tm(this._eventEmitter,this._specification),this._autofresh=Xf(this._refresher),this._deadline.on(su,()=>this._eventEmitter.emit(Ei)),this._refresher.on(iu,()=>this._eventEmitter.emit(Vf)),this._refresher.on(ou,()=>this._eventEmitter.emit(jf)),this._refresher.on(ru,()=>{this._session=this._refresher.session,this._deadline.refresh(this._session).finally(()=>this._eventEmitter.emit(qf)),this._eventEmitter.emit(nu)}),this.http=this._sessionHttp.bind(this),this.on=this._eventEmitter.on,this.refresh=this._refresher.refresh}get isExpired(){return this._deadline.elapsed}get refreshing(){return this._refresher.refreshing}_assertSessionHttp(t){if(!ee(t))throw Gf}async _sessionHttp(t,...n){for(this._autofresh(!0);;)try{await this._refresher.promise.catch(ue);const{signal:s}=this._deadline;return await(t==null?void 0:t(this._session,s,...n)),this._assertSessionHttp(this._specification.http),await this._specification.http(this._session,s,...n)}catch(s){if(s!==eu)throw s;if(this._refresher.pending)continue;this._deadline.elapse()}}}const sm="v1",aa=(e,t)=>{try{e==null||e(t)}catch{throw t}};async function rm(e){const{errorLevel:t,loadingContext:n="",path:s}=e,r=xf(e),a=new URL(`${ff(n)}${sm}${mf(s)}`);return e.params&&e.params.forEach((i,c)=>{const d=decodeURIComponent(i);d&&a.searchParams.append(c,d)}),(async()=>{let i=!1;const c={level:t};try{const d=await fetch(a,r);if(d.ok){if(d.status===204)return null;try{switch(Lf(d)){case"application/json":return await d.json();default:const h=await d.blob(),p=Ff(d);return{blob:h,filename:p}}}catch(u){throw i=!0,u}}c.type=wf(d.status);const l=await d.json();c.message=e.errorMessage||`Service at ${a} not available`,c.errorCode=(l==null?void 0:l.status)==null?void 0:String(l.status),c.requestId=l==null?void 0:l.requestId,$f(l)&&(c.message=l.detail,c.errorCode=l.errorCode,c.status=l.status),aa(e.errorHandler,c)}catch(d){if(i)throw aa(e.errorHandler,d),d;c.type||(c.type=$r.NETWORK_ERROR),aa(e.errorHandler,d),c.message=e.errorMessage||`Call to ${a} failed. Error: ${d}`}Bf(c)})()}class om{constructor(t){Y(this,"assert",t=>{if(vi(t)){const n=Ot(t.id)?t.id.trim():void 0,s=Ot(t.token)?t.token.trim():void 0;if(n&&s)return}throw void 0});Y(this,"deadline",t=>{const n=[];let s,r;try{({iat:s,exp:r}=JSON.parse(atob(t==null?void 0:t.token.split(".")[1]))),n.push(r)}catch{s=Date.now()}if(!oe(pl)){const a=new Date(s);n.push(a.setMilliseconds(a.getMilliseconds()+pl))}return n});Y(this,"http",async(t,n,s)=>{const{headers:r,signal:a,...i}=s;try{const c={...i,headers:{...r,...t&&{Authorization:`Bearer ${t.token}`}},errorHandler:this._errorHandler,signal:mo(a)?Ri([n,a]):n};return await rm(c)}catch(c){throw(c==null?void 0:c.type)===$r.EXPIRED_TOKEN?eu:c}});this.onSessionCreate=t,this._errorHandler=this._errorHandler.bind(this),Object.defineProperties(this,{autoRefresh:K(Pf),onRefresh:K((n,s)=>this.onSessionCreate(s))})}_errorHandler(t){try{this.errorHandler&&this.errorHandler(t)}catch{}throw t}}const Cr=Symbol("<<NO_ERR>>");function im(e){/* istanbul ignore if -- @preserve */if(e===Cr)throw new TypeError("Illegal error")}const am=()=>{let e=Cr;const t=()=>{e=Cr},n=s=>{im(s),e=s};return de({error:Ae(()=>e===Cr?void 0:e),hasError:Ae(()=>e!==Cr),reset:K(t),set:K(n)})};class cm{constructor(){Y(this,"_canSkipSessionRefresh",!1);Y(this,"_refreshPromisorSignal");Y(this,"_sessionIsFrozen",!1);Y(this,"_errorContainer",am());Y(this,"_specification",new om);Y(this,"_sessionContext",new nm(this._specification));Y(this,"_setupContext",new Hf(this._sessionContext));Y(this,"_refreshPromisor",_o(async(t,n=!1)=>{let s=!this._refreshPromisorSignal,r=this._refreshPromisorSignal===(this._refreshPromisorSignal=t);const a=Ve(n)&&this._canSkipSessionRefresh;s&&(s=!1,this._errorContainer.reset(),this._onAuthStateChanged());try{await(a?this._setupContext:this._sessionContext).refresh(t).finally(()=>r=this._refreshPromisorSignal===t)}catch(i){if(!r)return;!t.aborted&&(a||i!==tu)&&this._errorContainer.set(i),s=!a}finally{(s||a&&r)&&(this._refreshPromisorSignal=void 0,this._onAuthStateChanged())}}));Y(this,"_watchlist",go({endpoints:()=>this._setupContext.endpoints,extraConfig:()=>this._setupContext.extraConfig,hasError:()=>this._errorContainer.hasError,isExpired:()=>this._sessionContext.isExpired,isFrozen:()=>this._sessionIsFrozen,refreshing:()=>!!this._refreshPromisorSignal}));Y(this,"freeze",()=>{this._sessionIsFrozen=!0,this._watchlist.on.resume=void 0,this._watchlist.cancelSubscriptions()});Y(this,"http",this._sessionContext.http.bind(this._sessionContext,null));Y(this,"refresh",this._refresh.bind(this));Y(this,"subscribe",this._watchlist.subscribe);this._watchlist.on.resume=()=>{const t=[this._sessionContext.on(Ei,()=>{this._canSkipSessionRefresh=!1,this._onAuthStateChanged()}),this._sessionContext.on(nu,()=>{this._refresh(this._canSkipSessionRefresh=!0)})];this._watchlist.on.idle=()=>{this._watchlist.on.idle=void 0,t.forEach(n=>n()),t.length=0},!this.context.refreshing&&tn(this.context.isExpired)&&this._refresh()}}get context(){return this._watchlist.snapshot}set loadingContext(t){this._setupContext.loadingContext=t}set errorHandler(t){this._specification.errorHandler=t}set onSessionCreate(t){this._specification.onSessionCreate!==t&&(this._specification.onSessionCreate=t,this._refreshPromisorSignal&&ee(this._specification.onSessionCreate)&&(this._canSkipSessionRefresh=!1,this._refresh()))}_onAuthStateChanged(){this._watchlist.requestNotification()}_refresh(t=!1){this._refreshPromisor(t)}}const lm="Account",dm="Account Balance",um="Account description",hm="Account ID",pm="Additions",fm="Adjustments",mm="Amount",_m="and",gm="Apply",Tm="Back",ym="Balance account",Am="Balance account ID",vm="Booked",Rm="Captured",Cm="Category",Sm="Chargebacks",Em="Close",Nm="Contact support",Dm="Contact support for help.",bm="Contact support for help and share error code %{requestId}",Om="Copied",Im="Copy",Pm="Corrections",km="Currency",wm="Date",Lm="Date range",Fm="Description",Mm="Dismiss",xm="Download",Bm="Downloading",$m="Email",Um="Entity was not found",Hm="Transaction not found for the specified Account Holder",Wm="Fees",Gm="File",Ym="Filter bar",qm="From",jm="Full",Vm="Funds captured",zm="Go back",Xm="Grant issued",Km="Grant repayments",Zm="Hide content",Qm="ID",Jm="Incomplete field",e0="In progress",t0="Loading",n0="max",s0="min",r0="Mobile",o0="Net payout",i0="Next Payouts",a0="No data",c0="No negative numbers allowed",l0="No payouts found",d0="No reports found",u0="No transactions found",h0="Other",p0="Paginated navigation",f0="Partial",m0="Payment ID",_0="Payment method",g0="Payout Details",T0="Payout information is generated each day at midnight, UTC time.",y0="Payouts",A0="Pending",v0="Please come back later.",R0="Please, reach out to support for assistance.",C0="Reach out to support",S0="Reference ID",E0="Refresh",N0="Refunds",D0="Refund payment",b0="We couldn’t process the refund. Try again later.",O0="Something went wrong.",I0="Your customer will receive the money in a maximum of 40 days. When the refund is successful you will see a new Refund transaction on your list.",P0="Refund is sent!",k0="Amount to refund",w0="Refunds can take up to 40 days depending on the payment method. Fees are included.",L0="Refund %{amount}",F0="Reason for refund",M0="Reference",x0="Remaining amount",B0="Report",$0="Reports are generated each day at midnight, UTC time.",U0="Reports",H0="Reset",W0="Reversed",G0="Something went wrong.",Y0="Something went wrong. Try refreshing the page or come back later.",q0="Status",j0="Structured list",V0="Subtractions",z0="Sum of same-day payouts",X0="Tabs",K0="The error code is %{requestId}",Z0="There are no results",Q0="The request is missing required fields or contains invalid data.",J0="There was an unexpected error",e2="The selected balance account is incorrect",t2="Timezone",n2="To",s2="Total incoming",r2="Total outgoing",o2="To value should be equal or greater than the From value",i2="Transaction details",a2="Transactions",c2="Transactions overview",l2="Transaction type",d2="Transfers",u2="Try a different search or reset your filters, and we’ll try again.",h2="Try refreshing the page or come back later.",p2="Amount",f2="Type",m2="Value",_2="We couldn't load the payouts overview.",g2="We couldn't load the reports overview.",T2="We couldn't load the transactions overview.",y2="We couldn't load your balance accounts.",A2="We couldn't load your payouts.",v2="We couldn't load your reports.",R2="We couldn't load your transactions.",C2={account:lm,accountBalance:dm,accountDescription:um,accountID:hm,additions:pm,adjustments:fm,amount:mm,and:_m,apply:gm,back:Tm,balanceAccount:ym,balanceAccountId:Am,"balanceAccounts.all":"All accounts",Booked:vm,"button.clearAll":"Clear all","calendar.controls":"Calendar navigation controls","calendar.nextMonth":"Next month","calendar.previousMonth":"Previous month","calendar.timezone":"Timezone is set on: GMT%{offset} (%{time})","capital.accountIsInactive":"Your account is inactive","capital.actionNeeded":"Action needed","capital.annualPercentageRate":"Annual percentage rate","capital.annualPercentageRateIsTheCostOfBorrowingForALoan":"The Annual Percentage Rate (APR) is the cost of borrowing of this loan under Adyen Capital User Terms, expressed as an annual rate.","capital.bankAccountDetails":"Bank account details","capital.bankAccountIban":"IBAN","capital.bankAccountNumber":"Account number","capital.bankCountryOrRegion":"Country/region","capital.bankRoutingNumber":"Routing number","capital.bankSortCode":"Sort code","capital.businessFinancing":"Business financing","capital.businessFinancingOffer":"Business financing offer","capital.businessFinancingSummary":"Business financing summary","capital.closed":"Closed","capital.couldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.couldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.dailyRepaymentRate":"Daily repayment rate","capital.daysAndDaysLeft":"%{days} days (%{daysLeft} days left)","capital.expectedRepaymentPeriod":"Expected repayment period","capital.failed":"Failed","capital.fees":"Fees","capital.fullyRepaid":"Fully repaid","capital.goToTermsAndConditions":"Go to Terms & Conditions","capital.grantID":"Grant ID","capital.howMuchMoneyDoYouNeed":"How much money do you need?","capital.inProgress":"In progress","capital.legalSubtitleAU":"Adyen Capital is provided by Adyen Australia Pty Limited.","capital.legalSubtitleCA":"Adyen Capital is provided by Adyen Canada Ltd.","capital.legalSubtitleEU":"Loans are issued by Adyen N.V.","capital.legalSubtitleGB":"Loans are issued by Adyen N.V. represented by its London Branch.","capital.legalSubtitleUS":"Loans are issued by Adyen N.V. San Francisco Branch and subject to credit approval.","capital.maximumRepaymentPeriod":"Maximum repayment period","capital.minimumRepaymentToRepayTheFinancingOnTime":"Minimum repayment every %{days} days to repay the financing on time","capital.needSomeExtraMoney":"Need some extra money?","capital.offerLegalNoticeDescriptionUS":"If your application for business credit is denied, you have the right to a written statement of the specific reasons for the denial. To obtain the statement, please contact Adyen's Credit Support Team by emailing %{email} within 60 days from the date you are notified of our decision. We will send you a written statement of reasons for the denial within 30 days of receiving your request for the statement. %{break} The Federal Equal Credit Opportunity Act prohibits creditors from discriminating against credit applicants on the basis of race, color, religion, national origin, sex, marital status, age (provided that the applicant has the legal capacity to enter into a binding contract), because all or part of the applicant's income derives from any public assistance program, or because the applicant has in good faith exercised any right under the Consumer Credit Protection Act. The federal agency that administers compliance with this law concerning this creditor is the Office of the Comptroller of the Currency (OCC), Customer Assistance Group, PO Box 53570, Houston, TX 77052.","capital.offerLegalNoticeTitleUS":"Creditor: Adyen N.V. – San Francisco Branch %{break} 505 Brannan Street, San Francisco, CA 94107.","capital.oneMonth":"1 month","capital.pending":"Pending","capital.primaryAccount":"Primary account","capital.remaining":"Remaining","capital.remainingAmount":"Remaining amount","capital.remainingFees":"Remaining fees","capital.repaid":"Repaid","capital.repaidAmount":"Repaid amount","capital.repaidFees":"Repaid fees","capital.repaymentBalanceInfo":"Your current remaining amount, including fees, is %{amount}","capital.repaymentThreshold":"Repayment threshold","capital.requestedFunds":"Requested funds","capital.requestFunds":"Request funds","capital.requesting":"Requesting","capital.reviewOffer":"Review offer","capital.revoked":"Revoked","capital.seeNewOffer":"See new offer","capital.seeOptions":"See options","capital.sendRepayment":"Send repayment","capital.sendRepaymentNotice":"The additional repayment bank transfer made towards your loan could take 2-3 business days for it to be reflected on your loan account.","capital.sendRepaymentSubtitle":"Transfer money to this bank account to repay back part of your loan or the entirety of it.","capital.signTermsAndConditionsToReceiveFunds":"Sign the Terms & Conditions to receive your funds.","capital.signTheTermsToReceiveYourFunds":"Sign the terms to receive your funds","capital.termEnds":"Term ends: ","capital.thereIsNoPrimaryAccountConfigured":"There is no primary account configured","capital.thisOfferExpiresOn":"This offer expires on %{date}.","capital.totalFees":"Total fees","capital.totalRepaymentAmount":"Total repayment amount","capital.unsupportedRegionDescription":"Business financing isn’t available in your region yet, but check back here for an offer.","capital.unsupportedRegionTitle":"Stay tuned!","capital.weCouldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.weCouldNotContinueWithTheOfferContactSupportForHelp":"We couldn't continue with the offer. Contact support for help.","capital.weCouldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.weCouldNotProcessThisRequestTryAgain":"We couldn't process this request. Try again with a new offer.","capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon":"We received your request and we’re working on it now. Check back soon for the next steps.","capital.writtenOff":"Written off","capital.xDays":"%{days} days","capital.xMonths":"%{months} months","capital.xPercent":"%{percentage}%","capital.youAcceptedButThenReturnedTheseFunds":"You accepted but then returned these funds","capital.youAcceptedTheseFundsButDidNotRepayThem":"You accepted these funds but did not repay them","capital.youAreRequestingFundingOf":"You’re requesting funding of","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1":"You have been pre-qualified for business financing","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2":" up to %{amount}.","capital.yourRequestedFundsWere":"Your requested funds were: ","capital.youShouldGetTheFundsWithinOneBusinessDay":"You should get the funds within one business day","capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds":"You will need to repay a minimum of %{amount} every %{days} days to fully pay off the funds by %{date}.","capital.youWillSoonQualifyForAFinancialOffer":"You will soon qualify for a financial offer!",capture:Rm,category:Cm,chargeback:Sm,closeIconLabel:Em,contactSupport:Nm,contactSupportForHelp:Dm,contactSupportForHelpAndShareErrorCode:bm,copied:Om,copy:Im,correction:Pm,currency:km,date:wm,dateRange:Lm,default:"Default",description:Fm,dismiss:Mm,"disputes.accept":"Accept","disputes.accept.accepted":"Accepted","disputes.accept.chargeback":"Accept chargeback","disputes.accept.disputeAccepted":"Chargeback has been accepted","disputes.accept.disputeDisclaimer":"By accepting, you agree that the disputed amount will not be returned to your account.","disputes.accept.iAgree":"I agree","disputes.accept.requestForInformation":"Accept request for information","disputes.accept.requestForInformationAccepted":"Request for information has been accepted","disputes.accept.requestForInformationDisclaimer":"Once this request for information is accepted, it will be marked as expired and may lead to a chargeback in the future.","disputes.acceptedOn":"Accepted on","disputes.account":"Account","disputes.alert.autoDefended":"This chargeback was defended automatically.","disputes.alert.notDefendable":"This chargeback can’t be defended. Contact support for details.","disputes.alert.notDefendedExpired":"This request for information wasn’t responded to and was lost by default.","disputes.alert.notDefendedLost":"This chargeback wasn’t defended and was lost by default.","disputes.alert.responseDeadline":"The response deadline is %{date}","disputes.contactSupport.toDefendDispute":"Contact support to defend this dispute.","disputes.contactSupport.toDefendRequestForInformation":"Contact support to respond to this request for information.","disputes.contactSupport.toResolveNotificationOfFraud":"Contact support to resolve this notification of fraud. Refund this payment to avoid a future chargeback and paying extra fees.","disputes.currency":"Currency","disputes.defend.chargeback":"Defend chargeback","disputes.defend.chargebackFeeInformation":"A fee is charged for every defended chargeback. We recommend responding only when you have clear and convincing evidence.","disputes.defend.continue":"Continue","disputes.defend.defended":"Defended","disputes.defend.evidenceSubmitted":"Evidence has been submitted","disputes.defend.selectDefenseReason":"Select the reason you’re defending this chargeback.","disputes.defend.somethingWentWrong":"Something went wrong","disputes.defend.submit":"Submit","disputes.defend.submitSuccessfulInformation":"The chargeback details will be reviewed by the scheme, which can take up to 60 days.","disputes.defend.uploadDocumentsInformation":"Upload documents that support your dispute defense. Once submitted, no changes can be made.","disputes.defendedOn":"Defended on","disputes.defenseDocument.acquirerRepresentmentForm":"Acquirer Representment Form","disputes.defenseDocument.acquirerRepresentmentFormAutomaticallyGenerated":"The Acquirer Representment Form is an automatically generated document that contains an overview of key dispute details.","disputes.defenseDocument.acquirerRetrievalFulfilmentForm":"Acquirer Retrieval Fulfilment Form","disputes.defenseDocument.acquirerRetrievalFulfilmentFormAutomaticallyGenerated":"The Acquirer Retrieval Fulfilment Form is an automatically generated document that contains an overview of key dispute details.","disputes.defenseDocument.additionalInformation":"Additional Information","disputes.defenseDocument.additionalTransactions":"Additional Transactions","disputes.defenseDocument.additionalTransactionsConnectedWithDisputedFlight":"Additional transactions connected with the disputed flight, such as upgrades, excess baggage charges, and in-flight purchases","disputes.defenseDocument.alternativeDefenseMaterial":"Alternative defense material","disputes.defenseDocument.amexFaxCover":"Amex Fax Cover","disputes.defenseDocument.appropriateExplanation":"Appropriate explanation","disputes.defenseDocument.appropriateExplanationAndDocTwoSeparateTransactions":"An appropriate explanation and documentation showing two separate transactions.","disputes.defenseDocument.authorizationNotObtained":"Authorization Not Obtained","disputes.defenseDocument.authorizationNotObtainedHelp":"Authorization Not Obtained (Help)","disputes.defenseDocument.autoGeneratedDocRetrievalRequestFulfilled":"Automatically generated document showing that the retrieval request was fulfilled","disputes.defenseDocument.automaticallyGeneratedTransactionDetails":"Automatically generated transaction details","disputes.defenseDocument.avsDocumentation":"AVS Documentation","disputes.defenseDocument.cancelledRecurringBilling":"Cancelled recurring billing","disputes.defenseDocument.cardholderAgreedToAmountRange":"Documentation supporting the claim that the cardholder agreed to a reasonable amount range.","disputes.defenseDocument.cardholderResponsibleForAddendumTransaction":"Documentation to establish the cardholder is responsible for the addendum transaction","disputes.defenseDocument.cardholderResponsibleForDisputedAmount":"Documentation to support that the cardholder is responsible for the disputed amount.","disputes.defenseDocument.cardRecoveryBulletinOrExceptionFile":"Card Recovery Bulletin or Exception File","disputes.defenseDocument.cardRecoveryBulletinOrExceptionFileHelp":"Card Recovery Bulletin or Exception File (Help)","disputes.defenseDocument.chargebackRemediedOrInvalid":"Documentation to support that the chargeback is remedied or invalid.","disputes.defenseDocument.chargeToWrongAccountNumber":"Charge to Wrong Account Number","disputes.defenseDocument.chargeToWrongAccountNumberHelp":"Charge to Wrong Account Number (Help)","disputes.defenseDocument.clearingText":"Clearing Text","disputes.defenseDocument.compellingEvidence":"Compelling Evidence","disputes.defenseDocument.copyOfInvoice":"Copy of the invoice or similar document","disputes.defenseDocument.copyOfInvoiceOrOtherRelevantTransactionDetails":"Copy of the invoice, terminal receipt, sales ticket or any other document (Transaction Information Document) that provides the relevant transaction details like transaction amount, delivery address (if applicable) and description of the merchandise.","disputes.defenseDocument.CopyOfSalesDraftDetails":"Copy of the invoice, terminal receipt, sales ticket or any other document (transaction information document) that provides the relevant details like transaction amount, delivery address (if applicable) and description of the merchandise","disputes.defenseDocument.CopyOfSalesDraftTitle":"Copy of original Sales Draft","disputes.defenseDocument.copyOfTid":"A copy of the TID as proof that the transaction involved a retail sale rather than a credit.","disputes.defenseDocument.coverPageForAmexDisputes":"A cover page that will be sent for Amex disputes","disputes.defenseDocument.creditNotProcessed":"Credit Not Processed","disputes.defenseDocument.creditNotProcessedHelp":"Credit Not Processed (Help)","disputes.defenseDocument.creditNotProcessedReason":"Credit Not Processed Reason","disputes.defenseDocument.creditsOfMilesShowingConnectionToCardholder":"Credits of frequent flyer miles for the flight, showing connection to the cardholder","disputes.defenseDocument.customerWrittenConfirmation":"The customer's written confirmation of registration to receive electronic delivery of goods or services.","disputes.defenseDocument.defenseMaterial":"Defense Material","disputes.defenseDocument.deffectiveMerchandise":"Deffective Merchandise","disputes.defenseDocument.deffectiveMerchandiseHelp":"Deffective Merchandise (Help)","disputes.defenseDocument.deliveryOfFlightTicketAtAddress":"Proof of delivery of the flight ticket at cardholder's address","disputes.defenseDocument.descriptionOfDisputeReason":"A description of the dispute reason","disputes.defenseDocument.descriptionOfMerchandiseOrServices":"A description of the merchandise or services. This can be for example the invoice.","disputes.defenseDocument.differentSignature":"Different Signature","disputes.defenseDocument.differentSignatureHelp":"Different Signature (Help)","disputes.defenseDocument.disclosureAtPointOfInteraction":"Disclosure at the Point of Interaction","disputes.defenseDocument.docAllOfFollowing":"A merchant statement documenting all of the following:","disputes.defenseDocument.docCardholderIssuedPaperAirlineTickets":"Documentation establishing that the cardholder was issued paper airline tickets.","disputes.defenseDocument.docChargebackCodeNotApplicable":"Documentation to support that the chargeback code is not applicable","disputes.defenseDocument.docCorrectCurrency":"Documentation proving the correct currency was provided or specified","disputes.defenseDocument.docIdentifyTransaction":"Documentation that would further identify the transaction","disputes.defenseDocument.docMerchandiseNotCounterfeit":"Documentation to support the claim that the merchandise was not counterfeit","disputes.defenseDocument.docProvingCardHolderParticipated":"Documentation proving the card holder participated in the transacion. This can be:","disputes.defenseDocument.docRemediesChargeback":"Defense Material that remedies the chargeback.","disputes.defenseDocument.docsTwoTransactionsWithSameShopper":"Provide copies of two documents (for example terminal receipts or invoices) belonging to two separate transactions with the same shopper.","disputes.defenseDocument.docTermsOfSaleNotMisrepresented":"Documentation to prove that the terms of sale of the merchandise or services were not misrepresented","disputes.defenseDocument.docTransactionOccurredOnPos":"Documentation that show that the transaction occurred on an attended POS terminal","disputes.defenseDocument.docTwoDifferentTransactions":"Documentation showing Two Different Transactions","disputes.defenseDocument.documentationOfPositiveAvsResponseXOrY":"Documentation of positive AVS response X or Y","disputes.defenseDocument.documentCanBeCreditReasonDue":"A document can be a credit due reason.","disputes.defenseDocument.documentCanBeProofOfDelivery":"A document can be a proof of delivery signature or a proof of receipt copy.","disputes.defenseDocument.documentCanBeSubscriptionAgreement":"A document can be a subscription agreement.","disputes.defenseDocument.documentCanBetUrlReturnPolicy":"A document can be a description, item URL, return policy, or a copy of a contract or an affidavit.","disputes.defenseDocument.documentContainingImportantShipmentData":"A document containing important shipment data. It should include at least the shipment date.","disputes.defenseDocument.documentShipmentDate":"Document containing Shipment Date","disputes.defenseDocument.docViaFraudReporter":"Documentation that supports the second presentment from the Acquirer’s Loss Data File, the Acquirer Loss Data Report or the Acquirer Transaction Data Report via Fraud Reporter.","disputes.defenseDocument.duplicateProcessing":"Duplicate Processing","disputes.defenseDocument.duplicateProcessingHelp":"Duplicate Processing (Help)","disputes.defenseDocument.evidenceCardHolderParticipation":"Compelling Evidence of Card holder Participation","disputes.defenseDocument.evidenceProofingParticipationOfCardholder":"Compelling evidence proofing the participation of the cardholder in the transaction.","disputes.defenseDocument.evidenceTransactionWasRecurring":"Description of the goods or services being provided with evidence that the transaction was recurring by providing the start date of the recurring transaction and, if used, an indication that SecureCode or CVC2 has been used on the initial transaction.","disputes.defenseDocument.expiredCard":"Expired Card","disputes.defenseDocument.expiredCardHelp":"Expired Card (Help)","disputes.defenseDocument.explanation":"Explanation","disputes.defenseDocument.explanationWhyCancellationCodeInvalid":"Explanation why the cancellation code is invalid.","disputes.defenseDocument.falseTransaction":"False ransaction (Help)","disputes.defenseDocument.firstChargebackNumberAndDate":"Reference number and date of first chargeback","disputes.defenseDocument.flightManifest":"Flight Manifest","disputes.defenseDocument.flightManifestShowingCardholderName":"Flight manifest showing the cardholder's name","disputes.defenseDocument.flightTicket":"Flight Ticket","disputes.defenseDocument.flightTicketUsed":"Flight Ticket Used","disputes.defenseDocument.flightTicketWithCardholderName":"Flight Ticket or boarding pass showing the cardholder's name","disputes.defenseDocument.flightTookPlace":"Flight Took Place","disputes.defenseDocument.frequentFlyerInformation":"Frequent Flyer Information","disputes.defenseDocument.ifDelayedProofShowingMerchantAbleToProvideServices":"If the service is delayed, proof showing that the merchant is able to provide the services (for example, documentation showing that the merchant is not out of business)","disputes.defenseDocument.incorrectAmount":"Incorrect amount","disputes.defenseDocument.latePresentment":"Late Presentment","disputes.defenseDocument.latePresentmentHelp":"Late Presentment (Help)","disputes.defenseDocument.latestRecurringTransactions":"Latest Recurring Transactions","disputes.defenseDocument.memberMessageText":"Member Message Text","disputes.defenseDocument.memberMessageTextSentToSchemes":"Member Message Text sent to the schemes.","disputes.defenseDocument.merchandiseDescription":"Merchandise Description","disputes.defenseDocument.merchandiseNotAsDescribed":"Merchandise not as described.","disputes.defenseDocument.merchandiseNotReceived":"Merchandise Not Received","disputes.defenseDocument.merchandiseNotReceivedHelp":"Merchandise Not Received (Help)","disputes.defenseDocument.merchandiseSentToAvsConfirmedBillingAddress":" Documentation that shows the merchandise was sent to the AVS-confirmed billing address","disputes.defenseDocument.merchantFraudPerformanceProgram":"Merchant Fraud Performance Program","disputes.defenseDocument.merchantFraudPerformanceProgramHelp":"Merchant Fraud Performance Program (Help)","disputes.defenseDocument.merchantObtainedCardAtTimeReservationMade":"Documentation establishing that the merchant obtained the cardholder's account number, name present on the card, and the confirmation number provided at the time the reservation was made.","disputes.defenseDocument.merchantWrittenRebuttal":"Merchant's written rebuttal","disputes.defenseDocument.missingSignature":"Missing Signature","disputes.defenseDocument.missingSignatureHelp":"Missing Signature (Help)","disputes.defenseDocument.moreThanOneTransactionProcessed":"More than one transaction was processed by providing the date(s) of previous transaction(s).","disputes.defenseDocument.mpiData":"MPI Data","disputes.defenseDocument.nonMatchingAccountNumber":"Non Matching Account Number","disputes.defenseDocument.nonMatchingAccountNumberHelp":"Non Matching Account Number (Help)","disputes.defenseDocument.noNotification":"Proof of No Notification","disputes.defenseDocument.numberAndDateOfOriginalChargeback":"First chargeback reference number and date of original chargeback","disputes.defenseDocument.originalAmount":"Original Amount","disputes.defenseDocument.originalAmountIfDisputedRepresentsPartialShipment":"The original transaction amount if the disputed transaction represents partial shipment","disputes.defenseDocument.other":"Other","disputes.defenseDocument.otherHelp":"Other (Help)","disputes.defenseDocument.paidByOtherMeansThanJCBCard":"Paid By Other Means Than JCB Card","disputes.defenseDocument.paidByOtherMeansThanJCBCardHelp":"Paid By Other Means Than JCB Card (Help)","disputes.defenseDocument.paperAirlineTicket":"Paper Airline Ticket","disputes.defenseDocument.passengerId":"Passenger Identification Documentation","disputes.defenseDocument.passengerIdLinkedToCardholder":"Passenger identification documentation showing a link to the cardholder","disputes.defenseDocument.previousTransactionsNotDisputed":"Previous transactions were not disputed.","disputes.defenseDocument.printedSignedReceipt":"A printed, signed terminal receipt","disputes.defenseDocument.processingError":"Processing Error","disputes.defenseDocument.processingErrorHelp":"Processing Error (Help)","disputes.defenseDocument.proofAirlineTicketsWereUsed":"Documentation proving that the airline tickets were used by the cardholder or persons that the cardholder authorized.","disputes.defenseDocument.proofCardAndCardholderSignature":"Proof of card presence and cardholder signature","disputes.defenseDocument.proofCardPresence":"Proof of Card Presence","disputes.defenseDocument.proofFlightTookPlace":"Documentation proving that the airline rendered the service (the flight took place)","disputes.defenseDocument.proofGoodsServicesWereProvided":"Proof showing that the goods or services of the merchant were provided to the card holder","disputes.defenseDocument.proofGoodsWereDeliveredAsDescribed":"Proof showing that the goods were delivered as described.","disputes.defenseDocument.proofMerchantHadNotReceivedPreviousChargeback":"Proof showing that the merchant had not received a previous chargeback from the cardholder at the time of settlement.","disputes.defenseDocument.proofMerchantHadNotReceivedPreviousChargebackAutoGenerated":"Proof showing that the merchant had not received a previous chargeback from the cardholder at the time of settlement. (This proof is automatically generated.)","disputes.defenseDocument.proofMerchantNotNotifiedOfCancellation":"Proof showing that the merchant or acquirer was not notified of the cancellation at the time of settlement.","disputes.defenseDocument.proofOfAccountTakeover":"Proof of Account Takeover","disputes.defenseDocument.proofOfAddendum":"Proof of Addendum","disputes.defenseDocument.proofOfDelayedDelivery":"Proof of Delayed Delivery","disputes.defenseDocument.proofOfFulfillment":"Proof of Fulfillment","disputes.defenseDocument.proofOfInvalidChargeback":"Proof of Invalid Chargeback","disputes.defenseDocument.proofOfNoCancellation":"Proof of No Cancellation","disputes.defenseDocument.proofOfNoChargebackReceived":"Proof of No Chargeback Received","disputes.defenseDocument.proofOfNoShow":"Proof of No-Show","disputes.defenseDocument.proofOfRecurringTransaction":"Merchant's Proof of Recurring Transaction","disputes.defenseDocument.proofOfRefund":"Proof of Refund","disputes.defenseDocument.proofOfRetailSale":"Proof of Retail Sale","disputes.defenseDocument.proofProvidedMerchandise":"Proof of Provided Merchandise","disputes.defenseDocument.proofRecurringContractNotCancelledAtTimeOfSettlement":"Proof showing that the recurring contract was not cancelled at the time of settlement.","disputes.defenseDocument.proofRenewedMembership":"Proof of Renewed Membership","disputes.defenseDocument.proofShowingCardholderRenewedMembership":"Proof showing that the cardholder renewed his membership to the service after the cancellation received.","disputes.defenseDocument.proofShowingTrackingInformation":"Proof showing Tracking Info, Tracking Number.","disputes.defenseDocument.proofValidIncreaseOfAmount":"Proof of Valid Increase of Amount","disputes.defenseDocument.provideRefundId":"Provide the refund ID, for the difference in amount.","disputes.defenseDocument.provingTransactionResultedFromAccountTakeover":"Documentation that supports the second presentment by proving that the transaction resulted from an account takeover. For example: The Acquirer Loss File report, the SAFE Acquirer Transaction Data report or a statement from the authorized cardholder confirming that the account was in fact taken over and that fraud subsequently occurred.","disputes.defenseDocument.reasonableAmount":"Proof of reasonable amount","disputes.defenseDocument.reasonForInvalidation":"Reason for Invalidation","disputes.defenseDocument.reasonForInvalidationOfChargeback":"Reason for the invalidation of the chargeback. Please notice that this reason should be technical from nature, for example: the issuer submitted documentation that failed to support the chargeback.","disputes.defenseDocument.rebuttalCancellationNotAccepted":"Rebuttal of Cancellation Never Accepted","disputes.defenseDocument.rebuttalGivenToCardholder":"Rebuttal or proper disclosure given to the cardholder at the point of interaction.","disputes.defenseDocument.rebuttalStatingCancellationNotAccepted":"Rebuttal stating that the cancellation was never accepted","disputes.defenseDocument.receiptOfFlightTicketAtBillingAddress":"Proof of receipt of the flight ticket at the cardholder's billing address","disputes.defenseDocument.receiptOrOther":"A receipt, work order, or other document signed by the customer substantiating that the goods or services were received by the customer.","disputes.defenseDocument.resultsOfMpiCalls":"Results of MPI lookup service calls.","disputes.defenseDocument.retrievalRequestFulfilled":"Proof showing that the retrieval request was fulfilled","disputes.defenseDocument.retrievalRequestNotHonored":"Retrieval Request Not Honored","disputes.defenseDocument.retrievalRequestNotHonoredHelp":"Retrieval Request Not Honored (Help)","disputes.defenseDocument.serviceNotRendered":"Service Not Rendered","disputes.defenseDocument.serviceNotRenderedHelp":"Service Not Rendered (Help)","disputes.defenseDocument.shipmentDocumentation":"Shipment Documentation","disputes.defenseDocument.shipToAddress":"Ship-To Address","disputes.defenseDocument.shipToAddressIfApplicable":'"Ship to" address (if applicable)',"disputes.defenseDocument.signatureOrChipPinEvidence":"Signature or Chip PIN Evidence","disputes.defenseDocument.signedTerminalReceipt":"Signed Terminal Receipt","disputes.defenseDocument.SplitSales":"Duplicate Processing","disputes.defenseDocument.SplitSalesHelp":"Duplicate Processing (Help)","disputes.defenseDocument.statementMerchantDidNotReceiveGoods":"Statement from the merchant stating that the merchant did not receive the goods.","disputes.defenseDocument.SupplementalDocumentsDetails":"Complimentary information to the sales draft (e.g. Cardholder’s permission for recurring Transaction, MOTO/Electronic Commerce ordering form, Magnetic-stripe phone record.)","disputes.defenseDocument.SupplementalDocumentsTitle":"Additional transaction documents","disputes.defenseDocument.TEDocumentDetails":"Information related to the delivery of the travel and entertainment service (e.g. Hotel guest folio, Signature on file, Car rental agreement, etc.)","disputes.defenseDocument.TEDocumentTitle":"Travel and Entertainment information","disputes.defenseDocument.transactionAfterReservationCancelled":"Transaction After Reservation Cancelled","disputes.defenseDocument.transactionAfterReservationCancelledHelp":"Transaction After Reservation Cancelled (Help)","disputes.defenseDocument.transactionNotRecognizedChipLiabilityShift":"Transaction Not Recognized - Contactless and Card Not Presented","disputes.defenseDocument.transactionNotRecognizedChipLiabilityShiftHelp":"Transaction Not Recognized - Contactless and Card Not Presented (Help)","disputes.defenseDocument.transactionNotRecognizedContactlessAndCardNotPresented":"Transaction Not Recognized - Contactless and Card Not Presented","disputes.defenseDocument.transactionNotRecognizedContactlessAndCardNotPresentedHelp":"Transaction Not Recognized - Contactless and Card Not Presented (Help)","disputes.defenseDocument.unauthorisedReason":"Unauthorised reason","disputes.defenseDocument.uploadListOfRefundIds":"Upload list of Refund Id(s).","disputes.defenseDocument.writtenCorrespondenceExchanged":"Copies of written correspondence exchanged between the merchant and the customer (such as letter, email, or fax) showing that the customer participated in the transaction.","disputes.defenseDocument.writtenRebutalGoodsRepairedOrReplaced":"Written rebutal documenting that the goods were repaired or replaced.","disputes.defenseReason":"Defense reason","disputes.defenseReason.3dSecureFullyAuthenticatedTransaction":"3D Secure Fully Authenticated Transaction","disputes.defenseReason.3dSecureLiabilityShiftNotFullyAuthenticated":"3D Secure Liability Shift (not fully authenticated)","disputes.defenseReason.accountNumberNotListedInExceptions":"The Account Number was not listed on the Exception File","disputes.defenseReason.accountNumberNotListedInExceptionsFor60Days":"Account Number has not been on the Exception File with a Pickup Response for a minimum of 60 calendar days.","disputes.defenseReason.accountTakeover":"Account Takeover","disputes.defenseReason.acquirerDefendChargebackIfIssuerRequested":"The acquirer can defend the chargeback if the issuer requested it or if friendly-fraud is suspected. This might lead to further escalation with the issuer.","disputes.defenseReason.acquirerProvidesCorrectDateWithinTimeLimit":"The acquirer provides the correct transaction date that is within applicable time limit set forth in section Time Frame for First Presentment.","disputes.defenseReason.additionalInformation":"Additional Information","disputes.defenseReason.addressMerchandiseSentAvsConfirmed":"The merchant can provide documentation that it received a positive Address Verification Service (AVS) response of X (Both the nine-digit Postal zip code as well as the first five numerical characters contained in the address match) or Y (Both the five-digit Postal zip code as well as the first five numerical characters contained in the address match) for the transaction and documentation showing that the address to which the merchandise was sent is the same as the AVS confirmed address.","disputes.defenseReason.addressVerificationService":"Address Verification Service (AVS)","disputes.defenseReason.addressVerificationServiceAdditionalInformation":"Address Verification Service (AVS) Additional Information","disputes.defenseReason.airlineCompellingEvidence":"Airline Compelling Evidence","disputes.defenseReason.airlineFlightProvided":"Airline Flight Provided","disputes.defenseReason.atmDispute":"ATM Dispute","disputes.defenseReason.authorisationReceivedForAmount":"Authorisation was received for the transaction amount or greater from the issuer.","disputes.defenseReason.authorisedOnline":"Transaction was Authorised Online","disputes.defenseReason.autoGeneratedRecurringTransactionDetails":"Automatically generated recurring transaction details.","disputes.defenseReason.autoResponseSentToIssuer":"An automatically generated response has been sent to the issuer. This response was generated just before the Request for Information expires and contains the relevant data present in the system. Please notice that this response may be incomplete (for example if the merchandise description was not provided), which may lead to an invalid response. It is therefore recommended for the merchant to always upload the invoice (or the other requested information) for RFI's.","disputes.defenseReason.autoResponseToRfi":"Automatically Generated Response to a Request for Information","disputes.defenseReason.buyerExceededWindowToFileReturn":"Buyer has exceeded the window to file a return","disputes.defenseReason.cancellationCodeWasInvalidAsShownByExplanationProvided":"The cancellation code was invalid as is shown by the explanation provided.","disputes.defenseReason.cancellationContractFailed":"Cancellation Terms of the Contract failed","disputes.defenseReason.cancellationOrReturns":"Cancellation or Returns","disputes.defenseReason.cardAndSignatureForCorporateFleetCardTransaction":"Card was present and a signature exists for a Corporate Fleet Card transaction.","disputes.defenseReason.cardholderAgreedToAmountAsReasonable":"The cardholder agreed to an amount range as reasonable, and the transaction amount did not exceed this amount range.","disputes.defenseReason.cardholderBilledForSeparateAdditionalAmount":"For example, after the cardholder initially is billed for a vehicle rental, the cardholder is billed for a separate additional amount that represents unpaid parking tickets. The cardholder claims that he or she did not authorize the transaction for the parking tickets. The merchant should provide information about the violations showing that they were issued during the period that the vehicle was rented by the cardholder, as well as the rental agreement with proof of card presence and signature authorizing such charges.","disputes.defenseReason.cardholderCancelledRecurringServiceButRenewedLater":"The cardholder cancelled the recurring service, but renewed his membership after the cancellation.","disputes.defenseReason.cardholderDidNotMeetCancellationTerms":"The cardholder failed to meet the cancellation terms of the contract.","disputes.defenseReason.cardholderNotifiedBeforeRecurringTransaction":"The transaction amount was not within the range of amounts preauthorized but the Merchant notified the Cardholder before processing Recurring Transaction","disputes.defenseReason.cardholderNotifiedButNoReply":"Cardholder was notified but did not reply","disputes.defenseReason.cardholderParticipated":"The Cardholder Participated in the Transaction","disputes.defenseReason.cardholderResponsibleForAddendumTransaction":"Merchants may remedy the dispute with documentation substantiating the cardholder has participated in the original transaction and documentation to establish the cardholder is responsible for the addendum transaction.","disputes.defenseReason.cardholderResponsibleForDisputedAmount":"The merchant also must include documentation substantiating that the cardholder is responsible for the disputed amount if the amount represents final audit charges not included in the original hotel/motel or vehicle cardholder billing.","disputes.defenseReason.cardholderShouldHaveReturnedGoods":"The cardholder should have returned the goods to the merchant, but the merchant never received these goods.","disputes.defenseReason.cardPresenceProof":"Proof of Card Presence Available","disputes.defenseReason.cardPresentAndChipUsedNoPinProvided":"Card was present and Chip was used, but no PIN provided.","disputes.defenseReason.cardWithSignatureNotProcessedMastercardNetwork":"Card was present and a signature exists for a transaction that was not processed via the MasterCard Wordlwide Network.","disputes.defenseReason.cbCodeNotApplicable":"Chargeback code not applicable (card present transaction)","disputes.defenseReason.chargebackBundlingInvalid":"Chargeback bundling invalid for this reason code or MCC code","disputes.defenseReason.chargebackCodeNA3dSecureNotOffered":"Chargeback code is not applicable because 3D secure was not offered for the original transaction.","disputes.defenseReason.chargebackInvalidCorrectAmountAndCurrencyProvided":"The acquirer determines that the chargeback was invalid the correct transaction amount and currency code were provided.","disputes.defenseReason.chargebackReceivedAfterMastercardTimeLimit":"The chargeback was received after MasterCard's 120 days time limit after the authorisation.","disputes.defenseReason.chipLiabilityShift":"Chip Liability Shift","disputes.defenseReason.chipTransaction":"Chip Transaction","disputes.defenseReason.chipTransactionReportedSAFE":"Chip Transaction Reported to SAFE","disputes.defenseReason.claimNotJustifiedSinceTransactionNotChargebacked":"The issuer claims that a previous chargeback indicated the cancellation of the service. This claim is however not justified, since the transaction indicated by the issuer is not chargebacked or was not chargebacked at the time of settlement.","disputes.defenseReason.compellingEvidence":"Compelling Evidence","disputes.defenseReason.compellingEvidenceRecurringTransactions":"Compelling Evidence for Recurring Transactions","disputes.defenseReason.correctTransactionAmount":"Correct Transaction Amount","disputes.defenseReason.correctTransactionCurrency":"Correct transaction currency","disputes.defenseReason.correctTransactionDateProvided":"Correct transaction date provided","disputes.defenseReason.creditOrCancellationPolicyDisclosed":"Credit or Cancellation Policy Properly Disclosed","disputes.defenseReason.creditOrCancellationPolicyDisclosedToCardholder":"The merchant can substantiate that the credit or cancellation policy was properly disclosed to the cardholder at the point of interaction.","disputes.defenseReason.creditPreviouslyIssued":"Credit previously issued","disputes.defenseReason.cvc2ValidationProgram":"CVC 2 Validation Program","disputes.defenseReason.de22DontMatchInFaceToFaceTransaction":"DE 22 (Point of Service [POS] Entry Mode) of the authorization message and DE 22 (Point of Service Data Code) of the clearing messages do not match in a Face-to-Face transaction.","disputes.defenseReason.defenseReasonIfProblemsWithScans":"This defense reason can only be used if there are problems with the quality of the MasterCom scan of the documentation. Do not use this defense reason if the substance of the documentation received shows that the issuer processed an invalid first chargeback. One must use this defense reason when the first chargeback documentation does not correspond to the transaction being charged back (for example, the documentation concerns a different transaction) or when the documentation is incomplete because of a scanning error. For example, the documentation provided is a partial scan with missing information, or it relates to another card or to another transaction.","disputes.defenseReason.deficiencyCorrected":"Deficiency Corrected","disputes.defenseReason.delayInSubmittingTransaction":"The acquirer delayed presentment due to the merchant’s delay in submitting the transaction, as permitted under Chapter 3, Transaction Records of the Transaction Processing Rules, or a national bank holiday of at least four consecutive days prevented the acquirer from receiving the transaction within the applicable seven-calendar-day time frame.","disputes.defenseReason.disputedSurcharge":"Disputed Surcharge","disputes.defenseReason.disputedSurchargeIncorrectCalculation":"Disputed Surcharge - Incorrect Pro-rated Calculation","disputes.defenseReason.docToProveNoPaymentByOtherMean":"Documents (other than Transaction Receipt) to prove that Merchant did not receive payment by other means for the same merchandise or service.","disputes.defenseReason.documentationIncreasedDebitCardholderAccount":"The merchant can provide documentation that validates the increased debit to the cardholder's account. For example, documentation showing that the cardholder is responsible for the additional charges applied to his account.","disputes.defenseReason.documentationReceivedWasIllegible":"Documentation Received was Illegible","disputes.defenseReason.documentsSentToFulfillRetrievalRequest":"The supporting documents have been sent to fulfill the retrieval request.","disputes.defenseReason.duplicateChargeback":"Duplicate Chargeback","disputes.defenseReason.emergencyPaymentAuthorizationService":"Emergency Payment Authorization Service","disputes.defenseReason.emvDeviceNonEmvCard":"EMV liability shift: EMV device, non-EMV card","disputes.defenseReason.emvLiabilityShift":"EMV Liability Shift","disputes.defenseReason.evidenceCardholderAuthorizedTransaction":"The transaction was a non face-to-face (for example e-commerce) transaction. There is however evidence that the cardholder authorized the transaction.","disputes.defenseReason.evidenceGoodsNotDamaged":"There is evidence that the goods or services described on the invoice were delivered as described (not damaged or incomplete). For example, the merchant documents that the cardholder signed acknowledging the goods were received in good condition.","disputes.defenseReason.evidenceServicesProvidedAndReceivedWrittenCorrespondence":"The merchant can provide additional compelling evidence such as description of the goods or services provided; a receipt, work order or other document acknowledged by the customer that the goods or services were received by the customer; the customer's written confirmation of registration; any written correspondence exchanged between the merchant and the customer (such as letter, email or fax).","disputes.defenseReason.evidenceThatCardholderParticipated":"The merchant can provide compelling evidence to establish that the cardholder participated in the transaction.","disputes.defenseReason.faceToFaceTransactionNoConflictingInformation":"Face-to-Face Transaction with No Conflicting Information in Authorization and Clearing Message","disputes.defenseReason.faceToFaceTransactionWithConflictingInformation":"Face-to-Face Transaction with Conflicting Information in Authorization and Clearing Message","disputes.defenseReason.fallbackDefenseReasonCode":"Fallback defense reason code if all other defense reason codes do not apply. Use this reason if there is any documentation available that remedies the chargeback.","disputes.defenseReason.firstChargebackCodeNotApplicable":"Chargeback code used for the First Chargeback is not applicable to the Transaction.","disputes.defenseReason.firstChargebackDoesNotMeetPrerequisites":"The first chargeback does not meet the prerequisites for the dispute reason code. For example, an issuer processes a chargeback for message reason code 4837 (No Cardholder Authorization), with a cardholder letter alleging nonreceipt of merchandise. Since message reason code 4837 does not address issues related to nonreceipt of merchandise, the issuer's first chargeback was invalid, since it does not meet the prerequisites of message reason code 4837, which require the chargeback to include a cardholder letter stating that the transaction was not authorized.","disputes.defenseReason.firstChargebackInvalid":"Information provided by the issuer that is relevant is illegible to the point where it cannot be established that the first chargeback is valid. One must make every attempt to qualify the documentation before using this defense reason.","disputes.defenseReason.formatCbmmddyyArdXxxExpected":"The issuer did not provide the information required properly. Expected was the DE72 message text to be in the format CBMMDDYY ARD XXXXXXXXXXXXXXXXXXXXXXX, where MMDDYY denotes the date and XXXXXXXXXXXXXXXXXXXXXXX the Acquirer Reference Data of the chargeback containing the documentation to support this chargeback.","disputes.defenseReason.formatMultipleTransactionsNnnExpected":"The issuer did not provide the information required properly. Expected was the DE72 message text to be in the format MULTIPLE TRANSACTIONS NNN, where NNN denotes the number of chargebacks to which the supplied documentation applies to.","disputes.defenseReason.formatRpcsMmddyyExpected":"The issuer did not provide the information required properly. Expected was the DE72 message text to be in the format RPCS MMDDYY, where MMDDYY denotes date the account number was listed in the Recurring Payment Cancellation Service (RPCS).","disputes.defenseReason.fraudEvidence":"Card Present Fraud Evidence","disputes.defenseReason.goodsNotReturned":"Goods not Returned","disputes.defenseReason.goodsOrServicesProvided":"The goods or services were provided","disputes.defenseReason.goodsRepairedOrReplaced":"Goods Repaired or Replaced","disputes.defenseReason.goodsWereAsDescribed":"Goods were as Described","disputes.defenseReason.goodsWereRepairedOrReplaced":"The merchant can document that the goods that led to the chargeback, were repaired or replaced.","disputes.defenseReason.identifiedAddendum":"Identified Addendum","disputes.defenseReason.increasedTransactionAmount":"Increased Transaction Amount","disputes.defenseReason.intraregionalTransactionReportedSAFE":"The acquirer can demonstrate that the intraregional transaction was reported to SAFE as counterfeit fraud and occurred at a hybrid terminal (except for the U.S. region).","disputes.defenseReason.invalidAcquirerReferenceData":"Invalid Acquirer Reference Data on chargeback","disputes.defenseReason.invalidCancellationCode":"Invalid Cancellation Code","disputes.defenseReason.invalidChargeback":"Invalid Chargeback","disputes.defenseReason.invalidChargebackBasedOnMcc":"Invalid chargeback based on MCC","disputes.defenseReason.invalidChargebackReasonCode":"Invalid chargeback reason code for E-commerce/ POS payment","disputes.defenseReason.invalidMessageText":"Invalid Message Text","disputes.defenseReason.invalidReferenceDataDocumentationNotRequired":"Invalid Acquirer Reference Data on chargeback; documentation was provided or not required.","disputes.defenseReason.issuerDidNotIncludeTwoSetsOfArns":"The issuer did not include two sets of acquirer reference numbers (ARNs). Without this information one cannot validate the issuer's claim.","disputes.defenseReason.issuerDidNotProvideRequiredDocumentation":"The issuer did not provide the required documentation for this chargeback. This reason can only be chosen between 9 and 45 days of the first chargeback.","disputes.defenseReason.issuerHasInitiatedTooManyFraudulentDisputes":"The acquirer can defend the chargeback if the issuer has initiated too many fraudulent disputes on this PAN eg. more than 35 within the previous 120 calendar days for Visa.","disputes.defenseReason.issuerProcessedChargebackMoreThanOnce":"Use this defense strategy to remedy situations where the issuer has processed a first chargeback for the same transaction more than once.","disputes.defenseReason.justifiedDelayedPresentment":"Justified delayed presentment","disputes.defenseReason.liabilityShiftFullAuthenticated":"3D Secure Fully Authenticated Transaction","disputes.defenseReason.manyFraudulentChargebacks":"Too Many Fraudulent Chargebacks","disputes.defenseReason.membershipRenewedAfterCancellation":"Membership was Renewed after Cancellation","disputes.defenseReason.merchandiseNotReturned":"The merchandise was never returned","disputes.defenseReason.merchandiseWasNotCounterfeit":"Merchandise was not counterfeit","disputes.defenseReason.merchandiseWasReceivedByShopper":"The merchandise was received by the shopper","disputes.defenseReason.merchantCanProvideAdditionalCompellingEvidence":"The transaction is recurring, merchant can provide additional compelling evidence such as description of the goods or services provided; a receipt, work order or other document acknowledged by the customer that the goods or services were received by the customer; the customer's written confirmation of registration; any written correspondence exchanged between the merchant and the customer (such as letter, email or fax).","disputes.defenseReason.merchantCanProvideAdditionalInformation":"The merchant can provide additional information that would help to identify the transaction. This should include at least a description of the merchandise or services. This could, for example, be an invoice.","disputes.defenseReason.merchantCantReceiveThisChargebackBasedOnTheirMcc":"The merchant can not receive this chargeback based on their MCC","disputes.defenseReason.merchantNotNotifiedOfCancellation":"Merchant was not Notified of Cancellation","disputes.defenseReason.merchantProvidedServicesToCardholderProof":"There is proof that the merchant provided the services to the cardholder or person that the cardholder authorized.","disputes.defenseReason.merchantProvideMissingDocuments":"The merchant can provide the documents that were missing or were illegible, causing the chargeback.","disputes.defenseReason.noCreditSlip":"No credit slip or other advisement has been given to the card holder","disputes.defenseReason.noPriorChargebackReceived":"No prior chargeback received","disputes.defenseReason.noShowTransaction":"No Show Transaction","disputes.defenseReason.not3dSecureTransaction":"Not a 3D Secure transaction","disputes.defenseReason.notAgreeWithRefund":"The merchant did not agree with the refund","disputes.defenseReason.notPosTransaction":"Transaction was not a POS transaction","disputes.defenseReason.parcelServiceReceipt":"Proof that the cardholder received the merchandise or a person authorized by the cardholder received the merchandise. For example, the card acceptor provided proof of a United Parcel Service (UPS) receipt.","disputes.defenseReason.pastChargebackTimeLimit":"Past Chargeback Time Limit","disputes.defenseReason.paymentByOtherMeans":"Payment by Other Means","disputes.defenseReason.paypassAmountBelowProtectionAmount":"The transaction was a PayPass transaction with an amount below the chargeback protection amount.","disputes.defenseReason.paypassTransaction":"PayPass Transaction","disputes.defenseReason.pinForOneOrBothTransactions":"A PIN was present for one or both transactions.","disputes.defenseReason.pinTransaction":"PIN Transaction","disputes.defenseReason.pinUsedToVerifyCardholder":"PIN was used to verify the cardholder's presence in a POS environment.","disputes.defenseReason.posTransactionAndSignedTerminalReceiptAvailable":"The transaction was a POS transaction and a signed terminal receipt is available.","disputes.defenseReason.posTransactionCardholderWasPresentProof":"The transaction was a POS transaction and documentation is avaible to proof that the cardholder was present.","disputes.defenseReason.prevChargedbackTwoTransactionsWithSameAccount":"The issuer previously charged back two or more transactions involving the same MasterCard card account prior to the authorization approval date of the disputed transaction","disputes.defenseReason.previousChargebackCancellingRecurringContract":"The issuer claims that a previous transaction was chargebacked, cancelling the recurring contract. There is however proof that no prior transaction has been chargebacked at the time of settlement.","disputes.defenseReason.proofCardholderReceivedMerchandise":"There is proof that the cardholder or person that the cardholder authorized received the merchandise. For example:","disputes.defenseReason.proofDeficiencyCorrected":"The acquirer can document it corrected the deficiency that led to the chargeback.","disputes.defenseReason.proofOfCardPresenceAvailableNotAuthorisedMastercardNetwork":"Proof of Card Presence Available (Not authorised via MasterCard Wold Wide Network)","disputes.defenseReason.proofOfCardPresenceMastercardCorporateFleet":"Proof of Card Presence Available (Mastercard Corporate Fleet Card)","disputes.defenseReason.provideInformationForCollectionOrFraudCase":"Provide the required information for collection or fraud case","disputes.defenseReason.provideMissingInformation":"Provide Missing Information","disputes.defenseReason.provideTransactionalInformation":"Provide the requested transactional information to the issuer. At least this should include a copy of the invoice, receipt, sales ticket or any other document that provides the relevant order details, like the description of merchandise or services and the shipping data (if applicable).","disputes.defenseReason.provideTransactionalInfoTravelDetails":"Provide the requested transactional information to the issuer. At least this should include a copy of the invoice, receipt, sales ticket or any other document that provides the relevant order details, like the passenger name, travel agency (if applicable), ticket number (if applicable) and airline flight information.","disputes.defenseReason.purchaseProperlyPosted":"Purchase Properly Posted","disputes.defenseReason.qpsTransaction":"QPS Transaction","disputes.defenseReason.qpsTransactionWithAmountLessThanChargebackProtectionAmount":"The transaction was a QPS transaction with a transaction amount equal to or less than the chargeback protection amount.","disputes.defenseReason.receiptWithItemsBilledBecauseOfLossTheftDamages":"Card was present and a signed terminal receipt is available. The transaction involves loss, theft or damage. The merchant should provide the receipt containing specially the items that were additionally billed, because of the loss, theft or damages.","disputes.defenseReason.recurringTransactionCompellingEvidence":"Recurring Transaction Compelling Evidence","disputes.defenseReason.recurringTransactionCompellingMerchantEvidence":"Recurring Transaction Compelling Merchant Evidence","disputes.defenseReason.reponseToRfi":"Response to Request for Information","disputes.defenseReason.reponseToRfiCardPresent":"Response to a Request for Information (Card Present only)","disputes.defenseReason.requiredDocumentationNotReceived":"Non-receipt of Required Documentation to Support Chargeback","disputes.defenseReason.responseToRfiAirlines":"Response to Request for Information (Airlines only)","disputes.defenseReason.responseToRfiCarRental":"Response to Request for Information (Car Rental only)","disputes.defenseReason.retrievalRequestFulfilled":"Retrieval request fulfilled","disputes.defenseReason.returnNotAccepted":"The cancellation of services or the return of the merchandise was not accepted.","disputes.defenseReason.scanningError":"Scanning error - unrelated documents or partial scan","disputes.defenseReason.serviceCancelledButMerchantNotNotified":"The service was cancelled, but the merchant and acquirer were not notified in time to prevent the recurring transaction.","disputes.defenseReason.serviceNotCancelled":"Service was not Cancelled","disputes.defenseReason.serviceNotCancelledEvidence":"There is evidence that shows that the service was not cancelled at the time of the settlement.","disputes.defenseReason.servicesProvidedAfterCancellation":"Services Provided after Cancellation","disputes.defenseReason.servicesProvidedAndUsedAfterCancellation":"The merchant has provided services after the cancellation date, which have been used by the cardholder.","disputes.defenseReason.shopperClaimsRefundWasPromisedButNotExecuted":"The shopper claims that a refund was promised but not executed. To defend against this, simply upload a statement that this was not agreed.","disputes.defenseReason.shopperUsedAirlineTicket":"Shopper has or could have used the provided airline ticket","disputes.defenseReason.signedImprintedSalesSlipInvoicePosReceipt":"A signed and imprinted sales slip, invoice, or terminal-generated POS receipt showing that the cardholder, or a person that the cardholder authorized, picked up the merchandise. This documentation proves that the merchant did not ship or deliver the merchandise.","disputes.defenseReason.signedTerminalReceiptAvailable":"Signed Terminal Receipt Available","disputes.defenseReason.supplyDefenseMaterial":"Supply Defense Material","disputes.defenseReason.surchargeCorrectlyProcessed":"The acquirer substantiates that the surcharge was correctly processed.","disputes.defenseReason.surchargeIncorrectlyCalculatedByIssuer":"The acquirer substantiates that the pro-rated surcharge was incorrectly calculated by the issuer.","disputes.defenseReason.termsOfSaleWereNotMisrepresented":"Terms of sale were not misrepresented","disputes.defenseReason.thisReasonIsTechnical":"Please take care when using this dispute reason; this reason is technical in nature and does not always address the true nature of the dispute.","disputes.defenseReason.timeBetweenAuthorisationAndSettlementWithinTimeLimits":"The time between the authorisation and the settlement was within the time limits set by the schemes. For normal transactions the time limit is 180 days. In case the card account is no longer active/valid, the settlement should take place within 30 days for normal cards and 6 days for Visa Electron cards.","disputes.defenseReason.transactioAuthorisedEmergencyPaymentAuthorizationService":"The transaction was authorised through the Emergency Payment Authorization Service.","disputes.defenseReason.transactionAmountAlreadyRefunded":"The credit was previously issued, for example, the merchant already refunded the full transaction amount to the card holder.","disputes.defenseReason.transactionApproved3dSecureAuthenticated":"The transaction approved by the issuer was fully (directory and authentication response both Y) 3D Secure authenticated.","disputes.defenseReason.transactionBetweenChipLiabilityShiftProgramCustomers":"The transaction was between customers that participate in the appropriate Chip Liability Shift Program, occurred at a hybrid terminal, and was initiated with a non-EMV chip card.","disputes.defenseReason.transactionFallsCvc2ValidationProgram":"The transaction falls under the CVC2 Validation Program","disputes.defenseReason.transactionFromAccountTakeover":"The transaction resulted from an account takeover.","disputes.defenseReason.transactionInformationDocument":"The Transaction Information Document (TID) shows that the amount was processed correctly","disputes.defenseReason.transactionIssuerApproved3dSecureAuthenticated":"The transaction approved by the issuer was fully (directory and authentication response both Y) 3D Secure authenticated.","disputes.defenseReason.transactionNotChargebackedAutoDefense":"The issuer claims that a previous chargeback indicated the cancellation of the service. This claim is however not justified, since the transaction indicated by the issuer is not chargebacked or was not chargebacked at the time of settlement. This can be defended automatically by the system.","disputes.defenseReason.transactionNotFully3dSecureAuthenticated":"The transaction approved by the issuer was not fully 3D Secure authenticated, but there was a liability shift for the given dispute reason.","disputes.defenseReason.transactionNotRecurring":"Transaction is not Recurring","disputes.defenseReason.transactionNotRecurringTransactionInstallment":"The transaction was not recurring. For example, if the transaction is an installment.","disputes.defenseReason.transactionSettledWithinTimeLimit":"Transaction was settled within Time Limit","disputes.defenseReason.transactionsInitiatedDueToLossTheftOrDamages":"Transactions was initiated due to loss, theft or damages","disputes.defenseReason.transactionWasAuthorised":"Transaction was Authorised","disputes.defenseReason.transactionWasAuthorisedOnline":"Transaction was authorised online.","disputes.defenseReason.transactionWasECommerceGivenChargebackReasonNotApplicable":"The transaction was a E-Commerce, MOTO or Recurring transaction. The given chargeback reason is not applicable for these transaction types.","disputes.defenseReason.transactionWasInFaceToFaceEnvironment":"The transaction took place in a face-to-face (POS) environment.","disputes.defenseReason.transactionWasProperlyIdentifiedAsInstallmentTransaction":"The issuer claimed that the transaction was not for an installment billing, and transaction was properly identified as an installment transaction in the authorization request.","disputes.defenseReason.transactionWasResultOfGuaranteedReservation":"The transaction was the result of Guaranteed Reservation Service (a No-Show)","disputes.defenseReason.twoDifferentTidsNonAtm":"Two Different TIDs-Non-ATM","disputes.defenseReason.twoDifferentTidsWithSameCardholderAccount":"The Merchant can provide documentation to support two separate transactions by providing two different TIDs with the same cardholder account number.","disputes.defenseReason.twoDifferentTransactions":"Two Different Transactions","disputes.defenseReason.twoPreviousFraudRelatedChargebacks":"Two or More Previous Fraud-related Chargebacks","disputes.defenseReason.twoSeparateTransactions":"There is documentation available to support the claim that there were two separate transactions.","disputes.defenseReason.unfoundedCardholderDispute":"Unfounded cardholder dispute","disputes.defenseReason.unreasonableAmount":"Unreasonable Amount","disputes.defenseReason.uploadReturnPolicyDocument":"To defend against this dispute, upload a document that states the return policy, e.g. ToS","disputes.defenseReason.useThisDefenseReasonIfApplicable":"Use this defense reason if one of the following is applicable:","disputes.defenseReason.validityOfTransactionChargedExplanation":"The merchant can provide an explanation that substantiates the validity of the transaction charged.","disputes.defenseReason.waiverFormAbsolvingMerchantResponsibility":"A written merchant rebuttal to the claim of non-receipt of merchandise, such as a waiver form absolving merchant responsibility.","disputes.disputedAmount":"Disputed amount","disputes.disputeManagementTitle":"Dispute management","disputes.disputeReason":"Reason","disputes.disputeReference":"Dispute reference","disputes.documentRequirements":"Document requirements","disputes.documentRequirements.acceptableFormatAndSize":"Max 2MB for PDF or 10MB for JPEG, JPG, TIFF","disputes.documentRequirements.mustBeInEnglish":"Must be in English","disputes.documentRequirements.recommendedSize":"Recommended A4 or US letter size","disputes.empty.noChargebacksFound":"No chargebacks found","disputes.empty.noDisputesFound":"No disputes found","disputes.empty.noFraudAlertsFound":"No fraud alerts found","disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewChargebacks":"Try different filters or check again later for new chargebacks.","disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewDisputes":"Try different filters or check again later for new disputes.","disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewFraudAlerts":"Try different filters or check again later for new fraud alerts.","disputes.error.couldNotLoadDisputesOverview":"We could not load the disputes overview component","disputes.error.entityWasNotFound":"Entity was not found","disputes.error.entityWasNotFoundDetail":"Dispute not found for the specified Account Holder","disputes.error.failedRetry":"Failed, retry","disputes.error.weCouldNotLoadYourDispute":"We could not load your dispute.","disputes.error.weCouldNotLoadYourDisputes":"We could not load your disputes.","disputes.error.weCouldNotProcessTheDisputePleaseTryAgainOrContactSupport":"We couldn't process this dispute. Please try again, or contact support if you continue to have problems.","disputes.evidence":"Evidence","disputes.expiredOn":"Expired on","disputes.goBack":"Go back","disputes.gridCell.dueDate":"Due: %{dueDate}","disputes.inputError.fileIsOverSizeLimitForTypeChooseASmallerFileAndTryAgain":"File is over %{size} limit for %{type}. Choose a smaller file and try again.","disputes.inputError.somethingWentWrongPleaseCheckYourDocuments":"Something went wrong, please check that your documents are meeting requirements.","disputes.inputError.uploadAtLeastOneSupportingDocumentToContinue":"Upload at least one supporting document to continue","disputes.issuerComment.showLess":"Show less","disputes.issuerComment.showMore":"Show more","disputes.issuerComment.title":"The issuer came back with some feedback:","disputes.merchantReference":"Merchant reference","disputes.openedOn":"Opened on","disputes.paymentMethod":"Payment method","disputes.paymentReference":"Payment reference","disputes.reason":"Reason","disputes.reasonCategory.adjustment":"Adjustment","disputes.reasonCategory.authorisationError":"Authorisation error","disputes.reasonCategory.consumerDispute":"Consumer dispute","disputes.reasonCategory.fraud":"Fraud","disputes.reasonCategory.other":"Other","disputes.reasonCategory.processingError":"Processing error","disputes.reasonCategory.requestForInformation":"Request for information","disputes.reasonCode":"Reason code","disputes.respondBy":"Respond by","disputes.showDisputeDetails":"Show details","disputes.status":"Status","disputes.status.accepted":"Accepted","disputes.status.expired":"Expired","disputes.status.lost":"Lost","disputes.status.pending":"Pending","disputes.status.responded":"Responded","disputes.status.undefended":"Undefended","disputes.status.unresponded":"Unresponded","disputes.status.won":"Won","disputes.statusGroup.chargebacks":"Chargebacks","disputes.statusGroup.fraudAlerts":"Fraud alerts","disputes.statusGroup.ongoingAndClosed":"Ongoing & closed","disputes.title":"Disputes","disputes.totalPaymentAmount":"Total payment amount","disputes.type.chargeback":"Chargeback","disputes.type.notificationOfFraud":"Notification of fraud","disputes.type.requestForInformation":"Request for information","disputes.uploadDocuments.addOptionalDocument":"Add optional document","disputes.uploadDocuments.extraRequiredDocument":"Required document","disputes.uploadDocuments.optionalDocument":"Optional document","disputes.uploadDocuments.selectDocumentType":"Select document type","disputes.uploadDocuments.selectOneOfTheRequiredOptions":"Select one of the required options",download:xm,downloading:Bm,email:$m,entityWasNotFound:Um,entityWasNotFoundDetail:Hm,"error.pleaseTryAgainLater":"Please try again later.","error.somethingWentWrongWithDownload":"Something went wrong with the download","expandableCard.collapse":"Collapse","expandableCard.expand":"Expand",export:"Export",fee:Wm,file:Gm,"filter.date.since":"Since %{date}","filter.date.until":"Until %{date}",filterBar:Ym,"filterPlaceholder.category":"Type","filterPlaceholder.currency":"Currency","filterPlaceholder.status":"Status",from:qm,full:jm,fundsCaptured:Vm,goBack:zm,grantIssued:Xm,grantRepayment:Km,hideContent:Zm,id:Qm,incompleteField:Jm,inProgress:e0,"inputError.disallowedFileType":"File type not accepted","inputError.fileRequired":"File required","inputError.tooManyFiles":"Too many files","inputError.veryLargeFile":"File size exceeds the maximum file size",loading:t0,max:n0,min:s0,mobile:r0,netPayout:o0,nextPayouts:i0,noData:a0,noNegativeNumbersAllowed:c0,noPayoutsFound:l0,noReportsFound:d0,noTransactionsFound:u0,other:h0,paginatedNavigation:p0,"pagination.nextPage":"Next page","pagination.previousPage":"Previous page","pagination.showing":"Showing",partial:f0,paymentId:m0,paymentMethod:_0,payoutDetails:g0,payoutsNotice:T0,payoutsTitle:y0,Pending:A0,pleaseComeBackLater:v0,pleaseReachOutToSupportForAssistance:R0,"rangePreset.custom":"Custom","rangePreset.last30Days":"Last 30 days","rangePreset.last7Days":"Last 7 days","rangePreset.lastMonth":"Last month","rangePreset.lastWeek":"Last week","rangePreset.thisMonth":"This month","rangePreset.thisWeek":"This week","rangePreset.yearToDate":"Year to date",reachOutToSupport:C0,referenceID:S0,refresh:E0,refund:N0,"refund.amountAlreadyRefunded":"You already refunded %{amount}","refund.amountFailed":"The refund for %{amount} has failed. It is not currently possible to refund this amount. Please contact support.","refund.amountInProgress":"The partial refund of %{amount} is being processed.","refund.fee":"Fee","refund.fullAmountFailed":"It is not possible to refund this payment. Please contact support.","refund.fullAmountRefunded":"The full amount has been refunded back to the customer","refund.goToPayment":"Go to payment","refund.maximumRefundable":"You can only refund a maximum of %{amount}","refund.onlyRefundable":"You can only refund %{amount}","refund.originalAmount":"Original Amount","refund.originalPayment":"Original Payment","refund.paymentPspReference":"Payment PSP Reference","refund.pspReference":"PSP Reference","refund.refundFee":"Refund Fee","refund.refundPspReference":"Refund PSP Reference","refund.returnToRefund":"Return to refund","refund.theRefundIsBeingProcessed":"The refund is being processed.",refundAction:D0,refundActionErrorSubtitle:b0,refundActionErrorTitle:O0,refundActionSuccessSubtitle:I0,refundActionSuccessTitle:P0,refundAmount:k0,"refundAmount.excess":"You cannot exceed the available amount of %{amount}","refundAmount.required":"Enter a refund amount","refunded.full":"Fully refunded","refunded.partial":"Partially refunded",refundNotice:w0,refundPayment:L0,refundReason:F0,"refundReason.duplicate":"Duplicate","refundReason.fraudulent":"Fraudulent","refundReason.issue_with_item_sold":"Issue with item sold","refundReason.other":"Other","refundReason.requested_by_customer":"Requested by customer",refundReference:M0,"refundReference.placeholder":"Enter the reference here",remainingAmount:x0,report:B0,"reportsError.tooManyDownloads":"We couldn't download all the files. Please try again later.",reportsNotice:$0,reportsTitle:U0,"reportType.payout":"Payout",reset:H0,Reversed:W0,"select.filter.placeholder":"Placeholder","select.noOptionsFound":"No options match this search",somethingWentWrong:G0,somethingWentWrongTryRefreshingOrComeBackLater:Y0,status:q0,structuredList:j0,subtractions:V0,sumOfSameDayPayouts:z0,tabs:X0,theErrorCodeIs:K0,thereAreNoResults:Z0,theRequestIsMissingRequiredFieldsOrContainsInvalidData:Q0,thereWasAnUnexpectedError:J0,theSelectedBalanceAccountIsIncorrect:e2,timezone:t2,to:n2,"tooltip.ATM":"Money withdrawn at an ATM","tooltip.Capital":"Money from an incoming loan grant or outgoing loan repayment","tooltip.Chargeback":"Money returned to a customer after a disputed transaction","tooltip.Correction":"Adjustments to your funds, including transaction reversals and deposit corrections","tooltip.Fee":"Transaction costs and payment method fees","tooltip.Other":"Transactions not in another category, usually an adjustment","tooltip.Payment":"Money received to your account from a sales transaction","tooltip.Refund":"Money sent back to a customer from a refunded transaction","tooltip.totalIncoming":"All money received into your account based on the selected filters","tooltip.totalOutgoing":"All fees, refunds, payouts, and other charges based on the selected filters","tooltip.Transfer":"Money moved between your account and another account",totalIncoming:s2,totalOutgoing:r2,toValueShouldBeGreaterThanTheFromValue:o2,transactionDetails:i2,transactions:a2,transactionsOverviewTitle:c2,transactionType:l2,transfer:d2,tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain:u2,tryRefreshingThePageOrComeBackLater:h2,txAmount:p2,"txType.ATM":"ATM","txType.Capital":"Capital","txType.Chargeback":"Chargeback","txType.Correction":"Correction","txType.Fee":"Fee","txType.Other":"Other","txType.Payment":"Payment","txType.Refund":"Refund","txType.Transfer":"Transfer",type:f2,"uploadedFile.remove":"Delete %{filename} file","uploadFile.browse":"Browse files",value:m2,weCouldNotLoadThePayoutsOverview:_2,weCouldNotLoadTheReportsOverview:g2,weCouldNotLoadTheTransactionsOverview:T2,weCouldNotLoadYourBalanceAccounts:y2,weCouldNotLoadYourPayouts:A2,weCouldNotLoadYourReports:v2,weCouldNotLoadYourTransactions:R2},S2={...C2},sn=e=>e.then(({default:t})=>t),cu={da_DK:()=>sn(Promise.resolve().then(()=>require("./da-DK-DzyB6ApY.cjs")))},lu={de_DE:()=>sn(Promise.resolve().then(()=>require("./de-DE-C_manCYP.cjs")))},du={es_ES:()=>sn(Promise.resolve().then(()=>require("./es-ES-D4yWVVk4.cjs")))},uu={fi_FI:()=>sn(Promise.resolve().then(()=>require("./fi-FI-ziHSaIAM.cjs")))},hu={fr_FR:()=>sn(Promise.resolve().then(()=>require("./fr-FR-B-twXuu4.cjs")))},pu={it_IT:()=>sn(Promise.resolve().then(()=>require("./it-IT-CNU9GJon.cjs")))},fu={nl_NL:()=>sn(Promise.resolve().then(()=>require("./nl-NL-CWr5RWqD.cjs")))},mu={no_NO:()=>sn(Promise.resolve().then(()=>require("./no-NO-CU-dleiK.cjs")))},_u={pt_BR:()=>sn(Promise.resolve().then(()=>require("./pt-BR-DJUsdwmX.cjs")))},gu={sv_SE:()=>sn(Promise.resolve().then(()=>require("./sv-SE-Btn3_SAD.cjs")))},Xo={en_US:S2},lc={...cu,...lu,...Xo,...du,...uu,...hu,...pu,...fu,...mu,..._u,...gu},Yn="en-US",Tu=lc.en_US,dc={year:"numeric",month:"2-digit",day:"2-digit"},E2=["constructor","i18n","watch","preferredTranslations"],yu=e=>[...new Set(Object.keys(e).map(t=>t.replace(/_/g,"-")).sort())],N2=yu(lc),Au={AED:"د.إ",AFN:"؋",ALL:"L",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"Bs.",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BYN:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"Fr.",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KYD:"$",KZT:"₸",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTL:"Lt",LVL:"Ls",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},D2={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3},vu=e=>D2[e]||100,b2=e=>!!Au[e],Ru=e=>b2(e)?Au[e]:null,Cu=(e,t)=>{const n=vu(t);return parseInt(String(e),10)/n},O2=(e,t,n,s=!1,r={})=>{const a=e.toString(),i=Cu(a,n),c=t.replace("_","-"),d={style:"currency",currency:n,currencyDisplay:"symbol",...r};try{return s?I2(c,d,i):i.toLocaleString(c,d)}catch{return a}},I2=(e,t,n)=>Intl.NumberFormat(e,t).formatToParts(n).filter(s=>s.type!=="currency").reduce((s,r)=>s+r.value,"").trim(),P2=/GMT(?:[-+](?:0?\d|1[0-4])(?::?[0-5]\d)?)?$/,{BASE_FORMAT_OPTIONS:Su,BASE_LOCALE:Ni,SYSTEM_TIMEZONE:Do,SYSTEM_TIMEZONE_FORMATTER:Ss}=(()=>{const e="en-US",t="2-digit",n="numeric",i=Object.freeze({year:n,month:"short",day:n,hour:t,minute:t,second:t,fractionalSecondDigits:3,timeZoneName:"longOffset"});let c,d;try{d=new Intl.DateTimeFormat(e,i),c=d.resolvedOptions().timeZone}catch{c=void 0}return{BASE_FORMAT_OPTIONS:i,BASE_LOCALE:e,SYSTEM_TIMEZONE:c,SYSTEM_TIMEZONE_FORMATTER:d}})(),k2=/\+(?=-)|([+-]00:00)/g,w2=/(^\D?)(\d)$/,L2=([e,t])=>(Math.abs(e*60)+t)*(e<0?-1:1),F2=e=>Object.freeze([Math.floor(e/60),fo(e,60)]),M2=e=>parseInt(e,10)||0,x2=e=>`GMT+${F2(e).map(s=>`${s}`.replace(w2,"$10$2")).join(":")}`.replace(k2,""),Oa=e=>{var n;const t=((n=e==null?void 0:e.match(P2))==null?void 0:n[0].replace("GMT","").split(":",2).map(M2))??Se;return L2(t.concat(0,0).slice(0,2))},B2=(e,t=Ss)=>{const n=Oa(Ss==null?void 0:Ss.format(e));return Oa(t==null?void 0:t.format(e))-n},Eu=(e,t,n=1)=>{const{offset:s,timestamp:r}=e(t);return r-s*n*6e4},Kt=(e,t)=>Eu(e,t,1),gn=(e,t)=>Eu(e,t,-1),To=(()=>{let e,t;oe(Do)||(e=function(){return this.TIMEZONE},t=function(s){if(xe(s))this.TIMEZONE=Do,this.formatter=Ss;else try{const r=new Intl.DateTimeFormat(Ni,{...Su,timeZone:s}),a=r.resolvedOptions().timeZone;if(this.TIMEZONE===a)return;this.TIMEZONE=a,this.formatter=r}catch{}});function n(...s){if(s.length===0)return n.call(this,Date.now());const r=s[0],a=new Date(r).getTime(),i=this.formatter??Ss;return Object.freeze({formatted:i==null?void 0:i.format(a),offset:B2(a,i),timestamp:a})}return()=>{const s={TIMEZONE:Do},r=t==null?void 0:t.bind(s),a=de({current:{get:e==null?void 0:e.bind(s),set:r},system:{value:Do}});return Object.defineProperties(n.bind(s),{tz:{get:()=>a,set:r}})}})(),$2={values:z,count:0},U2=/^[a-z]{2}-[A-Z]{2}$/,Ko=e=>e.substring(0,2).toLowerCase();function H2(e,t){if(!e)return null;const n=Ko(e);return t.find(s=>Ko(s)===n)||null}function uc(e){const t=e.replace("_","-");if(U2.test(t))return t;const[n,s]=t.split("-");if(!n||!s)return null;const r=`${n.toLowerCase()}-${s.toUpperCase()}`;return r.length===5?r:null}function hc(e,t){const n=e.trim();if(!n||n.length<1||n.length>5)return Yn;const s=uc(n);return s&&t.includes(s)?s:H2(s??n,t)}function W2(e=z,t){return e===z?e:Object.keys(e).reduce((n,s)=>{const r=uc(s)||hc(s,t);return r&&e[s]&&(n[r]=e[s]),n},{})}const ca=(e,t)=>{if(ee(t)){const n=new Map;let s=-1;return e.replace(/%{(\w+)}/g,(r,a)=>{let i=n.get(a)??-1;const c=t(a,++s,++i)??"";return n.set(a,i),c})}return e.replace(/%{(\w+)}/g,(n,s)=>(t==null?void 0:t[s])??"")},ml=(e,t,n=$2)=>{const s=n.count??0,r=`${t}__${s}`;if(Qt(e,r)&&e[r])return ca(e[r],n.values);const a=`${t}__plural`;return Qt(e,a)&&s>1&&e[a]?ca(e[a],n.values):Qt(e,t)&&e[t]?ca(e[t],n.values):null},G2=async(e,t=z,n=z)=>{const s=hc(e,Object.keys(t))||Yn,r=t[s];return{...Tu,...await(ee(r)?r():r)??z,...Br(n==null?void 0:n[e])}};function Y2(){let e=this.locale,t=e,n=[...this.supportedLocales];return de({load:{value:s=>G2(e,this.preferredTranslations,s)},locale:{get:()=>e,set:s=>{t=s,e=uc(s)||hc(s,n)||Yn}},supportedLocales:{get:()=>n,set(s){n=s,this.locale=t}}})}function q2(){var t;const e={};for(const[n,s]of Object.entries(Object.getOwnPropertyDescriptors(Di.prototype)))E2.includes(n)||(ee(s.get)?e[n]={get:s.get.bind(this),...n==="timezone"&&{set:(t=s.set)==null?void 0:t.bind(this)}}:ee(s.value)?e[n]={value:s.value.bind(this)}:e[n]={get:()=>this[n]});return e}var jt,Vr,Fs,zr,Ms,xs,dn,Xr,Vn,zn,Bs,$s,Kr,Ia;class Di{constructor(t=Yn,n){$(this,Kr);$(this,jt,Yn);$(this,Vr,Ko(m(this,jt)));$(this,Fs,[Yn]);$(this,zr,m(this,Fs));$(this,Ms);$(this,xs,Tu);$(this,dn,Y2.call(this));$(this,Xr,rr);$(this,Vn);$(this,zn);$(this,Bs,go({timestamp:()=>performance.now()}));$(this,$s,To());Y(this,"watch",m(this,Bs).subscribe.bind(void 0));Y(this,"i18n",de(q2.call(this)));Y(this,"preferredTranslations");this.watch(ue),this.preferredTranslations=Object.freeze((n==null?void 0:n.reduce((s,r)=>({...s,...r}),Xo))??{...Xo}),k(this,Fs,yu(this.preferredTranslations)),this.locale=t}get customTranslations(){return m(this,Ms)??{}}set customTranslations(t){let n,s=[...m(this,Fs)];if(!xe(t)){n=W2(t,N2);const r=Object.keys(n);s=[...s,...r].sort().filter((a,i,c)=>c.indexOf(a)===i)}m(this,dn).supportedLocales=s,X(this,Kr,Ia).call(this,n)}get languageCode(){return m(this,Vr)}get lastRefreshTimestamp(){return m(this,Bs).snapshot.timestamp}get locale(){return m(this,jt)}set locale(t){if(xe(t))this.locale=Yn;else{if(m(this,dn).locale=t,m(this,jt)===m(this,dn).locale)return;X(this,Kr,Ia).call(this,m(this,Ms))}}get ready(){return m(this,Xr)}get supportedLocales(){return m(this,zr)}get timezone(){return m(this,$s).tz.current}set timezone(t){m(this,$s).tz=t}get(t,n){const s=ml(m(this,xs),t,n);return zo(s)?t:s}has(t,n){return!!ml(m(this,xs),t,n)}amount(t,n,s){const{hideCurrency:r,...a}=s||{},i=O2(t,m(this,jt),n,r,{...a,currencyDisplay:"symbol",signDisplay:"never"});return t<0?`- ${i}`:i}date(t,n={}){const s={...dc,timeZone:m(this,$s).tz.current,...n};return new Date(t).toLocaleDateString(m(this,jt),s)}fullDate(t){return this.date(t,{month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}}jt=new WeakMap,Vr=new WeakMap,Fs=new WeakMap,zr=new WeakMap,Ms=new WeakMap,xs=new WeakMap,dn=new WeakMap,Xr=new WeakMap,Vn=new WeakMap,zn=new WeakMap,Bs=new WeakMap,$s=new WeakMap,Kr=new WeakSet,Ia=function(t){oe(m(this,zn))&&k(this,Xr,new Promise(r=>{k(this,zn,()=>{r(m(this,Vn)),k(this,Vn,k(this,zn,void 0))})}));const n=()=>{var r;m(this,Vn)===s&&((r=m(this,zn))==null||r.call(this))},s=k(this,Vn,(async()=>{k(this,xs,await m(this,dn).load(t)),k(this,jt,m(this,dn).locale),k(this,zr,Object.freeze(m(this,dn).supportedLocales)),k(this,Ms,t),k(this,Vr,Ko(m(this,jt))),m(this,Bs).requestNotification()})());s.then(n).catch(r=>{n(),console.error(r)})};class pc{constructor(t){Y(this,"components",[]);Y(this,"options");Y(this,"localization");Y(this,"loadingContext");Y(this,"session",new cm);Y(this,"onError");Y(this,"update",async(t=z)=>(this.setOptions(t),await this.initialize(),this.components.forEach(n=>{n.props.core===this&&n.update(this.getPropsForComponent(this.options))}),this));Y(this,"remove",t=>(this.components=this.components.filter(n=>n._id!==t._id),t.unmount(),this));Y(this,"registerComponent",t=>{t.props.core===this&&this.components.push(t)});Y(this,"setOptions",t=>{var n,s;return this.options={...this.options,...t},this.localization.locale=(n=this.options)==null?void 0:n.locale,this.localization.customTranslations=(s=this.options)==null?void 0:s.translations,this.session.loadingContext=this.loadingContext,this.session.onSessionCreate=this.options.onSessionCreate,this});this.options={environment:Sa,...t},this.localization=new Di(t.locale,t.availableTranslations),this.loadingContext=_f(this.options.environment),this.setOptions(t)}async initialize(){return Promise.all([this.localization.ready]).then(()=>this)}getPropsForComponent(t){return{...t}}}Y(pc,"version","1.6.1");var yo,pe,Nu,Du,Hn,_l,bu,Ou,Iu,fc,Pa,ka,Pu,Ur={},ku=[],j2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ao=Array.isArray;function Zt(e,t){for(var n in t)e[n]=t[n];return e}function mc(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function or(e,t,n){var s,r,a,i={};for(a in t)a=="key"?s=t[a]:a=="ref"?r=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?yo.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return Ir(e,i,s,r,null)}function Ir(e,t,n,s,r){var a={type:e,props:t,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Nu,__i:-1,__u:0};return r==null&&pe.vnode!=null&&pe.vnode(a),a}function V2(){return{current:null}}function Q(e){return e.children}function An(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ir(e):null}function wu(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return wu(e)}}function wa(e){(!e.__d&&(e.__d=!0)&&Hn.push(e)&&!Zo.__r++||_l!==pe.debounceRendering)&&((_l=pe.debounceRendering)||bu)(Zo)}function Zo(){for(var e,t,n,s,r,a,i,c=1;Hn.length;)Hn.length>c&&Hn.sort(Ou),e=Hn.shift(),c=Hn.length,e.__d&&(n=void 0,r=(s=(t=e).__v).__e,a=[],i=[],t.__P&&((n=Zt({},s)).__v=s.__v+1,pe.vnode&&pe.vnode(n),_c(t.__P,n,s,t.__n,t.__P.namespaceURI,32&s.__u?[r]:null,a,r??ir(s),!!(32&s.__u),i),n.__v=s.__v,n.__.__k[n.__i]=n,Mu(a,n,i),n.__e!=r&&wu(n)));Zo.__r=0}function Lu(e,t,n,s,r,a,i,c,d,l,u){var h,p,f,T,g,y,_=s&&s.__k||ku,v=t.length;for(d=z2(n,t,_,d,v),h=0;h<v;h++)(f=n.__k[h])!=null&&(p=f.__i===-1?Ur:_[f.__i]||Ur,f.__i=h,y=_c(e,f,p,r,a,i,c,d,l,u),T=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&gc(p.ref,null,f),u.push(f.ref,f.__c||T,f)),g==null&&T!=null&&(g=T),4&f.__u||p.__k===f.__k?d=Fu(f,d,e):typeof f.type=="function"&&y!==void 0?d=y:T&&(d=T.nextSibling),f.__u&=-7);return n.__e=g,d}function z2(e,t,n,s,r){var a,i,c,d,l,u=n.length,h=u,p=0;for(e.__k=new Array(r),a=0;a<r;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(d=a+p,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Ir(null,i,null,null,null):Ao(i)?Ir(Q,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Ir(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,c=null,(l=i.__i=X2(i,n,d,h))!==-1&&(h--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&(r>u?p--:r<u&&p++),typeof i.type!="function"&&(i.__u|=4)):l!=d&&(l==d-1?p--:l==d+1?p++:(l>d?p--:p++,i.__u|=4))):e.__k[a]=null;if(h)for(a=0;a<u;a++)(c=n[a])!=null&&(2&c.__u)==0&&(c.__e==s&&(s=ir(c)),Bu(c,c));return s}function Fu(e,t,n){var s,r;if(typeof e.type=="function"){for(s=e.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=e,t=Fu(s[r],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ir(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Mn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ao(e)?e.some(function(n){Mn(n,t)}):t.push(e)),t}function X2(e,t,n,s){var r,a,i=e.key,c=e.type,d=t[n];if(d===null&&e.key==null||d&&i==d.key&&c===d.type&&(2&d.__u)==0)return n;if(s>(d!=null&&(2&d.__u)==0?1:0))for(r=n-1,a=n+1;r>=0||a<t.length;){if(r>=0){if((d=t[r])&&(2&d.__u)==0&&i==d.key&&c===d.type)return r;r--}if(a<t.length){if((d=t[a])&&(2&d.__u)==0&&i==d.key&&c===d.type)return a;a++}}return-1}function gl(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||j2.test(t)?n:n+"px"}function bo(e,t,n,s,r){var a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof s=="string"&&(e.style.cssText=s=""),s)for(t in s)n&&t in n||gl(e.style,t,"");if(n)for(t in n)s&&n[t]===s[t]||gl(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Iu,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?s?n.t=s.t:(n.t=fc,e.addEventListener(t,a?ka:Pa,a)):e.removeEventListener(t,a?ka:Pa,a);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Tl(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=fc++;else if(t.u<n.t)return;return n(pe.event?pe.event(t):t)}}}function _c(e,t,n,s,r,a,i,c,d,l){var u,h,p,f,T,g,y,_,v,N,S,D,R,b,E,I,w,H=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),a=[c=t.__e=n.__e]),(u=pe.__b)&&u(t);e:if(typeof H=="function")try{if(_=t.props,v="prototype"in H&&H.prototype.render,N=(u=H.contextType)&&s[u.__c],S=u?N?N.props.value:u.__:s,n.__c?y=(h=t.__c=n.__c).__=h.__E:(v?t.__c=h=new H(_,S):(t.__c=h=new An(_,S),h.constructor=H,h.render=Z2),N&&N.sub(h),h.props=_,h.state||(h.state={}),h.context=S,h.__n=s,p=h.__d=!0,h.__h=[],h._sb=[]),v&&h.__s==null&&(h.__s=h.state),v&&H.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Zt({},h.__s)),Zt(h.__s,H.getDerivedStateFromProps(_,h.__s))),f=h.props,T=h.state,h.__v=t,p)v&&H.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),v&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(v&&H.getDerivedStateFromProps==null&&_!==f&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(_,S),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(_,h.__s,S)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(h.props=_,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(x){x&&(x.__=t)}),D=0;D<h._sb.length;D++)h.__h.push(h._sb[D]);h._sb=[],h.__h.length&&i.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(_,h.__s,S),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(f,T,g)})}if(h.context=S,h.props=_,h.__P=e,h.__e=!1,R=pe.__r,b=0,v){for(h.state=h.__s,h.__d=!1,R&&R(t),u=h.render(h.props,h.state,h.context),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[]}else do h.__d=!1,R&&R(t),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++b<25);h.state=h.__s,h.getChildContext!=null&&(s=Zt(Zt({},s),h.getChildContext())),v&&!p&&h.getSnapshotBeforeUpdate!=null&&(g=h.getSnapshotBeforeUpdate(f,T)),I=u,u!=null&&u.type===Q&&u.key==null&&(I=xu(u.props.children)),c=Lu(e,Ao(I)?I:[I],t,n,s,r,a,i,c,d,l),h.base=t.__e,t.__u&=-161,h.__h.length&&i.push(h),y&&(h.__E=h.__=null)}catch(x){if(t.__v=null,d||a!=null)if(x.then){for(t.__u|=d?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;a[a.indexOf(c)]=null,t.__e=c}else for(w=a.length;w--;)mc(a[w]);else t.__e=n.__e,t.__k=n.__k;pe.__e(x,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=K2(n.__e,t,n,s,r,a,i,d,l);return(u=pe.diffed)&&u(t),128&t.__u?void 0:c}function Mu(e,t,n){for(var s=0;s<n.length;s++)gc(n[s],n[++s],n[++s]);pe.__c&&pe.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(a){a.call(r)})}catch(a){pe.__e(a,r.__v)}})}function xu(e){return typeof e!="object"||e==null?e:Ao(e)?e.map(xu):Zt({},e)}function K2(e,t,n,s,r,a,i,c,d){var l,u,h,p,f,T,g,y=n.props,_=t.props,v=t.type;if(v=="svg"?r="http://www.w3.org/2000/svg":v=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((f=a[l])&&"setAttribute"in f==!!v&&(v?f.localName==v:f.nodeType==3)){e=f,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(r,v,_.is&&_),c&&(pe.__m&&pe.__m(t,a),c=!1),a=null}if(v===null)y===_||c&&e.data===_||(e.data=_);else{if(a=a&&yo.call(e.childNodes),y=n.props||Ur,!c&&a!=null)for(y={},l=0;l<e.attributes.length;l++)y[(f=e.attributes[l]).name]=f.value;for(l in y)if(f=y[l],l!="children"){if(l=="dangerouslySetInnerHTML")h=f;else if(!(l in _)){if(l=="value"&&"defaultValue"in _||l=="checked"&&"defaultChecked"in _)continue;bo(e,l,null,f,r)}}for(l in _)f=_[l],l=="children"?p=f:l=="dangerouslySetInnerHTML"?u=f:l=="value"?T=f:l=="checked"?g=f:c&&typeof f!="function"||y[l]===f||bo(e,l,f,y[l],r);if(u)c||h&&(u.__html===h.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(h&&(e.innerHTML=""),Lu(t.type==="template"?e.content:e,Ao(p)?p:[p],t,n,s,v=="foreignObject"?"http://www.w3.org/1999/xhtml":r,a,i,a?a[0]:n.__k&&ir(n,0),c,d),a!=null)for(l=a.length;l--;)mc(a[l]);c||(l="value",v=="progress"&&T==null?e.removeAttribute("value"):T!==void 0&&(T!==e[l]||v=="progress"&&!T||v=="option"&&T!==y[l])&&bo(e,l,T,y[l],r),l="checked",g!==void 0&&g!==e[l]&&bo(e,l,g,y[l],r))}return e}function gc(e,t,n){try{if(typeof e=="function"){var s=typeof e.__u=="function";s&&e.__u(),s&&t==null||(e.__u=e(t))}else e.current=t}catch(r){pe.__e(r,n)}}function Bu(e,t,n){var s,r;if(pe.unmount&&pe.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||gc(s,null,t)),(s=e.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(a){pe.__e(a,t)}s.base=s.__P=null}if(s=e.__k)for(r=0;r<s.length;r++)s[r]&&Bu(s[r],t,n||typeof e.type!="function");n||mc(e.__e),e.__c=e.__=e.__e=void 0}function Z2(e,t,n){return this.constructor(e,n)}function Es(e,t,n){var s,r,a,i;t==document&&(t=document.documentElement),pe.__&&pe.__(e,t),r=(s=!1)?null:t.__k,a=[],i=[],_c(t,e=t.__k=or(Q,null,[e]),r||Ur,Ur,t.namespaceURI,r?null:t.firstChild?yo.call(t.childNodes):null,a,r?r.__e:t.firstChild,s,i),Mu(a,e,i)}function $u(e,t,n){var s,r,a,i,c=Zt({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?s=t[a]:a=="ref"?r=t[a]:c[a]=t[a]===void 0&&i!==void 0?i[a]:t[a];return arguments.length>2&&(c.children=arguments.length>3?yo.call(arguments,2):n),Ir(e.type,c,s||e.key,r||e.ref,null)}function ls(e){function t(n){var s,r;return this.getChildContext||(s=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){s=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&s.forEach(function(i){i.__e=!0,wa(i)})},this.sub=function(a){s.add(a);var i=a.componentWillUnmount;a.componentWillUnmount=function(){s&&s.delete(a),i&&i.call(a)}}),n.children}return t.__c="__cC"+Pu++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,s){return n.children(s)}).contextType=t,t}yo=ku.slice,pe={__e:function(e,t,n,s){for(var r,a,i;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&a.getDerivedStateFromError!=null&&(r.setState(a.getDerivedStateFromError(e)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,s||{}),i=r.__d),i)return r.__E=r}catch(c){e=c}throw e}},Nu=0,Du=function(e){return e!=null&&e.constructor==null},An.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Zt({},this.state),typeof e=="function"&&(e=e(Zt({},n),this.props)),e&&Zt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wa(this))},An.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wa(this))},An.prototype.render=Q,Hn=[],bu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ou=function(e,t){return e.__v.__b-t.__v.__b},Zo.__r=0,Iu=/(PointerCapture)$|Capture$/i,fc=0,Pa=Tl(!1),ka=Tl(!0),Pu=0;var Q2=0;function o(e,t,n,s,r,a){t||(t={});var i,c,d=t;if("ref"in d)for(c in d={},t)c=="ref"?i=t[c]:d[c]=t[c];var l={type:e,props:d,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Q2,__i:-1,__u:0,__source:r,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(c in i)d[c]===void 0&&(d[c]=i[c]);return pe.vnode&&pe.vnode(l),l}var ss,Be,la,yl,ar=0,Uu=[],Ye=pe,Al=Ye.__b,vl=Ye.__r,Rl=Ye.diffed,Cl=Ye.__c,Sl=Ye.unmount,El=Ye.__;function vo(e,t){Ye.__h&&Ye.__h(Be,e,ar||t),ar=0;var n=Be.__H||(Be.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function F(e){return ar=1,bi(Hu,e)}function bi(e,t,n){var s=vo(ss++,2);if(s.t=e,!s.__c&&(s.__=[n?n(t):Hu(void 0,t),function(c){var d=s.__N?s.__N[0]:s.__[0],l=s.t(d,c);d!==l&&(s.__N=[l,s.__[1]],s.__c.setState({}))}],s.__c=Be,!Be.__f)){var r=function(c,d,l){if(!s.__c.__H)return!0;var u=s.__c.__H.__.filter(function(p){return!!p.__c});if(u.every(function(p){return!p.__N}))return!a||a.call(this,c,d,l);var h=s.__c.props!==c;return u.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(h=!0)}}),a&&a.call(this,c,d,l)||h};Be.__f=!0;var a=Be.shouldComponentUpdate,i=Be.componentWillUpdate;Be.componentWillUpdate=function(c,d,l){if(this.__e){var u=a;a=void 0,r(c,d,l),a=u}i&&i.call(this,c,d,l)},Be.shouldComponentUpdate=r}return s.__N||s.__}function G(e,t){var n=vo(ss++,3);!Ye.__s&&Tc(n.__H,t)&&(n.__=e,n.u=t,Be.__H.__h.push(n))}function cr(e,t){var n=vo(ss++,4);!Ye.__s&&Tc(n.__H,t)&&(n.__=e,n.u=t,Be.__h.push(n))}function q(e){return ar=5,A(function(){return{current:e}},[])}function J2(e,t,n){ar=6,cr(function(){if(typeof e=="function"){var s=e(t());return function(){e(null),s&&typeof s=="function"&&s()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function A(e,t){var n=vo(ss++,7);return Tc(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return ar=8,A(function(){return e},t)}function ds(e){var t=Be.context[e.__c],n=vo(ss++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Be)),t.props.value):e.__}function e1(){for(var e;e=Uu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bo),e.__H.__h.forEach(La),e.__H.__h=[]}catch(t){e.__H.__h=[],Ye.__e(t,e.__v)}}Ye.__b=function(e){Be=null,Al&&Al(e)},Ye.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),El&&El(e,t)},Ye.__r=function(e){vl&&vl(e),ss=0;var t=(Be=e.__c).__H;t&&(la===Be?(t.__h=[],Be.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Bo),t.__h.forEach(La),t.__h=[],ss=0)),la=Be},Ye.diffed=function(e){Rl&&Rl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Uu.push(t)!==1&&yl===Ye.requestAnimationFrame||((yl=Ye.requestAnimationFrame)||t1)(e1)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),la=Be=null},Ye.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Bo),n.__h=n.__h.filter(function(s){return!s.__||La(s)})}catch(s){t.some(function(r){r.__h&&(r.__h=[])}),t=[],Ye.__e(s,n.__v)}}),Cl&&Cl(e,t)},Ye.unmount=function(e){Sl&&Sl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(s){try{Bo(s)}catch(r){t=r}}),n.__H=void 0,t&&Ye.__e(t,n.__v))};var Nl=typeof requestAnimationFrame=="function";function t1(e){var t,n=function(){clearTimeout(s),Nl&&cancelAnimationFrame(t),setTimeout(e)},s=setTimeout(n,100);Nl&&(t=requestAnimationFrame(n))}function Bo(e){var t=Be,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Be=t}function La(e){var t=Be;e.__c=e.__(),Be=t}function Tc(e,t){return!e||e.length!==t.length||t.some(function(n,s){return n!==e[s]})}function Hu(e,t){return typeof t=="function"?t(e):t}const ct="adyen-pe-typography";var O=(e=>(e.CAPTION="caption",e.BODY="body",e.SUBTITLE="subtitle",e.TITLE="title",e))(O||{}),Yt=(e=>(e.WIDE="wide",e.STRONGER="stronger",e.STRONGER_WIDE="stronger-wide",e.STRONGEST="strongest",e.STRONGEST_WIDE="strongest-wide",e.MEDIUM="m",e.LARGE="l",e.MOBILE="mobile",e))(Yt||{}),J=(e=>(e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.DIV="div",e.PARAGRAPH="p",e.SPAN="span",e))(J||{});function Wu(e,t){for(var n in t)e[n]=t[n];return e}function Fa(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var s in t)if(s!=="__source"&&e[s]!==t[s])return!0;return!1}function Dl(e,t){this.props=e,this.context=t}function Ue(e,t){function n(r){var a=this.props.ref,i=a==r.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,r)||!i:Fa(this.props,r)}function s(r){return this.shouldComponentUpdate=n,or(e,r)}return s.displayName="Memo("+(e.displayName||e.name)+")",s.prototype.isReactComponent=!0,s.__f=!0,s}(Dl.prototype=new An).isPureReactComponent=!0,Dl.prototype.shouldComponentUpdate=function(e,t){return Fa(this.props,e)||Fa(this.state,t)};var bl=pe.__b;pe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),bl&&bl(e)};var n1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function mr(e){function t(n){var s=Wu({},n);return delete s.ref,e(s,n.ref||null)}return t.$$typeof=n1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var s1=pe.__e;pe.__e=function(e,t,n,s){if(e.then){for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}s1(e,t,n,s)};var Ol=pe.unmount;function Gu(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),e.__c.__H=null),(e=Wu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(s){return Gu(s,t,n)})),e}function Yu(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(s){return Yu(s,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function da(){this.__u=0,this.o=null,this.__b=null}function qu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Oo(){this.i=null,this.l=null}pe.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ol&&Ol(e)},(da.prototype=new An).__c=function(e,t){var n=t.__c,s=this;s.o==null&&(s.o=[]),s.o.push(n);var r=qu(s.__v),a=!1,i=function(){a||(a=!0,n.__R=null,r?r(c):c())};n.__R=i;var c=function(){if(!--s.__u){if(s.state.__a){var d=s.state.__a;s.__v.__k[0]=Yu(d,d.__c.__P,d.__c.__O)}var l;for(s.setState({__a:s.__b=null});l=s.o.pop();)l.forceUpdate()}};s.__u++||32&t.__u||s.setState({__a:s.__b=s.__v.__k[0]}),e.then(i,i)},da.prototype.componentWillUnmount=function(){this.o=[]},da.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),s=this.__v.__k[0].__c;this.__v.__k[0]=Gu(this.__b,n,s.__O=s.__P)}this.__b=null}var r=t.__a&&or(Q,null,e.fallback);return r&&(r.__u&=-33),[or(Q,null,t.__a?null:e.children),r]};var Il=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function r1(e){return this.getChildContext=function(){return e.context},e.children}function o1(e){var t=this,n=e.h;t.componentWillUnmount=function(){Es(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(s){this.childNodes.push(s),t.h.appendChild(s)},insertBefore:function(s,r){this.childNodes.push(s),t.h.insertBefore(s,r)},removeChild:function(s){this.childNodes.splice(this.childNodes.indexOf(s)>>>1,1),t.h.removeChild(s)}}),Es(or(r1,{context:t.context},e.__v),t.v)}function ju(e,t){var n=or(o1,{__v:e,h:t});return n.containerInfo=t,n}(Oo.prototype=new An).__a=function(e){var t=this,n=qu(t.__v),s=t.l.get(e);return s[0]++,function(r){var a=function(){t.props.revealOrder?(s.push(r),Il(t,e,s)):r()};n?n(a):a()}},Oo.prototype.render=function(e){this.i=null,this.l=new Map;var t=Mn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Oo.prototype.componentDidUpdate=Oo.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Il(e,n,t)})};var i1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,a1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,c1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,l1=/[A-Z0-9]/g,d1=typeof document<"u",u1=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};An.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(An.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Pl=pe.event;function h1(){}function p1(){return this.cancelBubble}function f1(){return this.defaultPrevented}pe.event=function(e){return Pl&&(e=Pl(e)),e.persist=h1,e.isPropagationStopped=p1,e.isDefaultPrevented=f1,e.nativeEvent=e};var m1={enumerable:!1,configurable:!0,get:function(){return this.class}},kl=pe.vnode;pe.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,s=t.type,r={},a=s.indexOf("-")===-1;for(var i in n){var c=n[i];if(!(i==="value"&&"defaultValue"in n&&c==null||d1&&i==="children"&&s==="noscript"||i==="class"||i==="className")){var d=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&c===!0?c="":d==="translate"&&c==="no"?c=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?i="ondblclick":d!=="onchange"||s!=="input"&&s!=="textarea"||u1(n.type)?d==="onfocus"?i="onfocusin":d==="onblur"?i="onfocusout":c1.test(i)&&(i=d):d=i="oninput":a&&a1.test(i)?i=i.replace(l1,"-$&").toLowerCase():c===null&&(c=void 0),d==="oninput"&&r[i=d]&&(i="oninputCapture"),r[i]=c}}s=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Mn(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),s=="select"&&r.defaultValue!=null&&(r.value=Mn(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",m1)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=i1,kl&&kl(e)};var wl=pe.__r;pe.__r=function(e){wl&&wl(e),e.__c};var Ll=pe.diffed;pe.diffed=function(e){Ll&&Ll(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function _1({el:e,className:t,stronger:n,strongest:s,variant:r,medium:a,large:i,testId:c,wide:d,children:l}){const u=e||"p",h=A(()=>({[`${ct}--${O.CAPTION}`]:r===O.CAPTION,[`${ct}--${O.CAPTION}-${Yt.WIDE}`]:r===O.CAPTION&&d,[`${ct}--${O.CAPTION}-${Yt.STRONGER}`]:r===O.CAPTION&&n,[`${ct}--${O.BODY}`]:r===O.BODY,[`${ct}--${O.BODY}-${Yt.WIDE}`]:r===O.BODY&&d,[`${ct}--${O.BODY}-${Yt.STRONGER}`]:r===O.BODY&&n,[`${ct}--${O.BODY}-${Yt.STRONGEST}`]:r===O.BODY&&s,[`${ct}--${O.SUBTITLE}`]:r===O.SUBTITLE,[`${ct}--${O.SUBTITLE}-${Yt.STRONGER}`]:r===O.SUBTITLE&&n,[`${ct}--${O.TITLE}`]:r===O.TITLE&&!a&&!i,[`${ct}--${O.TITLE}-${Yt.MEDIUM}`]:r===O.TITLE&&a,[`${ct}--${O.TITLE}-${Yt.LARGE}`]:r===O.TITLE&&i}),[r,d,n,a,i,s]);return o(u,{className:M([`${ct}`,h,t]),"data-testid":c,children:l})}const P=Ue(_1),Vu=ls({i18n:new Di().i18n,loadingContext:"",commonProps:{},updateCore:ue,componentRef:{current:null}}),W=()=>ds(Vu),g1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='223'%20height='169'%20fill='none'%20viewBox='0%200%20223%20169'%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M36.6%20112.2c.6-.1%201-.7%201-1.3l-.9-8.7%202.1%206.6c.2.6.8.8%201.4.7.6-.1%201-.7.8-1.2l-1.3-6.8%202.9-4.8-5.9-5.5-7.6%209%205%204.7%201%206.2c0%20.7.7%201.2%201.5%201Z'/%3e%3cpath%20fill='%23EAB1A0'%20d='M31.7%20103.6c.3.4%201.2%206.6%201.5%209%200%20.5.6%201%201.1%201h.3c.7%200%201.2-.6%201.1-1.3l-.7-9.1'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M31.7%20103.6c.3.4%201.2%206.6%201.5%209%200%20.5.6%201%201.1%201h.3c.7%200%201.2-.6%201.1-1.3l-.7-9.1'/%3e%3cpath%20fill='%23EAB1A0'%20d='M30.4%2099.3v13.1c0%20.6.5%201.1%201.2%201.1.5%200%201-.4%201-1l1.2-9.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M30.4%2099.3v13.1c0%20.6.5%201.1%201.2%201.1.5%200%201-.4%201-1l1.2-9.3'/%3e%3cpath%20fill='%23EAB1A0'%20d='M35.8%2092s-6.5%204.8-6.6%206.2a995%20995%200%200%200-.9%2010.3c1.5%200%202.8-1%203.2-2.3.6-2.1%201.2-4.9%201-5.1-.1-.3%205-.7%205.8-3.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M35.8%2092s-6.5%204.8-6.6%206.2a995%20995%200%200%200-.9%2010.3c1.5%200%202.8-1%203.2-2.3.6-2.1%201.2-4.9%201-5.1-.1-.3%205-.7%205.8-3.8'/%3e%3cpath%20fill='%233300C2'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M95.3%2046.7S78%2053%2070.5%2059.4c-7.6%206.4-36.1%2031.2-36.1%2031.2l11.2%2011%2038-27.3c3.5-2.6%2011.7-27.6%2011.7-27.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m45.6%20101.7-11.2-11%2029.8-2.5-18.6%2013.5ZM186.4%2090.4h-7.1v25.3h7.1V90.4ZM215.6%2066.7h-7.2V92h7.2V66.7ZM173.7%20167.8h-7l8.3-44h7l-8.3%2044ZM26.3%20167.8h-7l8.3-44h7l-8.3%2044ZM209.2%20167.8h-7l-8.3-44h7l8.3%2044ZM68%2091.1h-7v25h7V91Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M208.4%2066.7H39V92h169.3V66.7Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M208.4%20123.4v-7.6H39v7.6h169.5Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M193.7%20123.4V116H15.3v7.5h178.4Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M77.4%20167.8h-7l-8.3-44h7l8.3%2044ZM42.2%20150.4l-.8%203h16.2l.7-3.1h-16ZM80.1%20150.3l1.4%203h15.1l-1-3H80Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m97.8%20115.9-28.4.1-7.7%2034.7h-23l9.5-40.6a18%2018%200%200%201%2016.7-12l54-.5-.5%202.6c-2%209.1-10.6%2015.6-20.6%2015.7Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M110.7%20115.9H85.5L99%20150.3h-25L62.9%20117c-3-9%203.6-18.6%2013.6-19.4h.8l54.5-1.3-.6%203.9a20.7%2020.7%200%200%201-20.4%2015.7Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M57.6%20153.4H41.4l-.8%202.7-16.8%204.2c-2%20.7-3.7%202.1-4.7%203.9H55l2.6-10.8ZM96.6%20153.4H81.5l1.3%202.9-15.2%204c-2%20.7-3.6%202.1-4.6%203.8h37.3l-3.7-10.7Z'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m54%20168%201-3.8H19a8%208%200%200%200-1%203.8h36ZM101.7%20168l-1.3-3.8H63a8%208%200%200%200-1%203.8h39.6Z'/%3e%3cpath%20fill='%233300C2'%20d='M86.9%2059.6c.3%2020-5.4%2037.7-5.4%2037.7l50.3-.1s4.7-18.7%202-31c-2.6-12.3-16.2-21.8-22.5-22.3-6.2-.6-20.6%204.6-20.6%204.6'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M86.9%2059.6c.3%2020-5.4%2037.7-5.4%2037.7l50.3-.1s4.7-18.7%202-31c-2.6-12.3-16.2-21.8-22.5-22.3-6.2-.6-20.6%204.6-20.6%204.6'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M96.7%2047.1s.6%205.5%202%209c1.2%203.6%202%207.3%202%207.3s6.8-17.5%208.3-19.6c0%200-8%206.5-12.3%203.3Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m105.8%2038.3%203.1%205.5s-4%206.8-8.6%206.7c-4.7%200-3.5-5.6-3.5-5.6l9-6.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m101.8%2044.7-4%204.9-1-2.5%205-2.4ZM97%2083.1H85.6l-3.3-17.9h11.1l3.4%2017.9Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M101.6%2082.6c-1-1.6-2.3-3-3.2-4.5-1.2-2-1.7-4.5-2.3-6.8-2.5-.7-2.6%204-2.4%206%20.3%201.8%201%203.7%201%203.7-2-.4-10.4-4.7-10.4-4.7.3%200-1.4%202.3-.7%203.3l1%201.3s-.7%201.3-.7%202c-.1%201.2%201.1%202.2%201.1%202.2l.1%202.3c.2.8%201.5%201.5%201.5%201.5s0%201.4.7%201.8c.7.3%2011.2%201.2%2015.8%201.4%200-1.6.5-3.4.3-5%200-1.5-1-3.2-1.8-4.5Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M111.7%2021.9c.4.8-.2%201.8-1%202.4-.7.5-1.7.7-2.6%201%201.2-.4%202.6-.2%203.8.2.4.2.8.4%201%20.7.3.5.1%201.2-.2%201.6-.3.4-.8.8-1.3%201-1.4.7-3%201.2-4.5%201.3%201%200%201.5%201.1%201.1%201.9-.4.8-1.3%201.2-2.2%201.4-1.5.4-3.3.4-4.5-.4-.7-.4-1.1-1-1.5-1.5a7%207%200%200%201-.2-7.4%209%209%200%200%201%205.7-3.8c1.7-.3%205.6-.3%206.4%201.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M68.7%2025c.5%201.7%203%202%204.6%201.3-1.2.2-2.4.4-3.3%201.2-1%20.9-1.1%202.4-.1%203%20.3.3.8.4%201.3.4a9%209%200%200%200%204.6-1c-1%20.6-2%201.9-1.3%203%20.6.9%202.2.8%203.2.2%201-.6%202-1.5%203-1.8-.6.4-1.3.8-1.5%201.5-.3.6%200%201.6.6%201.7.5.1%201%200%201.4-.2%201.1-.6%202.2-1.3%203-2.3-1%20.3-.8%201.9.1%202.3%201%20.4%202%200%203-.6a8.5%208.5%200%200%200%202.8-3c-.3.4%200%201.1.6%201.5%201%20.6%202.4.7%203.5.3a9%209%200%200%200%203-2%207%207%200%200%200%202-2.4c.6-1.4.2-3-.7-4.2A10%2010%200%200%200%2095%2021c-4.3-2.3-9.8-3-14.6-1.7a6.6%206.6%200%200%200-6.8-2c-.7.3-1.5.7-1.8%201.4-.5%201.2.5%202.3%201.6%202.8-2%200-5.4%201-4.6%203.5Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M80.6%2027.7c.7-.7%2010.6-6.8%2010.6-6.8l10.2%203.8%204.8%209.1v.2c.9%207.4-3.1%2010.5-8.8%2013.2-5%202.4-16-1.6-16.9-19.4%200%200%200%200%200%200Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M70.3%2017.3c-.3-.9-.3-1.8.2-2.4.5-.5%201.2-.7%201.9-.6.7%200%201.3.4%201.9.7-.9-.8-.3-2.3.8-2.7%201.1-.3%202.4.1%203.2%201%20.5.4%201%204.3%201.5%204.4.6.1%201%200%201.5-.2%202.4-.9%205-1.5%207.4-1.8%201.9-.3%203.8-.4%205.6-.2%202.1.3%204.2%201%206.2%201.9v0c3.4.2%207.4%2010.5%206.4%2010.8-.9.2.2%200-.1.1-2.1.7-6.4-.7-7.6-1.1a12%2012%200%200%201-3.1-2.1c-1.8-1.4-4-2.2-6.2-2.6l-1.4-.2c-1.8.7-3.8%201-5.8.7-.7%200-1.5-.3-2-.8-.3-.4-.3-1.2.2-1.5-1%20.5-2.1.7-3.3.7-.7%200-1.6%200-2.2-.7-.6-.5-.5-1.6.3-1.8-1.3.3-2.8.7-4%200-.7-.5-1.2-.7-1.4-1.6Z'/%3e%3cpath%20fill='%23EAB1A0'%20d='M100%2027.8c-.6-1.7.7-4.3%202.4-4.6%202.6-.5%204%202%204.5%204%20.5%201.8.6%203.8-.2%205.6-.3.5-.6%201-1.2%201.4'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M100%2027.8c-.6-1.7.7-4.3%202.4-4.6%202.6-.5%204%202%204.5%204%20.5%201.8.6%203.8-.2%205.6-.3.5-.6%201-1.2%201.4'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M96.8%207.7c2%200%203.6-1.5%203.6-3.4%200-1.8-1.6-3.3-3.6-3.3s-3.6%201.5-3.6%203.3c0%201.9%201.6%203.4%203.6%203.4Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M107.4%2022.1c0-.1%200-3.3-1.5-7.5-1.6-4-4.9-9.1-11.6-10.4-8.2-1.2-13.2%204-15.4%207.3-2.3%203.2-2.4%205.3-2.4%205.3a67%2067%200%200%201%2030.9%205.3Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M93.3%2017.9c.7-.9.4-2.2-.6-2.7-1-.4-2.4.2-2.7%201.2.7-.9.4-2.2-.5-2.9-.9-.7-2.3-.7-3.2%200-1%20.6-1.3%201.9-1%202.9%200-.7%200-1.5-.2-2.1-.3-.7-1-1.3-1.7-1.3-.5%200-1%20.2-1.4.5a3%203%200%200%200-1%203c-.3-1-.5-2.1-1.2-3-.7-1-1.8-1.6-3-1.4-1%20.2-2%201.3-2%202.3%200%201%20.7%202%201.5%202.7.1%200%2014.6%204%2017%20.8Z'/%3e%3cpath%20fill='%233300C2'%20d='M128%2054.8s22%2026.5%2018.9%2037.8c-2%206.7-47%204.9-47%204.9l2.5-14.3%2023.7-1.5-9.7-12.5'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M128%2054.8s22%2026.5%2018.9%2037.8c-2%206.7-47%204.9-47%204.9l2.5-14.3%2023.7-1.5-9.7-12.5'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M57.4%201.4H1v29.4h33.2L48.9%2045l-.2-14.2h8.7V1.4Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M2.3%20168h219.4'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M29.2%2026.3c6.2%200%2011.3-4.7%2011.3-10.5S35.4%205.2%2029.2%205.2C23%205.2%2017.9%2010%2017.9%2015.8s5%2010.5%2011.3%2010.5Z'/%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m25.2%2012%208%207.5M33.2%2012l-8%207.5'/%3e%3c/svg%3e",Je=e=>mr(e),Qo=(()=>{const e=new Set,t=(s,r,a,i)=>{let c=i==null?void 0:i[a];return c=ee(c)?c:po,!as(c(s[a]),c(r[a]))};return Object.defineProperty(s=>(r,a)=>{try{for(const i in r)if(e.add(i),t(r,a,i,s))return!1;for(const i in a)if(!e.has(i)&&(e.add(i),t(r,a,i,s)))return!1;return!0}finally{e.clear()}},"exclude",{value:ue})})(),Fl=/^\s+|\s+(?=\s|$)/g,ns=(e,t)=>(t?typeof t=="string"?t:(t==null?void 0:t.value)??"":"").replace(Fl,"")||e.replace(Fl,"")||void 0,Jo=(e,t,n)=>M(ns("",n),ns(ns("",t)||"",e)),yc=(e,t=[],n=[])=>M([...n,...t==null?void 0:t.map(s=>e?`${e}--${s}`:s)]),Oi=e=>Ts(e,(e==null?void 0:e.value)??e),_t="adyen-pe-button",T1="adyen-pe-button__anchor",Ma=`${_t}-actions`,y1=`${_t}--icon`,A1=`${_t}--icon-content`,v1=`${Ma}__container-wrapper`,zu=`${_t}__label`,R1=`${_t}__icon-right`,C1=`${_t}__icon-left`,S1=`${_t}--condensed`,E1=`${_t}--full-width`,N1=`${_t}--loading`,D1=`${zu}--centered`,xa=({inline:e=!1,size:t="large"})=>o("div",{className:`adyen-pe-spinner__wrapper ${e?"adyen-pe-spinner__wrapper--inline":""}`,children:o("div",{className:`adyen-pe-spinner adyen-pe-spinner--${t}`})}),Ii=(e,t,n,s,r,a)=>{const{children:i,iconLeft:c,iconRight:d,iconButton:l=!1,fullWidth:u,condensed:h,state:p="default"}=r,f=C(_=>{_.preventDefault(),s||a==null||a(_)},[s,a]),T=A(()=>yc(n,t,[n,e]),[n,t,e]),g=A(()=>({...r,className:M(T,{[y1]:l,[S1]:h,[E1]:u,[N1]:p==="loading"}),disabled:s||p==="loading"}),[T,h,s,u,l,r,p]),y=A(()=>l?o("div",{className:`${A1}`,children:i}):o(Q,{children:[p==="loading"&&o(xa,{size:"x-small"}),c&&o("span",{className:C1,children:c}),o(P,{className:M(zu,{[D1]:r.align==="center"}),el:J.SPAN,variant:O.BODY,children:i}),d&&o("span",{className:R1,children:d})]}),[i,l,c,d,r.align,p]);return{classes:T,click:f,allChildren:y,allProps:g}};var ne=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.TERTIARY_WITH_BACKGROUND="tertiary-with-background",e.LINK="link",e))(ne||{});function b1(e,t){const n=A(()=>ns("",e.className)||"",[e.className]),s=A(()=>Oi(e.disabled||!1),[e.disabled]),{click:r,allChildren:a,allProps:i}=Ii(n,[...e.classNameModifiers||[],e.variant||ne.PRIMARY],_t,s,e,e.onClick),{classNameModifiers:c,...d}=i;return o("button",{...d,ref:t,type:e.type||"button",onClick:r,children:a})}const ge=Je(b1),Ml={md:680},Jt=({title:e,message:t,imageDesktop:n,imageMobile:s,withImage:r,centered:a,refreshComponent:i,onContactSupport:c,translationValues:d,absolutePosition:l=!0,outlined:u=!0,renderSecondaryButton:h,withBackground:p})=>{const{i18n:f,updateCore:T}=W(),g=C(y=>Array.isArray(y)?y.map((_,v)=>v===0?o(Q,{children:[f.get(_),d&&d[_]&&o(Q,{children:d[_]})]}):o(Q,{children:[o("br",{}),f.get(_),d&&d[_]&&o(Q,{children:d[_]})]})):f.get(y),[f,d]);return o("div",{className:M(["adyen-pe-error-message-display"],{"adyen-pe-error-message-display--absolute-position":l,"adyen-pe-error-message-display--outlined":u,"adyen-pe-error-message-display--with-background":p!==!1&&!u,"adyen-pe-error-message-display--centered":a}),children:[(n||s||r)&&o("div",{className:"adyen-pe-error-message-display__illustration",children:o("picture",{children:[o("source",{type:"image/svg+xml",media:`(min-width: ${Ml.md}px)`,srcSet:n}),o("source",{type:"image/svg+xml",media:`(max-width: ${Ml.md}px)`,srcSet:s}),o("img",{srcSet:n??g1,alt:f.get("thereWasAnUnexpectedError")})]})}),o(P,{variant:O.TITLE,children:f.get(e)}),t&&o(P,{variant:O.BODY,children:g(t)}),(c||i||h)&&o("div",{className:"adyen-pe-error-message-display__button",children:[h&&h(),c&&o(ge,{onClick:c,children:f.get("reachOutToSupport")}),!c&&i&&o(ge,{onClick:T,children:f.get("refresh")})]})]})},cn=(e,t)=>ee(e.endpoints[t]),ua={transactions:e=>cn(e,"getTransactions"),transactionDetails:e=>cn(e,"getTransaction"),payouts:e=>cn(e,"getPayouts"),payoutDetails:e=>cn(e,"getPayout"),reports:e=>cn(e,"getReports"),capitalOverview:e=>cn(e,"getDynamicGrantOffersConfiguration"),capitalOffer:e=>cn(e,"getDynamicGrantOffer"),disputes:e=>cn(e,"getDisputeList"),disputesManagement:e=>cn(e,"getDisputeDetail")},Xu=async e=>{const t=Jd(),n=t.promise,s=e.context.refreshing;let r,a,i=e.subscribe(c=>{if(cs(c)){t.resolve();return}if(r??(r=e.context.refreshing),!e.context.refreshing){if(tn(e.context.isExpired)&&(a??(a=!(s||r)))){a=!1,e.refresh();return}t.resolve()}});return n.finally(()=>{i(),i=null}),n},O1=async(e,t)=>{var n;return await Xu(t),Ve(await((n=ua[e])==null?void 0:n.call(ua,t.context)))},I1=e=>{switch(e){case"payouts":return"weCouldNotLoadThePayoutsOverview";case"transactions":return"weCouldNotLoadTheTransactionsOverview";case"transactionDetails":return"weCouldNotLoadYourTransactions";case"payoutDetails":return"weCouldNotLoadYourPayouts";case"reports":return"weCouldNotLoadTheReportsOverview";default:return"somethingWentWrong"}},Ku=ls({endpoints:z,extraConfig:z,hasError:!1,http:gf,isExpired:void 0,isFrozen:!1,refresh:ue,refreshing:!1}),P1=({children:e,session:t,type:n})=>{const{http:s,refresh:r}=A(()=>t,[t]),[,a]=F(0),[i,c]=F(0),[d,l]=F();return G(()=>{O1(n,t).then(l)},[t,n]),G(()=>t.subscribe(u=>{(cs(u)?c:a)(p=>p+1)}),[i]),o(Ku.Provider,{value:{...t.context,http:s,refresh:r},children:!oe(d)&&(d?Mn(e):o(Jt,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[I1(n),"contactSupportForHelp"]}))})},Ee=()=>ds(Ku),zt=(e=!1)=>{const[t,n]=F(e),s=C(a=>n(a),[]),r=C(()=>n(a=>!a),[]);return[t,s,r]},k1=({i18n:e=new Di().i18n,children:t,commonProps:n,loadingContext:s,updateCore:r,externalErrorHandler:a,componentRef:i})=>{const[c,d]=zt(!1),l=A(()=>n||{},[n]),u=A(()=>s??"",[s]);return G(()=>{(async()=>{await(e==null?void 0:e.ready),d(!0)})().catch()},[]),c?o(Vu.Provider,{value:{i18n:e,commonProps:l,loadingContext:u,updateCore:r,externalErrorHandler:a,componentRef:i},children:Mn(t)}):null};var Yd;class Zu{constructor(t){Y(this,"_component");Y(this,"_node",null);Y(this,"_id",`${(Yd=this.constructor)==null?void 0:Yd.type}-${Ci()}`);Y(this,"defaultProps",{});Y(this,"props");Y(this,"state",{});this.props=this.formatProps({...this==null?void 0:this.defaultProps,...t}),this.props.core.registerComponent(this)}formatProps(t){return t}formatData(){return{}}setState(t){this.state={...this.state,...t}}get data(){return{...this.formatData(),clientStateDataIndicator:!0}}render(){throw new Error("Component cannot be rendered.")}mount(t){const n=Ot(t)?document.querySelector(t):t;if(!n)throw new Error("Component could not mount. Root node was not found.");return this._node&&this.unmount(),this._node=n,this._component=this.render(),Es(this._component,n),this}update(t){return this.props=this.formatProps({...this.props,...t}),this._component=this.render(),this._node&&Es(this._component,this._node),this}remount(t){if(!this._node)throw new Error("Component is not mounted.");const n=t||this.render();return Es(n,this._node),this}unmount(){return this._node&&Es(null,this._node),this}remove(){this.unmount(),this.props.core.remove(this)}}Y(Zu,"type");class Sn extends Zu{constructor(n){super(n);Y(this,"componentRef",null);Y(this,"componentToRender",null);Y(this,"elementRef");Y(this,"onContactSupport");Y(this,"customClassNames");Y(this,"compRef");Y(this,"setUIElementStatus");this.setState=this.setState.bind(this),this.onContactSupport=n.onContactSupport,this.elementRef=this,this.compRef=V2()}get isValid(){return!!this.state.isValid}get displayName(){return this.type}get accessibleName(){return this.displayName}get type(){var n;return(n=this.constructor)==null?void 0:n.type}formatProps(n){return n}formatData(){return{...this.state}}setState(n){this.state={...this.state,...n}}setStatus(n,s){var r,a;return(r=this.componentRef)!=null&&r.setStatus?this.componentRef.setStatus(n,s):(a=this.setUIElementStatus)==null||a.call(this,n),this}render(){const n=this.props.core,s=n.update.bind(n),r=this.props.onError||n.onError||null;return n.session.errorHandler=r,o(P1,{type:this.type,session:n.session,children:o(k1,{i18n:n.localization.i18n,loadingContext:n.loadingContext,updateCore:s,externalErrorHandler:r,componentRef:this.compRef,children:this.componentToRender&&o("div",{ref:this.compRef,className:M("adyen-pe-component",this.customClassNames),children:o("div",{className:"adyen-pe-component__container",children:this.componentToRender()})})})},performance.now())}}function gt({fetchOptions:{keepPrevData:e,onSuccess:t,enabled:n}={keepPrevData:!0},queryFn:s}){const r=q(!1),a={error:void 0,data:void 0,isFetching:tn(n)},i=(u,h)=>{switch(h.type){case"loading":return{...a,isFetching:!0,data:e?u.data:void 0};case"fetched":return{...a,data:h.payload,isFetching:!1};case"error":return{...a,error:h.payload,isFetching:!1};default:return u}},[c,d]=bi(i,a),l=C(async()=>{d({type:"loading"});try{if(r.current)return;const u=await s();t==null||t(u),d({type:"fetched",payload:u})}catch(u){if(r.current)return;d({type:"error",payload:u})}},[d,s,t]);return G(()=>(r.current=!1,tn(n)&&l(),()=>{r.current=!0}),[n,l]),c}const Pi=Je(({title:e,...t},n)=>o("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&o("title",{children:e}),o("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.47 4.97c.3-.3.77-.3 1.06 0L8 9.44l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5c-.3.3-.77.3-1.06 0l-5-5a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})]})),Ac=Je(({title:e,...t},n)=>o("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&o("title",{children:e}),o("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.53 11.03c-.3.3-.77.3-1.06 0L8 6.56l-4.47 4.47a.75.75 0 1 1-1.06-1.06l5-5c.3-.3.77-.3 1.06 0l5 5c.3.3.3.77 0 1.06Z",clipRule:"evenodd"})]})),vc="adyen-pe-accordion",Rc=vc+"__header",w1=Rc+"-container",L1=Rc+"-controller",F1=vc+"__content";function xl({children:e,classNames:t,header:n,headerInformation:s}){var d;const[r,a]=F(!1),i=q(null),c=C(()=>{a(!r)},[r]);return o("div",{className:M(vc,t),children:[o("h3",{className:Rc,children:[o("button",{id:"accordion-controller","aria-controls":"accordion-content",className:w1,onClick:c,"aria-expanded":r,children:o("div",{className:L1,children:[n,r?o(Ac,{height:8,width:15}):o(Pi,{height:8,width:15})]})}),s&&o("div",{children:s})]}),o("div",{role:"region",id:"accordion-content","aria-labelledby":"accordion-controller",style:{maxHeight:r?(d=i==null?void 0:i.current)==null?void 0:d.offsetHeight:0},className:F1,children:o("div",{ref:i,children:e})})]})}var te=(e=>(e.ARROW_DOWN="ArrowDown",e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_UP="ArrowUp",e.BACKSPACE="Backspace",e.END="End",e.ENTER="Enter",e.ESCAPE="Escape",e.HOME="Home",e.PAGE_DOWN="PageDown",e.PAGE_UP="PageUp",e.SPACE="Space",e.TAB="Tab",e))(te||{}),re=(e=>(e.BALANCE_ACCOUNT="balanceAccount",e.CATEGORIES="categories",e.CURRENCIES="currencies",e.CREATED_SINCE="createdSince",e.CREATED_UNTIL="createdUntil",e.STATUSES="statuses",e.MIN_AMOUNT="minAmount",e.MAX_AMOUNT="maxAmount",e))(re||{});const Bl={"angle-right":()=>Promise.resolve().then(()=>require("./angle-right-K64mXtoy.cjs")),"checkmark-circle-fill":()=>Promise.resolve().then(()=>require("./checkmark-circle-fill-BV2FvQh0.cjs")),"checkmark-square-fill":()=>Promise.resolve().then(()=>require("./checkmark-square-fill-B6rUSLy6.cjs")),checkmark:()=>Promise.resolve().then(()=>require("./checkmark-BFOfQ4U3.cjs")),"chevron-down":()=>Promise.resolve().then(()=>require("./chevron-down-Cwk2F1N2.cjs")),"chevron-left":()=>Promise.resolve().then(()=>require("./chevron-left-3kfyOgH8.cjs")),"chevron-right":()=>Promise.resolve().then(()=>require("./chevron-right-DlSewmYP.cjs")),"chevron-up":()=>Promise.resolve().then(()=>require("./chevron-up-DcHOD7ve.cjs")),copy:()=>Promise.resolve().then(()=>require("./copy-DmBUwp7_.cjs")),"cross-circle-fill":()=>Promise.resolve().then(()=>require("./cross-circle-fill-CepPVSd-.cjs")),cross:()=>Promise.resolve().then(()=>require("./cross-JGXC9RPo.cjs")),download:()=>Promise.resolve().then(()=>require("./download-BToMR9ry.cjs")),"external-link":()=>Promise.resolve().then(()=>require("./external-link-BRDaK3Bx.cjs")),filter:()=>Promise.resolve().then(()=>require("./filter-DXSSpM1j.cjs")),"info-filled":()=>Promise.resolve().then(()=>require("./info-filled-CqqSx6ab.cjs")),"minus-circle-outline":()=>Promise.resolve().then(()=>require("./minus-circle-outline-C_OF3LwJ.cjs")),plus:()=>Promise.resolve().then(()=>require("./plus-CW8c0zs1.cjs")),"plus-circle-outline":()=>Promise.resolve().then(()=>require("./plus-circle-outline-DJ6zGU6z.cjs")),square:()=>Promise.resolve().then(()=>require("./square-2HAeIvAR.cjs")),"trash-can":()=>Promise.resolve().then(()=>require("./trash-can-BLQ5Pm8W.cjs")),upload:()=>Promise.resolve().then(()=>require("./upload-C9Z9qRuS.cjs")),"warning-filled":()=>Promise.resolve().then(()=>require("./warning-filled-3hD1yAKv.cjs")),warning:()=>Promise.resolve().then(()=>require("./warning-CIRG3GTY.cjs"))},Re=({className:e,name:t,...n})=>{const[s,r]=F(null);return G(()=>{Bl[t]?Bl[t]().then(({default:a})=>{r(o(a,{}))}):(r(null),console.error(`Icon with name "${t}" does not exist.`))},[t]),s&&o("span",{className:M("adyen-pe-icon",e),role:"img","aria-hidden":!0,...n,children:s})},Pt="adyen-pe-card",M1=`${Pt}--expandable`,x1=`${Pt}__toggle`,Qu=`${Pt}__body`,Ju=`${Pt}__header`,B1=`${Pt}__title`,$1=`${Pt}__subtitle`,U1=`${Ju}-content`,H1=`${Qu}--with-title`,W1=`${Pt}--no-outline`,G1=`${Pt}--no-padding`,Y1=`${Pt}--filled`,q1=`${Pt}__footer`,j1=`${Pt}--compact`,Pr=({title:e,subTitle:t,children:n,expandable:s=!1,footer:r,el:a,renderHeader:i,renderFooter:c,filled:d,noOutline:l,noPadding:u,classNameModifiers:h,testId:p,compact:f})=>{const T=a||"header",[g,y]=F(!1),_=A(()=>Ci(),[]),v=C(()=>{s&&y(D=>!D)},[s]),N=C(D=>{switch(D.code){case te.ENTER:case te.SPACE:D.preventDefault(),v();return}},[v]),S=A(()=>s?{role:"button",tabIndex:0,onClick:v,onKeyDown:N,"aria-controls":_,"aria-expanded":g}:{},[s,g,_,N,v]);return o("section",{"data-testid":p,className:M(Pt,h,{[Y1]:d,[W1]:l,[G1]:u,[M1]:s,[j1]:f}),...S,children:[(e||i)&&o(T,{className:M(Ju),children:o("div",{className:M(U1),children:[s&&o(Re,{name:g?"chevron-up":"chevron-down",className:x1,role:"presentation"}),i||o("span",{className:B1,children:e}),t&&o("div",{className:$1,children:t})]})}),(!s||g)&&o("div",{id:_,className:M(Qu,{[H1]:e||i}),children:n}),(r||c)&&o("footer",{className:q1,children:c||r})]})},Ba="2-digit",ki="long",$a="numeric",Cc="short",Sc="shortOffset",us={month:ki,day:$a,year:$a},eh={hour:Ba,minute:Ba},Ec={...us,...eh,month:Cc,hour12:!1},th={...Ec,year:void 0},nh={...us,month:"short"},V1=us,z1=th,X1={...us,weekday:ki},$l={...us,month:Cc},K1=Ec,Z1=th,Q1={...us,...eh,weekday:ki,timeZoneName:Sc},Ul=us,yr={...Ec,hour12:!0,timeZoneName:Sc},J1={month:Cc,weekday:ki,hour:Ba,minute:$a,year:void 0,timeZoneName:Sc},Gt={sm:480,md:768,lg:1024},_r="adyen-pe-structured-list",e_=`${_r}--align-end`,sh=`${_r}__item`,Hl=`${_r}__grid`,t_=`${_r}__content`,n_=`${_r}__label`,s_=`${sh}--has-highlight`,r_=e=>{const{i18n:t}=W();return A(()=>e.map(n=>({key:n.key,value:n.value,id:Ci(),label:t.get(n.key),type:n.type,config:n.config})),[t,e])},o_="6-6";function Tn({items:e,highlightable:t,renderValue:n,renderLabel:s,layout:r=o_,grid:a=!0,classNames:i,align:c="end"}){const[d,l]=A(()=>r.split("-").map(p=>`${Hl}--width-${p}-of-12`),[r]),u=r_(e),{i18n:h}=W();return o("dl",{"aria-label":h.get("structuredList"),className:M(_r,i,{[e_]:c==="end"}),children:u.map((p,f)=>o("div",{className:M(sh,{[s_]:t,[Hl]:a}),children:[o("dt",{className:M(n_,d),children:s?s(p.label,e[f].key):o(P,{variant:O.BODY,children:p.label})}),o("dd",{"aria-label":`${h.get(p.key)} ${h.get("value")}`,className:M(t_,l),children:n?n(p.value,p.key,p.type,p.config):o(P,{variant:O.BODY,children:p.value})})]},`${f}_${p.id||"0"}`))})}const rh="adyen-pe-overview-details",Nc=`${rh}__skeleton`,i_=`${Nc}-container`,a_=`${Nc}--loading-content`,c_=`${rh}__status-skeleton`,l_=({skeletonRowNumber:e=0})=>{const t=M(Nc,a_),n=Array.from({length:e}),s=Array.from({length:2});return o("div",{className:i_,children:[o("div",{className:c_,children:s.map((r,a)=>o("span",{className:t},`status-skeleton-${a}`))}),n.map((r,a)=>o("span",{className:t},`skeleton-${a}`))]})},Dc=Ue(l_),Ua=e=>{const{i18n:t}=W();return C((...n)=>{const s=t.timezone;try{return e(...n)}finally{t.timezone=s}},[t,e])},d_=e=>{const{i18n:t}=W(),n=Ua(C(()=>(t.timezone=void 0,t.timezone=e,t.timezone),[t,e]));return A(n,[n])},kt=e=>{const{i18n:t}=W(),n=d_(e),s=Ua(C((...a)=>(t.timezone=n,t.date(...a)),[t,n])),r=Ua(C((...a)=>(t.timezone=n,t.fullDate(...a)),[t,n]));return{dateFormat:s,fullDateFormat:r}},Ht="adyen-pe-payout-data",u_=`${Ht}__title-container`,h_=`${Ht}__title`,p_=`${Ht}__title--with-extra-details`,f_=`${Ht}__title--ba-id`,bc=`${Ht}__content`,m_=`${Ht}__extra-details`,__=`${Ht}__extra-details-label`,g_=`${Ht}__extra-details-icon`,T_=`${Ht}__button-actions`,ys=`${bc}--section`,$o=`${bc}--card`,Wl=`${$o}-title`,kr=`${ys}-amount`,Gl=`${kr}-gross`,y_=`${kr}-net`,A_=`${Ht}--unpaid-amount`;var be=(e=>(e.DEFAULT="default",e.WARNING="warning",e.ERROR="error",e.SUCCESS="success",e.WHITE="white",e.LIGHT="light",e.LIGHT_WITH_OUTLINE="light-with-outline",e.BLUE="blue",e))(be||{});const it=Ue(({variant:e=be.DEFAULT,label:t,children:n})=>o("div",{className:M("adyen-pe-tag",{"adyen-pe-tag--success":e===be.SUCCESS,"adyen-pe-tag--default":e===be.DEFAULT,"adyen-pe-tag--warning":e===be.WARNING,"adyen-pe-tag--error":e===be.ERROR,"adyen-pe-tag--primary":e===be.WHITE,"adyen-pe-tag--light":e===be.LIGHT,"adyen-pe-tag--light-with-outline":e===be.LIGHT_WITH_OUTLINE,"adyen-pe-tag--blue":e===be.BLUE}),children:n||t}));function wi({href:e,children:t,variant:n="default",truncate:s,target:r="_blank",withIcon:a=!0,classNames:i=[],...c}){const d=C(l=>l.stopPropagation(),[]);return o("a",{className:M("adyen-pe-link",[...i],{[`adyen-pe-link--${n}`]:n!=="default","adyen-pe-link--truncate":s}),href:e,target:r,rel:"noopener noreferrer",onClick:d,...c,children:[o(P,{className:"adyen-pe-link__text",el:J.SPAN,variant:O.BODY,children:t}),a&&r==="_blank"&&o(Re,{name:"external-link"})]})}const Li=({className:e,alt:t,url:n})=>o("div",{className:"adyen-pe-data-grid__icon-container",children:o("img",{className:M("adyen-pe-data-grid__icon",e),alt:t,src:n})}),oh=ls(z),Oc=()=>ds(oh);function Yl({children:e,column:t,position:n,...s}){const{registerCells:r}=Oc(),a=q(null);return G(()=>{var i;a.current&&r({column:t,width:(i=a.current)==null?void 0:i.getBoundingClientRect().width})},[t,r]),o("div",{role:"cell",className:M("adyen-pe-data-grid__cell",{"adyen-pe-data-grid__cell--right":n==="right","adyen-pe-data-grid__cell--center":n==="center"}),...s,children:e&&Du(e)?$u(e,{...e==null?void 0:e.props,ref:a,style:{width:"min-content"}}):null})}const en=e=>!!e&&typeof e=="object"&&"value"in e,ql=e=>!!e&&typeof e=="object"&&e.type==="icon",v_=e=>!!e&&typeof e=="object"&&e.type==="button",R_=e=>!!e&&typeof e=="object"&&e.type==="link",ih=({columns:e,customCells:t,item:n,rowIndex:s})=>o(Q,{children:e.map(({key:r,position:a})=>{var h,p,f,T,g,y,_;if(t!=null&&t[r])return o(Yl,{"aria-labelledby":String(r),column:r,position:a,children:o("div",{style:{width:"min-content"},children:t[r]({key:r,value:n[r],item:n,rowIndex:s})})},r);const i=n[r],{value:c,type:d}=en(i)?i:{value:i,type:"text"},l=ql(i)?{url:(h=i==null?void 0:i.config)==null?void 0:h.src,alt:((p=i==null?void 0:i.config)==null?void 0:p.alt)!==void 0&&((f=i==null?void 0:i.config)==null?void 0:f.alt)!==null?(T=i==null?void 0:i.config)==null?void 0:T.alt:i.value}:void 0,u=v_(i)?v=>{var N;v.stopPropagation(),(N=i==null?void 0:i.config)==null||N.action()}:void 0;return o(Yl,{"aria-labelledby":String(r),column:r,position:a,children:o("div",{className:"adyen-pe-data-grid__cell-value",children:[ql(i)&&i.config&&(l==null?void 0:l.url)&&o("div",{className:M("adyen-pe-data-grid__icon-cell",(g=i==null?void 0:i.config)==null?void 0:g.className),children:[o(Li,{...l}),c.trim()&&o("span",{children:c})]}),d==="text"&&o("span",{className:M((y=i==null?void 0:i.config)==null?void 0:y.className),children:c}),d==="button"&&i.config&&u&&o(ge,{className:M((_=i.config)==null?void 0:_.className),onClick:u,variant:ne.SECONDARY,children:c}),R_(i)&&i.config&&o(wi,{classNames:i.config.className?[i.config.className]:[],href:i.config.href,target:i.config.target,children:c})]})},r)})});var Ro=(e=>(e.BUTTONS_END="buttons-end",e.FILL_CONTAINER="fill-container",e.SPACE_BETWEEN="space-between",e.VERTICAL_STACK="vertical-stack",e))(Ro||{}),ah=(e=>(e.BUTTONS_START="buttons-start",e))(ah||{});const C_={...Ro,...ah};function S_({actions:e,layout:t=C_.BUTTONS_END}){const n=()=>`${Ma}--${t}`,s=a=>{const i=e.length-1;return a===i?ne.PRIMARY:ne.SECONDARY},r=A(()=>[...e].reverse(),[e]);return o("div",{className:Ma,children:o("div",{className:`${v1} ${n()}`,role:"group",children:r.map((a,i)=>o(ge,{className:M(a.classNames),"aria-label":a.title,disabled:a.disabled,variant:a.variant||s(i),onClick:a.event,state:a.state??"default",children:a.renderTitle?a.renderTitle(a.title):a.title},`${i}_${a.title||"0"}`))})})}const hs=Ue(S_),E_=({balanceAccountId:e,balanceAccountDescription:t,payout:n,extraFields:s})=>{var p;const{payout:r}=n??z,{dateFormat:a}=kt("UTC"),{i18n:i}=W(),c=A(()=>{var T,g;const f=(g=(T=n==null?void 0:n.amountBreakdowns)==null?void 0:T.adjustmentBreakdown)==null?void 0:g.reduce((y,_)=>{var R,b,E,I,w,H,x;const v=(R=_==null?void 0:_.amount)!=null&&R.value&&((b=_==null?void 0:_.amount)!=null&&b.currency)?i.amount((E=_==null?void 0:_.amount)==null?void 0:E.value,(I=_==null?void 0:_.amount)==null?void 0:I.currency,{hideCurrency:!0}):(((w=_==null?void 0:_.amount)==null?void 0:w.value)??"").toString(),N=`${_==null?void 0:_.category}`,S=i.get(N),D=_!=null&&_.category&&S!==N?S:_==null?void 0:_.category;return _!=null&&_.category&&v&&D&&y[(H=_==null?void 0:_.amount)!=null&&H.value&&((x=_==null?void 0:_.amount)==null?void 0:x.value)<0?"subtractions":"additions"].push({key:D,value:v}),y},{subtractions:[],additions:[]});return f==null||f.subtractions.sort((y,_)=>y.key.localeCompare(_.key)),f==null||f.additions.sort((y,_)=>y.key.localeCompare(_.key)),f},[i,n]),d=A(()=>{var T,g;const f=(g=(T=n==null?void 0:n.amountBreakdowns)==null?void 0:T.fundsCapturedBreakdown)==null?void 0:g.reduce((y,_)=>{var v,N,S,D;return((v=_==null?void 0:_.amount)==null?void 0:v.value)===0||(N=_==null?void 0:_.amount)!=null&&N.value&&_.category&&y.push({key:_.category,value:i.amount((S=_==null?void 0:_.amount)==null?void 0:S.value,(D=_==null?void 0:_.amount)==null?void 0:D.currency,{hideCurrency:!0})}),y},[]);return f==null||f.sort((y,_)=>y.key==="capture"?-1:_.key==="capture"?1:y.key.localeCompare(_.key)),f},[n,i]),l=A(()=>r!=null&&r.createdAt?a(new Date(r==null?void 0:r.createdAt),X1):"",[r,a]),u=Object.entries(s||{}).filter(([,f])=>f.type!=="button"&&f.visibility!=="hidden").map(([f,T])=>({key:f,value:en(T)?T.value:T,type:en(T)?T.type:"text",config:en(T)?T.config:void 0}))||[],h=A(()=>[...s?Object.values(s).filter(g=>g.type==="button").map(g=>{var y,_,v;return{title:g.value,variant:ne.SECONDARY,event:(y=g.config)==null?void 0:y.action,classNames:(_=g==null?void 0:g.config)!=null&&_.className?[(v=g==null?void 0:g.config)==null?void 0:v.className]:[]}}):[]].filter(Boolean),[s]);return o(Q,{children:r?o("div",{className:Ht,children:[o("div",{className:M(h_,{[p_]:u.length}),children:[o("div",{className:u_,children:[o(P,{variant:O.SUBTITLE,stronger:!0,children:i.get("netPayout")}),r.isSumOfSameDayPayouts&&o(it,{variant:be.BLUE,label:i.get("sumOfSameDayPayouts")})]}),o(P,{variant:O.TITLE,large:!0,children:`${i.amount(r.payoutAmount.value,r.payoutAmount.currency,{hideCurrency:!0})} ${r.payoutAmount.currency}`}),o(P,{variant:O.BODY,children:l}),o("div",{className:ys,children:[t&&o(P,{variant:O.CAPTION,stronger:!0,wide:!0,children:`${t}`}),o(P,{variant:O.CAPTION,className:f_,children:`${e}`})]})]}),u&&u.length>0?o("div",{children:o(Tn,{classNames:m_,items:u,align:"start",layout:"5-7",renderLabel:f=>o("div",{className:__,children:f}),renderValue:(f,T,g,y)=>{if(g==="link"&&y)return o(wi,{classNames:[M(y==null?void 0:y.className)],href:y.href,target:y.target||"_blank",children:f});if(g==="icon"&&y){const _={url:y.src,alt:y.alt||f};return o("div",{className:M(g_,y==null?void 0:y.className),children:[o(Li,{..._}),o(P,{variant:O.BODY,children:f})]})}return o(P,{className:M(y==null?void 0:y.className),variant:O.BODY,children:f})}})}):null,o("div",{className:bc,children:[o("div",{className:ys,children:(r==null?void 0:r.fundsCapturedAmount)&&(d&&Object.keys(d).length>0?o(xl,{header:o(P,{variant:O.BODY,children:i.get("fundsCaptured")}),headerInformation:o(P,{variant:O.BODY,children:i.amount(r.fundsCapturedAmount.value,r.fundsCapturedAmount.currency)}),children:o("div",{className:ys,children:o("div",{className:$o,children:o(Pr,{noPadding:!0,children:o(Tn,{items:d})})})})}):o("div",{className:M(kr,Gl),children:[o(P,{variant:O.BODY,children:i.get("fundsCaptured")}),o(P,{variant:O.BODY,children:i.amount(r.fundsCapturedAmount.value,r.fundsCapturedAmount.currency)})]}))}),o("div",{className:ys,children:c!=null&&c.subtractions&&Object.keys(c==null?void 0:c.subtractions).length>0||c!=null&&c.additions&&Object.keys(c==null?void 0:c.additions).length>0?o(xl,{header:o(P,{variant:O.BODY,children:i.get("adjustments")}),headerInformation:o(P,{variant:O.BODY,children:i.amount(r.adjustmentAmount.value,r.adjustmentAmount.currency)}),children:[(c==null?void 0:c.additions)&&Object.keys(c==null?void 0:c.additions).length>0&&o("div",{className:$o,children:o(Pr,{noPadding:!0,renderHeader:o(P,{className:Wl,variant:O.CAPTION,stronger:!0,children:i.get("additions")}),children:o(Tn,{items:c==null?void 0:c.additions})})}),(c==null?void 0:c.subtractions)&&Object.keys(c==null?void 0:c.subtractions).length>0&&o("div",{className:$o,children:o(Pr,{noPadding:!0,renderHeader:o(P,{className:Wl,variant:O.CAPTION,stronger:!0,children:i.get("subtractions")}),children:o(Tn,{items:c==null?void 0:c.subtractions})})})]}):o("div",{className:M(kr,Gl),children:[o(P,{variant:O.BODY,children:i.get("adjustments")}),o(P,{variant:O.BODY,children:i.amount(r.adjustmentAmount.value,r.adjustmentAmount.currency)})]})}),o("div",{className:M(ys),children:o("div",{className:M(kr,y_),children:[o(P,{variant:O.BODY,stronger:!0,children:i.get("netPayout")}),o(P,{variant:O.BODY,stronger:!0,children:i.amount(r.payoutAmount.value,r.payoutAmount.currency)})]})})]}),((p=n==null?void 0:n.payout)==null?void 0:p.unpaidAmount)&&o("div",{className:A_,children:[o(P,{variant:O.BODY,children:i.get("remainingAmount")}),o(P,{variant:O.BODY,children:i.amount(n.payout.unpaidAmount.value,n.payout.unpaidAmount.currency)})]}),h.length?o("div",{className:T_,children:o(hs,{actions:h,layout:Ro.BUTTONS_END})}):null]}):o(Dc,{skeletonRowNumber:6})})};var Oe=(e=>(e.WARNING="warning",e.CRITICAL="critical",e.HIGHLIGHT="highlight",e.SUCCESS="success",e))(Oe||{}),at=(e=>(e.DEFAULT="default",e.TIP="tip",e))(at||{});const N_=({className:e,type:t})=>{switch(t){case Oe.WARNING:return o(Re,{name:"warning-filled",className:e});case Oe.CRITICAL:return o(Re,{name:"cross-circle-fill",className:e});case Oe.HIGHLIGHT:return o(Re,{name:"info-filled",className:e});case Oe.SUCCESS:default:return o(Re,{name:"checkmark-circle-fill",className:e})}},st=({className:e,description:t,title:n,type:s,children:r,onClose:a,variant:i=at.DEFAULT})=>o("div",{className:M("adyen-pe-alert",`adyen-pe-alert--${s}`,`adyen-pe-alert--${i}`,e),role:"alert",children:[o(N_,{type:s,className:"adyen-pe-alert__icon"}),o("div",{className:"adyen-pe-alert__content",children:[n&&i!==at.TIP&&o(P,{className:"adyen-pe-alert__title",el:J.DIV,variant:O.BODY,wide:!0,strongest:!0,children:n}),t&&o(P,{className:"adyen-pe-alert__description",el:J.DIV,variant:i!==at.TIP?O.CAPTION:O.BODY,wide:!0,children:t}),r]}),a&&i!==at.TIP&&o("div",{className:"adyen-pe-alert__close-button",children:o(ge,{iconButton:!0,variant:ne.TERTIARY,onClick:a,children:o(Re,{name:"cross"})})})]}),D_=Object.freeze({klarna:"Klarna",paypal:"PayPal"});function ch(e,t){return e.lastFourDigits?t==="detail"?"•••• •••• •••• "+e.lastFourDigits:e.lastFourDigits:e.description||D_[e.type]||e.type}const b_=e=>e!=null&&e.paymentMethod?e.paymentMethod.type:e!=null&&e.bankAccount?"bankTransfer":null,O_=e=>{var t;return e!=null&&e.paymentMethod?ch(e.paymentMethod,"detail"):(t=e==null?void 0:e.bankAccount)==null?void 0:t.accountNumberLastFourDigits},lh=({timezone:e,paymentMethodData:t,bankAccount:n,amountData:s,createdAt:r})=>{const a=A(()=>({paymentMethod:t,bankAccount:n}),[t,n]),{i18n:i}=W(),{dateFormat:c}=kt(e),d=A(()=>{if(s){const{currency:p,value:f}=s;return`${i.amount(f,p,{hideCurrency:!0})} ${p}`}},[s,i]),l=A(()=>b_(a),[a]),u=A(()=>O_(a),[a]),h=A(()=>r&&c(new Date(r),Q1),[r,c]);return{amount:d,date:h,paymentMethod:u,paymentMethodType:l}};var mt=(e=>(e[e.DETAILS=0]="DETAILS",e[e.REFUND=1]="REFUND",e[e.REFUND_SUCCESS=2]="REFUND_SUCCESS",e[e.REFUND_ERROR=3]="REFUND_ERROR",e))(mt||{}),ws=(e=>(e[e.INDETERMINATE=0]="INDETERMINATE",e[e.PARTIAL=1]="PARTIAL",e[e.FULL=2]="FULL",e))(ws||{}),Ke=(e=>(e.NON_REFUNDABLE="non_refundable",e.PARTIAL_AMOUNT="partially_refundable_any_amount",e.PARTIAL_LINE_ITEMS="partially_refundable_with_line_items_required",e.FULL_AMOUNT="fully_refundable_only",e))(Ke||{}),Sr=(e=>(e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.FAILED="failed",e))(Sr||{}),qn=(e=>(e.PARTIAL="partial",e.FULL="full",e))(qn||{});const dh=ls({availableItems:Se,primaryAction:ue,secondaryAction:ue,transaction:z,extraFields:z,dataCustomization:z}),I_=Ue(({children:e,lineItems:t,refundAvailable:n,refundDisabled:s,setActiveView:r,setPrimaryAction:a,setSecondaryAction:i,transaction:c,transactionNavigator:d,extraFields:l,dataCustomization:u})=>{const{i18n:h}=W(),{currentTransaction:p,canNavigateBackward:f,canNavigateForward:T,backward:g,forward:y}=d,_=A(()=>({title:h.get("refundAction")}),[h]),v=A(()=>!n||s,[n,s]),N=C(()=>void(!v&&r(mt.REFUND)),[v,r]),S=A(()=>{if(p===c.id){if(f)return 2;if(T)return 1}},[f,T,p,c]),D=C(()=>{switch(S){case 2:return void g();case 1:return void y()}},[S,g,y]),R=A(()=>{switch(S){case 2:return{title:h.get("refund.returnToRefund"),renderTitle:b=>o(Q,{children:[o(Re,{style:{transform:"scaleX(-1)"},name:"angle-right"}),o("span",{children:b})]})};case 1:return{title:h.get("refund.goToPayment"),renderTitle:b=>o(Q,{children:[o(Re,{name:"angle-right"}),o("span",{children:b})]})}}},[S,h]);return G(()=>{a(n?Object.freeze({disabled:v,event:N,variant:ne.PRIMARY,..._}):void 0)},[N,n,v,_,a]),G(()=>{i(S&&R?Object.freeze({disabled:!1,event:D,variant:ne.SECONDARY,...R}):void 0)},[S,D,R,i]),o(dh.Provider,{value:{availableItems:t,primaryAction:N,secondaryAction:D,transaction:c,extraFields:l,dataCustomization:u},children:e})}),P_=()=>ds(dh),Ic=Object.freeze(["requested_by_customer","issue_with_item_sold","fraudulent","duplicate","other"]),k_=({refundAmount:e,refundReason:t,refundInProgress:n,refundTransaction:s,setActiveView:r,transactionId:a})=>{const{i18n:i}=W(),c=A(()=>{const T=i.amount(e.value,e.currency);return{title:i.get("refundPayment",{values:{amount:T}})}},[e,i]),d=A(()=>({title:i.get("refundAction")}),[i]),l=A(()=>({title:`${i.get("inProgress")}..`,state:"loading"}),[i]),u=A(()=>({path:{transactionId:a}}),[a]),h=A(()=>({amount:e,refundReason:t}),[e,t]),p=C(()=>s==null?void 0:s({body:h,contentType:"application/json"},u).then(()=>{r(mt.REFUND_SUCCESS)}).catch(()=>{r(mt.REFUND_ERROR)}),[s,u,h,r]),f=A(()=>n?l:e.value>0?c:d,[e,n,c,d,l]);return{refundAction:p,refundActionLabel:f}},w_=({interactionsDisabled:e,refundAmount:t,setActiveView:n,setPrimaryAction:s,setSecondaryAction:r,...a})=>{const{refundAction:i,refundActionLabel:c}=k_({...a,refundAmount:t,setActiveView:n}),{i18n:d}=W(),l=A(()=>e||t.value<=0,[t,e]),u=C(()=>!l&&i(),[l,i]),h=e,p=A(()=>d.get("back"),[d]),f=C(()=>void(!h&&n(mt.DETAILS)),[h,n]);return G(()=>{s(Object.freeze({disabled:l,event:u,variant:ne.PRIMARY,...c}))},[u,l,c,s]),G(()=>{r(Object.freeze({disabled:h,event:f,title:p,variant:ne.SECONDARY}))},[f,h,p,r]),{primaryAction:u,secondaryAction:f}},L_=({availableAmount:e,currency:t,interactionsDisabled:n,items:s,refundMode:r})=>{const[a,i]=F(0),c=A(()=>{switch(r){case Ke.NON_REFUNDABLE:return 0;case Ke.PARTIAL_LINE_ITEMS:case Ke.PARTIAL_AMOUNT:return a;case Ke.FULL_AMOUNT:default:return e}},[e,s,r,a]),d=A(()=>Object.freeze({currency:t,value:c}),[c,t]),l=A(()=>!n&&r===Ke.PARTIAL_AMOUNT,[n,r]),u=C(h=>void(l&&i(Dt(0,h,e))),[e,l]);return G(()=>{i(e)},[e]),[d,u]},jl=(e,t,n,s=0)=>{const{...r}=e.get(n.id),a=Dt(0,Math.trunc(s),r.quantity+=n.quantity);r.quantity-=a,e.set(n.id,Object.freeze(r)),a>0&&t.push(Object.freeze({...r,quantity:a}))},Vl=(e,t,n=Se)=>{const s=new Map((n==null?void 0:n.map(({id:a,quantity:i})=>[a,i]))??Se),r=[];return t.forEach(a=>{const i=s.get(a.id);oe(i)?r.push(a):s.delete(a.id)&&jl(e,r,a,i)}),s.forEach((a,i)=>{jl(e,r,{id:i,quantity:0},a)}),r.length>0?Object.freeze(r):Se},F_=({currency:e,lineItems:t})=>{const[n,s]=F(Se),r=A(()=>{const d=t==null?void 0:t.filter(l=>{if(l.amountIncludingTax.currency!==e)return;const u=l.availableQuantity;return u>0&&Number.isFinite(u)&&Math.trunc(u)===u}).map(({id:l,...u})=>[l,Object.freeze({amount:u.amountIncludingTax.value,quantity:u.availableQuantity,id:l})]);return new Map(d??Se)},[e,t]),a=A(()=>(t==null?void 0:t.filter(({id:d})=>r.has(d)))??Se,[n,t,r]),i=C(function(d){s(l=>{const h=[...arguments.length===0?new Map(l.map(({id:p})=>[p,0])):new Map((d==null?void 0:d.map(p=>[p,0]))??Se)].map(([p,f])=>({id:p,quantity:f}));return Vl(r,l,h)})},[r]),c=C(d=>s(l=>Vl(r,l,d)),[r]);return{availableItems:a,clearItems:i,items:n,updateItems:c}},M_=({interactionsDisabled:e,refundMode:t})=>{const[n,s]=F(Ic[0]),r=A(()=>!e&&t!==Ke.NON_REFUNDABLE,[e,t]),a=C(i=>void(r&&s(i)),[r]);return[n,a]},Io=e=>{setTimeout(()=>{throw e},0)};function lr({queryFn:e,options:t}){const{retry:n=!1,retryDelay:s=1e3,onSuccess:r,onError:a,onSettled:i,shouldRetry:c}=t||z,[d,l]=F(null),[u,h]=F(null),[p,f]=F("idle"),T=q(!0),g=q(0),y=C(()=>{l(null),h(null),f("idle"),g.current=0},[]),_=C(()=>{g.current=0},[]),v=C(async(...N)=>{try{f("loading"),h(null);const S=await(e==null?void 0:e(...N));return T.current&&(l(S),f("success")),rr.then(()=>{r&&Ln(r,S).catch(Io),i&&Ln(i,S,null).catch(Io),_()}),S}catch(S){let D=0;if(pr(n)&&(!c||c(S))?D=Math.max(0,Math.floor(n)):D=0,g.current++<D){const R=ee(s)?s(g.current):s??1e3;return await new Promise(b=>setTimeout(b,R)),v(...N)}throw T.current&&(h(S),f("error")),rr.then(()=>{a&&Ln(a,S).catch(Io),i&&Ln(i,void 0,S).catch(Io),_()}),S}},[e,r,i,n,c,s,_,a]);return G(()=>()=>{T.current=!1},[]),A(()=>({data:d,error:u,status:p,isIdle:p==="idle",isLoading:p==="loading",isSuccess:p==="success",isError:p==="error",mutate:v,reset:y}),[d,u,p,v,y])}const uh=ls({amount:0,availableAmount:0,availableItems:Se,clearItems:ue,currency:"",interactionsDisabled:!1,items:Se,primaryAction:ue,refundMode:Ke.FULL_AMOUNT,refundReason:Ic[0],secondaryAction:ue,setAmount:ue,setRefundReason:ue,transactionId:"",updateItems:ue}),x_=Ue(({availableAmount:e,children:t,currency:n,lineItems:s,refreshTransaction:r,refundMode:a,setActiveView:i,setPrimaryAction:c,setSecondaryAction:d,transactionId:l})=>{const{isLoading:u,mutate:h}=lr({queryFn:Ee().endpoints.initiateRefund}),{availableItems:p,clearItems:f,items:T,updateItems:g}=F_({currency:n,lineItems:s}),y=u,[_,v]=L_({availableAmount:e,currency:n,interactionsDisabled:y,items:T,refundMode:a}),[N,S]=M_({interactionsDisabled:y,refundMode:a}),{value:D}=_,{primaryAction:R,secondaryAction:b}=w_({interactionsDisabled:y,refreshTransaction:r,refundAmount:_,refundInProgress:u,refundReason:N,refundTransaction:h,setActiveView:i,setPrimaryAction:c,setSecondaryAction:d,transactionId:l});return o(uh.Provider,{value:{amount:D,availableAmount:e,availableItems:p,clearItems:f,currency:n,interactionsDisabled:y,items:T,primaryAction:R,refundMode:a,refundReason:N,secondaryAction:b,setAmount:v,setRefundReason:S,transactionId:l,updateItems:g},children:t})}),Pc=()=>ds(uh),B_=()=>{let[e,t,n,s]=Se;const r=()=>!!(e&&e===s&&n),a=()=>!!(e&&e===n&&s);let i=null;const c=()=>{r()&&(t=e,e=n,h())},d=()=>{a()&&(t=e,e=s,h())},l=(p,f)=>{const T=e;e=t=n=s=void 0,!Da(p)&&!Da(f)&&(n=p,s=f,e=T===n||T===s?T:n,T!==e&&h())},u=p=>{xe(p)?i=null:ee(p)&&i!==(i=p)&&h()},h=()=>{const p=t,f=e;t=void 0,i==null||i(de({from:Ae(()=>p),to:Ae(()=>f)}))};return de({backward:K(c),forward:K(d),canNavigateBackward:Ae(r),canNavigateForward:Ae(a),currentTransaction:Ae(()=>e),onNavigation:{set:u},reset:K(l)})},$_=e=>{const[t,n]=F(e),[s,r]=F(e.id),[a,i]=F(performance.now()),{getTransaction:c}=Ee().endpoints,d=q(B_()),l=d.current,u=q(!1),h=q(!1),p=q(e),f=q(s),T=A(()=>!!c&&!!s&&u.current,[s,c]),g=C(()=>c(z,{path:{transactionId:s}}),[s,c]),{data:y,error:_,isFetching:v}=gt({fetchOptions:{enabled:T},queryFn:g}),N=C(()=>r(void 0),[]);return G(()=>{s||r(t.id)},[s,t]),G(()=>{var R;const S=d.current,D=p.current;return D.category==="Refund"&&(S.reset(D.id,(R=D.refundMetadata)==null?void 0:R.originalPaymentId),S.onNavigation=({to:b})=>{u.current=!0,i(performance.now()),b&&r(b)}),()=>{u.current=!1,S.onNavigation=null,S.reset()}},[]),G(()=>{if(h.current!==v&&!(h.current=v))if(!y||_)r(f.current);else{const S=p.current;n(()=>({...y.id===S.id?S:z,...y})),f.current=s}},[y,_,v,s,a]),{fetchingTransaction:v,refreshTransaction:N,transaction:t,transactionNavigator:l}},U_=(e,t)=>{let n=t?(t==null?void 0:t.length)>0:!1,s=!1;return t==null||t.forEach(r=>{const a=!!e(r);n&&(n=a),s||(s=a)}),{every:n,some:s}},Po=["completed","in_progress","failed"],H_=e=>{var N,S,D;const{i18n:t}=W(),n=e==null?void 0:e.refundDetails,s=(n==null?void 0:n.refundMode)??Ke.FULL_AMOUNT,r=Ve(n==null?void 0:n.refundLocked),a=s!==Ke.NON_REFUNDABLE,i=(N=e==null?void 0:e.originalAmount)==null?void 0:N.value,c=A(()=>{var R;return e?Math.max(0,((R=n==null?void 0:n.refundableAmount)==null?void 0:R.value)??0):0},[n,e]),d=ee(Ee().endpoints.initiateRefund),l=d&&a&&c>0,u=((S=n==null?void 0:n.refundableAmount)==null?void 0:S.currency)??(e==null?void 0:e.amount.currency)??"",h=!l||r,p=A(()=>{var b;const R=((b=e==null?void 0:e.refundDetails)==null?void 0:b.refundStatuses)??[];return(R==null?void 0:R.filter(E=>E.amount.value!==0).sort((E,I)=>Po.includes(E.status)&&Po.includes(I.status)&&Po.indexOf(E.status)>Po.indexOf(I.status)?0:-1).reduce((E,I)=>{var x;const w=I.status,H=~I.amount.value+1;return E!=null&&E[w]?((x=E==null?void 0:E[w])==null||x.amounts.push(H),E):{...E,[w]:{amounts:[H],currency:I.amount.currency}}},{}))??{}},[(D=e==null?void 0:e.refundDetails)==null?void 0:D.refundStatuses]),f=A(()=>{var b,E;const R=(E=(b=p.completed)==null?void 0:b.amounts)==null?void 0:E.reduce((I,w)=>I+w,0);return R?Math.max(0,R??0):0},[p]),{some:T,every:g}=A(()=>U_(({status:R})=>R===Sr.COMPLETED,n==null?void 0:n.refundStatuses),[n==null?void 0:n.refundStatuses]),y=A(()=>{var R;return c===0&&f>0&&g&&f===i?[{type:Oe.HIGHLIGHT,label:t.get("refund.fullAmountRefunded")}]:((R=Object.keys(p))==null?void 0:R.map(E=>{var x,j;const I=E,w=(x=p==null?void 0:p[I])==null?void 0:x.amounts.reduce((L,U,ie)=>{var V,Z,me;const le=(V=p==null?void 0:p[I])==null?void 0:V.amounts.length;return le>1&&ie===le-1?`${L?`${L}`:""} ${t.get("and")} ${t.amount(U,(Z=p==null?void 0:p[I])==null?void 0:Z.currency)}`:`${L?`${L},`:""} ${t.amount(U,(me=p==null?void 0:p[I])==null?void 0:me.currency)}`},""),H=(j=p==null?void 0:p[I])==null?void 0:j.amounts.reduce((L,U)=>L+U,0);switch(E){case Sr.COMPLETED:return{type:Oe.HIGHLIGHT,label:t.get("refund.amountAlreadyRefunded",{values:{amount:w}})};case Sr.IN_PROGRESS:return H===i?{type:Oe.HIGHLIGHT,label:t.get("refund.theRefundIsBeingProcessed")}:{type:Oe.HIGHLIGHT,label:t.get("refund.amountInProgress",{values:{amount:w}})};case Sr.FAILED:return H===i?{type:Oe.WARNING,label:t.get("refund.fullAmountFailed")}:{type:Oe.WARNING,label:t.get("refund.amountFailed",{values:{amount:w}})};default:return}}))??[]},[c,i,t,f,p,g]),_=A(()=>{if(c>0){const R=t.amount(c,u);switch(s){case Ke.FULL_AMOUNT:return{type:Oe.HIGHLIGHT,description:t.get("refund.onlyRefundable",{values:{amount:R}})};case Ke.PARTIAL_AMOUNT:return{type:Oe.HIGHLIGHT,description:t.get("refund.maximumRefundable",{values:{amount:R}})};default:return null}}return null},[t,c,u,s]),v=A(()=>{switch(s){case Ke.NON_REFUNDABLE:if(c===0&&f>0&&g&&f===i)return ws.FULL}switch(s){case Ke.PARTIAL_AMOUNT:case Ke.PARTIAL_LINE_ITEMS:if(c>0&&T&&f>0&&!oe(i)&&f<i)return ws.PARTIAL}return ws.INDETERMINATE},[c,f,s,i,T,g]);return{refundableAmount:c,refundable:a,refundableAmountLabel:_,refundAvailable:l,refundAuthorization:d,refundCurrency:u,refundDisabled:h,refundedAmount:f,refundedState:v,refundStatuses:y,refundLocked:r,refundMode:s}},Et="adyen-pe-popover",hh="adyen-pe-tooltip",W_=`${Et}-container`,zl=`${Et}__header`,G_=`${Et}__header-title`,ha=`${Et}__content`,ph=`${hh}__content`,Y_=`${Et}__footer`;function q_({image:e=!0,onClick:t}){const{i18n:n}=W();return o(Q,{children:o(ge,{className:e?"adyen-pe-popover-dismiss-button--on-image":"",iconButton:!0,variant:ne.TERTIARY,onClick:t,"aria-label":n.get("closeIconLabel"),children:o("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",children:[o("title",{children:"dismiss"}),o("path",{fill:"#00112C",fillRule:"evenodd",d:"M11.4697 12.5303C11.7626 12.8232 12.2374 12.8232 12.5303 12.5303C12.8232 12.2374 12.8232 11.7626 12.5303 11.4697L9.06066 8L12.5303 4.53033C12.8232 4.23744 12.8232 3.76256 12.5303 3.46967C12.2374 3.17678 11.7626 3.17678 11.4697 3.46967L8 6.93934L4.53033 3.46967C4.23744 3.17678 3.76256 3.17678 3.46967 3.46967C3.17678 3.76256 3.17678 4.23744 3.46967 4.53033L6.93934 8L3.46967 11.4697C3.17678 11.7626 3.17678 12.2374 3.46967 12.5303C3.76256 12.8232 4.23744 12.8232 4.53033 12.5303L8 9.06066L11.4697 12.5303Z",clipRule:"evenodd"})]})})})}const j_=Ue(q_);function V_({title:e,isImageTitle:t=!1}){return o(P,{strongest:!t,variant:t?O.SUBTITLE:O.BODY,children:e})}const z_=Ue(V_);var rt=(e=>(e.TOOLTIP="tooltip",e.POPOVER="popover",e))(rt||{}),se=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e))(se||{}),Hr=(e=>(e.MEDIUM="medium",e.WIDE="wide",e))(Hr||{});const Ns=(()=>{let e=[];const t=i=>{const c=i.reduce((d,l)=>{const u=l instanceof Node?e.findIndex(h=>{const p=h.element.getAttribute("id"),f=l&&(l!=null&&l.getAttribute)?l==null?void 0:l.getAttribute("id"):null;return p===f}):-1;return d===-1&&u!==-1?u:d},-1);c===-1?r(0):c+1<=e.length-1&&r(c+1)},n=i=>{const c=e.findIndex(d=>d.element.getAttribute("id")===i.getAttribute("id"));c>=0&&e.splice(c,1)},s=(i,c)=>{e.findIndex(l=>l.element.getAttribute("id")===i.getAttribute("id"))>=0||e.push({element:i,callback:c})},r=i=>{var d,l;const c=e.length;for(let u=i;u<c;u++)(l=(d=e==null?void 0:e[u])==null?void 0:d.callback)==null||l.call(d);e.splice(i)};return{add:s,remove:n,closeAll:()=>{e.forEach(i=>{var c;return(c=i==null?void 0:i.callback)==null?void 0:c.call(i)}),e=[]},closePopoversOutsideOfClick:t}})(),Wr=Symbol("_ref");class fh extends Error{}class X_ extends fh{}class K_ extends fh{}function kc(e){if(!ee(e))throw new K_}const Z_=e=>{try{if(ee(e)&&Qt(e,"current")&&Qt(e,Wr)&&!as(e,e[Wr])){const t=e.actions.get(z),n=e.actions.size;return oe(t)&&Number.isInteger(n)&&n>=0}}catch{}return!1},Gr=e=>Z_(e)?Gr(e[Wr]):e;function Xl(e){return!!e.current}const Q_=(()=>{const e=(s,r)=>{const a=s.get(r);if(!a)throw new X_;return a},t=(s,r,a)=>{let i,c;const d=Gr(r);try{i=e(s,d)}catch{kc(a)}if(i)[,c]=i;else{const l=ee(d),u=l?f=>{d(p=f)}:f=>{d&&(d.current=f,p=d.current)},h=f=>{if(c.size===0)return;const T=p;if(u(f),!as(p,T))for(const[g]of c)g(p,T)};let p=l?null:d.current;s.set(d,i=[h,c=new Map]),Object.defineProperties(h,{[Wr]:{value:d},actions:{value:de({get:{value:c.get.bind(c)},size:{get:()=>c.size}})},current:{get:()=>p,set:l?void 0:h}})}return a&&c.set(a,1+(c.get(a)||0)),i[0]},n=(s,r,a)=>{const i=Gr(r),[,c]=e(s,i),d=c.get(a)||0;d===1?c.delete(a):d>1&&c.set(a,d-1),c.size===0&&i&&s.delete(i)};return()=>{const s=new WeakMap;return de({bind:K(t.bind(void 0,s)),unbind:K(n.bind(void 0,s))})}})(),J_=Q_(),eg=e=>{kc(e);const t=new WeakMap([[e,1]]),n=r=>{if(as(s,r))return;const a=s;e(s=r,a)};let s=null;return Object.defineProperties(n,{[Wr]:{value:n},actions:{value:de({get:{value:t.get.bind(t)},size:{value:1}})},current:{get:()=>s,set:n}})},tg=(e=J_)=>{let t,n=null,s,r=!1;const a=l=>{t=void 0,n=null,s=l,r=!1},i=()=>{r||(c(),r=!0)},c=()=>{try{if(!n)return;e.unbind(n,s)}catch{}};return de({action:{get:()=>s},reflex:{get:()=>t},release:{value:i},update:{value:(l,u)=>{kc(l),r&&a(l);const h=xe(u)?null:u;if(s===l&&n===h){if(t)return}else if(n){if(as(Gr(n),Gr(h))){t=e.bind(n,l),c(),s=l;return}c()}s=l,t=(n=h)?e.bind(n,s):eg(s)}}})},En=(e,t)=>{const n=q(tg());return cr(()=>n.current.release,[]),A(()=>(n.current.update(e,t),n.current.reflex),[e,t])},Ds=Symbol("__control.Elem.");var mh=(e=>(e.POPOVER="POPOVER",e.DEFAULT="DEFAULT",e))(mh||{});const Kl=e=>{e.stopImmediatePropagation()},wc=(e,t,n,s)=>{const r=q(null),a=C(c=>{const d=c.composedPath();if(r&&r.current)if(s==="POPOVER")Ns.closePopoversOutsideOfClick(d);else{let l=0,u=!1,h=d[l];for(;h instanceof Element&&!(u||(u=h==null?void 0:h.isSameNode(r.current)));)h=d[++l]??h.parentElement,(h==null?void 0:h[Ds])instanceof Element&&(h=h[Ds],d.length=0);t&&!u&&t(!0)}},[r,t,s]),i=q(a);return G(()=>()=>{r.current&&Ns.remove(r.current),document.removeEventListener("click",i.current,!0)},[]),G(()=>(document.removeEventListener("click",i.current,!0),i.current=a,document.addEventListener("click",i.current,!0),s==="POPOVER"&&r.current instanceof Element&&Ns.add(r.current,t),()=>{r.current&&Ns.remove(r.current),document.removeEventListener("click",i.current,!0)}),[a,t,s]),G(()=>{n?document.removeEventListener("click",i.current,!0):document.addEventListener("click",i.current,!0)},[n]),En(C((c,d)=>{d instanceof Element&&d.removeEventListener("focusout",Kl,!0),c instanceof Element&&(n||(c.addEventListener("focusout",Kl,!0),r.current=c))},[n,s]),e)},Lc=`
|
|
2
|
+
a[href],
|
|
3
|
+
audio[controls],
|
|
4
|
+
video[controls],
|
|
5
|
+
button,
|
|
6
|
+
input,
|
|
7
|
+
select,
|
|
8
|
+
textarea,
|
|
9
|
+
[contenteditable],
|
|
10
|
+
[tabindex]
|
|
11
|
+
`.replace(/\s+/,""),ng=["contenteditable","controls","disabled","hidden","href","inert","tabindex"],Zl=new Map,_h=e=>e.tagName==="INPUT",sg=e=>_h(e)&&e.type==="radio",rg=e=>{const t=e.name,n=e.form,s=Zl.get(n);let r=s==null?void 0:s.get(t);return oe(r)&&n&&(r=n.querySelector(`input[type=radio][name='${t}']:checked`)||null,Zl.set(n,(s||new Map).set(t,r))),r===e},og=(e,t)=>{for(const n of t)if(n.type!=="attributes"){if(hl(n.addedNodes,s=>s instanceof Element&&Ha(s))||hl(n.removedNodes,s=>e.includes(s)))return!0}else{if(Ha(n.target))return!0;if(e.includes(n.target))return!0}return!1},Fc=(e=document.body,t)=>{if(oe(e))return!1;if(xe(t))return!!document.activeElement&&Fc(e,document.activeElement);let n=t==null?void 0:t.parentNode;for(;n;){if(n===e)return!0;n=n==null?void 0:n.parentNode}return!1},Mc=e=>!(!e.matches(Lc)||e!=null&&e.disabled||/^(true)?$/.test(e.getAttribute("inert"))||_h(e)&&e.hidden),Ha=e=>!(sg(e)&&!rg(e)||(e==null?void 0:e.tabIndex)<0||!Mc(e)),ig=()=>{const e=new MutationObserver(c=>og(t,c)&&a()),t=[];let n=-1,s=null;const r=c=>{var l;if(c<0)return;const d=Math.min(c,t.length-1);n!==d&&(n=d),(l=t[n])==null||l.focus()},a=()=>{t.length=0,s instanceof Element&&(s.querySelectorAll(Lc).forEach(c=>Ha(c)&&t.push(c)),Fc(s)&&(i.current=document.activeElement))},i=Object.create(null,{current:{get:()=>t[n]??null,set:c=>{if(c){if(!pr(c))return r(t.indexOf(c));if(c===~~c)return r(fo(n+c,t.length))}}},root:{get:()=>s,set:c=>{c!==s&&(s&&e.disconnect(),s=c instanceof Element?c:null,t.length=0,s&&(e.observe(s,{attributeFilter:ng,attributes:!0,childList:!0,subtree:!0}),a()))}},tabbables:{value:t}});return i},ag=(e,t)=>{const n=q(!1),s=q(null),r=q(!1),a=A(ig,[]),i=A(()=>{let u=null,h;return p=>{oe(h)||cancelAnimationFrame(h);let f=p.target;for(;f&&f!==p.currentTarget;){if(Mc(f)){u=f,h=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>{var T;s.current!==u&&u instanceof HTMLElement&&((T=s.current=u)==null||T.focus()),u=null,h=void 0})});return}f=f.parentNode}}},[]),c=C(u=>{a.current=s.current=u.target},[]),d=C(u=>{a.tabbables.includes(u.relatedTarget)||Fc(u.currentTarget,u.relatedTarget)||r.current||(n.current=!0,requestAnimationFrame(()=>{n.current&&t(n.current=!1)}))},[]),l=A(()=>{let u;return h=>{switch(h.code){case te.ARROW_DOWN:case te.ARROW_LEFT:case te.ARROW_RIGHT:case te.ARROW_UP:case te.END:case te.ESCAPE:case te.HOME:case te.PAGE_DOWN:case te.PAGE_UP:case te.TAB:cancelAnimationFrame(u),u=requestAnimationFrame(()=>{u=requestAnimationFrame(()=>{r.current=!1,u=void 0})}),r.current=!0;break}h.code===te.TAB?(h.preventDefault(),a.current=h.shiftKey?-1:1):h.code===te.ESCAPE&&t(!0)}},[]);return En(C((u,h)=>{h instanceof Element&&(h.removeEventListener("keydown",l,!0),h.removeEventListener("focusin",c,!0),h.removeEventListener("focusout",d,!0),u.removeEventListener("click",i,!0)),u instanceof Element?(u.addEventListener("keydown",l,!0),u.addEventListener("focusin",c,!0),u.addEventListener("focusout",d,!0),u.addEventListener("click",i,!0),n.current=!1,a.root=u):a.root=null},[]),e)},pa=(()=>{const e=new WeakMap,t=de({remove:K(function(){s(this.observerCallback)})}),n=(r,a)=>{let i=e.get(r);if(oe(i)){const c=new IntersectionObserver(d=>{d.forEach(l=>{r&&r(l)})},{root:a??null,rootMargin:"",threshold:[1]});i=fr(t,{observerCallback:K(r),observer:K(c)}),e.set(r,i)}return i},s=r=>{const a=e.get(r);a==null||a.observer.disconnect(),e.delete(r)};return n})(),Ql=[se.BOTTOM_RIGHT,se.BOTTOM_LEFT,se.TOP_RIGHT,se.TOP_LEFT],cg=5,Jl=4,lg=10,dg=({position:e,variant:t,offset:n,additionalStyle:s,fixedPositioning:r,fullWidth:a,popover:i,targetElement:c})=>{let d=0,l=0;const u=t===rt.TOOLTIP,h=i.clientHeight,p=i.clientWidth,f=i.firstChild,T=f.offsetHeight,g=f.offsetWidth,y=document.body.getBoundingClientRect(),_=c.getBoundingClientRect(),v=y.x+(y.width-g)/2,N=_.x+(_.width-g)/2,S=_.y+(_.height-T)/2,D=window.scrollX,R=window.scrollY;switch(e){case se.BOTTOM:d=a?v:u?N:_.x,l=_.y+_.height+n[1],r||(a||(d+=D),l+=R);break;case se.TOP:d=u?N:_.x,l=_.y-(h+n[0]),r||(d+=D,l+=R-f.clientHeight+h);break;case se.RIGHT:d=_.x+_.width+n[2],l=u?S:_.y-_.height/2,r||(d+=D,l+=R);break;case se.LEFT:d=_.x-(p+n[3]),l=u?S:_.y-_.height/2,r||(d+=D,l+=R);break;case se.BOTTOM_LEFT:d=5,l=_.y+_.height+n[1],r||(d+=D,l+=R);break;case se.BOTTOM_RIGHT:d=-5,l=_.y+_.height+n[1],r||(d+=D,l+=R);break;case se.TOP_LEFT:d=cg,l=_.y-h,r||(d+=D,l+=R-f.clientHeight+h);break;case se.TOP_RIGHT:d=-5,l=_.y-h,r||(d+=D,l+=R-f.clientHeight+h);break}const b={};if(s){const I=!!s.maxY&&l+(i==null?void 0:i.clientHeight)>s.maxY,w=!!s.minY&&l<s.minY;if(I&&s.maxY){const H=_.y+_.height+8,x=Math.max(0,s.maxY-H);x>20&&(b.height=`${x}px`),b["overflow-y"]="scroll"}if(w&&s.minY&&l){const H=i.offsetHeight??i.clientHeight,x=Math.max(0,H-(s.minY-l));b.height=`${x}px`,x&&(b["overflow-y"]="scroll")}w&&(l=s.minY??0)}const E=e===se.TOP_RIGHT||e===se.BOTTOM_RIGHT;return{inset:E?"0 0 auto auto":"0 auto auto 0",margin:"0",position:r?"fixed":"absolute",transform:`translate3d(${d}px, ${l}px, 0)`,visibility:"hidden",right:E?0:"auto",...b}},ug=(e,t,n,s,r,a,i,c,d,l,u,h)=>{const[p,f]=F(!0),[T,g]=F(c?!c:!!s),[y,_]=F(s||se.TOP),[v,N]=F([]),S=C(R=>{var I;const b=document.documentElement.clientWidth,E=(I=t.current)==null?void 0:I.getBoundingClientRect();if(R.intersectionRatio===1)return g(!0);if(!p&&R.intersectionRatio!==1){if(v&&v.length===(c?8:4)){const w=v.reduce((H,x)=>x[1]>H[1]?x:H,v[0]);return _(w[0]),g(!0)}switch(g(!1),y){case se.TOP:N(w=>[...w,[se.TOP,R.intersectionRatio]]),_(se.BOTTOM);break;case se.BOTTOM:N(w=>[...w,[se.BOTTOM,R.intersectionRatio]]),_(c?((E==null?void 0:E.x)||0)>b/2?se.BOTTOM_RIGHT:se.BOTTOM_LEFT:se.RIGHT);break;case se.BOTTOM_LEFT:N(w=>[...w,[se.BOTTOM_LEFT,R.intersectionRatio]]),_(c?se.TOP_LEFT:se.RIGHT);break;case se.BOTTOM_RIGHT:N(w=>[...w,[se.BOTTOM_RIGHT,R.intersectionRatio]]),_(c?se.TOP_RIGHT:se.RIGHT);break;case se.TOP_LEFT:N(w=>[...w,[se.TOP_LEFT,R.intersectionRatio]]),_(c?se.BOTTOM_LEFT:se.RIGHT);break;case se.TOP_RIGHT:N(w=>[...w,[se.TOP_RIGHT,R.intersectionRatio]]),_(c?se.BOTTOM_RIGHT:se.RIGHT);break;case se.RIGHT:N(w=>[...w,[se.RIGHT,R.intersectionRatio]]),_(se.LEFT);break;case se.LEFT:N(w=>[...w,[se.LEFT,R.intersectionRatio]]),_(se.TOP);break}}},[t,p,v,c,y]),D=q(S);return G(()=>{pa(D.current).remove(),D.current=S},[S]),En(C((R,b)=>{var E,I,w;if(b&&(!s||c)&&pa(S).observer.unobserve(b),R&&t.current){if((!s||c)&&pa(S).observer.observe(R),!(R instanceof Element))return;const x={...dg({variant:n,offset:e,additionalStyle:l,fixedPositioning:d,fullWidth:i,popover:R,position:y,targetElement:t.current}),...T&&{visibility:"visible"},...a&&{"min-width":"fit-content",width:`${t.current.clientWidth}px`}};if(R.setAttribute("style",Object.entries(x).map(j=>j.join(":")).join(";")),p&&f(!1),n&&n===rt.TOOLTIP&&r&&Xl(r)&&((E=r.current)==null||E.setAttribute("data-popover-placement",y),Ql.includes(y))){const j=t.current.getBoundingClientRect(),L=R.firstChild,U=L.offsetWidth,ie=j.x+(j.width-U)/2,le=L.offsetHeight,V=y===se.BOTTOM_RIGHT||y===se.BOTTOM_LEFT?le+Jl:Jl;(I=r.current)==null||I.setAttribute("style",`transform: translate3d(${ie}px, -${V}px, 0) rotate(45deg); inset: 0 0 auto auto`)}if(n&&n===rt.TOOLTIP&&h&&Xl(h)&&Ql.includes(y)){const j=document.documentElement.clientWidth;(w=h.current)==null||w.setAttribute("style",`max-width: ${j-lg}px`)}}},[s,c,t,S,n,e,l,d,i,y,T,a,p,r,h]),u)},wr=e=>{const t=q();return En(C((n,s)=>{s instanceof Element&&s.id===t.current&&(s.id=""),n instanceof Element&&(n.id=t.current||(t.current=Rn()))},[e]),e)},hg=e=>{var s;let t;const n=(s=e.querySelector(`.${ph}`))==null?void 0:s.querySelectorAll(Lc);return n?(Array.prototype.some.call(n,r=>{if(Mc(r))return t=r}),t):null},pg=e=>e===rt.TOOLTIP?[10,3,5,5]:[8,8,8,8];function ei({actions:e,disableFocusTrap:t=!1,actionsLayout:n=Ro.SPACE_BETWEEN,variant:s=rt.TOOLTIP,title:r,open:a,dismissible:i,modifiers:c,divider:d,fitContent:l,withoutSpace:u,containerSize:h,position:p,targetElement:f,setToTargetWidth:T,dismiss:g,children:y,withContentPadding:_,classNameModifiers:v,showOverlay:N=!1,fitPosition:S,fixedPositioning:D=!1,additionalStyle:R,...b}){const E=A(()=>ee(g)&&tn(i),[g,i]),I=wr(),w=wr(),H=q(),x=C(Ce=>{var ae;g&&g(),Ce&&((ae=f==null?void 0:f.current)==null||ae.focus())},[g,f]),j=C(Ce=>{Ce.code===te.ESCAPE&&(g&&g(),(f==null?void 0:f.current).focus())},[g,f]),L=q(j),U=q(),ie=wc(ug(pg(s),f,s,p,I,T,N,S,D,R,void 0,w),g,s===rt.TOOLTIP&&!a,mh.POPOVER),le=ag(t?null:ie,x),V=En(C((Ce,ae)=>{ae instanceof Element&&(ae[Ds]=void 0,delete ae[Ds]),Ce instanceof Element&&(Ce[Ds]=f.current,cancelAnimationFrame(U.current),U.current=requestAnimationFrame(()=>{if(H.current===a||!(H.current=a))return;const Te=hg(Ce);Te==null||Te.focus()}))},[a,f]),t?ie:le),Z=wr(V),me=A(()=>({[`${Et}--medium`]:h===Hr.MEDIUM,[`${Et}--with-divider`]:!!d,[`${Et}--wide`]:h===Hr.WIDE,[`${Et}--fit-content`]:l,[`${Et}--without-space`]:u,[`${Et}--auto-width`]:N}),[h,d,u,l,N]);G(()=>{V.current&&(V.current[Ds]=f.current)},[V,f]),G(()=>(document.removeEventListener("keydown",L.current),document.addEventListener("keydown",L.current=j),()=>document.removeEventListener("keydown",L.current)),[j]);const Ne=s===rt.TOOLTIP?hh:`${Et} ${W_}`,fe=s===rt.TOOLTIP?ph:`${ha}`;return ju(o(Q,{children:a?o(Q,{children:[N&&o("div",{className:"adyen-pe-popover__overlay"}),o("div",{id:"popover",ref:Z,...b,className:M(Ne,me,v),style:{visibility:"hidden"},role:b.role??(s===rt.POPOVER?"dialog":"tooltip"),children:[(r||E)&&o("div",{className:yc(zl,c,[zl]),children:[r&&o("div",{className:G_,children:o(z_,{title:r})}),E&&o(j_,{onClick:g})]}),y&&o(Q,{children:[o("div",{className:M(fe,{[`${ha}--with-padding`]:_,[`${ha}--overlay`]:N}),ref:w,children:y}),s===rt.TOOLTIP&&o("span",{"data-popover-placement":"hidden",ref:I,className:"adyen-pe-tooltip__arrow"})]}),e&&o("div",{className:Y_,children:o(hs,{actions:e,layout:n})})]})]}):null}),document.getElementsByTagName("body")[0])}const fg=()=>{const[e,t]=zt(),n=C(()=>t(!0),[t]),s=C(()=>t(!1),[t]),r=C(a=>{switch(a.code){case te.ESCAPE:s();break}},[s]);return{listeners:{onfocusoutCapture:s,onMouseLeave:s,onKeyDown:r,onFocus:n,onMouseEnter:n},isVisible:e}},mg=e=>typeof e=="string",Cn=({content:e,children:t,triggerRef:n,showTooltip:s,position:r,isContainerHovered:a=!1})=>{var l,u,h;const i=wr(),{isVisible:c,listeners:d}=fg();return o(Q,{children:[t?$u(t,{...t==null?void 0:t.props,role:"button",tabIndex:-1,ref:i,className:(l=t==null?void 0:t.props)!=null&&l.className?M(`${(u=t==null?void 0:t.props)==null?void 0:u.className} adyen-pe__tooltip-target`,{" adyen-pe__tooltip-target--hovered":a}):M("adyen-pe__tooltip-target",{"adyen-pe__tooltip-target--hovered":a}),...d,"aria-describedby":`tooltip-${(h=i.current)==null?void 0:h.id}`}):null,(c||s)&&o(ei,{fitPosition:!0,variant:rt.TOOLTIP,targetElement:n??i,position:r,open:c||s,children:o(Q,{children:e&&mg(e)?o(P,{variant:O.CAPTION,children:e}):{content:e}})})]})};function _g({value:e,isContainerHovered:t}){const{i18n:n}=W(),s=`tooltip.${e}`;return o(Q,{children:n.has(s)&&o(Cn,{content:n.get(s),isContainerHovered:t,children:o("span",{children:o(P,{variant:O.BODY,children:n.has(`txType.${e}`)?n.get(`txType.${e}`):`${e}`})})})})}const Yr={title:"thereWasAnUnexpectedError",message:["contactSupportForHelp"]},gh=(e,t)=>{if(!e)return null;switch(e.errorCode){case"29_001":return{title:"theRequestIsMissingRequiredFieldsOrContainsInvalidData",message:["contactSupportForHelp"],onContactSupport:t};case"30_112":return{title:"entityWasNotFound",message:["entityWasNotFoundDetail"],onContactSupport:t};case"00_403":return Yr;default:return null}},Ut=({textToCopy:e,isHovered:t,buttonLabel:n,showCopyTextTooltip:s=!0,type:r="Link",...a})=>{const{i18n:i}=W(),[c,d]=F(i.get("copy")),l=C(async()=>{if(e)try{await navigator.clipboard.writeText(e),d(i.get("copied"))}catch(h){console.log(h)}},[i,e]),u=C(()=>{d(i.get("copy"))},[i]);return o("span",{className:M("adyen-pe-copy-text__container",{"adyen-pe-copy-text__container--information":r==="Link"}),...a,children:[s?o(Cn,{content:e,isContainerHovered:t,children:o("span",{className:M({"adyen-pe-copy-text__label":r!=="Default","adyen-pe-copy-text__information":r==="Link","adyen-pe-copy-text__text":r==="Text"}),children:n||e})}):o("span",{className:M({"adyen-pe-copy-text__label":r!=="Default","adyen-pe-copy-text__information":r==="Link","adyen-pe-copy-text__text":r==="Text"}),children:n||e}),o(Cn,{content:c,children:o(ge,{variant:ne.TERTIARY,className:"adyen-pe-copy-text",onClick:l,onBlur:u,onMouseLeaveCapture:u,"data-testid":"copyText",children:o("div",{className:M("adyen-pe-copy-text__icon",{"adyen-pe-copy-text__icon--information":r==="Link"}),children:o(Re,{name:"copy","data-testid":"copy-icon"})})})})]})},xc=(e,t,n)=>{if(!e)return Yr;const s=gh(e,n);if(s)return s;switch(e.errorCode){case void 0:return{title:"somethingWentWrong",message:[t,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0};case"00_500":{const r=n?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";return{title:"somethingWentWrong",message:[t,r],translationValues:{[r]:e.requestId?o(Ut,{textToCopy:e.requestId}):null},onContactSupport:n}}default:return Yr}},Fi=({error:e,errorMessage:t,onContactSupport:n})=>{const{title:s,message:r,refreshComponent:a,translationValues:i,onContactSupport:c}=xc(e,t,n);return o(Jt,{title:s,message:r,translationValues:i,withImage:!0,centered:!0,refreshComponent:a,onContactSupport:c})},gg=({data:e,columns:t,customCells:n,onRowHover:s})=>{const{i18n:r}=W();return o(Q,{children:e==null?void 0:e.map((a,i)=>o("div",{role:"row",tabIndex:0,className:"adyen-pe-data-grid__row",onMouseEnter:r.has(`tooltip.${a==null?void 0:a.category}`)&&s?()=>s(i):ue,onFocus:r.has(`tooltip.${a==null?void 0:a.category}`)&&s?()=>s(i):ue,onMouseLeave:r.has(`tooltip.${a==null?void 0:a.category}`)&&s?()=>s():ue,onBlur:r.has(`tooltip.${a==null?void 0:a.category}`)&&s?()=>s():ue,children:o(ih,{columns:t,customCells:n,item:a,rowIndex:i})},a))})},Tg=({totalRows:e})=>{const[t,n]=bi((i,c)=>{const d=e;if(d>1){const l=c.index;if(l<d&&l>=0)return c.type==="ACTIVE"?Object.freeze({...i,index:c.index??0,activeIndex:c.index}):Object.freeze({...i,index:c.index??0,activeIndex:-1})}return i},Sg),s=En(C(i=>{var d;if(!(i instanceof Element))return;const c=Number((d=i.dataset)==null?void 0:d.index);t.activeIndex===-1&&c===0||c===t.index?i.setAttribute("tabindex","0"):i.setAttribute("tabindex","-1"),c===t.activeIndex&&(i==null||i.focus())},[t.activeIndex,t.index])),r=C(i=>{var d,l;if(!(((d=i.target)==null?void 0:d.getAttribute("role"))==="row")){i.code===te.ARROW_LEFT&&n({type:"ACTIVE",index:t.index});return}switch(i.code){case te.ARROW_DOWN:case te.ARROW_UP:n({type:"ACTIVE",index:i.code===te.ARROW_DOWN?t.index+1:t.index-1});break;case te.HOME:n({type:"ACTIVE",index:0});break;case te.END:n({type:"ACTIVE",index:e-1});break;case te.ENTER:(l=i.currentTarget)==null||l.click();break;default:return}i.stopPropagation()},[e,t.index]),a=C(i=>c=>{var l;(!(((l=c.target)==null?void 0:l.localName)==="tr")||t.index===-1)&&n({type:"CURRENT",index:i})},[t.index]);return{listeners:{onKeyDownCapture:r,onFocusCapture:a},ref:s,activeIndex:t.activeIndex,currentIndex:t.index}},yg=({data:e,columns:t,onRowClick:n,customCells:s,onRowHover:r})=>{const a=C(u=>()=>n==null?void 0:n.callback(n!=null&&n.retrievedField?u[n.retrievedField]:u),[n]),{i18n:i}=W(),{currentIndex:c,listeners:d,ref:l}=Tg({totalRows:(e==null?void 0:e.length)??0});return o(Q,{children:e==null?void 0:e.map((u,h)=>o("div",{role:"row",tabIndex:0,onMouseEnter:i.has(`tooltip.${u==null?void 0:u.category}`)&&r?()=>r(h):ue,onFocus:i.has(`tooltip.${u==null?void 0:u.category}`)&&r?()=>r(h):ue,onMouseLeave:i.has(`tooltip.${u==null?void 0:u.category}`)&&r?()=>r():ue,onBlur:i.has(`tooltip.${u==null?void 0:u.category}`)&&r?()=>r():ue,ref:l,"aria-selected":h===c,"data-index":h,className:"adyen-pe-data-grid__row adyen-pe-data-grid__row--clickable",onClick:a(u),onFocusCapture:d.onFocusCapture(h),onKeyDownCapture:d.onKeyDownCapture,children:o(ih,{columns:t,customCells:s,item:u,rowIndex:h})},u))})},Ag=({columnsNumber:e,loading:t,emptyMessageDisplay:n})=>{const s=Array.from({length:10},(a,i)=>i),r=Array.from({length:e},(a,i)=>i);return o(Q,{children:[s.map((a,i)=>o("div",{className:"adyen-pe-data-grid__row",children:r.map((c,d)=>o("div",{className:"adyen-pe-data-grid__cell adyen-pe-data-grid__skeleton-cell",children:o("span",{className:M({"adyen-pe-data-grid__skeleton-cell-content adyen-pe-data-grid__skeleton-cell-content--loading":t,"adyen-pe-data-grid__empty-cell":!t})})},`adyen-pe-data-grid-skeleton-cell-${d}`))},`adyen-pe-data-grid-skeleton-row-${i}`)),!t&&n&&n]})},vg="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='200'%20viewBox='0%200%20300%20200'%20fill='none'%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M189.3%20113.7c-1-.3%2036.3%2028.6%2047.7%2026.4%209.3-1.8%2014.3-59%2014.3-59h-9.9l-10.8%2036.3s-30.4-22.3-31.8-22.3c-1.4%200-8%2019.1-9.5%2018.6Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m230.1%20116.7%202%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m259.8%2074.6%2010-3.6.7-8.1c.1-.9-.6-1.6-1.4-1.7-.8-.1-1.5.5-1.7%201.3l-1.3%206.6-12.6%204.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m259.8%2074.6%2010-3.6.7-8.1c.1-.9-.6-1.6-1.4-1.7-.8-.1-1.5.5-1.7%201.3l-1.3%206.6-12.6%204.8'/%3e%3cpath%20fill='%23BF7C6A'%20d='m260.5%2075.5%2011.1-3.5%202.9-7.1c.3-.8-.1-1.7-.9-2.1-.8-.3-1.6%200-2%20.7l-3.2%205.9-10.2%203.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m260.5%2075.5%2011.1-3.5%202.9-7.1c.3-.8-.1-1.7-.9-2.1-.8-.3-1.6%200-2%20.7l-3.2%205.9-10.2%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m254%2076.5%207.4-7.8c.7-.6.8-1.5.2-2.2-.5-.7-1.5-.8-2.2-.4-2%201.3-6.2%205-10.7%207.1-3.1%201.4-5.2%205.8-5.8%207.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m254%2076.5%207.4-7.8c.7-.6.8-1.5.2-2.2-.5-.7-1.5-.8-2.2-.4-2%201.3-6.2%205-10.7%207.1-3.1%201.4-5.2%205.8-5.8%207.3'/%3e%3cpath%20fill='%23BF7C6A'%20d='M250.3%2082.2c1.2-.3%2021.6-8.6%2026.7-10.3.9-.3%201.4-1.2%201.1-2.1-.2-.9-1-1.1-1.9-1-4.4.8-17.9%203.9-19.5%204.2-1.5.2-5.3.6-10.9%203.1a9%209%200%200%200-5.2%208'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M250.3%2082.2c1.2-.3%2021.6-8.6%2026.7-10.3.9-.3%201.4-1.2%201.1-2.1-.2-.9-1-1.1-1.9-1-4.4.8-17.9%203.9-19.5%204.2-1.5.2-5.3.6-10.9%203.1a9%209%200%200%200-5.2%208'/%3e%3cpath%20fill='%2300112C'%20d='M130.9%2063.1c.8%207.3%204.7%2014.1%2010.3%2018l-3.1-6.4c-.5-1-.9-2-1-3.1l-.1-.3c-.1-.1-.1.2%200%20.1'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M130.9%2063.1c.8%207.3%204.7%2014.1%2010.3%2018l-3.1-6.4c-.5-1-.9-2-1-3.1l-.1-.3c-.1-.1-.1.2%200%20.1'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m158.9%2074.8-13.2.2-1.5%2018%208.4%203.6%207.9-3.8-1.6-18Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M151.9%2083.9c-4.7%200-6.4-2.7-6.4-2.7v-4.6h13.4l.3%206c-.1.1-2.5%201.3-7.3%201.3Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M134.5%2070.7c2.4%203%206.3%205.7%209.8%207.3%203.6%201.6%2015.3%201.7%2019.5-1.1%208.8-5.9%2010.5-20.3%208.2-30.6-.7-3.4-1.8-6.8-3.7-9.7a22%2022%200%200%200-19.8-9.3c-7.5.5-19.3%205.9-20.8%2014.2-1.7%209.6.8%2021.6%206.8%2029.2Z'/%3e%3cpath%20fill='%23BF7C6A'%20d='M133.2%2058.9s-5.1-7-7.8-1.6%204.8%2013.4%2010.8%2011.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M133.2%2058.9s-5.1-7-7.8-1.6%204.8%2013.4%2010.8%2011.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='M169.5%2052.4s2.3-8.3%206.7-4.2c4.4%204.1.2%2014.2-6.2%2014.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M169.5%2052.4s2.3-8.3%206.7-4.2c4.4%204.1.2%2014.2-6.2%2014.3'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M166.9%2041.2c-6.3-12-33.4-8.2-34.9%206.3A38.2%2038.2%200%200%200%20142%2077c5.7%205.2%2012%204.5%2014.1%204.1%202.1-.3%208.2-1.8%2011.7-8.8a37.2%2037.2%200%200%200-.9-31.1Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M134.1%2055c7.8-1.1%2015.5-2.6%2023.1-4.4l-.4-4.8c1%201.6%201.8%202.7%202.4%204.5%203-1.3%206.3-1.5%209.5-1.6%203.1-.1-4.2-14.3-6.1-15.6a16.2%2016.2%200%200%200-7.1-2.1c-5.7-.6-11.7-.4-16.7%202.3-4%202.2-7.3%206.4-7.6%2011%200%201.5.5%2011%202.9%2010.7Z'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M114.5%20113.7c1-.3-36.3%2028.6-47.7%2026.4-9.3-1.8-14.3-59-14.3-59h9.9l10.8%2036.3s30.4-22.3%2031.8-22.3c1.5-.1%208.1%2019.1%209.5%2018.6Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m73.8%20116.7-2.1%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='M44%2074.6%2034%2071l-.7-8.1c-.1-.9.6-1.6%201.4-1.7.8-.1%201.5.5%201.7%201.3l1.3%206.6%2012.6%204.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M44%2074.6%2034%2071l-.7-8.1c-.1-.9.6-1.6%201.4-1.7.8-.1%201.5.5%201.7%201.3l1.3%206.6%2012.6%204.8'/%3e%3cpath%20fill='%23BF7C6A'%20d='M43.3%2075.5%2032.2%2072l-2.9-7c-.3-.8.1-1.7.9-2.1.8-.3%201.6%200%202%20.7l3.2%205.9%2010.2%203.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M43.3%2075.5%2032.2%2072l-2.9-7c-.3-.8.1-1.7.9-2.1.8-.3%201.6%200%202%20.7l3.2%205.9%2010.2%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m49.8%2076.5-7.4-7.8c-.7-.6-.8-1.5-.2-2.2.5-.7%201.5-.8%202.2-.4%202%201.3%206.2%205%2010.7%207.1%203.1%201.4%205.2%205.8%205.8%207.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m49.8%2076.5-7.4-7.8c-.7-.6-.8-1.5-.2-2.2.5-.7%201.5-.8%202.2-.4%202%201.3%206.2%205%2010.7%207.1%203.1%201.4%205.2%205.8%205.8%207.3'/%3e%3cpath%20fill='%23BF7C6A'%20d='M53.5%2082.2C52.4%2081.9%2032%2073.7%2026.8%2072a1.6%201.6%200%200%201-1.1-2.1c.2-.9%201-1.1%201.9-1%204.4.8%2017.9%203.9%2019.5%204.2%201.5.2%205.3.6%2010.9%203.1a9%209%200%200%201%205.2%208'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M53.5%2082.2C52.4%2081.9%2032%2073.7%2026.8%2072a1.6%201.6%200%200%201-1.1-2.1c.2-.9%201-1.1%201.9-1%204.4.8%2017.9%203.9%2019.5%204.2%201.5.2%205.3.6%2010.9%203.1a9%209%200%200%201%205.2%208'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M139.9%2087.6c-1.4-3.4-6.3-12.5-9.8-11.7a90.7%2090.7%200%200%200-46.2%2029.7c-4.4%205.4-2%208.7-2%208.7l7.1%2018.8s3.6%202%2015.4%201.7c17.4-.5%2038.8-26.8%2039.5-30.6.4-2.6-1.7-10.8-4-16.6Z'/%3e%3cpath%20fill='%233300C2'%20d='m196.6%20232.8-18.7-58.1h-51l-20.2%2058.1'/%3e%3cpath%20stroke='%230C112C'%20stroke-miterlimit='10'%20d='m196.6%20232.8-18.7-58.1h-51l-20.2%2058.1'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m159.1%2091.8-16.8.1s-20.4%201-21.3%206.8c-1.6%2010.6%206.1%2052.6%205.9%2056.2l-4.8%2020.4.2.1c10.7%205%2022.7%207.2%2034.6%206.2l23.1-1.9-3.2-18.2c-.2-2.7%207.3-46%206.9-61.3-.1-7.1-24.6-8.4-24.6-8.4Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m141.4%2092%201.6-5.6h18.7l1.1%204.9c-.1.1-8.9%2011-21.4.7Zm23.1-4.4c1.4-3.4%206.3-12.5%209.8-11.7a90.7%2090.7%200%200%201%2046.2%2029.7c4.4%205.4%202%208.7%202%208.7l-7.1%2018.8s-3.6%202-15.4%201.7c-17.4-.5-38.8-26.8-39.5-30.6a48.3%2048.3%200%200%201%204-16.6ZM119.9%2018c0-2.5%201.1-4.9%202.7-6.8%201.9-2.2%204.5-3.8%207.4-4.2%202.9-.4%205.9.6%207.9%202.7a4.8%204.8%200%200%200-3-4.1s5-.2%207.1.4a14.7%2014.7%200%200%201%2011%2017.8c-2.3%208.8-14.2%207-21%205.6-5.6-1.2-12-4.9-12.1-11.4Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h300v200H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Rg=({children:e})=>{const t=A(()=>new Map,[]),n=C(({column:r,width:a})=>{if(t.has(r)){const i=t.get(r);a>i&&t.set(r,a)}else t.set(r,a)},[t]),s=C(r=>t.get(r),[t]);return o(oh.Provider,{value:{registerCells:n,getMinWidthByColumn:s},children:Mn(e)})},Cg=({cellKey:e,position:t,label:n})=>{const{registerCells:s}=Oc(),r=q(null);return G(()=>{var a;r.current&&s({column:e,width:(a=r.current)==null?void 0:a.getBoundingClientRect().width})},[e,s]),o("div",{role:"columnheader",id:String(e),className:M("adyen-pe-data-grid__cell adyen-pe-data-grid__cell--heading",{"adyen-pe-data-grid__cell--right":t==="right","adyen-pe-data-grid__cell--center":t==="center"}),children:o("div",{ref:r,className:"adyen-pe-data-grid__cell--heading-content",children:n})})},Sg=Object.freeze({activeIndex:-1,index:-1});function nn({errorDisplay:e,...t}){return o("div",{style:{width:"100%"},children:o(Rg,{children:o(Eg,{...t,errorDisplay:e})})})}function Eg({autoFitColumns:e,errorDisplay:t,...n}){var u,h;const s=A(()=>Mn(n.children),[n.children]),r=A(()=>s.find(p=>(p==null?void 0:p.type)===Th),[s]),a=A(()=>{var p;return((p=n.data)==null?void 0:p.length)===0},[n.data]),i=A(()=>!n.loading&&(a||n.error),[a,n.error,n.loading]),{getMinWidthByColumn:c}=Oc(),d=n.columns.filter(p=>p.visible!==!1).map(p=>({...p,minWidth:c(p.key)})),l=d.map(p=>`minmax(${(p.minWidth||100)+40}px, ${p.flex||1}fr)`).join(" ");return o("div",{className:M("adyen-pe-data-grid",{"adyen-pe-data-grid--condensed":n.condensed,"adyen-pe-data-grid--outline":n.outline,"adyen-pe-data-grid--scrollable":n.scrollable,"adyen-pe-data-grid--loading":n.loading,"adyen-pe-data-grid--empty":a||n.error}),style:e?void 0:{"--adyen-pe-data-grid-cols":d.length,"--adyen-pe-data-grid-cells":l},children:o(Q,{children:[o("div",{className:"adyen-pe-data-grid__table-wrapper",children:[o("div",{role:"table",className:"adyen-pe-data-grid__table",children:[o("div",{className:"adyen-pe-data-grid__head",role:"rowgroup",children:o("div",{role:"rowheader",className:"adyen-pe-data-grid__header",style:n.loading?{width:"100%"}:{},children:d.map(p=>o(Cg,{label:p.label,position:p.position,cellKey:p.key},p.key))})}),o(Ng,{...n,columns:d,emptyBody:a})]}),i&&(a&&!n.error?o(Jt,{title:((u=n.emptyTableMessage)==null?void 0:u.title)??"thereAreNoResults",message:(h=n.emptyTableMessage)==null?void 0:h.message,imageDesktop:vg,centered:!0}):n.error&&t?t():null)]}),r]})})}function Ng(e){const t=A(()=>e.loading||e.emptyBody||e.error,[e.emptyBody,e.error,e.loading]);return o("div",{role:"rowgroup",className:M("adyen-pe-data-grid__body"),style:t&&{display:"grid",gridTemplateColumns:"1fr"},children:t?o(Ag,{columnsNumber:e.columns.length,loading:e.loading}):e.onRowClick?o(yg,{onRowHover:e.onRowHover,data:e.data,columns:e.columns,onRowClick:e.onRowClick,customCells:e.customCells}):o(gg,{onRowHover:e.onRowHover,data:e.data,customCells:e.customCells,columns:e.columns})})}nn.Footer=Th;function Th({children:e}){return o("div",{className:"adyen-pe-data-grid__footer",children:e})}nn.defaultProps={condensed:!1,outline:!0,scrollable:!0};const ti="-ariaError";var et=(e=>(e[e.NONE=0]="NONE",e[e.APPLY=1]="APPLY",e[e.CLEAR=2]="CLEAR",e))(et||{});const yh=({applyDisabled:e,applyTitle:t,resetDisabled:n,resetTitle:s}=z)=>{const{i18n:r}=W(),[a,i]=F(et.NONE),c=C(()=>i(et.APPLY),[i]),d=C(()=>i(et.CLEAR),[i]),l=C(()=>i(et.NONE),[i]),u=A(()=>({disabled:Ve(e),event:c,title:(t==null?void 0:t.trim())||r.get("apply"),variant:ne.PRIMARY}),[r,c,e,t]),h=A(()=>({disabled:Ve(n),event:d,title:(s==null?void 0:s.trim())||r.get("reset"),variant:ne.SECONDARY}),[r,d,n,s]),p=A(()=>[u,h],[u,h]),f=A(()=>a!==et.NONE,[a]);return G(()=>{switch(a){case et.APPLY:case et.CLEAR:l();break}},[a,l]),{commitAction:a,commitActionButtons:p,committing:f,resetCommitAction:l}};function Ah(e){const{backgroundUrl:t="",className:n="",classNameModifiers:s=[],src:r="",alt:a="",showOnError:i=!1}=e,[c,d]=F(!1),l=q(null),u=()=>{d(!0)},h=()=>{d(i)},p=M([n],"adyen-pe-image",{"adyen-pe-image--loaded":c},...s.map(f=>`adyen-pe-image--${f}`));return G(()=>{const f=t?new Image:l.current;f&&(f.src=t||r,f.onload=u),d(!!(f!=null&&f.complete))},[]),t?o("div",{style:{backgroundUrl:t},...e,className:p}):o("img",{...e,alt:a,ref:l,className:p,onError:h})}const dr="adyen-pe-dropdown",Dg=yc(_t,[ne.SECONDARY],[_t]),rn=`${dr}__button`,bg=`${rn}--active`,Og=`${rn}-collapse-indicator`,Ig=`${rn}--has-selection`,Pg=`${rn}-icon`,kg=`${rn}-multiselect-counter`,wg=`${rn}--readonly`,Lg=`${rn}-text`,Fg=`${rn}--valid`,Mg=`${rn}--invalid`,Nn=`${dr}__element`,xg=`${Nn}--active`,Bg=`${Nn}-checkbox`,$g=`${Nn}-checkmark`,Ug=`${Nn}-content`,Hg=`${Nn}--disabled`,Wg=`${Nn}-icon`,Gg=`${Nn}--no-option`,vh=`${dr}__list`,Yg=`${vh}--active`,qg=`${dr}--multiselect`,jg=({active:e,disabled:t,className:n,filterable:s,toggleButtonRef:r,...a})=>{const i=A(()=>s?M(Dg,n):n,[n,s]);return s?o("div",{...a,className:i,ref:r}):o(ge,{...a,className:i,disabled:t,variant:ne.SECONDARY,ref:r})},Vg=e=>{var p,f;const{i18n:t}=W(),{active:n,filterable:s,multiSelect:r,placeholder:a,readonly:i,showList:c,withoutCollapseIndicator:d}=e,l=A(()=>(a==null?void 0:a.trim())||t.get("select.filter.placeholder"),[t,a]),u=A(()=>Ve(r)?void 0:n[0],[n,r]),h=A(()=>{var T;return((T=u==null?void 0:u.name)==null?void 0:T.trim())||l},[u,l]);return o(jg,{active:n,disabled:i,"aria-disabled":i,"aria-expanded":c,"aria-haspopup":"listbox",className:M(rn,{[bg]:c,[Ig]:!!n.length,[wg]:i,[Mg]:e.isInvalid,[Fg]:e.isValid}),filterable:s,onClick:i?void 0:e.toggleList,onKeyDown:i?void 0:e.onButtonKeyDown,role:s?"button":void 0,tabIndex:0,title:h,toggleButtonRef:e.toggleButtonRef,type:s?void 0:"button","aria-describedby":e.ariaDescribedBy,id:e.id??"",children:[c&&s?o("input",{"aria-autocomplete":"list","aria-controls":e.selectListId,"aria-expanded":c,"aria-owns":e.selectListId,autoComplete:"off",className:"adyen-pe-filter-input",onInput:e.onInput,placeholder:l,ref:e.filterInputRef,role:"combobox",type:"text"}):o(Q,{children:[(u==null?void 0:u.icon)&&o(Ah,{className:Pg,src:u.icon,alt:((p=u==null?void 0:u.name)==null?void 0:p.trim())??""}),o("span",{className:Lg,children:((f=u==null?void 0:u.selectedOptionName)==null?void 0:f.trim())||h}),r&&e.appliedFilterNumber>0&&o("div",{className:kg,children:o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,children:e.appliedFilterNumber})})]}),!d&&o("span",{className:Og,children:o(Pi,{role:"presentation"})})]})},zg=e=>{var d;const{componentRef:t}=W(),[n,s]=F(((d=t.current)==null?void 0:d.offsetWidth)||0),[r,a,i]=e;let c=!1;switch(r){case"up":c=n>=a;break;case"down":c=n<=a;break;case"only":if(i){const{min:l,max:u}=i;c=u?n<=u:l?n>=l:!1}else c=n===a;break}return G(()=>{const l=t.current;if(!l)return;const u=new ResizeObserver(h=>{for(const p of h)p.target===l&&s(l.offsetWidth)});return u.observe(l),()=>{u.unobserve(l),u.disconnect()}},[t]),c},Ie={up:{sm:["up",Gt.sm],md:["up",Gt.md]},down:{xs:["down",Gt.sm-1],sm:["down",Gt.md-1]},only:{xs:["only",Gt.sm-1,{max:Gt.sm-1}],sm:["only",Gt.sm,{max:Gt.md-1}],md:["only",Gt.md,{max:Gt.lg-1}]}},Pe=zg;function Xg(e){var c;const[t,n]=F(performance.now()),[s,r]=F(),a=C(d=>d&&e.fixedPositioning?d.scrollHeight>d.offsetHeight:!1,[e.fixedPositioning]),i=(c=e.targetElement.current)==null?void 0:c.offsetParent;return G(()=>{if(!a(i))return;const{height:d,y:l}=i.getBoundingClientRect();r({minY:l,maxY:l+d});let u=null;const h=()=>{u&&cancelAnimationFrame(u),u=requestAnimationFrame(()=>{u=null,n(performance.now())})};return i.addEventListener("scroll",h,{passive:!0}),()=>{i.removeEventListener("scroll",h),u&&cancelAnimationFrame(u),u=null}},[i,a]),e.fixedPositioning?o(ei,{...e,position:se.BOTTOM,additionalStyle:s}):o(ei,{...e})}const Kg=Je(({title:e,...t},n)=>o("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&o("title",{children:e}),o("path",{fill:"currentColor",d:"M1.25 3.5c0-1.24 1-2.25 2.25-2.25h9c1.24 0 2.25 1 2.25 2.25v9c0 1.24-1 2.25-2.25 2.25h-9c-1.24 0-2.25-1-2.25-2.25v-9ZM12.06 6 11 4.94l-4 4-2-2L3.94 8 7 11.06 12.06 6Z"})]})),Zg=Je(({title:e,...t},n)=>o("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&o("title",{children:e}),o("path",{stroke:"currentColor",d:"M.5 4C.5 2 2.1.5 4 .5h8c2 0 3.5 1.6 3.5 3.5v8c0 2-1.6 3.5-3.5 3.5H4C2 15.5.5 13.9.5 12V4Z"})]})),Qg=Je(({title:e,...t},n)=>o("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"16",viewBox:"0 0 16 16",height:"16",children:[e&&o("title",{children:e}),o("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.5 4.5a.7.7 0 0 0-1-1L6 10.9 2.5 7.5a.8.8 0 0 0-1 1l4 4a.8.8 0 0 0 1 0l8-8Z",clipRule:"evenodd"})]})),Jg=e=>e.multiSelect?o("span",{className:Bg,children:e.selected?o(Kg,{role:"presentation"}):o(Zg,{role:"presentation"})}):null,Rh=e=>e.multiSelect?null:o("span",{className:$g,children:e.selected&&o(Qg,{role:"presentation"})}),eT=e=>o(Q,{children:[Jg(e),o("div",{className:e.contentClassName,children:[e.item.icon&&o(Ah,{className:e.iconClassName,alt:e.item.name,src:e.item.icon}),o("span",{children:e.item.name})]}),Rh(e)]}),tT=({item:e,multiSelect:t,onKeyDown:n,onSelect:s,renderListItem:r,selected:a})=>{const i=!!e.disabled,c=Ve(e.disabled)||null,d=M(Nn,{[xg]:a,[Hg]:i});return o("li",{"aria-disabled":i,"aria-selected":a,className:d,"data-disabled":c,"data-value":e.id,onClick:s,onKeyDown:n,title:e.name,role:"option",tabIndex:-1,children:r({item:e,multiSelect:t,selected:a,contentClassName:Ug,iconClassName:Wg})})},nT=Ue(tT),sT=Je(({active:e,commitActions:t,items:n,multiSelect:s,onKeyDown:r,onSelect:a,renderListItem:i,selectListId:c,showList:d,textFilter:l,toggleButtonRef:u,dismissPopover:h,setToTargetWidth:p,popoverClassNameModifiers:f,showOverlay:T,fitPosition:g,fixedPopoverPositioning:y},_)=>{const{i18n:v}=W(),N=Pe(Ie.down.xs),S=n.filter(I=>!l||I.name.toLowerCase().includes(l)),D=M(vh,{[Yg]:d}),R=M(Nn,Gg),b=A(()=>ee(i)?i:eT,[i]),E=A(()=>Ve(s),[s]);return d?o(Xg,{classNameModifiers:f,actions:E?t:void 0,disableFocusTrap:!0,divider:!0,dismiss:h,dismissible:!1,open:d,setToTargetWidth:p,containerSize:Hr.MEDIUM,variant:rt.POPOVER,targetElement:u,withContentPadding:!1,position:se.BOTTOM,showOverlay:T&&N,fitPosition:g,fixedPositioning:y,children:o("ul",{className:D,id:c,ref:_,role:"listbox","aria-multiselectable":E,children:S.length?S.map(I=>o(nT,{item:I,multiSelect:E,onKeyDown:r,onSelect:a,renderListItem:b,selected:e.includes(I)},I.id)):o("div",{className:R,children:v.get("select.noOptionsFound")})})}):null}),rT=Ue(sT),oT=({items:e,multiSelect:t,selected:n})=>{const s=C((d=Se)=>{const l=Se.concat(d??Se).filter(Boolean),u=e.filter(p=>l.includes(p.id)),h=t?u:u.slice(0,1);return h.length?Object.freeze(h):Se},[e,t]),[r,a]=F(s(n)),i=C((d=Se)=>{const l=d.filter(u=>e.includes(u));a(l.length?Object.freeze(l):Se)},[e,a]),c=C(d=>{a(l=>{const u=l.indexOf(d);if(u<0)return Object.freeze((t?l:Se).concat(d));if(!t)return l;const h=[...l];return h.splice(u,1),h.length?Object.freeze(h):Se})},[t,a]);return G(()=>a(s(n)),[s,n,a]),{resetSelection:i,select:c,selection:r}},xn=({className:e,classNameModifiers:t=Se,popoverClassNameModifiers:n,items:s=Se,filterable:r=!1,multiSelect:a=!1,readonly:i=!1,onChange:c=ue,selected:d,name:l,isInvalid:u,isValid:h,placeholder:p,uniqueId:f,renderListItem:T,isCollatingErrors:g,setToTargetWidth:y,withoutCollapseIndicator:_=!1,showOverlay:v=!1,fitPosition:N,fixedPopoverPositioning:S})=>{const{resetSelection:D,select:R,selection:b}=oT({items:s,multiSelect:a,selected:d}),[E,I]=F(!1),[w,H]=F(""),x=q(null),j=q(null),L=q(null),U=q(`select-${Ci()}`),ie=q(),le=q(!0),V=q(!1),Z=q(b),me=q(b),Ne=A(()=>b.length,[b]),fe=C(()=>{H(""),I(!1),E&&(D(Z.current),le.current=!0)},[D,I,H,E]),Ce=A(()=>M([dr,{[qg]:Ve(a)},...t.map(_e=>`${dr}--${_e}`),e]),[e,t,a]),{commitAction:ae,commitActionButtons:Te,committing:He,resetCommitAction:he}=yh({resetDisabled:!b.length}),$e=C(()=>{var _e;H(""),I(!1),he(),le.current?le.current=!1:(_e=L.current)==null||_e.focus()},[he,I,H]),We=C(()=>{Z.current=b;const _e=`${b.map(({id:we})=>we)}`;c({target:{value:_e,name:l}})},[l,c,b]);G(()=>{switch(ae){case et.APPLY:We();break;case et.CLEAR:D(),V.current=!0;break}},[ae,We,D]);const De=C(_e=>{var Le;_e.preventDefault();const we=_e.currentTarget&&((Le=j==null?void 0:j.current)!=null&&Le.contains(_e.currentTarget))?_e.currentTarget:null;if(we&&!we.getAttribute("data-disabled")){const an=we.getAttribute("data-value"),Bn=s.find(fs=>fs.id===an);R(Bn)}},[s,R]);G(()=>{me.current!==b&&(me.current=b,(!a||V.current)&&(We(),$e())),V.current=!1},[$e,We,a,b]),G(()=>{He&&$e()},[He,$e]);const yt=C(_e=>{switch(_e.code){case te.ESCAPE:case te.TAB:E&&$e(),le.current=_e.key===te.TAB;return;case te.ENTER:case te.SPACE:if(r&&E){if(_e.key===te.ENTER)if(w)De(_e);else break;return}break;case te.ARROW_DOWN:case te.ARROW_UP:break;default:return}_e.preventDefault(),I(!0)},[$e,r,De,E,I,w]);G(()=>{E&&(cancelAnimationFrame(ie.current),ie.current=requestAnimationFrame(()=>{var _e;e:{let we=(_e=j.current)==null?void 0:_e.firstElementChild,Le;for(;we;){if(!(we.dataset.disabled&&we.dataset.disabled==="true")){if(we.getAttribute("aria-selected")==="true"){we.focus();break e}Le=Le||we}we=we.nextElementSibling}Le&&Le.focus()}}))},[E]);const bn=C(_e=>{const we=_e.target;switch(_e.code){case te.ESCAPE:_e.preventDefault(),$e();break;case te.ENTER:case te.SPACE:De(_e);break;case te.ARROW_DOWN:{_e.preventDefault();let Le=we.nextElementSibling;for(;Le;){if(!(Le.dataset.disabled&&Le.dataset.disabled==="true")){Le.focus();break}Le=Le.nextElementSibling}break}case te.ARROW_UP:{_e.preventDefault();e:{let Le=we.previousElementSibling;for(;Le;){if(!(Le.dataset.disabled&&Le.dataset.disabled==="true")){Le.focus();break e}Le=Le.previousElementSibling}r&&x.current&&x.current.focus()}break}case te.TAB:$e();break}},[$e,r,De]),on=C(_e=>{const we=_e.target.value;H(we.toLowerCase())},[H]),gr=C(_e=>{_e.preventDefault(),I(we=>!we),E&&D(Z.current)},[I,E,D]);return G(()=>{var _e;E&&r&&((_e=x.current)==null||_e.focus())},[r,E]),o("div",{className:Ce,children:[o(Vg,{id:f??void 0,appliedFilterNumber:Ne,active:b,filterInputRef:x,filterable:r,isInvalid:u,isValid:h,onButtonKeyDown:yt,onInput:on,multiSelect:a,placeholder:p,readonly:i,selectListId:U.current,showList:E,toggleButtonRef:L,toggleList:gr,withoutCollapseIndicator:_,ariaDescribedBy:!g&&f?`${f}${ti}`:""}),o(rT,{popoverClassNameModifiers:n,setToTargetWidth:y,dismissPopover:fe,active:b,commitActions:Te,items:s,multiSelect:a,onKeyDown:bn,onSelect:De,selectListId:U.current,ref:j,toggleButtonRef:L,renderListItem:T,showList:E,showOverlay:v,textFilter:w,fitPosition:N,fixedPopoverPositioning:S})]})},iT=Je(({title:e,...t},n)=>o("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&o("title",{children:e}),o("path",{d:"M5.56077 2.00011L2.56077 5.00011L5.56077 8.00011L4.50011 9.06077L0.439453 5.00011L4.50011 0.939453L5.56077 2.00011Z",fill:t.disabled?"#8D95A3":"#00112C"})]})),aT=Je(({title:e,...t},n)=>o("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&o("title",{children:e}),o("path",{d:"M0.439453 7.9999L3.43945 4.9999L0.439454 1.9999L1.50011 0.93924L5.56077 4.9999L1.50011 9.06056L0.439453 7.9999Z",fill:t.disabled?"#8D95A3":"#00112C"})]}));function Mi({next:e,hasNext:t,hasPrev:n,prev:s,limit:r,limitOptions:a,onLimitSelection:i}){const{i18n:c}=W(),d=A(()=>a&&Object.freeze(a.map(u=>({id:`${u}`,name:`${u}`}))),[a]),l=C(({target:u})=>{xe(u==null?void 0:u.value)||i==null||i(+u.value)},[i]);return o("div",{"aria-label":c.get("paginatedNavigation"),className:`adyen-pe-pagination ${M({})}`,children:[o("div",{className:"adyen-pe-pagination__context",children:d&&i&&o(Q,{children:[o("span",{children:c.get("pagination.showing")}),o("div",{className:"adyen-pe-pagination__limit-selector",children:o(xn,{setToTargetWidth:!0,filterable:!1,multiSelect:!1,items:d,onChange:l,selected:`${r??""}`})})]})}),o("div",{className:"adyen-pe-pagination__controls",children:[o(ge,{"aria-label":c.get("pagination.previousPage"),variant:ne.TERTIARY,disabled:!n,iconButton:!0,classNameModifiers:["circle"].concat(n?Se:"disabled"),onClick:s,children:o(iT,{disabled:!n})}),o(ge,{"aria-label":c.get("pagination.nextPage"),variant:ne.TERTIARY,disabled:!t,iconButton:!0,classNameModifiers:["circle"].concat(t?Se:"disabled"),onClick:e,children:o(aT,{disabled:!t})})]})]})}const ps="adyen-pe-transactions-table",cT=ps+"__amount",lT=ps+"__payment-method",dT=ps+"__payment-method-logo-container",uT=ps+"__payment-method-logo",hT=ps+"__date-and-payment-method",pT=ps+"__date-and-payment-method--date",fT="https://cdf6519016.cdn.adyen.com/checkoutshopper/",mT=({name:e,resourceContext:t,imageFolder:n="logos/",parentFolder:s="",extension:r="svg",size:a="",subFolder:i=""})=>{const c=`/images/${n}/${i}/${s}/${e}${a}.${r}`.replace(/\/+/g,"/");return`${t}${c}`},_T=({options:e=z,name:t})=>{const{loadingContext:n}=W();return A(()=>mT({resourceContext:fT,name:t,...e}),[n,t,e])},Ch=({folder:e="components/",className:t,alt:n,name:s,extension:r})=>{const a=_T({options:A(()=>({imageFolder:e,extension:r}),[r,e]),name:s});return o("img",{className:M("adyen-pe__image",t),alt:n,src:a})},bs=({paymentMethod:e,bankAccount:t})=>{const{i18n:n}=W(),s=Pe(Ie.down.xs);return o("div",{className:lT,children:e||t?o(Q,{children:[o("div",{className:dT,children:o(Ch,{name:e?e.type:"bankTransfer",alt:e?e.type:"bankTransfer",folder:"logos/",className:uT})}),o(P,{variant:O.BODY,stronger:s,children:e?ch(e):t==null?void 0:t.accountNumberLastFourDigits})]}):o(it,{label:n.get("noData"),variant:be.LIGHT_WITH_OUTLINE})})},gT={id:"paymentId",transactionType:"transactionType",createdAt:"date",balanceAccountId:"balanceAccount",accountHolderId:"account",amount:"txAmount",description:"description",status:"status",category:"category",paymentMethod:"paymentMethod",currency:"currency",fundsCapturedAmount:"fundsCaptured",payoutAmount:"netPayout",adjustmentAmount:"adjustments",dateAndPaymentMethod:"date",dateAndReportType:"date",reportType:"report",reportFile:"file"},Sh=e=>gT[e]||e;function TT(e){let t={};for(const n of Object.keys(e))oe(e[n])||(t={...t,[n]:e[n]});return t}const xi=({fields:e,customColumns:t,columnConfig:n,fieldsKeys:s})=>{const{i18n:r}=W(),a=A(()=>e.map(d=>({key:d})),[e]),i=Pe(Ie.up.sm);return A(()=>{const d=(t==null?void 0:t.filter(p=>!(e!=null&&e.some(f=>f===p.key))).map(p=>p.key))||[],l=[...a,...(t==null?void 0:t.filter(p=>p==null?void 0:p.key))||[]],u=(t==null?void 0:t.reduce((p,f)=>(p[f.key]=f,p),{}))||{},h=new Map;return l.forEach(p=>{const f=u[p.key];if((f==null?void 0:f.visibility)!=="hidden")if(h.has(p.key)){const T=h.get(p.key);h.set(p.key,{...T,...p,visible:p.visibility!=="hidden",position:p.align||T.position})}else{const{key:T,flex:g,align:y}=p,_=r.get(Sh((s==null?void 0:s[T])||T)),v=TT((n==null?void 0:n[T])||z);h.set(p.key,{key:T,label:_,visible:d.includes(p.key)?i:!0,flex:g,position:y,...v})}}),Array.from(h.values())},[n,t,e,r,i,a])},Bc=["createdAt","paymentMethod","transactionType","amount"],yT=({activeBalanceAccount:e,availableCurrencies:t,error:n,hasMultipleCurrencies:s,loading:r,onContactSupport:a,onRowClick:i,showDetails:c,showPagination:d,transactions:l,customColumns:u,...h})=>{const{i18n:p}=W(),{dateFormat:f}=kt(e==null?void 0:e.timeZone),[T,g]=F(),y=Pe(Ie.up.sm),_=Pe(Ie.up.md),v=Pe(Ie.down.xs),N=p.get("amount"),S=xi({fields:Bc,customColumns:u,columnConfig:{amount:{label:s?void 0:`${N} ${t&&t[0]?`(${Ru(t[0])})`:""}`,position:"right",flex:y?1.5:void 0},transactionType:{visible:_},paymentMethod:{visible:y}}}),D={title:"noTransactionsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},R=C(E=>{g(E??void 0)},[g]),b=A(()=>()=>o(Fi,{error:n,onContactSupport:a,errorMessage:"weCouldNotLoadYourTransactions"}),[n,a]);return o("div",{className:ps,children:o(nn,{errorDisplay:b,error:n,columns:S,data:l,loading:r,outline:!1,onRowClick:{callback:i},onRowHover:R,emptyTableMessage:D,customCells:{transactionType:({item:E,rowIndex:I})=>{const w=`tooltip.${E.category}`;return E.category?p.has(w)?o(_g,{isContainerHovered:I===T,value:E.category}):o(P,{variant:O.BODY,children:p.has(`txType.${E.category}`)?p.get(`txType.${E.category}`):`${E.category}`}):null},amount:({value:E})=>{const I=p.amount(E.value,E.currency,{hideCurrency:!s});return o(P,{variant:O.BODY,className:cT,children:I})},createdAt:({item:E,value:I})=>v?o("div",{className:hT,children:[o(bs,{paymentMethod:E.paymentMethod,bankAccount:E.bankAccount}),o(P,{variant:O.BODY,className:pT,children:f(E.createdAt,Z1)})]}):o(P,{variant:O.BODY,children:f(I,K1)}),paymentMethod:({item:E})=>o(bs,{paymentMethod:E.paymentMethod,bankAccount:E.bankAccount})},children:d&&o(nn.Footer,{children:o(Mi,{...h})})})})},Tt="adyen-pe-transaction-data",AT=`${Tt}__amount`,vT=`${Tt}__action-bar`,Bi=`${Tt}__container`,RT=`${Tt}__head-container`,$c=`${Tt}__input`,Co=`${$c}-container`,Eh=`${Co}--short`,CT=`${Co}--text-input`,ST=`${Co}--with-error`,Nh=`${$c}-head`,ET=`${Tt}__label`,NT=`${Tt}__list`,DT=`${Tt}__tags`,bT=`${Tt}__status-box`,OT=`${Tt}__refund-response`,ni=`${Tt}__refund-response-icon`,IT=`${ni}--success`,PT=`${ni}--error`,kT=`${Tt}__refund-statuses-container`,Dh=new Set(["status","category","paymentMethod","bankAccount","balanceAccount","id","balanceAccountId",...Bc,"deductedAmount","lineItems","originalAmount","paymentPspReference","refundDetails","refundMetadata"]),wT=()=>{var r;const{i18n:e}=W(),{transaction:t,extraFields:n,dataCustomization:s}=P_();return A(()=>{const{balanceAccount:a,category:i,id:c,paymentPspReference:d,refundMetadata:l}=t,u=i==="Refund",h=null,p=S=>{if(xe(S))return null;const{value:D,currency:R}=S;return e.amount(D,R)},f=p(t.deductedAmount),T=p(t.originalAmount),g=u?"refund.refundFee":"refund.fee",y=u?"refund.originalPayment":"refund.originalAmount",_=u?"refund.paymentPspReference":"refund.pspReference",N=[...[T?{key:y,value:T,id:"originalAmount"}:h,f?{key:g,value:f,id:"deductedAmount"}:h,a!=null&&a.description?{key:"account",value:a.description,id:"description"}:h,u&&(l!=null&&l.refundReason)?{key:"refundReason",value:e.has(`refundReason.${l.refundReason}`)?e.get(`refundReason.${l.refundReason}`):l.refundReason,id:"refundReason"}:h,{key:"referenceID",value:o(Ut,{type:"Default",textToCopy:c,showCopyTextTooltip:!1}),id:"id"},u&&(l!=null&&l.refundPspReference)?{key:"refund.refundPspReference",value:l.refundPspReference,id:"refundPspReference"}:h,d?{key:_,value:d,id:"paymentPspReference"}:h].filter(Boolean).filter(S=>{var D,R;return!((R=(D=s==null?void 0:s.details)==null?void 0:D.fields)!=null&&R.some(b=>b.key===S.id&&b.visibility==="hidden"))}),...Object.entries(n||{}).filter(([S,D])=>!Dh.has(S)&&D.type!=="button"&&D.visibility!=="hidden").map(([S,D])=>({key:S,value:en(D)?D.value:D,type:en(D)?D.type:"text",config:en(D)?D.config:void 0}))||{}];return o(Tn,{classNames:NT,items:N,layout:"5-7",align:"start",renderLabel:S=>o("div",{className:ET,children:S}),renderValue:(S,D,R,b)=>{if(R==="link"&&b)return o(wi,{classNames:[M(b==null?void 0:b.className)],href:b.href,target:b.target||"_blank",children:S});if(R==="icon"&&b){const E={url:b==null?void 0:b.src,alt:b.alt||S};return o("div",{className:M("adyen-pe-transaction-data__list-icon-value",b==null?void 0:b.className),children:[o(Li,{...E}),o(P,{variant:O.BODY,children:[" ",S," "]})]})}return o(P,{className:M(b==null?void 0:b.className),variant:O.BODY,children:S})}})},[(r=s==null?void 0:s.details)==null?void 0:r.fields,n,e,t])},ed=({children:e,className:t})=>o("div",{className:M(Bi,t),children:e}),So="adyen-pe-status-box",LT=`${So}__amount`,FT=`${So}__label`,Uc=`${So}__payment-method`,MT=`${Uc}-detail`,bh=`${Uc}-logo`,xT=`${bh}-container`,BT=`${So}__tags`,$T=({tag:e,amount:t,paymentMethod:n,paymentMethodType:s,date:r,classNames:a})=>o("div",{className:So,children:[e&&o("div",{className:BT,children:e}),t&&o("div",{className:M(LT,a==null?void 0:a.amount),children:t}),s&&o("div",{className:Uc,children:[o("div",{className:xT,children:o(Ch,{className:bh,name:s,alt:s,folder:"logos/"})}),o("div",{className:MT,children:n})]}),r&&o("div",{className:FT,children:r})]}),Oh=Ue($T),UT=Je(({title:e,...t},n)=>o("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&o("title",{children:e}),o("g",{clipPath:"url(#a)",children:o("path",{d:"M.25 8a7.75 7.75 0 1 1 15.5 0A7.75 7.75 0 0 1 .25 8ZM6 4.94 4.94 6l2 2-2 2L6 11.06l2-2 2 2L11.06 10l-2-2 2-2L10 4.94l-2 2-2-2Z",fill:"currentColor"})}),o("defs",{children:o("clipPath",{id:"a",children:o("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}));function Ih({onInput:e,onKeyUp:t,trimOnBlur:n,onBlurHandler:s,onBlur:r,onFocusHandler:a,errorMessage:i,...c},d){const{autoCorrect:l,classNameModifiers:u,isInvalid:h,isValid:p,readonly:f=!1,spellCheck:T,type:g,uniqueId:y,isCollatingErrors:_,disabled:v}=c;Qt(c,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const N=C(L=>{e==null||e(L)},[e]),S=C(L=>{t&&t(L)},[t]),D=C(L=>{s==null||s(L),n&&(L.target.value=L.target.value.trim()),r==null||r(L)},[r,s,n]),R=C(L=>{a==null||a(L)},[a]),b=M("adyen-pe-input",[`adyen-pe-input--${g}`],c.className,{"adyen-pe-input--invalid":h,"adyen-pe-input--valid":p},u==null?void 0:u.map(L=>`adyen-pe-input--${L}`)),{classNameModifiers:E,uniqueId:I,isInvalid:w,isValid:H,isCollatingErrors:x,...j}=c;return o(Q,{children:[o("input",{id:y,...j,type:g,className:b,readOnly:f,"aria-describedby":_?void 0:`${y}${ti}`,"aria-invalid":h,onInput:N,onBlurCapture:D,onFocus:R,onKeyUp:S,disabled:v,ref:d}),h&&i&&o("span",{className:"adyen-pe-input__invalid-value",id:`${y}${ti}`,children:i})]})}Ih.defaultProps={type:"text",classNameModifiers:[],onInput:()=>{}};const si=mr(Ih),Ph=(e,t)=>Cu(e,t).toFixed(Wa(t)),Wa=e=>Math.log10(vu(e)),kh=({currency:e,disabled:t,errorMessage:n,errorMessageArg:s,onInput:r,value:a})=>{const{i18n:i}=W(),c=q(Rn()),d=q(Rn()),l=n?s?i.get(n,{values:{amount:s}}):i.get(n):"";return o("div",{className:Bi,children:[o("div",{className:Nh,children:o("div",{id:d.current,children:o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,children:i.get("refundAmount")})})}),o("div",{className:M({[Co]:!0,[Eh]:!0,[CT]:!0,[ST]:!!n}),children:[o("label",{htmlFor:c.current,"aria-labelledby":d.current,children:[e&&o(it,{label:e,variant:be.DEFAULT}),o(si,{min:0,type:"number",className:$c,disabled:Ve(t),lang:i.locale,onInput:r,value:a,uniqueId:c.current})]}),n&&o("div",{className:"adyen-pe-input__refund-invalid-value",id:`${c.current}${ti}`,children:[o(UT,{}),o(P,{el:J.SPAN,variant:O.BODY,children:l})]})]})]})},HT=()=>{const{availableAmount:e,currency:t}=Pc();return o(kh,{currency:t,errorMessage:null,value:Ph(e,t),disabled:!0})},WT=({locale:e})=>{const{availableAmount:t,currency:n,interactionsDisabled:s,setAmount:r}=Pc(),[a,i]=F(null),[c,d]=F(`${Ph(t,n)}`),{i18n:l}=W(),u=A(()=>{const p=Wa(n);return f=>Math.trunc(+`${parseFloat(f)}e${p}`)||0},[n]),h=p=>{var v;let f=p.currentTarget.value.trim();const T=u(f);let g=null;T||f?(T<0&&(g="noNegativeNumbersAllowed"),T>t&&(g="refundAmount.excess")):g="refundAmount.required";const y=((v=1.1.toLocaleString(e).match(/\d(.*?)\d/))==null?void 0:v[1])||".",_=f.split(y);if(_.length===2){const N=Wa(n),S=_[0];let D=_[1];D.length>=N&&(D=D.substring(0,N),f=S+y+D,p.currentTarget.value=f)}d(f),i(g),r(g?0:T)};return o(kh,{currency:n,errorMessage:a,errorMessageArg:l.amount(t,n),onInput:h,value:c,disabled:s})},GT=()=>{const{i18n:e}=W();return A(()=>o("div",{className:`${Bi} ${RT}`,children:[o(P,{el:J.DIV,variant:O.SUBTITLE,stronger:!0,children:e.get("refundAction")}),o(P,{variant:O.BODY,children:e.get("refundNotice")})]}),[e])},YT=()=>{const{i18n:e}=W(),{interactionsDisabled:t,refundReason:n,setRefundReason:s}=Pc(),r=A(()=>Object.freeze(Ic.map(i=>({id:i,name:e.has(`refundReason.${i}`)?e.get(`refundReason.${i}`):i}))),[e]),a=C(i=>{var d;const c=(d=i.target)==null?void 0:d.value;c&&s(c)},[s]);return o("div",{className:Bi,children:[o("div",{className:Nh,children:o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,children:e.get("refundReason")})}),o("div",{className:`${Co} ${Eh}`,children:o(xn,{items:r,readonly:t,filterable:!1,multiSelect:!1,onChange:a,selected:n})})]})},qT=e=>{switch(e==null?void 0:e.status){case"Booked":return"default";case"Reversed":return"error";default:return"pending"}},jT=e=>{if(e.category==="Refund"){const{refundType:t}=e.refundMetadata??z;switch(t){case qn.FULL:return qn.FULL;case qn.PARTIAL:return qn.PARTIAL}}},VT=({transaction:e,refundedState:t})=>{const{i18n:n}=W(),{category:s}=e,r=jT(e);return o("div",{className:DT,children:[s&&o(it,{label:n.get(`txType.${s}`),variant:be.DEFAULT}),r&&o(Q,{children:[r===qn.FULL&&o(it,{label:n.get("full"),variant:be.SUCCESS}),r===qn.PARTIAL&&o(it,{label:n.get("partial"),variant:be.BLUE})]}),t===ws.FULL&&o(it,{label:n.get("refunded.full"),variant:be.SUCCESS}),t===ws.PARTIAL&&o(it,{label:n.get("refunded.partial"),variant:be.BLUE})]})},td=({children:e,renderViewActionButtons:t,renderViewMessageBox:n})=>o("div",{className:Tt,children:[e,n&&n(),t()]}),nd=({action:e,title:t,renderIcon:n,subtitle:s})=>o("div",{className:OT,children:[n&&n(),o(P,{className:Yt.MEDIUM,variant:O.TITLE,children:t}),o(P,{variant:O.BODY,children:s}),e&&e()]}),zT=({transaction:e,extraFields:t,dataCustomization:n})=>{var Te,He;const[s,r]=F(mt.DETAILS),[a,i]=F(),[c,d]=F(),[l,u]=F(!1),{fetchingTransaction:h,refreshTransaction:p,transaction:f,transactionNavigator:T}=$_(e),{refundable:g,refundableAmount:y,refundableAmountLabel:_,refundAvailable:v,refundCurrency:N,refundDisabled:S,refundedState:D,refundStatuses:R,refundMode:b,refundLocked:E}=H_(f),I=A(()=>S||l,[S,l]),{i18n:w}=W(),H=Object.freeze((f==null?void 0:f.lineItems)??Se),x=C(he=>i(he),[]),j=C(he=>d(he),[]),L=C(he=>he===mt.REFUND&&I,[I]),{getBalanceAccounts:U}=Ee().endpoints,{data:ie}=gt(A(()=>({fetchOptions:{enabled:!!U&&!f.balanceAccount&&!!f.balanceAccountId,keepPrevData:!0},queryFn:async()=>U==null?void 0:U(z)}),[f.balanceAccountId,f.balanceAccount,U])),le=C(he=>void(L(he)||r(he)),[L]),V=C(()=>{const he=t?Object.values(t).filter(We=>We.type==="button").map(We=>{var De,yt;return{title:We.value,variant:ne.SECONDARY,event:(De=We.config)==null?void 0:De.action,classNames:(yt=We.config)!=null&&yt.className?[We.config.className]:[]}}):[],$e=[a,c,...he].filter(Boolean);return $e.length?o(ed,{className:vT,children:o(hs,{actions:$e,layout:Ro.BUTTONS_END})}):null},[t,a,c]),Z=C(()=>{p(),u(!0)},[u,p]),me={timezone:(Te=f.balanceAccount)==null?void 0:Te.timeZone,createdAt:f.createdAt,amountData:f.amount,paymentMethodData:f.paymentMethod,bankAccount:f.bankAccount},Ne=lh(me),fe=C(()=>R!=null&&R.length||E||l?o("div",{className:kT,children:[(E||l)&&o(st,{type:Oe.HIGHLIGHT,variant:at.TIP,description:`${w.get("refund.theRefundIsBeingProcessed")} ${w.get("pleaseComeBackLater")}`}),R.map((he,$e)=>o(st,{variant:at.TIP,type:(he==null?void 0:he.type)??Oe.HIGHLIGHT,description:he==null?void 0:he.label},`${Math.random()}-${$e}`))]}):null,[w,R,E,l]),Ce=f.balanceAccount??((He=ie==null?void 0:ie.data)==null?void 0:He.find(he=>he.id===f.balanceAccountId));if(cr(()=>{r(mt.DETAILS)},[f]),cr(()=>{I&&r(mt.DETAILS)},[I]),h)return o(Dc,{skeletonRowNumber:5});if(L(s))return null;const ae={lineItems:H,refundAvailable:v,refundDisabled:I,setActiveView:le,setPrimaryAction:x,setSecondaryAction:j};switch(s){case mt.DETAILS:return o(td,{renderViewActionButtons:V,renderViewMessageBox:fe,children:o(I_,{...ae,transaction:!f.balanceAccount&&Ce?{...f,balanceAccount:Ce}:{...f},transactionNavigator:T,extraFields:t,dataCustomization:n,children:[o(ed,{className:bT,children:o(Oh,{...Ne,tag:o(VT,{transaction:f,refundedState:D}),classNames:{amount:`${AT}--${qT(f)}`}})}),o(wT,{})]})});case mt.REFUND:return o(td,{renderViewActionButtons:V,children:o(x_,{...ae,availableAmount:y,currency:N,refundMode:b,refreshTransaction:p,transactionId:f.id,children:[o(GT,{}),g&&o(YT,{}),b===Ke.FULL_AMOUNT&&o(HT,{}),(b===Ke.PARTIAL_AMOUNT||b===Ke.PARTIAL_LINE_ITEMS)&&o(WT,{locale:w.locale}),_&&o(st,{variant:at.TIP,type:_.type,description:_.description})]})});case mt.REFUND_SUCCESS:return o(nd,{renderIcon:()=>o(Re,{name:"checkmark-circle-fill",className:M(ni,IT)}),title:w.get("refundActionSuccessTitle"),subtitle:w.get("refundActionSuccessSubtitle"),action:()=>o(ge,{variant:ne.SECONDARY,onClick:Z,children:w.get("goBack")})});case mt.REFUND_ERROR:return o(nd,{renderIcon:()=>o(Re,{name:"cross-circle-fill",className:M(ni,PT)}),title:w.get("refundActionErrorTitle"),subtitle:w.get("refundActionErrorSubtitle"),action:()=>o(ge,{variant:ne.SECONDARY,onClick:p,children:w.get("goBack")})});default:return null}},XT=({error:e,isFetching:t,transaction:n,extraFields:s,dataCustomization:r})=>Ve(t)||!(n||e)?o(Dc,{skeletonRowNumber:5}):n?o(zT,{dataCustomization:r,transaction:n,extraFields:s}):null,Eo=(e,t)=>{const{getBalanceAccounts:n}=Ee().endpoints,{data:s,isFetching:r,error:a}=gt(A(()=>({fetchOptions:{enabled:!!n&&(t??!0),keepPrevData:!0},queryFn:async()=>n==null?void 0:n(z)}),[n])),i=A(()=>s==null?void 0:s.data.filter(d=>e?d.id===e:!0),[s==null?void 0:s.data,e]),c=A(()=>!!e&&!!(s!=null&&s.data.length)&&(i==null?void 0:i.length)===0,[i==null?void 0:i.length,s==null?void 0:s.data.length,e]);return{balanceAccounts:i,isBalanceAccountIdWrong:c,isFetching:r,error:a}},wh=ls({withinModal:!1}),KT=()=>ds(wh);function Lh({title:e,children:t,classNameModifiers:n=[],isOpen:s,onClose:r,isDismissible:a=!0,headerWithBorder:i=!0,size:c="fluid",...d}){const l=Pe(Ie.down.xs),{i18n:u}=W(),h=wc(null,r),p=C(f=>{f.key==="Escape"&&s&&a&&r()},[s,a,r]);return G(()=>(s?window.addEventListener("keydown",p):window.removeEventListener("keydown",p),()=>window.removeEventListener("keydown",p)),[s,p]),o(Q,{children:s&&o("div",{className:M("adyen-pe-modal-wrapper",n.map(f=>`adyen-pe-modal-wrapper--${f}`),{"adyen-pe-modal-wrapper--open":s,"adyen-pe-modal-wrapper--dismissible":a}),role:"dialog","aria-modal":"true","aria-hidden":!open,...d,children:o(wh.Provider,{value:{withinModal:!0},children:o("div",{className:M("adyen-pe-modal",{"adyen-pe-modal--fluid":c==="fluid","adyen-pe-modal--small":c==="small","adyen-pe-modal--large":c==="large","adyen-pe-modal--extra-large":c==="extra-large","adyen-pe-modal--full-screen":c==="full-screen"||l}),ref:h,children:[o("div",{className:M("adyen-pe-modal__header",{"adyen-pe-modal__header--with-title":e,"adyen-pe-modal__header--with-border-bottom":i}),children:[e&&o("div",{className:"adyen-pe-modal__header__title",children:e}),a&&o(ge,{onClick:r,variant:ne.TERTIARY,iconButton:!0,classNameModifiers:["circle"],className:"adyen-pe-modal__header-icon","aria-label":u.get("dismiss"),children:o(Re,{name:"cross"})})]}),o("div",{className:"adyen-pe-modal__content",children:t})]})})})})}const ZT={transaction:"transactionDetails",payout:"payoutDetails"},QT=({hideTitle:e,type:t})=>{const{i18n:n}=W(),{withinModal:s}=KT(),[r,a]=F(!1),i=A(()=>r||Ve(e),[r,e]),c=A(()=>n.get(ZT[t]),[n,t]);return G(()=>{a(s)},[s]),{hideTitle:i,title:c}},Fh="adyen-pe-payouts-table",JT=`${Fh}__net-payout`,Mh=["fundsCapturedAmount","adjustmentAmount","payoutAmount"],$i=["createdAt",...Mh],ey=e=>Mh.includes(e),ty=({error:e,loading:t,onContactSupport:n,onRowClick:s,showDetails:r,showPagination:a,data:i,customColumns:c,...d})=>{const{i18n:l}=W(),{dateFormat:u}=kt("UTC"),{refreshing:h}=Ee(),p=A(()=>t||h,[t,h]),f=Pe(Ie.up.sm),T=C(v=>{var S,D,R,b;const N=l.get(Sh(v));if(ey(v))return{label:(D=(S=i==null?void 0:i[0])==null?void 0:S[v])!=null&&D.currency?`${N} (${Ru((b=(R=i==null?void 0:i[0])==null?void 0:R[v])==null?void 0:b.currency)})`:N,position:"right"}},[i,l]),g=xi({fields:$i,customColumns:c,columnConfig:A(()=>({fundsCapturedAmount:{...T("fundsCapturedAmount"),visible:f},adjustmentAmount:{...T("adjustmentAmount"),visible:f},payoutAmount:T("payoutAmount")}),[T,f])}),y={title:"noPayoutsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},_=A(()=>()=>o(Fi,{error:e,errorMessage:"weCouldNotLoadYourPayouts",onContactSupport:n}),[e,n]);return o("div",{className:Fh,children:o(nn,{errorDisplay:_,error:e,columns:g,data:i,loading:p,outline:!1,onRowClick:{callback:s},emptyTableMessage:y,customCells:{createdAt:({value:v})=>v?f?v&&o(P,{variant:O.BODY,children:u(v,V1)}):u(v,z1):null,fundsCapturedAmount:({value:v})=>v&&o(P,{variant:O.BODY,children:l.amount(v.value,v.currency,{hideCurrency:!0})}),adjustmentAmount:({value:v})=>v&&o(P,{variant:O.BODY,children:l.amount(v.value,v.currency,{hideCurrency:!0})}),payoutAmount:({value:v})=>v&&o(P,{variant:O.BODY,className:M({[`${JT}--strong`]:!f}),children:l.amount(v.value,v.currency,{hideCurrency:f})})},children:a&&o(nn.Footer,{children:o(Mi,{...d})})})})},ny={transaction:"getTransaction",payout:"getPayout",dispute:"getDisputeDetail"},ko=e=>!("data"in e);function Hc(e){var v;const t=A(()=>ko(e)?null:e.data,[e]),n=A(()=>ko(e)?e.id:null,[e]),s=Ee().endpoints[ny[e.type]],{hideTitle:r,title:a}=QT(e),{data:i,error:c,isFetching:d}=gt(A(()=>({fetchOptions:{enabled:!!n&&!!s},queryFn:async()=>{let N=null;switch(e.type){case"transaction":N={path:{transactionId:n}};break;case"payout":N={query:{balanceAccountId:n,createdAt:e.date}};break;default:break}return s(z,{...N})}}),[n,s,e])),l=e.type==="payout"?e.id:i==null?void 0:i.balanceAccountId,u=e.type==="payout"?e==null?void 0:e.balanceAccountDescription:e==null?void 0:e.balanceAccount,{balanceAccounts:h}=Eo(l,!u),p=A(()=>{if(c)return xc(c,"weCouldNotLoadYourTransactions",e.onContactSupport)},[c,e.onContactSupport]),f=t??i,[T,g]=F(),y=C(async()=>{var N,S,D,R,b;if(i&&(ko(e)&&e.type==="transaction"||e.type==="payout")){const E=await((D=(S=(N=e.dataCustomization)==null?void 0:N.details)==null?void 0:S.onDataRetrieve)==null?void 0:D.call(S,i));g((b=(R=e.dataCustomization)==null?void 0:R.details)==null?void 0:b.fields.reduce((I,w)=>Dh.has(w.key)||$i.includes(w.key)||(w==null?void 0:w.visibility)==="hidden"?I:{...I,...E!=null&&E[w.key]?{[w.key]:E[w.key]}:{}},{}))}},[i,e]),_=ko(e)&&e.type==="transaction"||e.type==="payout"?e.dataCustomization:void 0;return G(()=>{y()},[y]),o("div",{className:"adyen-pe-overview-details",children:[!r&&o("div",{className:"adyen-pe-overview-details--title",children:o(P,{variant:O.TITLE,medium:!0,children:a})}),c&&p&&o("div",{className:"adyen-pe-overview-details--error-container",children:o(Jt,{withImage:!0,...p})}),e.type==="transaction"&&o(XT,{transaction:f?{...f||z,balanceAccount:(e==null?void 0:e.balanceAccount)||(h==null?void 0:h[0])}:void 0,error:!!(c&&p),isFetching:d,extraFields:T,dataCustomization:_}),e.type==="payout"&&f&&o(E_,{balanceAccountId:n,payout:f,balanceAccountDescription:(e==null?void 0:e.balanceAccountDescription)||((v=h==null?void 0:h[0])==null?void 0:v.description),isFetching:d,extraFields:T,dataCustomization:_})]})}class xh extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(Hc,{...this.props,type:"payout",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(xh,"type","payoutDetails");const sy="adyen-pe-data-overview-container--with-error";function Ui({balanceAccountsError:e,children:t,className:n,errorMessage:s,isBalanceAccountIdWrong:r,onContactSupport:a}){const{hasError:i}=Ee();return o("div",{className:M(n,{[sy]:i}),children:i?o(Jt,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[s,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0}):e?o(Jt,{withImage:!0,centered:!0,...xc(e,"weCouldNotLoadYourBalanceAccounts",a)}):r?o(Jt,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[s,"theSelectedBalanceAccountIsIncorrect"]}):o(Q,{children:t})})}const ry="adyen-pe-payouts-overview",oy="adyen-pe-payouts-details",iy=new Date("2024-04-16T00:00:00.000Z").toString(),sd="adyen-pe-filter-bar-mobile-switch",Hi=()=>{const e=Pe(Ie.down.xs),[t,n]=F(!e);return G(()=>{n(!e)},[e]),{isMobileContainer:e,showingFilters:t,setShowingFilters:n}},Wi=({isMobileContainer:e,showingFilters:t,setShowingFilters:n})=>e?o("div",{className:sd,children:o(ge,{iconButton:!0,className:`${sd}__button`,disabled:!ee(n),onClick:()=>n==null?void 0:n(!t),variant:ne.SECONDARY,children:o(Re,{name:t?"cross":"filter"})})}):null,Gi=e=>{const{i18n:t}=W();return e.showingFilters?o("div",{"aria-label":t.get("filterBar"),className:M("adyen-pe-filter-bar",{"adyen-pe-filter-bar__content--mobile":e.isMobileContainer}),children:[e.children,e.canResetFilters&&!!e.resetFilters&&o(ge,{variant:ne.TERTIARY,onClick:e.resetFilters,children:t.get("button.clearAll")})]}):null},ri=Rn(),Yi=(e,t=!1)=>{const{i18n:n}=W(),[s,r]=F(0),a=C(()=>r(0),[]),i=A(()=>e&&[...e,...t?[{...e[0]??{},id:ri,description:void 0}]:[]],[t,e]),c=A(()=>i==null?void 0:i[s],[i,s]),d=A(()=>e&&e.length>1?Object.freeze(i==null?void 0:i.map(({description:u,id:h})=>{const p=h===ri?n.get("balanceAccounts.all"):Of(u);return{id:h,name:p}})):void 0,[i,e,n]),l=C(({target:u})=>{const h=u==null?void 0:u.value,p=i==null?void 0:i.findIndex(({id:f})=>f===h);p>=0&&r(p)},[i]);return{activeBalanceAccount:c,balanceAccountSelectionOptions:d,onBalanceAccountSelection:l,resetBalanceAccountSelection:a}},Wc="adyen-pe-balance-account-selector",ay=`${Wc}__account-id`,rd=`${Wc}__account-label`,qi=Ue(({activeBalanceAccount:e,balanceAccountSelectionOptions:t,onBalanceAccountSelection:n})=>{const s=Pe(Ie.down.xs),{i18n:r}=W(),a=C(i=>o(Q,{children:[o("div",{className:i.contentClassName,children:[i.item.name&&o("span",{className:rd,children:i.item.name}),i.item.id!==ri&&o("span",{className:i.item.name?ay:rd,children:i.item.id})]}),Rh(i)]}),[]);return t&&t.length>1?o(xn,{popoverClassNameModifiers:[Wc],onChange:n,filterable:!1,multiSelect:!1,placeholder:(e==null?void 0:e.id)||r.get("balanceAccount"),selected:e==null?void 0:e.id,withoutCollapseIndicator:!0,items:t,renderListItem:a,showOverlay:s}):null}),ji=Object.freeze([10,20]),cy=100,ur=10,Ga=e=>{const t=~~e;return t===e&&t>0?Math.min(t,cy):Math.max(t,0)},ly=(e,t)=>{const n=e.length-1;if(n<0)return t;if(t<=e[0])return e[0];if(t>=e[n])return e[n];let s=0,r=0,a=n;for(;;){const i=e[s=zd(r,a)];if(r>a||t===i)return i;t>i?r=s+1:a=s-1}},dy=({preferredLimit:e=ur,preferredLimitOptions:t})=>{const n=q(),s=q(),r=A(()=>{try{const i=new Set;for(const c of t){const d=Ga(c);d>0&&i.add(d)}return Object.freeze([...i].sort((c,d)=>c-d))}catch{}},[t]);return{limit:A(()=>{let i=Ga(e)||ur;e:try{if(n.current===r)break e;const c=new Set(n.current=r);if(c.size===0){n.current=void 0;break e}if(s.current!==i)t:{if(c.size===c.add(i).size)break t;if(c.delete(i),c.size===c.add(s.current).size){if(pr(s.current)){i=s.current;break t}}else c.delete(s.current);i=ly(n.current,i)}}catch{}return s.current=i},[r,e]),limitOptions:r}},Gc=e=>{const t=q(!1),n=A(()=>e,[e]);return G(()=>(t.current=!0,()=>{t.current=!1,n&&n()}),[n]),t},Bh=(e,t,n)=>{const s=q(),r=q(),a=q(),i=q(),c=Gc(C(()=>{var w;(w=s.current)==null||w.abort(),s.current=void 0},[])),[d,l]=F(i.current),[u,h]=zt(!1),p=A(()=>Ga(n),[n]),{getPageCount:f,getPageParams:T,resetPageCount:g,updatePagination:y}=e,_=A(()=>t?w=>{var L;if(!(p&&Number.isInteger(w)))return;const H=f(),x=w<0?w+H+1:w;x>0&&(H?x<=H:x===1)&&((L=s.current)==null||L.abort(),s.current=new AbortController,c.current&&(((i.current=x)>1||H)&&l(i.current),(async()=>{const{signal:U}=s.current,ie={...T(x,p),limit:p,page:x};try{const le=await t(ie,U);if(!le||!c.current)return;const{size:V,...Z}=le;y(x,p,Z),r.current=i.current&&Math.max(i.current,r.current||-1/0),i.current&&i.current===r.current&&(a.current=V),i.current===1&&V>0&&l(i.current),i.current=void 0,h(!0)}catch(le){if(U.aborted)return;console.error(le)}})()))}:ue,[p,t]),v=C(()=>{d&&_(Math.min(d+1,f()))},[_,d]),N=C(()=>{d&&_(Math.max(d-1,1))},[_,d]),S=A(()=>f()||d||void 0,[_,u]),D=A(()=>!!(d&&S)&&d<S,[d,S]),R=A(()=>!!d&&d>1,[d]),b=A(()=>r.current?(r.current-1)*p+(a.current||0):0,[_,u]),E=A(()=>p&&Math.min(p,b||1/0)%p,[p,b]),I=C(()=>{g(),r.current=a.current=i.current=void 0,c.current&&l(i.current)},[g]);return G(()=>{c.current&&u&&h(!1)},[u]),{goto:_,hasNext:D,hasPrev:R,limit:p,next:v,page:d,pages:S,pageSize:E,prev:N,resetPagination:I,size:b}},uy=e=>Ot(e.next),hy=e=>Ot(e.prev),py=(e,t)=>{const n=A(()=>{const s=[],r=()=>s.length,a=()=>{s.length=0},i=l=>({cursor:s[l-1]}),c=(l,u)=>{const h=s[u-1];(u===1||u===(s.length||1)+1)&&oe(h)&&(s[u-1]=l?decodeURIComponent(l):void 0)};return{getPageCount:r,getPageParams:i,resetPageCount:a,updatePagination:(l,u,h)=>{uy(h)&&c(h.next,l+1),hy(h)&&c(h.prev,l-1)}}},[]);return Bh(n,e,t)},fy=e=>e.next,my=(e,t)=>{const n=A(()=>{let s=0;return{getPageCount:()=>s,getPageParams:(d,l)=>({offset:(d-1)*l}),resetPageCount:()=>{s=0},updatePagination:(d,l,u)=>{fy(u)&&u.next&&(s=Math.max(s,d+1))}}},[]);return Bh(n,e,t)},_y=(e=z,t=!0)=>{const n=q(t),s=q(Object.freeze({...e})),r=q(new Set(Object.keys(s.current))),a=q(new Set),i=Gc(),[c,d]=A(()=>{const p=f=>{i.current&&u(f)};return[()=>p("reset"),f=>p(f)]},[i]),[l,u]=bi((p,f)=>{if(f==="reset")return a.current.clear(),s.current;const T={...f},g=[0];Object.keys(T).forEach((_,v)=>{if(!r.current.has(_))return;const N=p[_]??void 0,S=s.current[_]??void 0,D=T[_]??S;if(D===N)return;const R=Math.floor(v/32),b=1<<v%32;T[_]=D,g[R]|=b,a.current[D===S?"delete":"add"](_)});const y=g.some(_=>_)?n.current&&a.current.size===0?s.current:Object.freeze({...p,...T}):p;return n.current||(s.current=y,n.current=!0),y},s.current),h=A(()=>!!a.current.size,[]);return G(()=>{s.current=Object.freeze({...e}),r.current=new Set(Object.keys(s.current)),n.current=t,c()},[t,e,c]),{canResetState:h,defaultState:s.current,resetState:c,state:l,updateState:d}},gy=(e=z,t)=>{const{canResetState:n,defaultState:s,resetState:r,state:a,updateState:i}=_y(e,t);return{canResetFilters:n,defaultFilters:s,filters:a,resetFilters:r,updateFilters:i}};var Ya=(e=>(e.NEXT="next",e.PREV="prev",e))(Ya||{}),Yc=(e=>(e.CURSOR="cursor",e.OFFSET="offset",e))(Yc||{});const Ty=["hasNext","hasPrevious"],$h=e=>{const t=Object.getOwnPropertyNames(e);return!Ty.some(n=>t.includes(n))},yy=(e,t="data")=>{const n=e[t];if($h(e)){const s=Object.fromEntries(Object.entries(e._links).map(([r,a])=>[r,a.cursor]));return{records:n,paginationData:s}}throw new TypeError("MALFORMED_PAGINATED_DATA")},Ay=(e,t="data")=>{const n=e[t];if(!$h(e)){const{hasNext:s,hasPrevious:r}=e,a={[Ya.NEXT]:Ve(s),[Ya.PREV]:Ve(r)};return{records:n,paginationData:a}}throw new TypeError("MALFORMED_PAGINATED_DATA")},vy=({dataField:e="data",fetchRecords:t,filterParams:n=z,initialFiltersSameAsDefault:s=!0,initialize:r,onFiltersChanged:a,pagination:i,preferredLimit:c,preferredLimitOptions:d,enabled:l})=>{const[u,h]=F([]),[p,f]=zt(!0),[T,g]=F(),[y,_]=F(c),v=Gc(),N=q(!0),S=q(1),D=gy(n,s),{limit:R,limitOptions:b}=dy({preferredLimit:y,preferredLimitOptions:d}),{defaultFilters:E,filters:I,updateFilters:w,...H}=D,[x,j]=A(()=>i===Yc.CURSOR?[yy,py]:[Ay,my],[]),L=C(me=>_(me),[]),{goto:U,page:ie,pages:le,resetPagination:V,...Z}=j(C(async({page:me,...Ne},fe)=>{try{if(g(void 0),S.current=me,!v.current||f(!0))return;const Ce=await t({...Ne,...I},fe),{records:ae,paginationData:Te}=x(Ce,e);return N.current&&(r==null||r([ae,Te],D),N.current=!1),v.current&&(h(ae),f(!1)),{...Te,size:ae==null?void 0:ae.length}}catch(Ce){if(fe!=null&&fe.aborted)return;f(!1),g(Ce),console.error(Ce)}},[t,I,R]),R);return A(()=>{N.current=!0},[n]),A(()=>{V(),S.current=1},[I,R,V]),G(()=>{l&&U(S.current)},[U,l]),G(()=>{a==null||a(I)},[I]),{error:T,fetching:p,filters:I,goto:U,limitOptions:b,page:ie,pages:le,records:u,updateFilters:w,updateLimit:L,...H,...Z}},Vi=e=>vy({...e,pagination:Yc.CURSOR}),{getTimezoneTime:Ry,getUsedTimezone:Cy}=(()=>{const e=/\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i,t=/^GMT|0(?=\d:00)|:00/g,n=To();return{getTimezoneTime:(a,i=Date.now())=>{n.tz=a;const{formatted:c}=n(i),[d="",l=""]=(c==null?void 0:c.match(e))??Se,u=Oa(c),h=`${d}${l&&` ${l}`}`,p=x2(u).replace(t,"");return[h,p]},getUsedTimezone:a=>(n.tz=a,n.tz.current)}})(),Sy=({timezone:e,withClock:t=!1}=z)=>{const n=A(()=>Ve(t),[t]),s=A(()=>Cy(e),[e]),r=q(ue),[a,i]=F(Date.now()),[c,d]=A(()=>Ry(s,a),[a,s]);return A(()=>{r.current(),r.current=n?ac.subscribe(l=>{cs(l)||i(l.now)}):ue},[i,n]),{clockTime:c,GMTOffset:d,timestamp:a,timezone:s}},Ey=e=>Object.freeze({systemToTimezone:K(t=>Kt(e,t)),timezoneToSystem:K(t=>gn(e,t)),timezoneOffset:K(t=>e(t).offset)}),Uh=(e,t,n=e)=>{const s=(r,a)=>{let i=r;xe(r)?i=n:Mr(r)||(i=a??n);const c=Dt(e,i,t);return c===i?c:a??n};return r=>{const a=Ae(()=>i);let i=s(r);return de({value:a,descriptor:K({...a,set(c){const d=i;i=s(c,i),d!==i&&(this.now=this.now)}})})}},Ny=(e,t)=>n=>ee(n)?n.call(e,t):n,Dy=e=>!Qt(e,"offsets"),by=e=>Qt(e,"from"),zi=({now:e})=>e,Oy=(()=>{const e=new Map;return t=>{let n=e.get(t);return oe(n)&&(n=Object.freeze([0,0,t,0,0,0,-1]),e.set(t,n)),n}})(),ms=e=>{try{const t=e instanceof Date||+e===e?e:void 0,n=new Date(t).getTime();return isNaN(n)?void 0:n}catch{}},Xi=(e=z,t=z)=>{const n=Br(e),s=Br(t);return()=>{const r=To(),a=Ae(()=>h),i=Ae(()=>r.tz.current),c=de({now:a,timezone:i,...Ey(r)}),d=Ny(n,c);let{from:l,to:u,now:h}=z;const p=T=>{h=ms(T??Date.now())??h;e:{if(Dy(n)){l=ms(d(n.from))??h,u=ms(d(n.to))??h;break e}let g,y,_;(_=by(n))?(g=new Date(l=ms(d(n.from))??h),y=1):(g=new Date(u=ms(d(n.to))??h),y=-1),g=new Date(c.timezoneToSystem(g));const[v=0,N=0,S=0,D=0,R=0,b=0,E=0]=d(n.offsets);g.setFullYear(g.getFullYear()+v*y,g.getMonth()+N*y,g.getDate()+S*y),g.setHours(g.getHours()+D*y,g.getMinutes()+R*y,g.getSeconds()+b*y,g.getMilliseconds()+E*y);const I=ms(c.systemToTimezone(g))??h;_?u=I:l=I}l>u&&([l,u]=[u,l])},f=T=>{const g=r.tz,y=g.current;r.tz=T,g.current!==y&&p(h)};return p(),de({...s,from:Ae(()=>l),now:{...a,set:p},timezone:{...i,set:f},to:Ae(()=>u)})}},Iy=/^(\d{2})\/(\d{2})\/(-?\d+),\s+(\d{2}):(\d{2}):(\d{2}).(\d{3})/,Ki=(e=po)=>(t,n,...s)=>{const r=vn(n),a=new Date(gn(r,t));return a.setHours(0,0,0,0),Kt(r,e(a,...s))},Hh=Ki(),Wh=Ki(e=>e.setDate(1)),Py=Ki(e=>e.setMonth(0,1)),Gh=Ki((e,t)=>{const n=wy(e.getDay(),t??0);return e.setDate(e.getDate()-n)}),ky=e=>(e%100?e%4:e%400)===0,fa=(e,t,n=0)=>{const s=e+n,r=fo(s,12),a=t+Math.floor(s/12);let i=31;switch(r){case 1:i=ky(a)?29:28;break;case 3:case 5:case 8:case 10:i=30;break}return[i,r,a]},wy=(e,t=0)=>(7-t+e)%7,Os=(e,t)=>ts(e)?0:e-Hh(e,t),od=e=>oe(e)?e:new Date(e),Ly=(e,t=z)=>{const n=vn(t.timeZone),s={...dc,...t,timeZone:n.tz.current};return new Date(e).toLocaleDateString(Ni,s)},On=(e,t)=>{const n=Ly(e,{...Su,...dc,timeZone:t,hour12:!1}),[,s="",r="",a="",i="",c="",d="",l=""]=n.match(Iy)??Se;return[+a,+s-1,+r,+i%24,+c,+d,+l]},qa=(e,t,n)=>{if(ts(e)||ts(t))return 1/0;const[s,r]=On(e,n),[a,i]=On(t,n);return Math.abs(i-r+(a-s)*12)},vn=(()=>{const e=To();return t=>(e.tz=void 0,e.tz=t,e)})(),qc=1,Fy=Oy(7),My=Uh(0,6,qc),Yh=(e=0)=>{const t=~~Dt(0,e,1/0)||0;return(n=qc)=>{const s=t?{offsets:Fy}:{to:zi},r=My(n);return Xi({from:({now:a,timezone:i,systemToTimezone:c,timezoneToSystem:d})=>{const l=new Date(d(Gh(a,i,r.value)));return l.setDate(l.getDate()-t*7),c(l)},...s},{firstWeekDay:r.descriptor})()}},xy=Object.freeze([0,1,0,0,0,0,-1]),qh=(e=0)=>{const t=~~Dt(0,e,1/0)||0;return Xi({from:({now:s,timezone:r,systemToTimezone:a,timezoneToSystem:i})=>{const c=new Date(i(Wh(s,r)));return c.setMonth(c.getMonth()-t),a(c)},...t?{offsets:xy}:{to:zi}})},By=qh(1),$y=365,Uy=1,Hy=1,Wy=Uh(Uy,$y,Hy),id=e=>{const t=Wy(e);return Xi({from:({now:n,timezone:s,systemToTimezone:r,timezoneToSystem:a})=>{const i=new Date(a(Hh(n,s)));return i.setDate(i.getDate()-t.value+1),r(i)},to:zi},{numberOfDays:t.descriptor})()},Gy=Yh(1),Yy=qh(0),qy=Yh(0),jy=Xi({from:({now:e,timezone:t})=>Py(e,t),to:zi}),Vy=()=>Object.freeze({"rangePreset.last7Days":id(7),"rangePreset.last30Days":id(30),"rangePreset.thisWeek":qy(),"rangePreset.lastWeek":Gy(),"rangePreset.thisMonth":Yy(),"rangePreset.lastMonth":By(),"rangePreset.yearToDate":jy()}),zy=({now:e=Date.now(),options:t,selectedOption:n,timezone:s})=>{const{i18n:r}=W(),[a,i]=F(),[c,d]=F(),[l,u]=F(),h=q(),p=q(),[f,T,g]=A(()=>{const R=r.get("rangePreset.custom"),b=Object.keys(t),E=Object.freeze(b.map(w=>r.get(w)));return[R,(w,H=E)=>{const x=H.findIndex(j=>j===w);return t[b[x]]},E]},[r,t]),[y,_]=F(n===f),v=A(()=>Object.freeze([...g,f]),[f,g]),N=A(()=>y?v:g,[y,g,v]),S=C(R=>{const b=T(R,g);b&&(i(b.from),d(b.to),_(!1),u(R))},[f,T,l,g]),D=C(()=>{i(void 0),d(void 0),_(!0),u(f)},[f]);return A(()=>{n===f?u(f):S(n)},[]),A(()=>{var R;if(h.current!==e||p.current!==s){const b=Object.values(t);b.forEach(E=>{E.now=e,E.timezone=s}),h.current=e,p.current=(R=b[0])==null?void 0:R.timezone,S(l)}},[e,s,t]),{customSelection:D,from:a,onSelection:S,options:N,selectedOption:l,to:c}},Xy=({calendarRef:e,onTimeRangeSelected:t,timestamp:n,...s})=>{const{customSelection:r,from:a,onSelection:i,options:c,selectedOption:d,to:l}=zy(s),u=A(()=>Object.freeze(c.map(T=>({id:T,name:T}))),[c]),h=C(({target:T})=>i(T==null?void 0:T.value),[i]),p=q(!0),f=q(n);return G(()=>{e!=null&&e.current&&a&&l&&(p.current=!0,e.current.from=new Date(a),e.current.to=new Date(l))},[e,a,l]),G(()=>{f.current!==n&&(f.current=n,p.current?p.current=!1:r())},[r,n]),G(()=>{d&&(t==null||t(d))},[d,t]),o(xn,{setToTargetWidth:!0,items:u,filterable:!1,multiSelect:!1,onChange:h,selected:d})},Nt=(()=>{const e=s=>Object.freeze(fr(z,Object.fromEntries(Object.entries(s).map(([r,a])=>[r,{value:a}])))),t=s=>{try{return Object.getPrototypeOf(s)===z}catch{return!1}},n=(s,r)=>{if(!s)return e(K(r,tn(s)));let a=r;return e({enumerable:!0,get:()=>a,set:i=>{a=s(i)}})};return Object.defineProperties(n,{is:{value:t},isObject:{value:vi},immutable:{value:s=>n(!1,s)},mutable:{value:s=>n(void 0,s)},restricted:{value:()=>n(!1)}})})(),jh=(()=>{const e=(n={},s=!1)=>{const r=de();for(const[a,i]of Object.entries(n)){try{const c=Nt.is(i),d=Nt.isObject(i);if(c||d){Object.defineProperty(r,a,c?i:e(i,s));continue}else if(s){Object.defineProperty(r,a,Nt.immutable(i));continue}}catch{}r[a]=i}return Nt((a={})=>Object.assign(r,a),r)};return Object.defineProperties(e,{unwrapped:{value:(n={},s=!1)=>{const r=e(n,s);return de({P:r}).P}}})})();var jc=(e=>(e[e.DATE=0]="DATE",e[e.DAY_OF_WEEK=1]="DAY_OF_WEEK",e[e.MONTH_HEADER=2]="MONTH_HEADER",e))(jc||{});const Vh="adyen-pe-calendar__cell adyen-pe-calendar__cell--date",zh="adyen-pe-calendar__date",Ky=(e=z,t)=>{const n=jh.unwrapped({childClassName:Nt.mutable(zh),childProps:{children:Nt.restricted(),className:""},className:Nt.mutable(Vh),props:{...e,children:Nt.restricted(),className:""}},!0);return t==null||t(jc.DATE,n),n},Zy=Je(({grid:e,prepare:t,datetime:n,flags:s,index:r,label:a,onlyCellsWithin:i},c)=>{const d=s.WITHIN_BLOCK,l={"data-cursor-position":r,"data-within-month":d,tabIndex:-1};if(d){const g=s.WITHIN_RANGE;l["data-today"]=s.CURRENT,l["data-first-week-day"]=s.LINE_START,l["data-last-week-day"]=s.LINE_END,l["data-weekend"]=s.WEEKEND,l["data-first-month-day"]=s.BLOCK_START,l["data-last-month-day"]=s.BLOCK_END,l["data-within-range"]=g,g&&(l["data-range-end"]=s.RANGE_END,l["data-range-start"]=s.RANGE_START,l["data-selection-end"]=s.SELECTION_END,l["data-selection-start"]=s.SELECTION_START,l["data-within-selection"]=s.WITHIN_SELECTION,l["aria-selected"]=`${!!(s.SELECTION_END||s.SELECTION_START||s.WITHIN_SELECTION)}`),r===+e.cursor&&(l.ref=c)}const u=Ky(l,t),{children:h,className:p,...f}=u.props||z,T=Jo(u.className,Vh,p);return o("td",{...f,...l,className:T,children:(!i||d)&&(()=>{const{children:g,className:y,..._}=u.childProps||z,v=Jo(u.childClassName,zh,y);return o("time",{..._,className:v,dateTime:n,children:a})})()})}),Qy=Ue(Zy,Qo({block:Qo.exclude,flags:e=>+e})),Xh="adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week",Kh="adyen-pe-calendar__day-of-week",Jy=(e=z,t)=>{const n=jh.unwrapped({childClassName:Nt.mutable(Kh),childProps:{children:Nt.restricted(),className:""},className:Nt.mutable(Xh),props:{...e,children:Nt.restricted(),className:""}},!0);return t==null||t(jc.DAY_OF_WEEK,n),n},eA=({prepare:e,flags:t,labels:{long:n,short:s}})=>{const r={"aria-label":n,"data-first-week-day":t.LINE_START,"data-last-week-day":t.LINE_END,"data-weekend":t.WEEKEND,scope:"col"},a=Jy(r,e),{children:i,className:c,onCommand:d,...l}=a.props||z,u=Jo(a.className,Xh,c),{children:h,className:p,...f}=a.childProps||z,T=Jo(a.childClassName,Kh,p);return o("th",{...l,ref:l.ref,...r,className:u,children:o("abbr",{...f,className:T,children:s})})},tA=Ue(eA,Qo({block:Qo.exclude,flags:e=>+e})),nA=mr(({cursorRootProps:e,onlyCellsWithin:t,prepare:n,grid:s},r)=>o("ol",{className:"adyen-pe-calendar",role:"none",...e,children:s.map(a=>o("li",{className:"adyen-pe-calendar__month",role:"none",children:[o("div",{className:"adyen-pe-calendar__month-name",role:"none",children:o("time",{dateTime:a.datetime,"aria-hidden":"true",children:a.label})}),o("table",{role:"grid","aria-multiselectable":!0,"aria-label":`${a.label} calendar`,className:"adyen-pe-calendar__grid",style:{"--adyen-pe-calendar-rowspan":s.rowspan},children:[o("thead",{children:o("tr",{className:"adyen-pe-calendar__row",children:s.weekdays.map((i,c)=>o(tA,{grid:s,block:a,prepare:n,cell:c,...i},i.labels.long))})}),o("tbody",{children:a.map((i,c)=>o("tr",{className:"adyen-pe-calendar__row",children:i.map((d,l)=>o(Qy,{ref:r,grid:s,block:a,prepare:n,cell:l,onlyCellsWithin:t,row:c,...d},`${a.month}:${d.timestamp}`))},`${a.month}:${c}`))})]})]},a.datetime))})),sA=Ue(nA),qr=864e5,rA=["narrow","short","long"],Zh=[0,1,6],Ls=[1,2,3,4,6,12],ad=42,oA=[0,1],Vc=Symbol(),zc=Symbol(),Xc=Symbol(),cd=[Xc,zc,Vc],Wn=Symbol(),Is=Symbol(),Ps=Symbol(),iA=[Is,Ps,Wn],Qh=Symbol(),Jh=Symbol(),ep=Symbol(),tp=Symbol(),np=Symbol(),sp=Symbol(),rp=Symbol(),op=Symbol(),ip=Symbol(),ap=Symbol(),Kc=Symbol(),Zc=Symbol(),cp=Symbol(),ld=Symbol(),tt=Symbol(),dd=Symbol(),vt=Symbol(),lp=Symbol(),Uo=Symbol(),Ho=Symbol(),ud=(e,t)=>{if(t>=e)return e;let n=Math.max(1,Ls.indexOf(e));for(;--n&&t<Ls[n];);return Ls[n]},aA=e=>Ls[Math.max(Ls.indexOf(e),0)],hd=(e=0)=>Object.freeze(oA.map(t=>fo(6-e+t,7)));var Zr,ut,ht,Us,Hs;class pd{constructor(...t){$(this,Zr,1/0);$(this,ut,1/0);$(this,ht,-1/0);$(this,Us,0);$(this,Hs,0);if(t.length>=3){let n=new Date(t[1]).getTime();if(typeof t[2]!="symbol")k(this,ht,n||m(this,ht)),k(this,ut,new Date(t[2]).getTime()||m(this,ut)),m(this,ut)<m(this,ht)&&([Un(this,ut)._,Un(this,ht)._]=[m(this,ht),m(this,ut)]),k(this,Hs,Os(m(this,ht),t[0])),k(this,Us,Os(m(this,ut),t[0])),k(this,Zr,qa(m(this,ht),m(this,ut),t[0])+1);else if(!isNaN(n))switch(t[2]){case Zc:k(this,ut,n),k(this,Us,Os(m(this,ut),t[0]));break;case Kc:default:k(this,ht,n),k(this,Hs,Os(m(this,ht),t[0]));break}}}get numberOfMonths(){return m(this,Zr)}get endTimestamp(){return m(this,ut)}get endTimestampOffset(){return m(this,Us)}get startTimestamp(){return m(this,ht)}get startTimestampOffset(){return m(this,Hs)}}Zr=new WeakMap,ut=new WeakMap,ht=new WeakMap,Us=new WeakMap,Hs=new WeakMap;const Zi=(...e)=>{let t=vn().tz.current,n=new pd(t,...e);return de({from:Ae(()=>n.startTimestamp,!1),to:Ae(()=>n.endTimestamp,!1),offsets:{value:de({from:Ae(()=>n.startTimestampOffset,!1),to:Ae(()=>n.endTimestampOffset,!1)})},span:Ae(()=>n.numberOfMonths,!1),timezone:{...Ae(()=>t,!1),set:s=>{const r=t;t=vn(s??void 0).tz.current,t!==r&&(n=new pd(t,...e))}}})},Lr=Zi(),cA=()=>Zi(Date.now(),Kc),lA=()=>Zi(Date.now(),Zc),dp=(...e)=>e.length===0?Lr:Zi(...e);var Ge=(e=>(e[e.CURRENT=1]="CURRENT",e[e.CURSOR=2]="CURSOR",e[e.WEEKEND=4]="WEEKEND",e[e.LINE_START=8]="LINE_START",e[e.LINE_END=16]="LINE_END",e[e.WITHIN_BLOCK=32]="WITHIN_BLOCK",e[e.BLOCK_START=64]="BLOCK_START",e[e.BLOCK_END=128]="BLOCK_END",e[e.WITHIN_RANGE=256]="WITHIN_RANGE",e[e.RANGE_START=512]="RANGE_START",e[e.RANGE_END=1024]="RANGE_END",e[e.WITHIN_SELECTION=2048]="WITHIN_SELECTION",e[e.SELECTION_START=4096]="SELECTION_START",e[e.SELECTION_END=8192]="SELECTION_END",e[e.ALL=16383]="ALL",e))(Ge||{}),As=(e=>(e[e.PREV=1]="PREV",e[e.BLOCK=0]="BLOCK",e[e.FRAME=2]="FRAME",e[e.PERIOD=4]="PERIOD",e))(As||{}),ja=(e=>(e[e.PREV_PERIOD=5]="PREV_PERIOD",e[e.PREV_FRAME=3]="PREV_FRAME",e[e.PREV=1]="PREV",e[e.NEXT=0]="NEXT",e[e.NEXT_FRAME=2]="NEXT_FRAME",e[e.NEXT_PERIOD=4]="NEXT_PERIOD",e))(ja||{});const up=(()=>{const e={},t=Object.keys(Ge).filter(s=>isNaN(+s)),n=s=>s!=="ALL"&&Ot(s)&&t.includes(s);return s=>{const r=s&Ge.ALL;return e[r]||(e[r]=new Proxy(de({valueOf:{value:()=>r}}),Si({get:(a,i)=>{switch(i){case"valueOf":return a.valueOf;case Symbol.toStringTag:return"_";default:if(!n(i))return}return r&Ge[i]?1:void 0}}))),e[r]}})(),dA=e=>(t,n,s)=>{if(Ot(n)){const r=+n;if(r>=0&&r<t.length)return e(r)}return Reflect.get(t,n,s)},fd=function*(e=po,t){for(let n=0;n<this.length;n++)yield e.call(t,this[n],n,this)},uA=Object.freeze(de({[Symbol.iterator]:{value(){return fd.call(this)}},map:{value(e,t){return[...fd.call(this,e,t)]}}})),yn=(e,t)=>ee(e)?yn({length:{get:e}},t):pr(e)?yn({length:{value:e}},t):new Proxy(fr(uA,e),{get:dA(t),set:Na}),oi=(()=>{const e=new Map,t=To(),n=(s=Date.now())=>{const r=new Date(gn(t,s)),a=Kt(t,r.setHours(0,0,0,0)),i=Kt(t,r.setDate(r.getDate()+1));return[a,i-a]};return s=>{t.tz=s;const r=t.tz.current;return e.get(r)??(()=>{let a=null,i=null,c=null;const d=()=>(t.tz=r,a??n()[0]),l=(g=Date.now())=>{t.tz=r,[a,i]=n(g)},{cancelSubscriptions:u,requestNotification:h,subscribe:p,on:f}=go({timestamp:d});f.resume=()=>{c=ac.subscribe(g=>{if(cs(g))return;const{now:y}=g;if(zo(a)||zo(i))return l(y);y-a<i||(l(y),h())})},f.idle=()=>{c==null||c(),a=i=c=null};const T=de({cancelSubscriptions:K(u),timestamp:Ae(d),timezone:K(r),subscribe:K(p)});return e.set(r,T),T})()}})();var Ws,nt,Qr,Jr,eo,to,Ft,pt,un,Gs,Ys,qs,Xn,hn,no,ze,qe,je,js,pn,Kn,Vs,Mt,so,ro,Pn,fn,oo,io,di,ui,ye,hp,pp,vs,fp,dt,Er,za;const ks=class ks{constructor(){$(this,ye);$(this,nt,0);$(this,Qr);$(this,Jr);$(this,eo,-1);$(this,to,-1);$(this,Ft);$(this,pt);$(this,un);$(this,Gs,!1);$(this,Ys);$(this,qs,0);$(this,Xn,[]);$(this,hn,m(ks,Ws));$(this,no,12);$(this,ze);$(this,qe);$(this,je,1);$(this,js);$(this,pn);$(this,Kn);$(this,Vs,oi());$(this,Mt);$(this,so,-1/0);$(this,ro,1/0);$(this,Pn,-1/0);$(this,fn,1/0);$(this,oo,1/0);$(this,io,0);Y(this,"daysInWeek",0);Y(this,"origin");Y(this,"originTimestamp");$(this,di,yn(()=>this.daysInWeek,this.getDayOfWeekAtIndex.bind(this)));$(this,ui,yn(()=>m(this,je),X(this,ye,fp).bind(this)))}get fromTimestamp(){return m(this,so)}get toTimestamp(){return m(this,ro)}get numberOfBlocks(){return m(this,oo)}get blankSelection(){return m(this,ze)===m(this,qe)&&oe(m(this,qe))}get cursor(){return m(this,Ft)??-1}get daysOfWeek(){return m(this,di)}get dynamicBlockHeight(){return m(this,Gs)}set dynamicBlockHeight(t){xe(t)?k(this,Gs,!!t):Ea(t)&&k(this,Gs,t)}set effect(t){xe(t)?k(this,Ys,void 0):ee(t)&&k(this,Ys,t)}get firstWeekDay(){return m(this,qs)}set firstWeekDay(t){if(xe(t))this.firstWeekDay=0;else if(!Zh.includes(t)||m(this,qs)===k(this,qs,t))return}get frameBlocks(){return m(this,ui)}get isAtEnd(){return!ts(m(this,fn))&&m(this,fn)===m(this,je)-1}get isAtStart(){return!ts(m(this,Pn))&&m(this,Pn)===0}get locale(){return m(this,hn)}set locale(t){const n=m(this,hn);if(xe(t))k(this,hn,m(ks,Ws));else if(typeof Intl<"u")try{k(this,hn,new Intl.Locale(t).toString())}catch{k(this,hn,m(ks,Ws))}m(this,hn)!==n&&this.refreshFrame(!0)}get selectionStart(){return m(this,ze)}get selectionEnd(){return m(this,qe)}get size(){return m(this,je)}set size(t){const n=Math.min(!xe(t)&&aA(t)||1,m(this,no));m(this,je)!==k(this,je,n)&&(X(this,ye,za).call(this),this.refreshFrame())}get timeslice(){return m(this,pn)}set timeslice(t){if(t===m(this,js)||xe(t)&&m(this,js)===Lr)return;const{from:n,to:s,timezone:r}=k(this,js,t??Lr);k(this,pn,dp(n,s)),this.timezone=r}get timezone(){return m(this,Kn)}set timezone(t){m(this,pn).timezone=t,k(this,Kn,m(this,pn).timezone),k(this,Vs,oi(m(this,Kn))),m(this,Mt)&&(m(this,Mt).call(this),k(this,Mt,m(this,Vs).subscribe(this.refreshFrame.bind(this,!0)))),X(this,ye,hp).call(this)}set trackCurrentDay(t){Ea(t)?t&&!m(this,Mt)?k(this,Mt,m(this,Vs).subscribe(this.refreshFrame.bind(this,!0))):!t&&m(this,Mt)&&(m(this,Mt).call(this),k(this,Mt,void 0)):xe(t)&&(this.trackCurrentDay=!1)}get units(){return m(this,io)}initialize(){this.timeslice=Lr}refreshFrame(t=!1){var n;if(m(this,Xn).length=0,!(oe(m(this,pt))||t)){const s=this.getFrameBlockAtIndex(m(this,nt)),{from:r,to:a}=s.inner,[i]=X(this,ye,vs).call(this,this.getTimestampAtIndex(r+m(this,pt)),!1);k(this,pt,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(r),i));const c=r+m(this,pt),d=Dt(r,c,a);if(d>c)return k(this,pt,this.getUnitsForFrameBlockAtIndex(--Un(this,nt)._)+c-d),m(this,nt)>=0?this.refreshFrame():(k(this,nt,m(this,je)-1),this.shiftFrameByOffset(-1,Uo));if(d<c)return k(this,pt,c-d-1),++Un(this,nt)._<m(this,je)?this.refreshFrame():(k(this,nt,0),this.shiftFrameByOffset(1,Uo));k(this,Qr,r),k(this,Jr,a),k(this,un,X(this,ye,vs).call(this,this.getTimestampAtIndex(c),!1)[0]),k(this,pt,this.getCursorBlockOriginTimestampOffset(m(this,un))),k(this,Ft,r+m(this,pt));const l=m(this,nt)>0?this.getFrameBlockAtIndex(0):s,u=m(this,nt)<m(this,je)-1?this.getFrameBlockAtIndex(m(this,je)-1):s;k(this,eo,l.inner.from),k(this,to,u.inner.to),k(this,io,u.outer.to+1)}this.withCurrentDayTimestamp(),(n=m(this,Ys))==null||n.call(this)}shiftFrameByOffset(t,n){if(t&&Mr(t))switch(n){case lp:return X(this,ye,Er).call(this,t);case Ho:return X(this,ye,Er).call(this,t*12);case Uo:default:return X(this,ye,Er).call(this,t*m(this,je))}}shiftFrameCursor(t){switch(t){case Qh:return X(this,ye,dt).call(this,-1);case np:return X(this,ye,dt).call(this,1);case ap:return X(this,ye,dt).call(this,-this.rowspan);case tp:return X(this,ye,dt).call(this,this.rowspan);case ep:return X(this,ye,dt).call(this,m(this,Qr)-m(this,Ft));case Jh:return X(this,ye,dt).call(this,m(this,Jr)-m(this,Ft));case rp:return X(this,ye,dt).call(this,-(m(this,Ft)%this.rowspan));case sp:return X(this,ye,dt).call(this,this.rowspan-(m(this,Ft)%this.rowspan+1));case ip:return X(this,ye,dt).call(this,-this.getUnitsForFrameBlockAtIndex((m(this,nt)??0)-1));case op:return X(this,ye,dt).call(this,this.getUnitsForFrameBlockAtIndex(m(this,nt)??0))}if(!(t<0)&&t>=m(this,eo)&&t<=m(this,to))return X(this,ye,dt).call(this,t-m(this,Ft))}shiftFrameToTimestamp(t){k(this,un,this.originTimestamp=X(this,ye,vs).call(this,t,!1).reduce((n,s)=>n+s)),k(this,pt,this.getCursorBlockOriginTimestampOffset(m(this,un))),this.reoriginate(),[Un(this,Pn)._,Un(this,fn)._]=this.getEdgeBlockOffsetsFromOrigin(),X(this,ye,za).call(this),this.refreshFrame(),X(this,ye,dt).call(this,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(m(this,Ft)),m(this,un)))}clearSelection(){this.blankSelection||(k(this,ze,k(this,qe,void 0)),this.refreshFrame(!0))}updateSelection(t,n){const s=m(this,ze),r=m(this,qe),a=X(this,ye,vs).call(this,t,!1).reduce((i,c)=>i+c);switch(n===ld&&(a<=s?n=vt:a>=r&&(n=tt)),n){case tt:k(this,ze,a),k(this,qe,Math.max(m(this,ze),r??a));break;case vt:k(this,qe,a),k(this,ze,Math.min(s??a,m(this,qe)));break;case ld:case dd:{let i=Math.abs(a-(s??a)),c=Math.abs(a-(r??a));n===dd&&([i,c]=[c,i]),i>c?k(this,ze,a):k(this,qe,a);break}case cp:default:k(this,ze,k(this,qe,a));break}(m(this,ze)!==s||m(this,qe)!==r)&&this.refreshFrame(!0)}};Ws=new WeakMap,nt=new WeakMap,Qr=new WeakMap,Jr=new WeakMap,eo=new WeakMap,to=new WeakMap,Ft=new WeakMap,pt=new WeakMap,un=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,qs=new WeakMap,Xn=new WeakMap,hn=new WeakMap,no=new WeakMap,ze=new WeakMap,qe=new WeakMap,je=new WeakMap,js=new WeakMap,pn=new WeakMap,Kn=new WeakMap,Vs=new WeakMap,Mt=new WeakMap,so=new WeakMap,ro=new WeakMap,Pn=new WeakMap,fn=new WeakMap,oo=new WeakMap,io=new WeakMap,di=new WeakMap,ui=new WeakMap,ye=new WeakSet,hp=function(){const{from:t,to:n,span:s,offsets:r}=m(this,pn);k(this,so,t-r.from),k(this,ro,n-r.to),k(this,oo,s);const a=oe(m(this,ze))?m(this,ze):Math.max(m(this,ze),t),i=oe(m(this,qe))?m(this,qe):Math.min(m(this,qe),n);a===m(this,ze)||i===m(this,qe)?(k(this,ze,a),k(this,qe,i)):k(this,ze,k(this,qe,void 0)),this.reslice(),k(this,no,ud(12,this.numberOfBlocks)),k(this,je,ud(m(this,je),this.numberOfBlocks)),this.shiftFrameToTimestamp(m(this,un))},pp=function(t){return Dt(m(this,Pn),t||0,m(this,fn)-m(this,je)+1)},vs=function(t,n=!0){let s=new Date(t).getTime();if(isNaN(s))return X(this,ye,vs).call(this,Date.now());const{from:r,to:a}=m(this,pn),i=Dt(r,s,a);i!==s&&n?(s=zd(r,a),(isNaN(s)||ts(s))&&(s=i)):s=i;const c=Os(s,m(this,Kn));return[s-c,c]},fp=function(t){if(Mr(t)&&t>=0&&t<m(this,je)){if(!m(this,Xn)[t]){const n=this.getFrameBlockAtIndex(t);if(!n)return;const[s,r]=this.getFormattedDataForFrameBlock(n[n.inner.from][0]+qr/2),a=n.outer.from;m(this,Xn)[t]=yn({datetime:K(r),label:K(s),length:K(Math.ceil(n.outer.units/this.rowspan)),month:K(n.month),year:K(n.year)},i=>{const c=i*this.rowspan;return yn(this.rowspan,d=>{const[l,u]=n[d+c],[h,p]=this.getFormattedDataForBlockCell(l+qr/2);return de({datetime:K(p),flags:K(up(u)),index:K(a+d+c),label:K(h),timestamp:K(l)})})})}return m(this,Xn)[t]}},dt=function(t){t!==0&&(k(this,pt,m(this,pt)+t),this.refreshFrame())},Er=function(t){const n=X(this,ye,pp).call(this,t);n&&(this.shiftOrigin(n),k(this,Pn,m(this,Pn)-n),k(this,fn,m(this,fn)-n),k(this,nt,fo(m(this,nt)-n,m(this,je))),this.refreshFrame())},za=function(){const t=m(this,je)-1,n=Math.min(t-this.origin%m(this,je),m(this,fn))-t;n&&X(this,ye,Er).call(this,n)},$(ks,Ws,Ni);let Va=ks;var Zn,Qn,zs,ao,Xs,Ks,co,Zs,lo,Qs,Js,er,Ze,Xa,Ka,Rs,Wo;class hA extends Va{constructor(){super();$(this,Ze);$(this,Zn,7);$(this,Qn,[]);$(this,zs,hd(this.firstWeekDay));$(this,ao);$(this,Xs,-1/0);$(this,Ks,1/0);$(this,co,1/0);$(this,Zs);$(this,lo);$(this,Qs);$(this,Js);$(this,er);Y(this,"daysInWeek",m(this,Zn));this.initialize()}get fromTimestamp(){return m(this,Xs)}get toTimestamp(){return m(this,Ks)}get numberOfBlocks(){return m(this,co)}get currentDayTimestamp(){return m(this,ao)}get dynamicBlockHeight(){return super.dynamicBlockHeight}set dynamicBlockHeight(n){const s=this.dynamicBlockHeight;super.dynamicBlockHeight=n,this.dynamicBlockHeight!==s&&this.refreshFrame(!0)}get rowspan(){return m(this,Zn)}get firstWeekDay(){return super.firstWeekDay}set firstWeekDay(n){const s=this.firstWeekDay;super.firstWeekDay=n,this.firstWeekDay!==s&&(m(this,Qn).length=0,k(this,zs,hd(this.firstWeekDay)),this.reoriginate(),this.refreshFrame())}getCursorBlockOriginTimestampOffset(n){return On(n,this.timezone)[2]-1}getDayOfWeekAtIndex(n){if(!m(this,Qn)[n]){const s=new Date(this.getTimestampAtIndex(n));let r=0;m(this,zs).includes(n)&&(r|=Ge.WEEKEND),n===0?r|=Ge.LINE_START:n===6&&(r|=Ge.LINE_END);const a={};for(const i of rA)a[i]=K(s.toLocaleDateString(this.locale,{weekday:i,timeZone:this.timezone}));m(this,Qn)[n]=de({flags:K(up(r)),labels:K(de(a))})}return m(this,Qn)[n]}getEdgeBlockOffsetsFromOrigin(){return[X(this,Ze,Xa).call(this,m(this,Xs)),X(this,Ze,Xa).call(this,m(this,Ks))]}getFormattedDataForBlockCell(n){const[s,r,a]=On(n,this.timezone);return[Number(a).toLocaleString(this.locale),`${s}-${`${r+1}`.padStart(2,"0")}-${`${a}`.padStart(2,"0")}`]}getFormattedDataForFrameBlock(n){const[s,r]=On(n,this.timezone);return[new Date(n).toLocaleDateString(this.locale,{month:"long",year:"numeric",timeZone:this.timezone}),`${s}-${`${r+1}`.padStart(2,"0")}`]}getFrameBlockAtIndex(n){const[s,r,a]=fa(this.origin,m(this,Qs),n),i=n>0?this.getFrameBlockAtIndex(n-1).inner.to+1:m(this,Zs),c=i+s-1,d=Math.floor(i/7)*7,l=this.dynamicBlockHeight?Math.ceil((c+1)/7)*7:d+ad,u=this.dynamicBlockHeight?l-d:ad,h=new Proxy(de(),Si({get:(p,f,T)=>{if(Ot(f)){const g=+f;if(Mr(g)&&g>=0&&g<u){const y=d+g,_=this.getTimestampAtIndex(y),v=y%m(this,Zn);let N=_===this.currentDayTimestamp?Ge.CURRENT:0;return y===this.cursor&&(N|=Ge.CURSOR),m(this,zs).includes(v)&&(N|=Ge.WEEKEND),v===0?N|=Ge.LINE_START:v===m(this,Zn)-1&&(N|=Ge.LINE_END),y>=i&&y<=c&&(y===i?N|=Ge.BLOCK_START:y===c&&(N|=Ge.BLOCK_END),N|=Ge.WITHIN_BLOCK),_>=this.fromTimestamp&&_<=this.toTimestamp&&(_===this.fromTimestamp&&(N|=Ge.RANGE_START),_===this.toTimestamp&&(N|=Ge.RANGE_END),N|=Ge.WITHIN_RANGE),_>=m(this,Js)&&_<=m(this,er)&&(_===m(this,Js)&&(N|=Ge.SELECTION_START),_===m(this,er)&&(N|=Ge.SELECTION_END),N|=Ge.WITHIN_SELECTION),[_,N]}}return Reflect.get(p,f,T)}}));return fr(h,{inner:{value:de({from:{value:i},to:{value:c},units:{value:s}})},month:{value:r},outer:{value:de({from:{value:d},to:{value:l-1},units:{value:u}})},year:{value:a}})}getUnitsForFrameBlockAtIndex(n){return fa(this.origin,m(this,Qs),n)[0]}getUnitsOffsetForTimestamp(n,s){return Math.round((s-n)/qr)}reoriginate(){this.originTimestamp=Wh(this.originTimestamp,this.timezone);const[n,s]=On(this.originTimestamp,this.timezone),r=Gh(this.originTimestamp,this.timezone,this.firstWeekDay);this.origin=s,k(this,Qs,n),k(this,Zs,this.getUnitsOffsetForTimestamp(r,this.originTimestamp)),k(this,lo,X(this,Ze,Ka).call(this,this.originTimestamp,-m(this,Zs)))}reslice(){X(this,Ze,Wo).call(this),k(this,Xs,X(this,Ze,Rs).call(this,super.fromTimestamp)),k(this,Ks,X(this,Ze,Rs).call(this,super.toTimestamp)),k(this,co,qa(super.fromTimestamp,super.toTimestamp,this.timezone)+1)}shiftOrigin(n){const[s,r]=On(this.originTimestamp,this.timezone),[,a,i]=fa(r,s,n),c=vn(this.timezone),d=new Date(gn(c,this.originTimestamp)).setFullYear(i,a);this.originTimestamp=Kt(c,d),this.reoriginate()}clearSelection(){super.clearSelection(),X(this,Ze,Wo).call(this),this.refreshFrame(!0)}getTimestampAtIndex(n){return X(this,Ze,Ka).call(this,m(this,lo),n)}updateSelection(n,s){super.updateSelection(n,s),X(this,Ze,Wo).call(this),this.refreshFrame(!0)}withCurrentDayTimestamp(){k(this,ao,X(this,Ze,Rs).call(this,Date.now()))}}Zn=new WeakMap,Qn=new WeakMap,zs=new WeakMap,ao=new WeakMap,Xs=new WeakMap,Ks=new WeakMap,co=new WeakMap,Zs=new WeakMap,lo=new WeakMap,Qs=new WeakMap,Js=new WeakMap,er=new WeakMap,Ze=new WeakSet,Xa=function(n){const s=qa(n,this.originTimestamp,this.timezone);return n<this.originTimestamp?0-s:s},Ka=function(n,s=0){const r=vn(this.timezone),a=gn(r,n),i=Kt(r,a+s*qr);let[,,,c,d]=On(i,this.timezone),l=0;return(c>0||d>0)&&(c=(c>12?24:0)-c,d=(c>1?1:-1)*d,l=c*36e5+d*6e4),i+l},Rs=function(n){return oe(n)||ts(n)?n:n-Os(n,this.timezone)},Wo=function(){k(this,Js,X(this,Ze,Rs).call(this,this.selectionStart)),k(this,er,X(this,Ze,Rs).call(this,this.selectionEnd))};const md=Symbol("<<NO_EXCEPTION>>"),_d=e=>{const t=[];return de({bind:K(s=>function(...r){let a=md;try{return t.push(s),s.call(this,...r)}catch(i){throw a=i}finally{t.pop(),t.length===0&&a===md&&e()}}),effect:K(e)})};var qd,jd,Me,xt,B,Bt,Rt,$t,Qe,Jn,ft,tr,mn,_n,Ct,Vt,nr,uo,kn,St,hi,wn,sr,es,ho,pi,ke,fi,mi,_i,gi,Ti,yi,bt,mp,_p,gp,Ai,Go,ce,Nr,Za,Tp,yp,Ap,vp,Qa,Rp,Dr,Ja,Yo,ec,tc,nc,sc;let pA=(ke=class{constructor(){$(this,ce);Y(this,"grid");Y(this,"kill");$(this,Me,z);$(this,xt,!1);$(this,B);$(this,Bt);$(this,Rt);$(this,$t,!1);$(this,Qe,Is);$(this,Jn,!1);$(this,ft);$(this,tr,(qd=m(this,ft))==null?void 0:qd.join(" "));$(this,mn);$(this,_n);$(this,Ct);$(this,Vt);$(this,nr);$(this,uo,oi());$(this,kn,[]);$(this,St);$(this,hi,new Proxy(yn(()=>{var t;return((t=m(this,St))==null?void 0:t.length)??0},X(this,ce,Qa).bind(this)),Si({get:(t,n,s)=>{var a,i;const r=((a=m(this,St))==null?void 0:a.indexOf(n))??-1;return r>=0?(i=X(this,ce,Qa).call(this,r))==null?void 0:i[1]:Reflect.get(t,n,s)}})));$(this,wn,go({blocks:()=>{var t;return(t=m(this,B))==null?void 0:t.size},cells:()=>{var t;return(t=m(this,B))==null?void 0:t.units},controls:()=>Tr(cd,m(this,Me).controls),cursor:()=>{var t;return(t=m(this,B))==null?void 0:t.cursor},from:()=>{var t;return(t=m(this,B))==null?void 0:t.selectionStart},highlight:()=>m(this,Qe),locale:()=>{var t;return(t=m(this,B))==null?void 0:t.locale},minified:()=>Ts(m(this,Me).minified),origin:()=>{var t;return(t=m(this,B))==null?void 0:t.getTimestampAtIndex(0)},timezone:()=>{var t;return(t=m(this,B))==null?void 0:t.timezone},to:()=>{var t;return(t=m(this,B))==null?void 0:t.selectionEnd},today:()=>m(this,uo).timestamp}));$(this,sr,(jd=m(this,wn))==null?void 0:jd.snapshot);$(this,es,_d(()=>{var t;return m(this,Ct)&&((t=m(this,wn))==null?void 0:t.requestNotification())}));$(this,ho,_d(()=>{var t;return(t=m(this,Ct))==null?void 0:t.call(m(this,ce,Nr))}));$(this,pi,fr(yn(()=>{var t;return((t=m(this,B))==null?void 0:t.size)??0},t=>{var n;return(n=m(this,B))==null?void 0:n.frameBlocks[t]}),{config:{value:Object.defineProperties(t=>(t&&X(this,ce,yp).call(this,t),m(this,ce,Nr)),{cursorIndex:{get:()=>m(this,mn),set:t=>{m(this,xt)||(xe(t)?k(this,mn,void 0):ee(t)&&k(this,mn,t))}},shiftFactor:{get:()=>m(this,_n),set:t=>{m(this,xt)||(xe(t)?k(this,_n,void 0):ee(t)&&k(this,_n,t))}},watch:{get:()=>m(this,Ct),set:t=>{var n,s,r,a,i;if(!m(this,xt))if(ee(t)){if(k(this,Ct,t),!m(this,Vt)){const c=(n=m(this,es))==null?void 0:n.bind(m(ke,Ai).bind(this));c&&(k(this,Vt,(s=m(this,es))==null?void 0:s.bind(ue)),k(this,nr,(a=m(this,wn))==null?void 0:a.subscribe((r=m(this,ho))==null?void 0:r.bind(c))),m(this,B)&&(m(this,B).effect=m(this,Vt)))}if(!m(this,Jn))return;k(this,Jn,!1),(i=m(this,Vt))==null||i.call(this)}else xe(t)&&k(this,Ct,void 0)}}})},controls:{value:m(this,hi)},cursor:{value:Object.defineProperties(t=>X(ke,bt,Go).call(this,n=>!!(n&&X(this,ce,Ap).call(this,n)))(t),{valueOf:{value:()=>{var t;return((t=m(this,B))==null?void 0:t.cursor)??-1}}})},highlight:{value:(()=>{const t=()=>m(this,Bt)===m(this,Rt)&&oe(m(this,Rt)),n=s=>r=>X(ke,bt,Go).call(this,a=>{var i,c,d,l,u;if(!(m(this,xt)||!m(this,Qe)||m(this,Qe)===Is)){if(xe(a))return X(this,ce,Ja).call(this);t()?(c=m(this,B))==null||c.updateSelection(a,cp):((i=m(this,B))==null||i.updateSelection(a,s),m(this,Qe)===Wn&&m(this,ft)&&X(this,ce,Yo).call(this,a,s===tt?vt:tt,m(this,ft))),k(this,Bt,(d=m(this,B))==null?void 0:d.selectionStart),k(this,Rt,(l=m(this,B))==null?void 0:l.selectionEnd),(u=m(this,B))==null||u.shiftFrameToTimestamp(s===tt?m(this,Bt):m(this,Rt))}})(r);return de({blank:{get:t},from:{get:()=>{var s;return((s=m(this,B))==null?void 0:s.selectionStart)??m(this,Bt)},set:n(tt)},to:{get:()=>{var s;return((s=m(this,B))==null?void 0:s.selectionEnd)??m(this,Rt)},set:n(vt)}})})()},rowspan:{get:()=>{var t;return((t=m(this,B))==null?void 0:t.rowspan)??0}},weekdays:{get:()=>{var t;return((t=m(this,B))==null?void 0:t.daysOfWeek)??m(ke,_i)}}}));this.grid=m(this,pi),this.kill=X(this,ce,vp).bind(this)}},Me=new WeakMap,xt=new WeakMap,B=new WeakMap,Bt=new WeakMap,Rt=new WeakMap,$t=new WeakMap,Qe=new WeakMap,Jn=new WeakMap,ft=new WeakMap,tr=new WeakMap,mn=new WeakMap,_n=new WeakMap,Ct=new WeakMap,Vt=new WeakMap,nr=new WeakMap,uo=new WeakMap,kn=new WeakMap,St=new WeakMap,hi=new WeakMap,wn=new WeakMap,sr=new WeakMap,es=new WeakMap,ho=new WeakMap,pi=new WeakMap,fi=new WeakMap,mi=new WeakMap,_i=new WeakMap,gi=new WeakMap,Ti=new WeakMap,yi=new WeakMap,bt=new WeakSet,mp=function(t){if(!Ot(t)||!m(ke,fi).test(t))return;const n=t.split(/\s+/);return Array.from({length:6},(s,r)=>parseInt(n[r]??"0"))},_p=function(t){switch(t&~As.PREV){case As.FRAME:return Uo;case As.PERIOD:return Ho;case As.BLOCK:default:return lp}},gp=function(t){return t&As.PREV?-1:1},Ai=new WeakMap,Go=function(t){var n;return((n=m(this,es))==null?void 0:n.bind(t))??t},ce=new WeakSet,Nr=function(){return{...m(this,Me)}},Za=function(){return new hA},Tp=function(t){return!!m(this,B)&&!(t>0?m(this,B).isAtEnd:m(this,B).isAtStart)},yp=function(t){var r,a;if(m(this,xt))return;k(this,ft,void 0);const n=t==null?void 0:t.highlight,s=Ts(m(this,Me).minified);if(Ot(n)?k(this,ft,X(r=ke,bt,mp).call(r,n))&&k(this,Qe,Wn):k(this,Qe,Tr(iA,n,m(this,Qe))),k(this,Me,{...m(this,Me),...t,blocks:Tr(Ls,t==null?void 0:t.blocks,m(this,Me).blocks),controls:Tr(cd,t==null?void 0:t.controls,m(this,Me).controls),firstWeekDay:Tr(Zh,t==null?void 0:t.firstWeekDay,m(this,Me).firstWeekDay),fixedBlockHeight:Ts(t==null?void 0:t.fixedBlockHeight,m(this,Me).fixedBlockHeight),highlight:m(this,Qe),minified:Ts(t==null?void 0:t.minified,m(this,Me).minified),trackCurrentDay:Ts(t==null?void 0:t.trackCurrentDay,m(this,Me).trackCurrentDay)}),!ee(m(this,Ct))){m(this,B)?k(this,Jn,!0):(k(this,B,m(this,ce,Za)),X(this,ce,tc).call(this),X(this,ce,sc).call(this),X(this,ce,nc).call(this));return}(!m(this,B)||s!==m(this,Me).minified)&&(k(this,B,m(this,ce,Za)),m(this,B).effect=m(this,Vt)),X(this,ce,tc).call(this),(a=m(this,Vt))==null||a.call(this)},Ap=function(t){if(t&&m(this,B)&&ee(m(this,Ct))){if(t instanceof KeyboardEvent){switch(t.code){case te.ARROW_LEFT:m(this,B).shiftFrameCursor(Qh);break;case te.ARROW_RIGHT:m(this,B).shiftFrameCursor(np);break;case te.ARROW_UP:m(this,B).shiftFrameCursor(ap);break;case te.ARROW_DOWN:m(this,B).shiftFrameCursor(tp);break;case te.HOME:m(this,B).shiftFrameCursor(t.ctrlKey?ep:rp);break;case te.END:m(this,B).shiftFrameCursor(t.ctrlKey?Jh:sp);break;case te.PAGE_UP:t.shiftKey?m(this,B).shiftFrameByOffset(-1,Ho):m(this,B).shiftFrameCursor(ip);break;case te.PAGE_DOWN:t.shiftKey?m(this,B).shiftFrameByOffset(1,Ho):m(this,B).shiftFrameCursor(op);break;case te.SPACE:case te.ENTER:return X(this,ce,Dr).call(this),!0;default:return}return m(this,$t)&&X(this,ce,Dr).call(this,z),!0}if(t instanceof MouseEvent&&m(ke,mi).includes(t.type)&&ee(m(this,mn))){const n=m(this,mn).call(m(this,ce,Nr),t);if(!Mr(n))return;const s=t.type==="click";if(!(s||m(this,$t)))return;if(m(this,B).shiftFrameCursor(n),m(this,B).cursor===n)return s?X(this,ce,Dr).call(this):X(this,ce,Dr).call(this,z),!0}}},vp=function(){var t;m(this,xt)||((t=m(this,nr))==null||t.call(this),k(this,es,k(this,ho,k(this,mn,k(this,B,k(this,Qe,k(this,tr,k(this,sr,k(this,ft,k(this,_n,k(this,nr,k(this,wn,k(this,Vt,k(this,Ct,void 0))))))))))))),k(this,Me,z),k(this,$t,k(this,Jn,!1)),k(this,xt,!0))},Qa=function(t){var s,r;if(!m(this,St)||t<0||t>=m(this,St).length)return;const n=m(this,St)[t];if(!m(this,kn)[t]){const a=ja[n],i=X(s=ke,bt,_p).call(s,a),c=X(r=ke,bt,gp).call(r,a);m(this,kn)[t]=(...d)=>X(ke,bt,Go).call(this,(...l)=>{var p;const u=X(this,ce,Tp).call(this,c);if(!(u&&l.length))return u;const h=X(this,ce,Rp).call(this,n,l[0]);return oe(h)?!1:((p=m(this,B))==null||p.shiftFrameByOffset(c*h,i),!0)})(...d)}return[n,m(this,kn)[t]]},Rp=function(t,n){if(!(m(this,B)&&ee(m(this,Ct))))return;if(n instanceof MouseEvent){if(n.type!=="click")return}else if(n instanceof KeyboardEvent){if(!m(ke,gi).includes(n.code))return}else return;let s=1;if(ee(m(this,_n))){const r=Number(m(this,_n).call(m(this,ce,Nr),n,t));s=Number.isInteger(r)&&r>=1?r:s}return s},Dr=function(t){if(m(this,xt)||!m(this,B))return;switch(m(this,Qe)){case Wn:case Ps:break;case Is:default:return}const n=m(this,B).cursor,s=Math.max(m(this,B).getTimestampAtIndex(n),m(this,B).timeslice.from),r=Math.min(m(this,B).getTimestampAtIndex(n+1)-1,m(this,B).timeslice.to),a=m(this,ft);if(m(this,Qe)===Ps||m(this,B).blankSelection||a)if(k(this,$t,!(m(this,Qe)===Ps||a)),m(this,Qe)===Wn&&a){const i=r>=m(this,B).selectionEnd?tt:vt;i===tt?m(this,B).updateSelection(r,vt):m(this,B).updateSelection(s,tt),X(this,ce,Yo).call(this,i===tt?m(this,B).selectionEnd:m(this,B).selectionStart,i,a)}else m(this,B).updateSelection(s,tt),m(this,B).updateSelection(r,vt);else{const i=t===z,c=vn(m(this,B).timezone);if(i||k(this,$t,!1),s<=m(this,B).selectionStart){const d=new Date(gn(c,m(this,B).selectionStart)),l=Math.min(Kt(c,d.setDate(d.getDate()+1)-1),m(this,B).timeslice.to);s===m(this,B).selectionStart&&r<=l&&m(this,B).updateSelection(r,vt),m(this,B).updateSelection(s,tt)}else{const d=new Date(gn(c,m(this,B).selectionEnd)),l=Math.max(Kt(c,d.setHours(0,0,0,0)),m(this,B).timeslice.from);s<=m(this,B).selectionEnd&&s>=l&&m(this,B).updateSelection(s,tt),m(this,B).updateSelection(r,vt)}if(i)return}k(this,Bt,m(this,B).selectionStart),k(this,Rt,m(this,B).selectionEnd)},Ja=function(){var t;(t=m(this,B))==null||t.clearSelection(),k(this,$t,!1),k(this,Bt,k(this,Rt,void 0))},Yo=function(t,n,s){var f;if(!m(this,B))return;const r=vn((f=m(this,B))==null?void 0:f.timezone),a=new Date(gn(r,t)),i=n===tt?-1:1,[c=0,d=0,l=0,u=0,h=0,p=0]=s??[];a.setFullYear(a.getFullYear()+c*i,a.getMonth()+d*i,a.getDate()+l*i),a.setHours(a.getHours()+u*i,a.getMinutes()+h*i,a.getSeconds()+p*i),m(this,B).updateSelection(Kt(r,a.getTime()-i),n)},ec=function(){var t,n;m(this,Bt)&&((t=m(this,B))==null||t.updateSelection(m(this,Bt),tt)),m(this,Rt)&&((n=m(this,B))==null||n.updateSelection(m(this,Rt),vt)),k(this,$t,!1)},tc=function(){m(this,B)&&(m(this,B).timeslice=m(this,Me).timeslice,m(this,B).dynamicBlockHeight=!m(this,Me).fixedBlockHeight,m(this,B).firstWeekDay=m(this,Me).firstWeekDay,m(this,B).locale=m(this,Me).locale,m(this,B).size=m(this,Me).blocks,m(this,B).timezone=m(this,Me).timezone,m(this,B).trackCurrentDay=m(this,Me).trackCurrentDay,k(this,uo,oi(m(this,B).timezone)),X(this,ce,ec).call(this))},nc=function(){var t,n,s,r,a,i;switch(m(this,Qe)){case Wn:!tn((t=m(this,B))==null?void 0:t.blankSelection)&&m(this,ft)&&X(this,ce,Yo).call(this,(n=m(this,B))==null?void 0:n.selectionStart,vt,m(this,ft));break;case Ps:if(!tn((s=m(this,B))==null?void 0:s.blankSelection)){const c=vn((r=m(this,B))==null?void 0:r.timezone),d=new Date(gn(c,(a=m(this,B))==null?void 0:a.selectionStart));(i=m(this,B))==null||i.updateSelection(Kt(c,d.setHours(23,59,59,999)),vt)}break;case Is:default:X(this,ce,Ja).call(this);return}},sc=function(){var t,n;switch((t=m(this,wn))==null?void 0:t.snapshot.controls){case Vc:k(this,St,m(ke,Ti));break;case zc:k(this,St,m(ke,yi));break;case Xc:default:k(this,St,void 0)}m(this,kn).length=0,m(this,kn).length=((n=m(this,St))==null?void 0:n.length)??0},$(ke,bt),$(ke,fi,/^(?:0|[1-9]\d*)(\s+(?:0|[1-9]\d*)?){0,5}?$/),$(ke,mi,["click","mouseover","pointerover"]),$(ke,_i,yn(0,ue)),$(ke,gi,[te.ENTER,te.SPACE]),$(ke,Ti,Object.keys(ja).filter(t=>isNaN(+t))),$(ke,yi,["PREV","NEXT"]),$(ke,Ai,function(t){var i,c;if(cs(t))return;let n=!1,s=!1,r=!1;const a=(i=m(this,ft))==null?void 0:i.join(" ");for(const d of Object.keys(t))t[d]!==((c=m(this,sr))==null?void 0:c[d])&&(d==="controls"?n=!0:d==="highlight"?s=!0:(d==="from"||d==="to")&&(r=!0));m(this,tr)!==a&&(k(this,tr,a),s=!0),k(this,sr,t),m(this,$t)&&!r&&X(this,ce,ec).call(this),n&&X(this,ce,sc).call(this),s&&X(this,ce,nc).call(this)}),ke);const qt=Object.defineProperties(t=>{const{grid:n,kill:s}=new pA;return pr(t)?n.config({blocks:t}):ee(t)?rr.then(()=>{n.config.watch=t}):n.config(t),de({grid:K(n),kill:K(s)})},{controls:{value:de({ALL:{value:Vc},MINIMAL:{value:zc},NONE:{value:Xc}})},highlight:{value:de({ONE:{value:Ps},MANY:{value:Wn},NONE:{value:Is}})},slice:{value:Object.defineProperties(dp.bind(null),{FROM:{value:Kc},TO:{value:Zc},UNBOUNDED:{value:Lr},SINCE_NOW:{get:cA},UNTIL_NOW:{get:lA}})}}),fA=({config:e,grid:{controls:t},renderer:n})=>e.controls===qt.controls.NONE||!ee(n)?null:o(Q,{children:t.map(([s,r])=>n(s,r))}),mA=Ue(fA),_A=e=>{const t=C((n,s)=>{s instanceof Element&&s.setAttribute("tabindex","-1"),n instanceof Element&&(n.setAttribute("tabindex","0"),rr.then(()=>n==null?void 0:n.focus()))},[]);return En(C((n,s)=>{try{e==null||e(n,s)}finally{t(n,s)}},[e]))},gA=({blocks:e,controls:t,dynamicBlockRows:n,firstWeekDay:s,highlight:r,locale:a,onHighlight:i,originDate:c,renderControl:d,sinceDate:l,timezone:u,trackCurrentDay:h,untilDate:p,useYearView:f},T)=>{const{i18n:g}=W(),[y,_]=F(performance.now()),v=A(()=>qt.slice(l,p),[l,p]),N=q(z),S=A(()=>t??(ee(d)?qt.controls.MINIMAL:qt.controls.NONE),[t,d]),D=A(()=>r??(ee(i)?qt.highlight.ONE:qt.highlight.NONE),[r,i]),{grid:R,kill:b}=A(()=>{const{grid:w,kill:H}=qt(function(){_(performance.now()),N.current=this,!(x===w.highlight.from&&j===w.highlight.to)&&(x=w.highlight.from,j=w.highlight.to,i==null||i(x,j))});let{from:x,to:j}=w.highlight;return w.config.cursorIndex=L=>{let U=L.target;for(;U&&U!==L.currentTarget;){const ie=Number(U.dataset.cursorPosition);if(Number.isFinite(ie))return ie;U=U.parentNode}},w.config.shiftFactor=function(L){if(this.controls===qt.controls.MINIMAL)return L!=null&&L.shiftKey?12:L!=null&&L.altKey?this.blocks:1},{grid:w,kill:H}},[]),E=A(()=>{const w=H=>{R.cursor(H)};return{onClickCapture:w,onMouseOverCapture:w,onPointerOverCapture:w,onKeyDownCapture:H=>{R.cursor(H)&&H.preventDefault()}}},[R]),I=_A(C((w,H)=>{H instanceof Element&&H.removeAttribute("aria-selected"),w instanceof Element&&w.setAttribute("aria-selected","true")},[]));return J2(T,()=>{const{from:w,to:H}=(R==null?void 0:R.highlight)||z;return{clear:()=>{R!=null&&R.highlight&&(R.highlight.from=void 0)},get config(){return{...N.current??z}},get from(){return od(w)},set from(x){R!=null&&R.highlight&&x&&(R.highlight.from=x.getTime())},get to(){return od(H)},set to(x){R!=null&&R.highlight&&x&&(R.highlight.to=x.getTime())}}},[R,y]),G(()=>{R.config({blocks:e,controls:S,firstWeekDay:s,fixedBlockHeight:!n,highlight:D,locale:a??g.locale,minified:f,timeslice:v,timezone:u,trackCurrentDay:h})},[S,D,e,n,s,R,g,a,v,u,h,f]),G(()=>{const w=[].concat(c).slice(0,2).map(Number).filter(Boolean);return w[0]&&(R.highlight.from=+w[0]),w[1]&&(R.highlight.to=+w[1]),b},[]),{cursorElementRef:I,cursorRootProps:E,grid:R}},TA=mr((e,t)=>{const n=gA(e,t),s=n.grid.config();return o("div",{role:"none",children:[o(mA,{config:s,grid:n.grid,renderer:e.renderControl}),o(sA,{ref:n.cursorElementRef,config:s,cursorRootProps:n.cursorRootProps,grid:n.grid,onlyCellsWithin:e.onlyCellsWithin,prepare:e.prepare})]})}),yA=Ue(TA),AA=(e,t)=>{const[n,s]=F(),r=En(A(()=>{const a=i=>(...c)=>{const d=e(i,...c);return d&&ju(d,i)};return s(void 0),i=>s(i instanceof Element?()=>a(i):void 0)},[e,t]),t);return[n,r]},vA=e=>{const{i18n:t}=W();return AA(C((n,s,r)=>{if(!(n instanceof HTMLElement))return null;if(ee(e))return e(s,r);let a,i,c;switch(s){case"PREV":a="prev",i="previous",c=Ac;break;case"NEXT":a=i="next",c=Pi;break;default:return null}const d=r();return d?o(ge,{"aria-label":t.get(`calendar.${i}Month`),variant:ne.TERTIARY,disabled:!d,classNameModifiers:["circle",a],iconButton:!0,onClick:r,children:o(c,{role:"presentation"})},s):null},[t,e]))},RA=mr((e,t)=>{const{i18n:n}=W(),[s,r]=vA(e.renderControl),[a,i]=F(performance.now()),c=A(()=>tn(e.showTimezoneInfo),[e.showTimezoneInfo]),{clockTime:d,GMTOffset:l}=Sy({timezone:e.timezone,withClock:c}),u=A(()=>M([{"adyen-pe-datepicker--with-timezone":c},"adyen-pe-datepicker"]),[c]),h=A(()=>c?{values:{offset:l,time:d}}:z,[l,d,c]),p=En(ue,t),f=C(()=>{var T,g,y,_,v;i(performance.now()),(T=p.current)!=null&&T.from&&((g=p.current)!=null&&g.to)&&((v=e.onHighlight)==null||v.call(e,+((y=p.current)==null?void 0:y.from),+((_=p.current)==null?void 0:_.to)))},[i,e.onHighlight]);return o("div",{className:u,children:[o("div",{className:"adyen-pe-datepicker__selector-container",children:o(Xy,{now:e.now,calendarRef:p,onTimeRangeSelected:e.onPresetOptionSelected,options:e.timeRangePresetOptions,selectedOption:e.selectedPresetOption,timestamp:a,timezone:e.timezone})}),o("div",{ref:r,role:"group",className:"adyen-pe-datepicker__controls","aria-label":n.get("calendar.controls")}),o(yA,{...e,ref:p,firstWeekDay:qc,dynamicBlockRows:!0,onlyCellsWithin:!0,controls:e.controls??qt.controls.MINIMAL,highlight:e.highlight??qt.highlight.MANY,onHighlight:f,renderControl:s,trackCurrentDay:!0}),c&&o("div",{className:"adyen-pe-datepicker__timezone",children:n.get("calendar.timezone",h)})]})}),CA="adyen-pe-filter-button";function SA(e,t){const{className:n,classNameModifiers:s=[],children:r,disabled:a,onClick:i,...c}=e,d=A(()=>ns("",n)||"",[n]),l=A(()=>Oi(a),[a]),{classes:u,click:h}=Ii(d,s,CA,l,e,i);return o("button",{className:u,ref:t,onClick:h,...c,children:o(P,{el:J.DIV,variant:O.BODY,stronger:!0,children:r})})}const EA=Je(SA),NA=mr(function(t,n){return o(si,{classNameModifiers:t.classNameModifiers,...t,ref:n,"aria-required":t.required,type:"text"})}),DA=e=>!e||Da(e),bA=(()=>{const e=t=>{const{editAction:n,name:s,onChange:r,onValueUpdated:a}=t,[i,c]=F(t.value),d=C(l=>{const u=l.target.value.trim();c(u),a(u)},[a]);return G(()=>{if(n===et.CLEAR){const l="";c(l),a(l),r(l)}n===et.APPLY&&r(i??"")},[i,n,r,a]),o(NA,{name:s,value:i,onInput:d})};return t=>o(e,{...t})})(),OA=({render:e,...t})=>{var H;const n=Pe(Ie.down.xs),[s,r]=zt(!1),[a,i]=zt(!1),c=A(()=>t.isValueEmpty??DA,[t.isValueEmpty]),[d,l]=zt(c(t.value)),[u,h]=zt(!1),[p,f]=zt(!1),[T,g]=zt(c(t.value)),y=wr(),_=A(()=>e??bA,[e]),v=C(x=>{const j=c(x??void 0);l(j),g(zo(x)),f(u?x!==t.value:!j)},[c,l,g,f,u,t.value]),{commitAction:N,commitActionButtons:S,committing:D,resetCommitAction:R}=yh({applyDisabled:T||!p,resetDisabled:d}),[b,E]=A(()=>{const x=j=>()=>{j!==s&&(j&&(R(),f(!1),h(!1)),r(j),i(j))};return[x(!1),x(!0)]},[r,s,R,i,h,f]);G(()=>{if(a){const x=c(t.value);i(!1),l(x),h(!x)}},[t.value,a,c,i,l,h]),G(()=>{D&&b(),l(d)},[D,b,l,d]);const I=Pe(Ie.only.sm),w=Pe(Ie.only.md);return o(Q,{children:[o("div",{className:`adyen-pe-filter adyen-pe-filter--${t.type}`,children:A(()=>o(EA,{classNameModifiers:[...t.appliedFilterAmount?["with-counter"]:[],...t.classNameModifiers??[],...s?["active"]:[],...d?[]:["has-selection"]],onClick:s?b:E,tabIndex:0,ref:y,children:o("div",{className:"adyen-pe-filter-button__default-container",children:[o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,className:"adyen-pe-filter-button__label",children:t.label}),!!t.appliedFilterAmount&&o("div",{className:"adyen-pe-filter-button__counter-wrapper",children:o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,className:"adyen-pe-filter-button__counter",children:t.appliedFilterAmount})})]})}),[t.appliedFilterAmount,t.classNameModifiers,t.label,s,d,b,E,y])}),s&&o(ei,{actions:S,title:(H=t.title)==null?void 0:H.trim(),variant:rt.POPOVER,modifiers:["filter"],open:s,"aria-label":`${t.label}`,dismiss:b,dismissible:!1,withContentPadding:t.withContentPadding??!0,divider:!0,targetElement:y,disableFocusTrap:!1,position:se.BOTTOM,containerSize:t.containerSize,showOverlay:n,fitPosition:I||w,children:_({...t,editAction:N,onValueUpdated:v})})]})},Cp=Ue(OA);var jr=(e=>(e.FROM="from",e.TO="to",e))(jr||{});const IA={month:"short",day:"numeric",year:"numeric"},Sp=(e,t,n,s)=>{const r=n&&t(n),a=s&&t(s);if(r&&a)return`${r} - ${a}`;if(r)return e.get("filter.date.since",{values:{date:r}});if(a)return e.get("filter.date.until",{values:{date:a}})},Xt=e=>{try{return new Date(e||"").toISOString()}catch{return""}},PA=(()=>{const e=({editAction:t,from:n,to:s,now:r,onChange:a,onValueUpdated:i,showTimezoneInfo:c,selectedPresetOption:d,timeRangePresetOptions:l,timezone:u,sinceDate:h,untilDate:p})=>{const{i18n:f}=W(),{fullDateFormat:T}=kt(u),[g,y]=F(d),_=A(()=>[new Date(n),new Date(s)],[n,s]),v=q(),N=C((S,D)=>{i(Sp(f,T,Xt(S),Xt(D)))},[f,T,i]);return G(()=>{var S,D,R;switch(t){case et.APPLY:a({selectedPresetOption:g,[jr.FROM]:Xt((S=v.current)==null?void 0:S.from),[jr.TO]:Xt((D=v.current)==null?void 0:D.to)});break;case et.CLEAR:(R=v.current)==null||R.clear(),a()}},[t,a,g]),o(RA,{ref:v,now:r,originDate:_,onHighlight:N,onPresetOptionSelected:y,selectedPresetOption:d,timeRangePresetOptions:l,timezone:u,showTimezoneInfo:c,sinceDate:Xt(h),untilDate:Xt(p)})};return t=>o(e,{...t})})(),kA=(e,t,n)=>e.formatRange(t,n);function wA({title:e,from:t,to:n,selectedPresetOption:s,...r}){const{i18n:a}=W(),{fullDateFormat:i}=kt(r.timezone),[c,d]=F(),[l,u]=F(),[h,p]=F(),f=C(_=>{const{from:v,to:N,selectedPresetOption:S}=_??z;try{d(c??S),u(Xt(l??v)),p(Xt(h??N))}finally{r.onChange({from:v,to:N,selectedPresetOption:S})}},[c,l,h,r]),T=A(()=>a.get("rangePreset.custom"),[a]),g=A(()=>{const _={...IA,timeZone:r.timezone};let v=new Intl.DateTimeFormat(Ni,_);try{v=new Intl.DateTimeFormat(a.locale,_)}catch{}return v},[a,r.timezone]);G(()=>d(s),[s]),G(()=>u(Xt(t||Date.now())),[t]),G(()=>p(Xt(n||Date.now())),[n]);const y=A(()=>s===T&&l&&h?kA(g,new Date(l),new Date(h)):s??r.label,[T,g,l,h,s,r.label]);return o(Cp,{...r,from:t,to:n,type:"date",label:y,onChange:f,render:PA,selectedPresetOption:s,value:Sp(a,i,t,n),withContentPadding:!1})}const Qi=({timezone:e,canResetFilters:t,defaultParams:n,filters:s,nowTimestamp:r,refreshNowTimestamp:a,sinceDate:i,untilDate:c,updateFilters:d})=>{const{i18n:l}=W(),u=A(()=>l.get(n.current.defaultTimeRange),[l]),[h,p]=F(u),f=C((T=z)=>{for(const[g,y]of Object.entries(T)){switch(g){case"selectedPresetOption":p(y||u);break;case jr.FROM:d({[re.CREATED_SINCE]:y||n.current.defaultFilterParams[re.CREATED_SINCE]});break;case jr.TO:d({[re.CREATED_UNTIL]:y||n.current.defaultFilterParams[re.CREATED_UNTIL]});break;default:return}a()}},[u,a,d]);return A(()=>!t&&p(u),[t,u]),o(wA,{label:l.get("dateRange"),name:re.CREATED_SINCE,sinceDate:i,untilDate:c??new Date(r).toString(),from:s[re.CREATED_SINCE],to:s[re.CREATED_UNTIL],selectedPresetOption:h,timeRangePresetOptions:n.current.timeRangeOptions,timezone:e,onChange:f,showTimezoneInfo:!0,now:r})};function LA(e){return"callback"in e}function Qc(e){const[t,n]=F(null),s=C(i=>{var c;return i&&LA(e[i.selection.type])?{callback:(c=e==null?void 0:e[i.selection.type])!=null&&c.callback?d=>{var l,u;return(u=(l=e[i.selection.type])==null?void 0:l.callback)==null?void 0:u.call(l,{showModal:()=>n(i),...d})}:()=>{var d;return((d=e[i.selection.type])==null?void 0:d.showDetails)&&n(i)}}:(n(i),{})},[e]),r=C(()=>n(null),[]),a=A(()=>{const i={};for(const c in e){const d=e[c];i[c]=!(d!=null&&d.showDetails)||!!d.callback}return i},[e]);return{selectedDetail:t,updateDetails:s,detailsToShow:a,resetDetails:r}}const ii=Ue(({placeholder:e,selection:t,selectionOptions:n,updateSelection:s})=>{const r=Pe(Ie.down.xs),a=Pe(Ie.only.sm),i=Pe(Ie.only.md);return n&&n.length>1?o(xn,{onChange:s,filterable:!1,multiSelect:!0,placeholder:e,selected:t,withoutCollapseIndicator:!0,items:n,showOverlay:r,fitPosition:i||a}):null}),FA=(e,t)=>{const n=ee(t)?t:po;return Object.freeze(e.map(s=>({id:s,name:n(s)??s})))},Fr=({filterParam:e,filterValues:t,filters:n,defaultFilters:s,updateFilters:r,mapFilterOptionName:a})=>{const i=A(()=>Gn((n==null?void 0:n[e])??(s==null?void 0:s[e])??""),[s,n,e]),c=A(()=>t&&FA(t,a),[t,a]),d=C(({target:l})=>{r==null||r({[e]:(l==null?void 0:l.value)||""})},[r,e]);return{selection:i,selectionOptions:c,updateSelection:d}},MA=[re.CURRENCIES,re.CATEGORIES,re.STATUSES],qo=Object.freeze(Object.fromEntries(MA.map(e=>[e,""]))),xA=["ATM","Capital","Chargeback","Correction","Fee","Payment","Refund","Transfer","Other"],BA=["Booked","Pending","Reversed"],$A=e=>{const t=Vy(),n="rangePreset.last30Days",{from:s,to:r}=t[n];return{defaultFilterParams:{...e==="transactions"&&{...qo,[re.MIN_AMOUNT]:void 0,[re.MAX_AMOUNT]:void 0},[re.BALANCE_ACCOUNT]:void 0,[re.CREATED_SINCE]:new Date(s).toISOString(),[re.CREATED_UNTIL]:new Date(r).toISOString()},defaultTimeRange:n,timeRangeOptions:t}},Ji=(e,t)=>{const[n,s]=F(Date.now()),r=$A(e),a=q(r),i=C(()=>s(Date.now()),[s]);return G(()=>{i()},[t,i]),{defaultParams:a,nowTimestamp:n,refreshNowTimestamp:i}},UA="adyen-pe-data-overview-header",HA=({baseClassName:e=UA,children:t,hideTitle:n,titleKey:s,descriptionKey:r})=>{const{i18n:a}=W();return o("header",{className:e,children:[o("div",{className:`${e}__headings`,children:[!n&&s&&o("div",{className:`${e}__title`,children:o(P,{el:J.SPAN,variant:O.TITLE,medium:!0,children:a.get(s)})}),r&&o("p",{className:`${e}__description`,children:o(P,{el:J.SPAN,variant:O.BODY,children:a.get(r)})})]}),t&&o("div",{className:`${e}__controls`,children:t})]})},WA={base:"adyen-pe-modal-content"};function GA({type:e,data:t,dataCustomization:n,...s}){const r=A(()=>{switch(e){case"payout":return{...t,type:e,...s};case"transaction":return{id:t,type:e,...s};default:return{data:t,type:e}}},[t,s,e]);return o(Q,{children:r&&o("div",{className:WA.base,children:o(Hc,{...r,dataCustomization:n})})})}const Ep=({children:e,className:t,selectedDetail:n,resetDetails:s,dataCustomization:r})=>{const{i18n:a}=W(),i=!!n;return G(()=>{i&&Ns.closeAll()},[i]),o("div",{className:t,children:[e,n&&o(Lh,{title:n!=null&&n.title?a.get(n.title):void 0,isOpen:!!n,"aria-label":a.get("payoutDetails"),onClose:s,isDismissible:!0,headerWithBorder:!1,size:(n==null?void 0:n.modalSize)??"large",children:n&&o(GA,{dataCustomization:{details:r},...n==null?void 0:n.selection})})]})},Jc=({records:e,hasCustomColumn:t=!1,onDataRetrieve:n,mergeCustomData:s})=>{const[r,a]=F(e),[i,c]=F(!1),d=C(async()=>{try{if(t&&ee(n)){const l=await n(e);if(Array.isArray(l))a(s({records:e,retrievedData:(l==null?void 0:l.filter(Boolean))||[]}));else throw new Error("Retrieved data should be an array")}else a(e)}catch(l){a(e),console.error(l)}finally{c(!1)}},[t,n,s,e]);return G(()=>{e.length&&(c(!0),d())},[d,e]),{customRecords:r,loadingCustomRecords:i}},el=(e,t=Se)=>{var n;if(Array.isArray(e))for(const s of e)try{const r=typeof s=="object"?(n=s==null?void 0:s.key)==null?void 0:n.trim():!1;if(typeof r=="string"&&r&&!t.includes(r))return!0}catch{}return!1},tl=(e,t,n)=>{const s=[];for(let r=0;r<e.length;r++){const a=e[r],i=t.find(c=>n(c,a,r));s[r]={...i??z,...a}}return s},YA=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n=!0,preferredLimit:s=ur,onRecordSelection:r,showDetails:a,isLoadingBalanceAccount:i,onContactSupport:c,hideTitle:d,dataCustomization:l})=>{var He,he,$e,We;const{getPayouts:u}=Ee().endpoints,{activeBalanceAccount:h,balanceAccountSelectionOptions:p,onBalanceAccountSelection:f}=Yi(t),{defaultParams:T,nowTimestamp:g,refreshNowTimestamp:y}=Ji("payouts",h),_=C(async(De,yt)=>u({signal:yt,errorLevel:"error"},{query:{...De,createdSince:De[re.CREATED_SINCE]??T.current.defaultFilterParams[re.CREATED_SINCE],createdUntil:De[re.CREATED_UNTIL]??T.current.defaultFilterParams[re.CREATED_UNTIL],balanceAccountId:(h==null?void 0:h.id)??""}}),[h==null?void 0:h.id,T,u]),v=Hi(),N=A(()=>ee(e)?e:void 0,[e]),S=A(()=>n?ji:void 0,[n]),{canResetFilters:D,error:R,fetching:b,filters:E,limit:I,limitOptions:w,records:H,resetFilters:x,updateFilters:j,updateLimit:L,...U}=Vi({fetchRecords:_,dataField:"data",filterParams:T.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:N,preferredLimit:s,preferredLimitOptions:S,enabled:!!(h!=null&&h.id)&&!!u});G(()=>{y()},[E,y]);const ie=A(()=>({showDetails:a??!0,callback:r}),[a,r]),le=C(({records:De,retrievedData:yt})=>tl(De,yt,(bn,on)=>bn.createdAt===on.createdAt),[]),V=A(()=>{var De;return el((De=l==null?void 0:l.list)==null?void 0:De.fields,$i)},[(He=l==null?void 0:l.list)==null?void 0:He.fields]),{customRecords:Z,loadingCustomRecords:me}=Jc({records:H,hasCustomColumn:V,onDataRetrieve:(he=l==null?void 0:l.list)==null?void 0:he.onDataRetrieve,mergeCustomData:le}),Ne=A(()=>({payout:ie}),[ie]),{updateDetails:fe,resetDetails:Ce,selectedDetail:ae}=Qc(Ne),Te=C(De=>{fe({selection:{type:"payout",data:{id:h==null?void 0:h.id,balanceAccountDescription:(h==null?void 0:h.description)||"",date:De.createdAt}},modalSize:"small"}).callback({balanceAccountId:(h==null?void 0:h.id)||"",date:De.createdAt})},[fe,h==null?void 0:h.id,h==null?void 0:h.description]);return o("div",{className:ry,children:[o(HA,{hideTitle:d,titleKey:"payoutsTitle",descriptionKey:"payoutsNotice",children:o(Wi,{...v})}),o(Gi,{...v,children:[o(qi,{activeBalanceAccount:h,balanceAccountSelectionOptions:p,onBalanceAccountSelection:f}),o(Qi,{canResetFilters:D,defaultParams:T,filters:E,nowTimestamp:g,refreshNowTimestamp:y,sinceDate:iy,timezone:"UTC",updateFilters:j})]}),o(Ep,{className:oy,onContactSupport:c,selectedDetail:ae,resetDetails:Ce,dataCustomization:l==null?void 0:l.details,children:o(ty,{loading:b||i||!t||me,data:($e=l==null?void 0:l.list)!=null&&$e.onDataRetrieve?Z:H,showPagination:!0,onRowClick:Te,showDetails:a,limit:I,limitOptions:w,onContactSupport:c,onLimitSelection:L,error:R,customColumns:(We=l==null?void 0:l.list)==null?void 0:We.fields,...U})})]})},qA="adyen-pe-payouts-overview-container";function jA({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:s,error:r}=Eo(e.balanceAccountId);return o(Ui,{balanceAccountsError:r,className:qA,errorMessage:"weCouldNotLoadThePayoutsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:o(YA,{...e,balanceAccounts:t,isLoadingBalanceAccount:s})})}class Np extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(jA,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(Np,"type","payouts");class Dp extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(Hc,{...this.props,type:"transaction",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(Dp,"type","transactionDetails");const VA={base:"adyen-pe-divider"},zA=({className:e})=>o("hr",{className:M(VA.base,e)}),XA="adyen-pe-header",No=({baseClassName:e=XA,children:t,hasDivider:n,hideTitle:s,titleKey:r,subtitleKey:a,subtitleConfig:i})=>{const{i18n:c}=W();return o("header",{className:e,children:[o("div",{className:`${e}__headings`,children:[!s&&r&&o("div",{className:`${e}__title`,children:o(P,{el:J.SPAN,variant:O.TITLE,medium:!0,children:c.get(r)})}),a&&o("div",{className:M(`${e}__subtitle`,i==null?void 0:i.classNames),children:o(P,{el:(i==null?void 0:i.typographyEl)??J.SPAN,variant:(i==null?void 0:i.variant)??O.BODY,children:c.get(a)})}),n&&o(zA,{className:`${e}__divider`})]}),t&&o("div",{className:`${e}__controls`,children:t})]})},KA="adyen-pe-transaction-totals",gd="adyen-pe-transaction-totals__item",ZA="adyen-pe-base-button";function QA(e,t){const n=A(()=>ns("",e.className)||"",[e.className]),s=A(()=>Oi(e.disabled||!1),[e.disabled]),{click:r,allProps:a}=Ii(n,[...e.classNameModifiers||[],...e.fullWidth?["full-width"]:[]],ZA,s,e,e.onClick);return o("button",{type:e.type||"button",onClick:r,ref:t,...a,children:e.children})}const Td=Je(QA),bp="adyen-pe-expandable-card",ea=bp,Fn=ea+"__container",jo=ea+"__content",yd=ea+"__chevron",Ad=Fn+"--button",ma=Fn+"--filled",JA=Fn+"--hidden",ev=Fn+"--in-flow",Op=Fn+"--overlay",vd=jo+"--expandable",Rd=`--${bp}-height`,_a=Op,nl=({renderHeader:e,children:t,filled:n,fullWidth:s,inFlow:r,...a})=>{const{i18n:i}=W(),[c,d]=F(!1),[l,u]=F(0),h=A(()=>r===!0,[r]),p=C(()=>d(v=>!v),[d]),f=q(null),T=q(null),g=q(!1),y=q(c),_=wc(void 0,C(()=>{c&&(p(),g.current=!0)},[c,p]));return cr(()=>{const v=T.current;v&&(h?v.style.setProperty(Rd,`${l}px`):c||v.style.removeProperty(Rd))},[l,h,c]),G(()=>{if(!h)return void u(0);const v=f.current;if(!v)return;const N=new ResizeObserver(S=>{for(const D of S)D.target===v&&u(v.offsetHeight||0)});return N.observe(v),()=>{N.unobserve(v),N.disconnect()}},[h]),G(()=>{var v,N;c?(v=_.current)==null||v.focus():(y.current!==c&&!g.current&&((N=f.current)==null||N.focus()),g.current=!1),y.current=c},[c,_]),o("div",{ref:T,className:ea,children:t?o(Q,{children:[o(Td,{className:M(Fn,Ad,{[ma]:n}),disabled:c,fullWidth:s,"aria-controls":_a,"aria-expanded":c,"aria-hidden":c,onClick:p,ref:f,"data-testid":"expand-button",...a,children:[o("span",{className:"adyen-pe-visually-hidden",children:i.get("expandableCard.expand")}),o("div",{className:M(jo,vd),children:e}),o("div",{className:yd,children:o(Pi,{role:"presentation"})})]}),o(Td,{id:_a,className:M(Fn,Ad,Op,{[ma]:n,[JA]:!c,[ev]:h}),disabled:!c,fullWidth:s,"aria-controls":_a,"aria-expanded":c,"aria-hidden":!c,onClick:p,ref:_,"data-testid":"collapse-button",...a,children:[o("span",{className:"adyen-pe-visually-hidden",children:i.get("expandableCard.collapse")}),o("div",{className:M(jo,vd),children:[e,o("div",{children:t})]}),o("div",{className:yd,children:o(Ac,{role:"presentation"})})]})]}):o("div",{className:M(Fn,{[ma]:n}),...a,children:o("div",{className:jo,children:e})})})},sl="adyen-pe-amount-skeleton",tv=sl+"--has-margin",nv=sl+"--loading",sv=({hasMargin:e=!1,isLoading:t=!1,width:n})=>o("span",{className:M(sl,{[nv]:t,[tv]:e}),style:{width:n}}),rs="adyen-pe-summary-item",Ip=rs+"__label-container",rv=Ip+"--loading",ov=rs+"--body",Pp=rs+"__label",iv=rs+"__placeholder",av=rs+"__amount",Cd=Je(({config:e,i18n:t,isSkeletonVisible:n,className:s,...r},a)=>o("span",{className:M(Ip,s,{[rv]:n}),style:{cursor:"default"},ref:a,...r,children:e.labelKey&&o(P,{variant:O.CAPTION,className:Pp,children:t.get(e.labelKey)})})),kp=({columnConfigs:e,isHeader:t=!1,isHovered:n=!1,isSkeletonVisible:s=!1,isLoading:r=!1,widths:a,onWidthsSet:i,isEmpty:c})=>{const{i18n:d}=W();G(()=>{const p=e.map(f=>{var T,g;return((g=(T=f.ref)==null?void 0:T.current)==null?void 0:g.getBoundingClientRect().width)??0});i(p)},[i]);const l=p=>({width:a&&a[p]?a[p]:"auto"}),u=Pe(Ie.only.xs),h=C((p,f)=>p.valueHasLabelStyle?O.CAPTION:f&&!u?O.BODY:O.TITLE,[u]);return o("div",{className:M(rs,{[ov]:!t}),children:e.map((p,f)=>{const T=p.getValue(),g=!!T&&T.length>12;return o("div",{children:[t&&(p.tooltipLabel?o(Cn,{content:d.get(`${p.tooltipLabel}`),isContainerHovered:n,children:o(Cd,{config:p,i18n:d,isSkeletonVisible:s})}):o(Cd,{config:p,i18n:d,isSkeletonVisible:s})),s?o(sv,{isLoading:r,hasMargin:p.hasSkeletonMargin,width:p.skeletonWidth+"px"}):c?o("span",{className:M([rs,iv])}):o("div",{ref:p.ref,style:l(f),children:o(P,{variant:h(p,g),className:M({[Pp]:p.valueHasLabelStyle,[av]:!p.valueHasLabelStyle}),children:T})})]},f)})})},Sd=({total:e,hiddenField:t,isHeader:n=!1,isHovered:s=!1,isSkeleton:r=!1,isLoading:a=!1,widths:i,onWidthsSet:c})=>{const{i18n:d}=W(),l=q(null),u=q(null),h=q(null),p=A(()=>{const f={labelKey:"totalIncoming",ref:l,skeletonWidth:80,getValue:()=>e&&d.amount(e.incomings,e.currency),tooltipLabel:"tooltip.totalIncoming"},T={labelKey:"totalOutgoing",ref:u,skeletonWidth:80,getValue:()=>e&&d.amount(e.expenses,e.currency),tooltipLabel:"tooltip.totalOutgoing"};return[...t!=="incomings"?[f]:[],...t!=="expenses"?[T]:[],{ref:h,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}]},[e,t,d]);return o(kp,{isHovered:s,isEmpty:!e,columnConfigs:p,isHeader:n,isSkeletonVisible:r,isLoading:a,widths:i,onWidthsSet:c})},cv="adyen-pe-base-list",rl=({children:e,classNames:t})=>o("ul",{className:M(cv,[t]),children:e}),wp=()=>{const[e,t]=F([]),n=C(s=>{t(r=>s.every(a=>!a)?s:s.map((a,i)=>{const c=r[i];return!c||a>c?a:c}))},[]);return[e,n]},ga=Ue(({totals:e,isLoading:t,hiddenField:n,fullWidth:s})=>{const[r,a]=wp(),[i,c]=F(!1),[d,...l]=A(()=>e.map(u=>(u.key=`${u.currency}-${Math.random()}`,u)),[e]);return o(nl,{renderHeader:o(Sd,{isHovered:i,total:d,hiddenField:n,widths:r,isHeader:!0,isSkeleton:t,isLoading:t,onWidthsSet:a}),fullWidth:s,onMouseEnter:()=>c(!0),onFocus:()=>c(!0),onMouseLeave:()=>c(!1),onBlur:()=>c(!1),children:!t&&l.length&&o(rl,{children:l.map(u=>o("li",{children:o(Sd,{isHovered:i,total:u,hiddenField:n,widths:r,onWidthsSet:a})},u.key))})})}),lv=Ue(({availableCurrencies:e,isAvailableCurrenciesFetching:t,balanceAccountId:n,createdSince:s,createdUntil:r,categories:a,statuses:i,maxAmount:c,minAmount:d,currencies:l,fullWidth:u})=>{const{getTransactionTotals:h}=Ee().endpoints,p=C(async()=>h==null?void 0:h(z,{query:{createdSince:s,createdUntil:r,categories:a,statuses:i,maxAmount:c,minAmount:d,currencies:l,balanceAccountId:n}}),[n,a,s,r,l,h,c,d,i]),{data:f,isFetching:T}=gt({fetchOptions:A(()=>({enabled:!!n&&!!h}),[n,h]),queryFn:p}),g=!n||T||t,_=C(()=>{if(!e||!f)return f==null?void 0:f.data;const N=e.map(S=>f.data.find(R=>R.currency===S)||{currency:S,incomings:0,expenses:0});return N.concat(f.data.filter(S=>!N.includes(S)))},[e,f])()??[],v=Pe(Ie.only.xs);return o("div",{className:KA,children:v?o(Q,{children:[o("div",{className:gd,children:o(ga,{totals:_,isLoading:g,hiddenField:"expenses",fullWidth:u})}),o("div",{className:gd,children:o(ga,{totals:_,isLoading:g,hiddenField:"incomings",fullWidth:u})})]}):o(ga,{totals:_,isLoading:g,fullWidth:u})})}),dv="adyen-pe-balances",Ed=({balance:e,isHeader:t=!1,isSkeleton:n=!1,isLoading:s=!1,widths:r,onWidthsSet:a,isEmpty:i})=>{const{i18n:c}=W(),d=q(null),l=q(null),u=A(()=>[{labelKey:"accountBalance",ref:d,skeletonWidth:80,getValue:()=>e&&c.amount(e.value,e.currency)},{ref:l,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}],[e,d,c]);return o(kp,{isEmpty:i,columnConfigs:u,isHeader:t,isSkeletonVisible:n,isLoading:s,widths:r,onWidthsSet:a})},uv=Ue(({balanceAccountId:e,defaultCurrencyCode:t,onCurrenciesChange:n,fullWidth:s})=>{const{getBalances:r}=Ee().endpoints,a=C(async()=>r==null?void 0:r(z,{path:{balanceAccountId:e}}),[e,r]),{data:i,error:c,isFetching:d}=gt({fetchOptions:A(()=>({enabled:!!e&&!!r}),[e,r]),queryFn:a}),l=!e||d,u=!!c||!(i!=null&&i.data.length),h=A(()=>(i==null?void 0:i.data)&&[...i.data].sort(({currency:y},{currency:_})=>{if(t){if(y===t)return-1;if(_===t)return 1}return y.localeCompare(_)}),[i==null?void 0:i.data,t]),[p,...f]=A(()=>(h==null?void 0:h.map(y=>(y.key=`${y.currency}-${Math.random()}`,y)))??[],[h]),[T,g]=wp();return G(()=>{const y=new Set((h==null?void 0:h.map(({currency:_})=>_))||[]);n(Array.from(y),d)},[h,d,n]),o("div",{className:dv,children:o(nl,{renderHeader:o(Ed,{isEmpty:u,balance:p,widths:T,isHeader:!0,isSkeleton:l,isLoading:l,onWidthsSet:g}),filled:!0,fullWidth:s,children:f.length&&o(rl,{children:f.map(y=>o("li",{children:o(Ed,{balance:y,widths:T,onWidthsSet:g})},y.key))})})})}),hv=(e,t)=>{const n=Fr({filterParam:re.CATEGORIES,filterValues:xA,defaultFilters:qo,...e}),s=Fr({filterParam:re.STATUSES,filterValues:BA,defaultFilters:qo,...e}),r=Fr({filterParam:re.CURRENCIES,filterValues:t,defaultFilters:qo,...e});return{categoriesFilter:n,currenciesFilter:r,statusesFilter:s}},ai=1e5,pv=({onChange:e,editAction:t,onValueUpdated:n,selectedCurrencies:s,availableCurrencies:r,value:a,...i})=>{const{i18n:c}=W(),[d,l]=F(oe(i.minAmount)?void 0:parseFloat(i.minAmount)/ai),[u,h]=F(oe(i.maxAmount)?void 0:parseFloat(i.maxAmount)/ai),p=C(()=>{e({minAmount:d,maxAmount:u})},[u,d,e]),f=C(()=>{e({minAmount:void 0,maxAmount:void 0}),h(void 0),l(void 0)},[e]);G(()=>{t===et.APPLY&&p(),t===et.CLEAR&&f()},[p,f,t]);const T=A(()=>({minAmount:Number(d),maxAmount:Number(u)}),[u,d]);return G(()=>{const{maxAmount:g,minAmount:y}=T;oe(g)&&oe(y)||y>g?n(null):n(`${y}-${g}`)},[T,n]),o("div",{className:"adyen-pe-range-selection-filter",children:[o("div",{className:"adyen-pe-range-selection-filter__input",children:[o("label",{htmlFor:"minValue",children:`${c.get("from")}:`}),o(si,{"data-testid":"minValueFilter",lang:c.locale,name:"minValue",type:"number",value:d,onInput:g=>{g.currentTarget&&l(g.currentTarget.value!==""?g.currentTarget.value:void 0)},min:0,isInvalid:d?d<0:!1,errorMessage:c.get("noNegativeNumbersAllowed")})]}),o("div",{className:"adyen-pe-range-selection-filter__input",children:[o("label",{htmlFor:"maxValue",children:`${c.get("to")}:`}),o(si,{"data-testid":"maxValueFilter",lang:c.locale,name:"maxValue",type:"number",value:u,onInput:g=>{g.currentTarget&&h(g.currentTarget.value!==""?g.currentTarget.value:void 0)},min:d,isInvalid:!oe(u)&&!oe(d)&&u<d,errorMessage:c.get("toValueShouldBeGreaterThanTheFromValue")})]})]})},fv=({updateFilters:e,selectedCurrencies:t,availableCurrencies:n,...s})=>{const{i18n:r}=W(),[a,i]=F(),[c,d]=F(),l=A(()=>(t==null?void 0:t.length)===1||(n==null?void 0:n.length)===1,[n==null?void 0:n.length,t==null?void 0:t.length]),u=C((p,f)=>{const T=(t==null?void 0:t[0])||(n==null?void 0:n[0]),g=f&&T?{style:"currency",currency:T,currencyDisplay:"symbol"}:void 0;return p.toLocaleString(r.locale,g)},[n,r,t]),h=C(p=>{const{minAmount:f,maxAmount:T}=p??z;i({minAmount:f,maxAmount:T}),oe(f)&&oe(T)&&d(void 0),e({minAmount:oe(f)?void 0:String(Math.round(f*ai)),maxAmount:oe(T)?void 0:String(Math.round(T*ai))})},[e]);if(a&&(a.minAmount||a.maxAmount)){const{minAmount:p,maxAmount:f}=a??{};!oe(p)&&!oe(f)&&p<=f?d(`${u(p,l)} ${r.get("to").toLowerCase()} ${u(f,l)}`):!oe(p)&&oe(f)&&p>=0?d(`${r.get("from")} ${u(p,l)}`):oe(p)&&!oe(f)?d(`${r.get("to")} ${u(f,l)}`):d(void 0)}return o(Cp,{...s,updateFilters:e,minAmount:s.minAmount,maxAmount:s.maxAmount,onChange:h,value:c,label:c||s.label,type:"text",containerSize:Hr.MEDIUM,selectedCurrencies:t,availableCurrencies:n,render:pv})},Lp="adyen-pe-transactions",Fp=`${Lp}-overview`,mv=`${Lp}-details`,Mp=`${Fp}__summary`,Nd=`${Mp}-item`,_v=24,gv=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n=!0,preferredLimit:s=ur,onRecordSelection:r,showDetails:a,isLoadingBalanceAccount:i,onContactSupport:c,hideTitle:d,dataCustomization:l})=>{var an,Bn,fs,$n;const{i18n:u}=W(),{getTransactions:h}=Ee().endpoints,{activeBalanceAccount:p,balanceAccountSelectionOptions:f,onBalanceAccountSelection:T}=Yi(t),{defaultParams:g,nowTimestamp:y,refreshNowTimestamp:_}=Ji("transactions",p),v=C(async({balanceAccount:ve,...Fe},Wt)=>h({signal:Wt,errorLevel:"error"},{query:{...Fe,statuses:Gn(Fe[re.STATUSES]),categories:Gn(Fe[re.CATEGORIES]),currencies:Gn(Fe[re.CURRENCIES]),createdSince:Fe[re.CREATED_SINCE]??g.current.defaultFilterParams[re.CREATED_SINCE],createdUntil:Fe[re.CREATED_UNTIL]??g.current.defaultFilterParams[re.CREATED_UNTIL],sortDirection:"desc",balanceAccountId:(p==null?void 0:p.id)??"",minAmount:oe(Fe.minAmount)?void 0:parseFloat(Fe.minAmount),maxAmount:oe(Fe.maxAmount)?void 0:parseFloat(Fe.maxAmount)}}),[p==null?void 0:p.id,g,h]),N=Hi(),S=A(()=>ee(e)?e:void 0,[e]),D=A(()=>n?ji:void 0,[n]),{canResetFilters:R,error:b,fetching:E,filters:I,limit:w,limitOptions:H,records:x,resetFilters:j,updateFilters:L,updateLimit:U,...ie}=Vi({fetchRecords:v,dataField:"data",filterParams:g.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:S,preferredLimit:s,preferredLimitOptions:D,enabled:!!(p!=null&&p.id)&&!!h}),[le,V]=F([]),[Z,me]=F(!1),Ne=C((ve,Fe)=>{V(ve),me(Fe)},[]),{categoriesFilter:fe,currenciesFilter:Ce,statusesFilter:ae}=hv({filters:I,updateFilters:L},le);G(()=>{V(void 0),L({[re.BALANCE_ACCOUNT]:p==null?void 0:p.id,[re.CURRENCIES]:void 0})},[L,p==null?void 0:p.id]),G(()=>{_()},[I,_]),G(()=>{ae.updateSelection({target:{value:"Booked",name:"status"}})},[ae]);const Te=Pe(Ie.down.sm),He=!!le&&le.length>1,he=A(()=>({showDetails:a??!0,callback:r}),[a,r]),$e=A(()=>({transaction:he}),[he]),We=C(({records:ve,retrievedData:Fe})=>tl(ve,Fe,(Wt,oa)=>Wt.id===oa.id),[]),De=A(()=>{var ve;return el((ve=l==null?void 0:l.list)==null?void 0:ve.fields,Bc)},[(an=l==null?void 0:l.list)==null?void 0:an.fields]),{customRecords:yt,loadingCustomRecords:bn}=Jc({records:x,hasCustomColumn:De,onDataRetrieve:(Bn=l==null?void 0:l.list)==null?void 0:Bn.onDataRetrieve,mergeCustomData:We}),{updateDetails:on,resetDetails:gr,selectedDetail:_e}=Qc($e),we=C(({id:ve})=>{on({selection:{type:"transaction",data:ve,balanceAccount:p||""},modalSize:"small"}).callback({id:ve})},[p,on]),Le=A(()=>{const ve=new Date(y);return ve.setMonth(ve.getMonth()-_v),ve.toString()},[y]);return o("div",{className:Fp,children:[o(No,{hideTitle:d,titleKey:"transactionsOverviewTitle",children:o(Wi,{...N})}),o(Gi,{...N,children:[o(qi,{activeBalanceAccount:p,balanceAccountSelectionOptions:f,onBalanceAccountSelection:T}),o(Qi,{canResetFilters:R,defaultParams:g,filters:I,nowTimestamp:y,refreshNowTimestamp:_,sinceDate:Le,timezone:p==null?void 0:p.timeZone,updateFilters:L}),o(ii,{...fe,placeholder:u.get("filterPlaceholder.category")}),o(fv,{availableCurrencies:le,selectedCurrencies:Gn(I[re.CURRENCIES]),name:"range",label:u.get("amount"),minAmount:I[re.MIN_AMOUNT],maxAmount:I[re.MAX_AMOUNT],updateFilters:L,onChange:L}),o(ii,{...Ce,placeholder:u.get("filterPlaceholder.currency")})]}),o("div",{className:Mp,children:[o("div",{className:Nd,children:o(lv,{availableCurrencies:le,isAvailableCurrenciesFetching:Z,balanceAccountId:p==null?void 0:p.id,statuses:ae.selection,categories:fe.selection,createdUntil:I[re.CREATED_UNTIL],createdSince:I[re.CREATED_SINCE],currencies:Ce.selection,minAmount:I[re.MIN_AMOUNT]?parseFloat(I[re.MIN_AMOUNT]):void 0,maxAmount:I[re.MAX_AMOUNT]?parseFloat(I[re.MAX_AMOUNT]):void 0,fullWidth:Te})}),o("div",{className:Nd,children:o(uv,{balanceAccountId:p==null?void 0:p.id,onCurrenciesChange:Ne,defaultCurrencyCode:p==null?void 0:p.defaultCurrencyCode,fullWidth:Te})})]}),o(Ep,{dataCustomization:l==null?void 0:l.details,selectedDetail:_e,resetDetails:gr,className:mv,children:o(yT,{activeBalanceAccount:p,availableCurrencies:le,error:b,hasMultipleCurrencies:He,limit:w,limitOptions:H,loading:E||i||!t||bn,onContactSupport:c,onLimitSelection:U,onRowClick:we,showPagination:!0,transactions:(fs=l==null?void 0:l.list)!=null&&fs.onDataRetrieve?yt:x,customColumns:($n=l==null?void 0:l.list)==null?void 0:$n.fields,...ie})})]})},Tv="adyen-pe-transactions-overview-container";function yv({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:s,error:r}=Eo(e.balanceAccountId);return o(Ui,{balanceAccountsError:r,className:Tv,errorMessage:"weCouldNotLoadTheTransactionsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:o(gv,{...e,balanceAccounts:t,isLoadingBalanceAccount:s})})}class xp extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(yv,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(xp,"type","transactions");var jn=(e=>(e.AU="AU",e.EU="EU",e.GB="GB",e.US="US",e.CA="CA",e))(jn||{});const Av=["AU","GB","US","CA"],vv=["EU"],Bp=e=>{var n;const t=(n=e==null?void 0:e.regions)==null?void 0:n.find(s=>s.type==="capital");return(t==null?void 0:t.value)??""},Rv=e=>{switch(e){case jn.EU:return"capital.legalSubtitleEU";default:return null}},Cv=e=>{switch(e){case jn.AU:return"capital.legalSubtitleAU";case jn.GB:return"capital.legalSubtitleGB";case jn.US:return"capital.legalSubtitleUS";case jn.CA:return"capital.legalSubtitleCA";default:return null}},Sv=e=>{const t=Bp(e),n=e==null?void 0:e.countryCode;return Cv(n)??Rv(t)},ol=e=>{const t=Bp(e),n=(e==null?void 0:e.countryCode)??"";return Av.includes(n)||vv.includes(t)},ln={contactSupportForHelp:"contactSupportForHelp",couldNotLoadOffers:"capital.weCouldNotLoadFinancialOffers",tryRefreshingThePage:"tryRefreshingThePageOrComeBackLater",somethingWentWrong:"somethingWentWrong"},Ta={title:ln.somethingWentWrong,message:[ln.couldNotLoadOffers,ln.tryRefreshingThePage],refreshComponent:!0},$p=(e,t)=>{if(!e)return Ta;const n=gh(e,t);if(n)return n;const s=t?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";switch(e.errorCode){case void 0:return{...Ta,...t?{onContactSupport:t}:{}};case"30_016":return{title:ln.somethingWentWrong,message:[ln.couldNotLoadOffers,s],translationValues:{[s]:e.requestId?o(Ut,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_011":return{title:"capital.accountIsInactive",message:[ln.couldNotLoadOffers,s],translationValues:{[s]:e.requestId?o(Ut,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_600":return{title:ln.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",s],translationValues:{[s]:e.requestId?o(Ut,{textToCopy:e.requestId}):null},onContactSupport:t};case"EMPTY_CONFIG":return{title:ln.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",ln.contactSupportForHelp]};case"UNSUPPORTED_REGION":return{title:"capital.unsupportedRegionTitle",message:"capital.unsupportedRegionDescription"};default:return{...Ta,refreshComponent:!0}}},ta=({emptyGrantOffer:e,error:t,onContactSupport:n,onBack:s,unsupportedRegion:r})=>{const{i18n:a}=W(),i=C(()=>o(Q,{children:s&&o(ge,{variant:ne.SECONDARY,onClick:s,children:a.get("back")})}),[a,s]),c=A(()=>r?new ba($r.ERROR,"UnsupportedRegion","Unsupported Region Configuration","UNSUPPORTED_REGION"):e?new ba($r.ERROR,"EmptyConfig","Empty Configuration","EMPTY_CONFIG"):t,[e,r,t]);return o(Jt,{absolutePosition:!1,withImage:!0,onContactSupport:n,renderSecondaryButton:i,outlined:!1,...$p(c,n)})},Dd={base:"adyen-pe-capital-offer",errorContainer:"adyen-pe-capital-offer__error-container"},os=e=>{var s;const t=(s=Ee().extraConfig)==null?void 0:s.legalEntity,n=A(()=>{const r=Sv(t);return r?{subtitleKey:r}:{}},[t]);return o(No,{...e,...n,subtitleConfig:{variant:O.CAPTION,classNames:"adyen-pe-capital-header__subtitle"}})},na=({className:e,el:t="div",children:n})=>o(t,{className:M("adyen-pe-info-box",e),children:n}),Ev=(e,t=0)=>new Date(new Date(e).setUTCHours(0,0,0,0)+Math.floor(t)*qr),Up=e=>ic(Ev(new Date,e)),Nv=e=>e?Math.ceil(e/30):null,Dv=(e,t)=>{let n,s;function r(...a){clearTimeout(n),s=a,n=setTimeout(()=>{e(s),s=void 0},t)}return r.cancel=()=>{n&&(clearTimeout(n),n=void 0,s=void 0)},r},ci=e=>e/100;function bv(e,t,n,s){if(t>=n)return 0;const r=s>0?s:1;if(r>n-t)return 0;const i=(Math.round((e-t)/r)*r+t-t)*100/(n-t);return Number(Dt(0,i,100).toFixed(2))}function Ov(e,t,n){const s=t/2;let r=Math.round(s/n)*n;return r<e?r=e:r>t&&(r=t),r}const Iv=({min:e=0,max:t=100,step:n=1,value:s=e,onChange:r,className:a,...i})=>{const c=A(()=>bv(s,e,t,n),[s,e,t,n]);return o("input",{type:"range",className:M("adyen-pe-slider",a),min:e,max:t,step:n,value:s,onChange:r,style:{backgroundSize:`${c}% 100%`},...i})},Pv=({dynamicOffersConfig:e,value:t=e.minAmount.value,onValueChange:n,onRelease:s,className:r})=>{const a=Rn(),{i18n:i}=W(),c=l=>{const u=Number(l.target.value);n==null||n(u)},d=l=>{const u=Number(l.target.value);s==null||s(u)};return o("div",{className:M("adyen-pe-capital-slider",r),children:[o("label",{htmlFor:a,className:"adyen-pe-capital-slider__label",children:o(P,{variant:O.BODY,stronger:!0,children:i.get("capital.howMuchMoneyDoYouNeed")})}),o("div",{children:[o("output",{htmlFor:a,className:"adyen-pe-capital-slider__value","aria-live":"polite",children:o(P,{variant:O.TITLE,strongest:!0,children:i.amount(t,e.minAmount.currency,{maximumFractionDigits:0})})}),o(Iv,{id:a,value:t,min:e.minAmount.value,max:e.maxAmount.value,step:e.step,onChange:c,onMouseUp:d,onTouchEnd:d,onKeyUp:d,className:"adyen-pe-capital-slider__input"})]}),o("div",{className:"adyen-pe-capital-slider__labels",children:[o("label",{children:[o(P,{variant:O.CAPTION,children:i.get("min")}),o(P,{variant:O.BODY,children:i.amount(e.minAmount.value,e.minAmount.currency,{maximumFractionDigits:0})})]}),o("label",{children:[o(P,{variant:O.CAPTION,children:i.get("max")}),o(P,{variant:O.BODY,children:i.amount(e.maxAmount.value,e.maxAmount.currency,{maximumFractionDigits:0})})]})]})]})},li=30,kv=()=>o("div",{className:"adyen-pe-capital-offer-selection__loading-container",children:[...Array(4)].map((e,t)=>o("div",{className:"adyen-pe-capital-offer-selection__loading-skeleton"},t))}),wv=({data:e})=>{const{i18n:t}=W(),n=A(()=>{const s=e.expectedRepaymentPeriodDays&&Up(e.expectedRepaymentPeriodDays);return s?t.date(s,{month:"long"}):null},[e,t]);return o("div",{className:"adyen-pe-capital-offer-selection__information",children:[o(P,{el:J.SPAN,variant:O.BODY,wide:!0,children:n&&t.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:t.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:li,date:n}})}),o(Tn,{renderValue:s=>o(P,{el:J.SPAN,stronger:!0,variant:O.CAPTION,children:s}),renderLabel:s=>o(P,{el:J.SPAN,variant:O.CAPTION,children:s}),items:[{key:"capital.fees",value:t.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.dailyRepaymentRate",value:`${t.get("capital.xPercent",{values:{percentage:ci(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})}]})]})},Lv=({dynamicOffersConfig:e,dynamicOffersConfigError:t,emptyGrantOffer:n,onContactSupport:s,onOfferDismiss:r,onOfferSelect:a,requestedAmount:i})=>{const{i18n:c}=W(),d=A(()=>{if(e)return Ov(e.minAmount.value,e.maxAmount.value,e.step)},[e]),[l,u]=F(void 0),h=A(()=>e==null?void 0:e.minAmount.currency,[e==null?void 0:e.minAmount.currency]),{createGrantOffer:p,getDynamicGrantOffer:f}=Ee().endpoints,T=lr({queryFn:f,options:{retry:1,shouldRetry:C(E=>E.status===500,[]),onSettled:C(()=>{N(!1)},[])}}),g=lr({queryFn:p,options:{onSuccess:E=>a(E)}}),y=C(()=>{var E,I;g.mutate({body:{amount:((E=T.data)==null?void 0:E.grantAmount.value)||l,currency:((I=T.data)==null?void 0:I.grantAmount.currency)||h},contentType:"application/json"})},[h,T.data,l,g]),_=C(E=>T.mutate({},{query:{amount:E,currency:h}}),[h,T]),[v,N]=F(!1),S=Dv(_,300),D=C(E=>{S.cancel(),N(!0),u(E)},[S]),R=E=>S(E);G(()=>{e&&!T.data&&!l&&(u(E=>E||(i?Number(i):d||e.minAmount.value)),_(l||d||e.minAmount.value))},[e,T.data,_,d,i,l]);const b=A(()=>g.isLoading||T.isLoading||v,[T.isLoading,v,g.isLoading]);return o("div",{className:"adyen-pe-capital-offer-selection",children:g.error||T.error||n||t?o(ta,{error:g.error||T.error||t,onBack:r,onContactSupport:s,emptyGrantOffer:n}):o(Q,{children:[e&&o(Pv,{value:l,dynamicOffersConfig:e,onValueChange:D,onRelease:R}),o(na,{className:"adyen-pe-capital-offer-selection__details",children:!T.data||T.isLoading||v?o(kv,{}):T.data?o(wv,{data:T.data}):null}),o("div",{className:"adyen-pe-capital-offer-selection__buttons",children:[r&&o(ge,{variant:ne.SECONDARY,onClick:r,children:c.get("back")}),o(ge,{variant:ne.PRIMARY,state:b?"loading":void 0,onClick:y,disabled:g.isLoading||!(e!=null&&e.minAmount),children:c.get(b?"loading":"capital.reviewOffer")})]})]})})},Fv=(e,t)=>{const{variant:n=ne.PRIMARY,disabled:s=!1,onClick:r,classNameModifiers:a=[],className:i}=e,c=A(()=>ns("",i)||"",[i]),d=A(()=>Oi(s),[s]),{click:l,allChildren:u,allProps:h}=Ii(c,[...a,n],`${_t} ${T1}`,d,e,r),p=A(()=>({...h,...e.onClick&&l?{onClick:l}:{}}),[l,h,e.onClick]);return o("a",{...p,href:e.href,ref:t,children:u})},Mv=Je(Fv),bd=e=>ee(e)?e:()=>e,hr=({count:e,defaultFill:t,fills:n,translationKey:s})=>{const{i18n:r}=W(),a=A(()=>{const i=bd(t);return n!==void 0?(...c)=>{const[d,l]=c;for(const u of[d,l]){const h=bd(n[u])(...c);if(h!=null)return h}return i(...c)}:i},[n,t]);return A(()=>{const i=[],c=Rn("translation"),d=(...h)=>(i.push(a(...h)??null),c),[l,...u]=r.get(s,{count:e,values:d}).split(c);return o(Q,{children:[l,u.map((h,p)=>o(Q,{children:[i[p],h]},`${c}__${p}`))]})},[r,e,a,s])},Od="capital-support@adyen.com",xv=()=>{var t,n,s;return((s=(n=(t=Ee())==null?void 0:t.extraConfig)==null?void 0:n.legalEntity)==null?void 0:s.countryCode)===jn.US?o(Pr,{filled:!0,noOutline:!0,children:[o(P,{variant:O.CAPTION,className:"adyen-pe-capital-offer-legal-notice--title",children:o(hr,{translationKey:"capital.offerLegalNoticeTitleUS",fills:{break:o("br",{})}})}),o("br",{}),o(P,{variant:O.CAPTION,className:"adyen-pe-capital-offer-legal-notice--description",children:o(hr,{translationKey:"capital.offerLegalNoticeDescriptionUS",fills:{email:o(Mv,{href:`mailto:${Od}`,variant:ne.TERTIARY,className:"adyen-pe-capital-offer-summary__info--email",children:Od}),break:o(Q,{children:[o("br",{}),o("br",{})]})}})})]}):null},Bv=["30_013"],$v=({grantOffer:e,onBack:t,onFundsRequest:n,onContactSupport:s})=>{const{i18n:r}=W(),a=A(()=>{const f=Up(e.expectedRepaymentPeriodDays);return f?r.date(f,{month:"long"}):null},[e,r]),{requestFunds:i}=Ee().endpoints,c=lr({queryFn:i,options:{onSuccess:f=>n==null?void 0:n(f)}}),d=C(f=>{c.mutate(z,{path:{grantOfferId:f}})},[c]),l=C(()=>{e.id&&d(e.id)},[e.id,d]),u=A(()=>Nv(e.maximumRepaymentPeriodDays),[e.maximumRepaymentPeriodDays]),h=A(()=>{const f=c.error?c.error:null;if(f&&Bv.includes(f.errorCode))switch(f.errorCode){case"30_013":return{title:r.get("capital.thereIsNoPrimaryAccountConfigured"),message:r.get("capital.weCouldNotContinueWithTheOfferContactSupportForHelp"),errorCode:"30_013"};default:return{title:r.get("somethingWentWrong"),message:r.get("capital.weCouldNotLoadFinancialOffers")}}return null},[r,c.error]),p=A(()=>{const f=[{key:"capital.fees",value:r.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.totalRepaymentAmount",value:r.amount(e.totalAmount.value,e.totalAmount.currency)},{key:"capital.repaymentThreshold",value:r.amount(e.thresholdAmount.value,e.thresholdAmount.currency)},{key:"capital.dailyRepaymentRate",value:r.get("capital.xPercent",{values:{percentage:ci(e.repaymentRate)}})},{key:"capital.expectedRepaymentPeriod",value:r.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})},{key:"account",value:r.get("capital.primaryAccount")}];return u&&f.splice(4,0,{key:"capital.maximumRepaymentPeriod",value:u===1?r.get("capital.oneMonth"):r.get("capital.xMonths",{values:{months:u}})}),e.aprBasisPoints&&f.splice(1,0,{key:"capital.annualPercentageRate",value:r.get("capital.xPercent",{values:{percentage:ci(e.aprBasisPoints)}})}),f},[e,r,u]);return!h&&c.error?o(ta,{error:c.error,onBack:t,onContactSupport:s}):o("div",{className:"adyen-pe-capital-offer-summary",children:[o(na,{className:"adyen-pe-capital-offer-summary__grant-summary",children:[o(P,{el:J.PARAGRAPH,variant:O.BODY,children:[r.get("capital.youAreRequestingFundingOf")," ",o("strong",{children:`${r.amount(e.grantAmount.value,e.grantAmount.currency,{minimumFractionDigits:0})}.`})]}),o(P,{el:J.PARAGRAPH,variant:O.CAPTION,children:r.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:r.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:li,date:a??""}})})]}),o(Tn,{classNames:"adyen-pe-capital-offer-summary__details",renderLabel:(f,T)=>T==="capital.repaymentThreshold"?o(Cn,{isContainerHovered:!0,content:r.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:li}}),children:o("span",{children:o(P,{className:"adyen-pe-capital-offer-summary__list-label",el:J.SPAN,variant:O.CAPTION,children:f})})}):T==="capital.annualPercentageRate"?o(Cn,{isContainerHovered:!0,content:r.get("capital.annualPercentageRateIsTheCostOfBorrowingForALoan"),children:o("span",{children:o(P,{className:"adyen-pe-capital-offer-summary__list-label",el:J.SPAN,variant:O.CAPTION,children:f})})}):o(P,{className:"adyen-pe-capital-offer-summary__list-label",el:J.SPAN,variant:O.CAPTION,children:f}),renderValue:(f,T)=>{const g=T==="account"&&c.error&&h&&h.errorCode==="30_013";return o(P,{className:M({"adyen-pe-capital-offer-summary__details--error":g}),el:J.SPAN,variant:O.CAPTION,stronger:!0,children:[g?o(Re,{name:"warning-filled","data-testid":"primary-account-warning-icon"}):null,f]})},items:p}),h&&o(st,{className:"adyen-pe-capital-offer-summary__error-alert",type:Oe.WARNING,title:h.title,description:h.message,children:s?o(ge,{className:"adyen-pe-capital-offer-summary__error-alert-button",onClick:s,children:r.get("contactSupport")}):null}),o(xv,{}),o("div",{className:"adyen-pe-capital-offer-summary__buttons",children:[c.error&&!h?null:o(ge,{variant:ne.SECONDARY,onClick:t,children:r.get("back")}),o(ge,{variant:ne.PRIMARY,state:c.isLoading?"loading":void 0,onClick:l,disabled:c.isLoading||!!c.error||!!c.data,children:r.get(c.isLoading?"capital.requesting":"capital.requestFunds")})]})]})},il=({externalDynamicOffersConfig:e,hideTitle:t,onContactSupport:n,onFundsRequest:s,onOfferDismiss:r,onOfferSelect:a})=>{var D,R;const{getDynamicGrantOffersConfiguration:i}=Ee().endpoints,c=(R=(D=Ee())==null?void 0:D.extraConfig)==null?void 0:R.legalEntity,d=A(()=>ol(c),[c]),[l,u]=F(!1),h=C(b=>{u(!b)},[]),{data:p,error:f}=gt({fetchOptions:{enabled:!e&&!!i&&d,onSuccess:h},queryFn:C(async()=>i==null?void 0:i(z),[i])}),T=e||p,[g,y]=F(),[_,v]=F(),N=C(b=>{a?a(b):(v(b==null?void 0:b.grantAmount.value),y(b))},[a]),S=A(()=>g?"OfferSummary":"OfferSelection",[g]);return d?o("div",{className:Dd.base,children:[o(os,{hasDivider:!0,hideTitle:t,titleKey:S==="OfferSummary"?"capital.businessFinancingSummary":"capital.businessFinancingOffer"}),S==="OfferSelection"&&o(Lv,{requestedAmount:_,dynamicOffersConfig:T,dynamicOffersConfigError:f,onOfferDismiss:r,onOfferSelect:N,emptyGrantOffer:l,onContactSupport:n}),S==="OfferSummary"&&o($v,{grantOffer:g,onBack:()=>y(void 0),onFundsRequest:s,onContactSupport:n})]}):o("div",{className:Dd.errorContainer,children:[o(os,{hideTitle:t,titleKey:"capital.businessFinancing"}),o(ta,{unsupportedRegion:!0})]})};class Hp extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(il,{...this.props}));this.componentToRender=this.componentToRender.bind(this),this.customClassNames="adyen-pe-capital-offer-component"}}Y(Hp,"type","capitalOffer");const Uv=(e=1e3,t=!1)=>{const[n,s]=F(t),r=q(),a=q(),i=C(()=>{n||(a.current=setTimeout(()=>{r.current=requestAnimationFrame(()=>s(!1))},e),s(!0))},[n,e]);return G(()=>()=>{cancelAnimationFrame(r.current),clearTimeout(a.current),r.current=a.current=null},[e]),{freeze:i,frozen:n}},Id=({...e})=>o("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o("path",{d:"M8.25 0.25V8.18957L10.5001 5.93945L11.5608 7.00011L7.50011 11.0608L3.43945 7.00011L4.50011 5.93945L6.75 8.18934V0.25H8.25Z",fill:"currentColor"}),o("path",{d:"M2.25 11.5V9.25H0.75V11.5C0.75 12.0967 0.987053 12.669 1.40901 13.091C1.83097 13.5129 2.40326 13.75 3 13.75H12C12.5967 13.75 13.169 13.5129 13.591 13.091C14.0129 12.669 14.25 12.0967 14.25 11.5V9.25H12.75V11.5C12.75 11.6989 12.671 11.8897 12.5303 12.0303C12.3897 12.171 12.1989 12.25 12 12.25H3C2.80109 12.25 2.61032 12.171 2.46967 12.0303C2.32902 11.8897 2.25 11.6989 2.25 11.5Z",fill:"currentColor"})]}),Hv=(e,t,n)=>{const s=Ee().endpoints[e];return gt({fetchOptions:{enabled:!!s&&n,keepPrevData:!0},queryFn:async()=>s(z,{...t})})};function Wv({blob:e,filename:t}){const n=document.createElement("a"),s=URL.createObjectURL(e);n.href=s,n.download=t||"download";const r=()=>{setTimeout(()=>{URL.revokeObjectURL(s)},150)};n.addEventListener("click",r,{once:!0}),n.click()}function Wp({className:e,disabled:t,endpointName:n,requestParams:s,setError:r,errorDisplay:a,onDownloadRequested:i,iconButton:c=!1,errorMessage:d}){const{i18n:l}=W(),[u,h]=F(!1),p=Pe(Ie.down.xs),{data:f,error:T,isFetching:g}=Hv(n,s,u);G(()=>{u&&h(!1)},[u]),G(()=>{f&&Wv(f)},[f]),G(()=>{r&&T&&r(T)},[T,r]);const y=()=>{h(!0),i==null||i()},_=A(()=>g?o(xa,{size:"small"}):o(Id,{}),[g]),v=A(()=>c?_:g?`${l.get("downloading")}..`:l.get("download"),[_,l,g,c]);return o(Q,{children:[o("div",{className:M("adyen-pe-download",{"adyen-pe-download-icon-button-container":c}),children:[p?o(ge,{iconButton:!0,variant:ne.TERTIARY,onClick:y,children:g?o(xa,{size:"small"}):o(Id,{})}):o(ge,{className:M("adyen-pe-download__button",{"adyen-pe-download__button--loading":g,"adyen-pe-download__button--icon":c},e),disabled:t||g,variant:c?ne.TERTIARY:ne.SECONDARY,onClick:y,...!c&&{iconLeft:_},children:v}),T&&a&&o("div",{className:"adyen-pe-download__error",children:a})]}),T&&d&&d(T)]})}const Gv=({...e})=>o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{d:"M8.75 4.58008H7.25V9.08008H8.75V4.58008Z",fill:"currentColor"}),o("path",{d:"M8.71 10.6201C8.57 10.4801 8.39 10.3801 8.2 10.3501C8.01 10.3101 7.8 10.3301 7.62 10.4101C7.44 10.4901 7.28 10.6101 7.17 10.7801C7.06 10.9401 7 11.1401 7 11.3401C7 11.6101 7.11 11.8601 7.29 12.0501C7.48 12.2401 7.73 12.3401 8 12.3401C8.2 12.3401 8.39 12.2801 8.56 12.1701C8.72 12.0601 8.85 11.9001 8.93 11.7201C9.01 11.5401 9.03 11.3401 8.99 11.1401C8.95 10.9501 8.86 10.7701 8.72 10.6301L8.71 10.6201Z",fill:"currentColor"}),o("path",{d:"M9.9501 2.21008L15.3501 11.5301V11.5201C15.5501 11.8601 15.6501 12.2501 15.6501 12.6501C15.6501 13.0501 15.5501 13.4401 15.3501 13.7801C15.1501 14.1201 14.8601 14.4001 14.5201 14.6001C14.1801 14.8001 13.7901 14.9001 13.4001 14.9001H2.6001C2.2001 14.9001 1.8101 14.8001 1.4701 14.6001C1.1301 14.4101 0.850097 14.1201 0.650097 13.7801C0.450097 13.4501 0.350098 13.0601 0.350098 12.6601C0.350098 12.2601 0.450097 11.8701 0.650097 11.5301L6.0601 2.20008C6.2501 1.86008 6.5401 1.58008 6.8801 1.38008C7.5601 0.980078 8.4401 0.980078 9.1301 1.38008C9.4701 1.58008 9.7501 1.87008 9.9501 2.21008ZM13.7701 13.3001C13.8901 13.2401 13.9801 13.1401 14.0501 13.0301L14.0601 13.0401C14.1301 12.9201 14.1601 12.7901 14.1601 12.6601C14.1601 12.5301 14.1301 12.4001 14.0601 12.2901L8.6601 2.96008C8.5901 2.84008 8.5001 2.74008 8.3801 2.68008C8.2601 2.62008 8.1401 2.58008 8.0001 2.58008C7.8601 2.58008 7.7301 2.61008 7.6201 2.68008C7.5101 2.74008 7.4201 2.84008 7.3501 2.95008L1.9501 12.2901C1.8801 12.4001 1.8501 12.5301 1.8501 12.6601C1.8501 12.7901 1.8801 12.9201 1.9501 13.0301C2.0101 13.1401 2.1101 13.2401 2.2201 13.3001C2.3401 13.3601 2.4701 13.4001 2.6001 13.4001H13.3901C13.5301 13.4001 13.6601 13.3701 13.7701 13.3001Z",fill:"currentColor"})]}),Yv=1e3,Gp="adyen-pe-reports-table",Yp=`${Gp}-date-report-type`,qv=`${Yp}--date`,qp=["createdAt","dateAndReportType","reportType","reportFile"],jv=({error:e,loading:t,balanceAccountId:n,onContactSupport:s,showPagination:r,data:a,customColumns:i,...c})=>{const{i18n:d}=W(),{dateFormat:l}=kt("UTC"),{freeze:u,frozen:h}=Uv(Yv),[p,f]=F(null),{refreshing:T}=Ee(),g=A(()=>t||T,[t,T]),y=Pe(Ie.up.sm),_=Pe(Ie.down.xs),v=xi({fields:qp,customColumns:i,columnConfig:A(()=>({dateAndReportType:{visible:_},createdAt:{visible:y},reportType:{visible:y},reportFile:{visible:!0,position:_?"right":void 0}}),[y,_])}),N=C(()=>{f(null)},[]),S={title:"noReportsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},D=A(()=>()=>o(Fi,{error:e,errorMessage:"weCouldNotLoadYourReports",onContactSupport:s}),[e,s]),R=A(()=>o(Gv,{}),[]),b=A(()=>E=>{const I={};switch(E==null?void 0:E.errorCode){case"999_429_001":I.title=d.get("error.somethingWentWrongWithDownload"),I.description=d.get("reportsError.tooManyDownloads");break;case"00_500":default:I.title=d.get("error.somethingWentWrongWithDownload"),I.description=d.get("error.pleaseTryAgainLater");break}f(I)},[d]);return t&&f(null),o("div",{className:Gp,children:[p&&o(st,{onClose:N,type:Oe.WARNING,className:"adyen-pe-reports-table-alert",...p}),o(nn,{errorDisplay:D,error:e,columns:v,data:a,loading:g,outline:!1,emptyTableMessage:S,customCells:{createdAt:({value:E})=>E?E&&o(P,{variant:O.BODY,children:l(E,$l)}):null,dateAndReportType:({item:E})=>o("div",{className:Yp,children:[o(P,{variant:O.BODY,stronger:!0,children:d.get(`reportType.${E==null?void 0:E.type}`)}),o(P,{className:qv,variant:O.BODY,children:l(E.createdAt,$l)})]}),reportType:({item:E})=>(E==null?void 0:E.type)&&o(P,{variant:O.BODY,children:d.get(`reportType.${E==null?void 0:E.type}`)}),reportFile:({item:E})=>{const I={query:{balanceAccountId:n,createdAt:E.createdAt,type:E.type}};return o(Wp,{className:"adyen-pe-reports-table--download",endpointName:"downloadReport",disabled:h,requestParams:I,onDownloadRequested:u,setError:b,errorDisplay:R})}},children:r&&o(nn.Footer,{children:o(Mi,{...c})})})]})},Vv="adyen-pe-reports-overview",zv=new Date("2024-04-16T00:00:00.000Z").toString(),Xv=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n=!0,preferredLimit:s=ur,isLoadingBalanceAccount:r,onContactSupport:a,hideTitle:i,dataCustomization:c})=>{var V,Z,me,Ne;const{getReports:d}=Ee().endpoints,{activeBalanceAccount:l,balanceAccountSelectionOptions:u,onBalanceAccountSelection:h}=Yi(t),{defaultParams:p,nowTimestamp:f,refreshNowTimestamp:T}=Ji("reports",l),g=C(async(fe,Ce)=>d({signal:Ce,errorLevel:"error"},{query:{...fe,type:"payout",createdSince:fe[re.CREATED_SINCE]??p.current.defaultFilterParams[re.CREATED_SINCE],createdUntil:fe[re.CREATED_UNTIL]??p.current.defaultFilterParams[re.CREATED_UNTIL],balanceAccountId:(l==null?void 0:l.id)??""}}),[l==null?void 0:l.id,p,d]),y=Hi(),_=A(()=>ee(e)?e:void 0,[e]),v=A(()=>n?ji:void 0,[n]),{canResetFilters:N,error:S,fetching:D,filters:R,limit:b,limitOptions:E,records:I,resetFilters:w,updateFilters:H,updateLimit:x,...j}=Vi({fetchRecords:g,dataField:"data",filterParams:p.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:_,preferredLimit:s,preferredLimitOptions:v,enabled:!!(l!=null&&l.id)&&!!d}),L=C(({records:fe,retrievedData:Ce})=>tl(fe,Ce,(ae,Te)=>ae.createdAt===Te.createdAt),[]),U=A(()=>{var fe;return el((fe=c==null?void 0:c.list)==null?void 0:fe.fields,qp)},[(V=c==null?void 0:c.list)==null?void 0:V.fields]),{customRecords:ie,loadingCustomRecords:le}=Jc({records:I,hasCustomColumn:U,onDataRetrieve:(Z=c==null?void 0:c.list)==null?void 0:Z.onDataRetrieve,mergeCustomData:L});return G(()=>{T()},[R,T]),o("div",{className:Vv,children:[o(No,{hideTitle:i,titleKey:"reportsTitle",subtitleKey:"reportsNotice",children:o(Wi,{...y})}),o(Gi,{...y,children:[o(qi,{activeBalanceAccount:l,balanceAccountSelectionOptions:u,onBalanceAccountSelection:h}),o(Qi,{canResetFilters:N,defaultParams:p,filters:R,nowTimestamp:f,refreshNowTimestamp:T,sinceDate:zv,timezone:"UTC",updateFilters:H})]}),o(jv,{balanceAccountId:l==null?void 0:l.id,loading:D||r||!t||!l||le,data:(me=c==null?void 0:c.list)!=null&&me.onDataRetrieve?ie:I,showPagination:!0,limit:b,limitOptions:E,onContactSupport:a,onLimitSelection:x,error:S,customColumns:(Ne=c==null?void 0:c.list)==null?void 0:Ne.fields,...j})]})},Kv="adyen-pe-reports-overview-container";function Zv({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:s,error:r}=Eo(e.balanceAccountId);return o(Ui,{balanceAccountsError:r,className:Kv,errorMessage:"weCouldNotLoadTheReportsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:o(Xv,{...e,balanceAccounts:t,isLoadingBalanceAccount:s})})}class jp extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(Zv,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>{this.componentRef=n}}));this.componentToRender=this.componentToRender.bind(this)}}Y(jp,"type","reports");const In={base:"adyen-pe-capital-overview",skeleton:"adyen-pe-capital-overview__skeleton",headerSkeleton:"adyen-pe-capital-overview__header-skeleton",skeletonContainer:"adyen-pe-capital-overview__header-skeleton-container",preQualifiedGrant:"adyen-pe-capital-overview__pre-qualified-grant",preQualifiedGrantButton:"adyen-pe-capital-overview__pre-qualified-grant-review-button",errorContainer:"adyen-pe-capital-overview__error-container"},Qv="data:image/svg+xml,%3csvg%20width='254'%20height='132'%20viewBox='0%200%20254%20132'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M68.0772%2069.5256C68.0287%2069.3932%2066.6957%2058.4056%2066.6957%2058.4056C66.576%2057.682%2064.6702%2055.0296%2064.4049%2054.5676L53.5013%2036.8958C52.618%2035.639%2051.1199%2036.0946%2050.4728%2036.6244C49.9325%2037.0379%2049.4601%2037.7293%2050.3272%2039.3769C51.7832%2042.1489%2057.4842%2052.9393%2057.4842%2052.9393L55.7144%2056.3348L52.7927%2058.9872C52.9836%2059.3231%2048.6124%2058.4993%2048.6124%2058.4993C48.4798%2058.3313%2050.9776%2071.0117%2057.4421%2074.7529C57.4421%2074.7529%2065.2591%2087.724%2065.0294%2087.8274L73.1635%2078.8397L68.0772%2069.5289V69.5256Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M51.534%2055.2108C51.534%2055.2108%2047.6805%2054.975%2048.6155%2058.4932C49.5506%2062.0146%2053.6079%2068.3984%2055.4069%2066.838C57.2058%2065.2776%2053.2844%2059.5238%2053.2844%2059.5238'%20fill='%23B34B36'/%3e%3cpath%20d='M51.534%2055.2108C51.534%2055.2108%2047.6805%2054.975%2048.6155%2058.4932C49.5506%2062.0146%2053.6079%2068.3984%2055.4069%2066.838C57.2058%2065.2776%2053.2844%2059.5238%2053.2844%2059.5238'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M53.6048%2052.245C53.6048%2052.245%2049.7513%2052.0092%2050.6863%2055.5274C51.6214%2059.0488%2055.6787%2065.4326%2057.4777%2063.8722C59.2766%2062.3118%2055.3552%2056.558%2055.3552%2056.558'%20fill='%23B34B36'/%3e%3cpath%20d='M53.6048%2052.245C53.6048%2052.245%2049.7513%2052.0092%2050.6863%2055.5274C51.6214%2059.0488%2055.6787%2065.4326%2057.4777%2063.8722C59.2766%2062.3118%2055.3552%2056.558%2055.3552%2056.558'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M56.1903%2050.5459C56.1903%2050.5459%2051.8191%2049.0404%2052.7542%2052.5619C53.6893%2056.0833%2057.7466%2062.4671%2059.5455%2060.9067C61.3445%2059.3463%2056.1903%2050.5459%2056.1903%2050.5459Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M66.6955%2058.4029C66.6955%2058.4029%2065.5081%2049.147%2063.7253%2048.0615C61.9425%2046.9759%2057.8852%2043.3641%2056.8142%2044.091C55.7433%2044.8146%2056.1186%2046.4849%2056.8369%2047.4024C57.5552%2048.3199%2061.2469%2051.8381%2061.2469%2051.8381C61.2469%2051.8381%2056.3677%2059.3365%2058.872%2064.8481'%20fill='%23B34B36'/%3e%3cpath%20d='M66.6955%2058.4029C66.6955%2058.4029%2065.5081%2049.147%2063.7253%2048.0615C61.9425%2046.9759%2057.8852%2043.3641%2056.8142%2044.091C55.7433%2044.8146%2056.1186%2046.4849%2056.8369%2047.4024C57.5552%2048.3199%2061.2469%2051.8381%2061.2469%2051.8381C61.2469%2051.8381%2056.3677%2059.3365%2058.872%2064.8481'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.833%2023.1365C116.105%2020.3161%20116.157%2017.247%20116.856%2014.7691C116.862%2014.7432%20116.869%2014.7206%20116.879%2014.6948C117.869%2011.3155%20121.479%209.48044%20124.89%2010.3721C127.465%2011.0473%20130.222%2011.1572%20132.907%2011.1442C136.748%2011.1281%20140.66%2010.9116%20144.364%2011.9261C148.069%2012.9373%20150.829%2014.5397%20151.867%2018.2291C163.078%2023.0557%20156.41%2033.3325%20156.41%2033.3325L150.822%2042.3364L127.381%2038.8182C121.855%2038.1236%20117.882%2033.171%20118.406%2027.6368L118.833%2023.1365Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M123.178%2023.6825C121.062%2022.3709%20120.467%2019.2629%20121.677%2017.0887C122.887%2014.9145%20125.56%2013.774%20128.035%2014.0389C129.484%2014.194%20130.853%2014.7658%20132.257%2015.1568C133.661%2015.5477%20135.205%2015.7512%20136.551%2015.1858C137.893%2014.6205%20138.903%2013.0633%20138.424%2011.687'%20stroke='%2385DFA9'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M150.725%2040.7211C150.783%2039.2382%20152.158%2037.9847%20153.64%2037.8813C155.122%2037.778%20156.574%2038.7116%20157.273%2040.0201C157.972%2041.3285%20157.975%2042.9438%20157.474%2044.3395C157.115%2045.3377%20156.487%2046.265%20155.594%2046.84C154.384%2047.6154%20152.792%2047.6541%20151.449%2047.1405C150.107%2046.6268%20149.003%2045.6091%20148.172%2044.4396'%20fill='%23B34B36'/%3e%3cpath%20d='M150.725%2040.7211C150.783%2039.2382%20152.158%2037.9847%20153.64%2037.8813C155.122%2037.778%20156.574%2038.7116%20157.273%2040.0201C157.972%2041.3285%20157.975%2042.9438%20157.474%2044.3395C157.115%2045.3377%20156.487%2046.265%20155.594%2046.84C154.384%2047.6154%20152.792%2047.6541%20151.449%2047.1405C150.107%2046.6268%20149.003%2045.6091%20148.172%2044.4396'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M120.641%2036.9443C120.951%2035.4937%20119.932%2033.9365%20118.521%2033.4713C117.111%2033.0061%20115.474%2033.5489%20114.471%2034.6441C113.468%2035.7393%20113.066%2037.3029%20113.205%2038.7793C113.306%2039.8358%20113.684%2040.889%20114.406%2041.6643C115.386%2042.7143%20116.92%2043.1472%20118.347%2042.9792C119.774%2042.8112%20121.097%2042.1005%20122.194%2041.1733'%20fill='%23B34B36'/%3e%3cpath%20d='M120.641%2036.9443C120.951%2035.4937%20119.932%2033.9365%20118.521%2033.4713C117.111%2033.0061%20115.474%2033.5489%20114.471%2034.6441C113.468%2035.7393%20113.066%2037.3029%20113.205%2038.7793C113.306%2039.8358%20113.684%2040.889%20114.406%2041.6643C115.386%2042.7143%20116.92%2043.1472%20118.347%2042.9792C119.774%2042.8112%20121.097%2042.1005%20122.194%2041.1733'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M153.317%2064.6669H152.567C148.937%2064.6669%20145.995%2061.727%20145.995%2058.1054V49.3535H125.097V58.1054C125.097%2061.7302%20122.153%2064.6669%20118.526%2064.6669H117.775L135.516%2080.7977L153.324%2064.6669H153.317Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.293%2043.2381L122.273%2052.6361C122.668%2053.5666%20121.982%2054.5971%20120.972%2054.5971H113.013C112%2054.5971%20111.317%2053.5666%20111.712%2052.6361L115.692%2043.2381C116.177%2042.088%20117.808%2042.088%20118.296%2043.2381H118.293Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M155.138%2047.7447L159.535%2056.9553C159.972%2057.8664%20159.334%2058.926%20158.322%2058.9713L150.372%2059.3266C149.362%2059.3719%20148.631%2058.3736%20148.984%2057.427L152.537%2047.861C152.97%2046.6914%20154.601%2046.6171%20155.138%2047.7447Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.543%2056.5576L125.096%2056.1828V53.0781H145.926V56.1828L145.574%2056.48C143.063%2058.609%20139.918%2059.8658%20136.628%2060.0079C135.741%2060.0467%20134.851%2060.0402%20133.968%2059.9853C130.868%2059.7947%20127.924%2058.5477%20125.543%2056.5543V56.5576Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M147.713%2022.2967C141.423%2025.2624%20134.202%2026.2381%20127.355%2024.9911C126.158%2024.7746%20124.919%2024.4354%20123.777%2023.9379C121.457%2026.923%20119.833%2030.7158%20119.296%2034.9674C117.921%2045.9%20124.24%2055.6954%20133.416%2056.8456C142.588%2057.9957%20151.143%2050.0676%20152.518%2039.135C153.346%2032.567%20151.392%2026.4126%20147.71%2022.2935L147.713%2022.2967Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M119.625%2020.3711C120.754%2022.2158%20122.595%2023.5275%20124.653%2024.2802'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M132.249%2035.6243C132.444%2034.0771%20131.084%2032.6321%20129.212%2032.397C127.34%2032.1618%20125.664%2033.2254%20125.469%2034.7727C125.274%2036.3199%20126.634%2037.7649%20128.506%2038C130.378%2038.2352%20132.054%2037.1716%20132.249%2035.6243Z'%20fill='white'/%3e%3cpath%20d='M130.497%2041.3389C130.497%2041.3389%20128.646%2044.9152%20133.943%2045.5775C139.239%2046.243%20138.084%2042.2887%20138.084%2042.2887'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.459%2034.7669C125.459%2034.7669%20125.812%2031.9659%20129.199%2032.3923C132.587%2032.8188%20132.234%2035.6198%20132.234%2035.6198'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.726%2036.9931C128.968%2036.9931%20129.975%2035.9878%20129.975%2034.7478C129.975%2033.5077%20128.968%2032.5024%20127.726%2032.5024C126.484%2032.5024%20125.478%2033.5077%20125.478%2034.7478C125.478%2035.9878%20126.484%2036.9931%20127.726%2036.9931Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M123.944%2033.5752C123.944%2033.5752%20125.048%2034.9256%20126.161%2034.7609L123.944%2033.5752Z'%20fill='%2300112C'/%3e%3cpath%20d='M123.944%2033.5752C123.944%2033.5752%20125.048%2034.9256%20126.161%2034.7609'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M146.765%2036.4375C146.765%2036.4375%20145.361%2037.4713%20144.325%2037.0384L146.765%2036.4375Z'%20fill='%2300112C'/%3e%3cpath%20d='M146.765%2036.4375C146.765%2036.4375%20145.361%2037.4713%20144.325%2037.0384'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M144.949%2037.2181C145.144%2035.6708%20143.785%2034.2259%20141.912%2033.9907C140.04%2033.7555%20138.364%2034.8192%20138.169%2036.3664C137.974%2037.9137%20139.334%2039.3586%20141.206%2039.5938C143.079%2039.829%20144.754%2038.7653%20144.949%2037.2181Z'%20fill='white'/%3e%3cpath%20d='M138.158%2036.3631C138.158%2036.3631%20138.511%2033.5621%20141.898%2033.9885C145.286%2034.415%20144.933%2037.216%20144.933%2037.216'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M133.784%2046.9853C130.581%2046.5847%20129.06%2048.1031%20129.06%2048.1031C129.06%2048.1031%20128.801%2051.6859%20133.263%2052.2448C137.725%2052.8037%20138.013%2049.3437%20138.013%2049.3437C138.013%2049.3437%20137.223%2047.415%20133.787%2046.982L133.784%2046.9853Z'%20fill='%2389382B'/%3e%3cpath%20d='M128.361%2047.7129C131.526%2049.6093%20135.334%2050.123%20138.89%2049.1344L139.136%2049.0665'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.485%2029.0653C126.695%2028.4838%20128.089%2028.2996%20129.41%2028.5419C130.73%2028.7842%20131.966%2029.453%20132.891%2030.4254'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M145.984%2030.8031C145.114%2029.7854%20143.913%2029.052%20142.606%2028.7419C141.302%2028.4318%20139.898%2028.5448%20138.662%2029.0585'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M140.583%2038.6054C141.825%2038.6054%20142.831%2037.6001%20142.831%2036.3601C142.831%2035.12%20141.825%2034.1147%20140.583%2034.1147C139.341%2034.1147%20138.334%2035.12%20138.334%2036.3601C138.334%2037.6001%20139.341%2038.6054%20140.583%2038.6054Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M154.285%2023.02C154.285%2023.02%20156.686%2025.33%20155.223%2030.8027'%20stroke='%2385DFA9'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M124.708%2064.8447C123.245%2064.1016%20121.679%2063.6009%20120.055%2063.3586C115.723%2062.7124%20107.294%2066.8121%20100.011%2070.9603C89.8645%2076.74%2080.3262%2090.0019%2080.3262%2090.0019L69.607%2069.8328C69.2187%2069.1059%2068.2222%2068.9929%2067.6851%2069.6164C64.3784%2073.4447%2054.9081%2084.5744%2055.1475%2086.2447C55.4355%2088.2671%2067.3033%20128.437%2081.1966%20120.348C95.0899%20112.258%20106.087%20102.718%20106.087%20102.718L107.951%20131.494H138.119C138.119%20131.494%20138.216%2078.9821%20138.216%2077.538C138.216%2076.4137%20128.843%2066.9414%20124.704%2064.8414L124.708%2064.8447Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M152.566%2064.6665L138.217%2077.5408L138.12%20131.496H169.899V104.359L185.84%20131.496H211.297C211.297%20131.496%20193.473%2089.0323%20179.767%2074.2487C172.503%2066.4111%20152.566%2064.6665%20152.566%2064.6665Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9987%201H13.3003V49.1274H15.9987V1Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13%2024.6216L1%2024.6216'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.75'%20d='M80.2651%201.22607H16.0015V49.3535H80.2651V1.22607Z'%20fill='white'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.2651%201H16.0015V49.1274H80.2651V1Z'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.8433%2025.0622C29.8433%2023.8378%2030.8398%2022.8428%2032.0661%2022.8428C33.2923%2022.8428%2034.2889%2023.8378%2034.2889%2025.0622C34.2889%2026.2867%2033.2923%2027.2817%2032.0661%2027.2817C30.8398%2027.2817%2029.8433%2026.2867%2029.8433%2025.0622Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M64.1984%2027.2817C65.426%2027.2817%2066.4212%2026.288%2066.4212%2025.0622C66.4212%2023.8365%2065.426%2022.8428%2064.1984%2022.8428C62.9708%2022.8428%2061.9756%2023.8365%2061.9756%2025.0622C61.9756%2026.288%2062.9708%2027.2817%2064.1984%2027.2817Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M48.1344%2027.2817C49.362%2027.2817%2050.3572%2026.288%2050.3572%2025.0622C50.3572%2023.8365%2049.362%2022.8428%2048.1344%2022.8428C46.9068%2022.8428%2045.9116%2023.8365%2045.9116%2025.0622C45.9116%2026.288%2046.9068%2027.2817%2048.1344%2027.2817Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.75'%20d='M226.125%20106.581V46.6392H181.1V106.581H226.125Z'%20fill='white'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M180.99%2046.6392H178.469V106.581H180.99V46.6392Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M253%2076.6216H226'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M225.866%2046.6392H212.345V60.1402H225.866V46.6392Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M244.779%2027.5757H214.763V57.5467H244.779V27.5757Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M225.499%2043.4868L228.443%2046.4235L236.176%2038.7021'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M220.919%20116.949L216.163%2096.2178L234.832%20106.113L220.919%20116.949Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Jv=({hideTitle:e})=>{const{i18n:t}=W();return o(Q,{children:[o(os,{hideTitle:e,titleKey:"capital.needSomeExtraMoney"}),o("div",{className:"adyen-pe-capital-overview__unqualified-state",children:[o("div",{className:"adyen-pe-capital-overview__unqualified-state-img",children:o("img",{srcSet:Qv,alt:""})}),o(P,{el:J.PARAGRAPH,variant:O.BODY,large:!0,children:t.get("capital.youWillSoonQualifyForAFinancialOffer")})]})]})},eR=({dynamicOfferConfig:e,hideTitle:t,onOfferOptionsRequest:n})=>{const{i18n:s}=W();return o(Q,{children:[o(os,{hideTitle:t,titleKey:"capital.needSomeExtraMoney"}),o("div",{className:In.preQualifiedGrant,children:[o(na,{children:o(P,{variant:O.BODY,children:[s.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1"),o("strong",{children:s.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2",{values:{amount:s.amount(e.maxAmount.value,e.maxAmount.currency,{minimumFractionDigits:0})}})})]})}),o(ge,{className:In.preQualifiedGrantButton,onClick:n,children:s.get("capital.seeOptions")})]})]})},tR=({hideTitle:e,dynamicOffer:t,skipPreQualifiedIntro:n,onOfferOptionsRequest:s,onFundsRequest:r,onOfferDismiss:a})=>{const[i,c]=F(n?"capitalOffer":"intro"),d=C(()=>{s?s():c("capitalOffer")},[s]),l=A(()=>!n||!!a,[a,n]),u=C(()=>{a?a():c("intro")},[a]);return o(Q,{children:i==="intro"?o(eR,{hideTitle:e,dynamicOfferConfig:t,onOfferOptionsRequest:d}):o(il,{onFundsRequest:r,onOfferDismiss:l?u:void 0,externalDynamicOffersConfig:t})})},nR=({max:e=1,value:t,labels:n,tooltips:s,className:r})=>{const a=A(()=>Dt(0,t*100/e,100),[t,e]),i=!!(n!=null&&n.current||n!=null&&n.max),c=(n==null?void 0:n.ariaLabel)??(n!=null&&n.current?`${n.current}: ${t}`:`${t}/${e}`);return o("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,"aria-valuetext":`${a}%`,"aria-label":c,className:M("adyen-pe-progress-bar",r),children:[o("div",{className:"adyen-pe-progress-bar__track",children:[o("div",{className:"adyen-pe-progress-bar__track-background"}),o(Pd,{tooltipContent:s==null?void 0:s.progress,title:n==null?void 0:n.current,percentage:a,className:"adyen-pe-progress-bar__track-fill"}),o(Pd,{tooltipContent:s==null?void 0:s.remaining,title:n==null?void 0:n.max,percentage:100-a,className:"adyen-pe-progress-bar__track-remaining"})]}),i&&o("div",{className:"adyen-pe-progress-bar__legend","aria-hidden":"true",children:[n.current&&o(P,{el:J.SPAN,variant:O.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.current}),n.max&&o(P,{el:J.SPAN,variant:O.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.max})]})]})},Pd=({tooltipContent:e,title:t,percentage:n,className:s})=>{const r=a=>o("div",{className:s,title:a,style:{width:`${n}%`}});return e?o(Cn,{content:e,children:r()}):r(t)},wt={base:"adyen-pe-grant-item",actionsBar:"adyen-pe-grant-item__actions-bar",alert:"adyen-pe-grant-item__alert",cardContent:"adyen-pe-grant-item__card-content",grantID:"adyen-pe-grant-item__grant-id",mainActionBtn:"adyen-pe-grant-item__main-action-button",progressBar:"adyen-pe-grant-item__progress-bar",statusContainer:"adyen-pe-grant-item__status-container",textSecondary:"adyen-pe-grant-item__text--secondary"},sR=e=>e==="Active",rR=e=>e==="Repaid",oR=e=>e==="Active"?"capital.remaining":"capital.requestedFunds",iR=e=>e.status==="Active"?e.remainingTotalAmount:e.grantAmount,aR=({status:e,missingActions:t})=>{switch(e){case"Active":return;case"Failed":return"capital.failed";case"Pending":return t&&t.length?"capital.actionNeeded":"capital.pending";case"Repaid":return"capital.fullyRepaid";case"Revoked":return"capital.revoked";case"WrittenOff":return"capital.writtenOff"}},cR=({status:e,missingActions:t})=>{switch(e){case"Failed":return be.ERROR;case"Pending":return t!=null&&t.length?be.WARNING:be.DEFAULT;case"Repaid":return be.LIGHT;case"Revoked":case"WrittenOff":return be.WARNING;default:return be.DEFAULT}},lR=e=>{const t=new Date,n=new Date;return n.setDate(t.getDate()+e),n},dR=e=>{var n,s;const t=((n=e.missingActions)==null?void 0:n.some(r=>r.type==="signToS"))||!1;switch(e.status){case"Pending":return(s=e.missingActions)!=null&&s.length?t?"capital.signTheTermsToReceiveYourFunds":void 0:"capital.youShouldGetTheFundsWithinOneBusinessDay";case"Failed":return"capital.weCouldNotProcessThisRequestTryAgain";case"WrittenOff":return"capital.youAcceptedTheseFundsButDidNotRepayThem";case"Revoked":return"capital.youAcceptedButThenReturnedTheseFunds";default:return}},Vp=e=>{var s;const t=e.status==="Active",n=e.status==="Pending";return{amount:iR(e),amountLabelKey:oR(e.status),hasAlerts:n,hasDetails:sR(e.status),hasUnscheduledRepaymentDetails:t&&!!((s=e.unscheduledRepaymentAccounts)!=null&&s.length),isAmountColorSecondary:!t,isBackgroundFilled:rR(e.status),isGrantIdVisible:!t,isLabelColorSecondary:t,isProgressBarVisible:t,repaymentPeriodEndDate:lR(e.repaymentPeriodLeft),statusKey:aR(e),statusTagVariant:cR(e),statusTooltipKey:dR(e)}},Ar={base:"adyen-pe-grant-details",content:"adyen-pe-grant-details__content",header:"adyen-pe-grant-details__header",label:"adyen-pe-grant-details__label"},uR=({grant:e})=>{const{i18n:t}=W(),n=C(r=>t.amount(r.value,r.currency),[t]),s=A(()=>{const r=e.maximumRepaymentPeriodDays?Math.ceil(e.maximumRepaymentPeriodDays/30):null,a=[{key:"capital.remainingAmount",value:t.amount(e.remainingGrantAmount.value,e.remainingGrantAmount.currency)},{key:"capital.remainingFees",value:n(e.remainingFeesAmount)},{key:"capital.repaidAmount",value:n(e.repaidGrantAmount)},{key:"capital.repaidFees",value:n(e.repaidFeesAmount)},{key:"capital.dailyRepaymentRate",value:`${t.get("capital.xPercent",{values:{percentage:ci(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.daysAndDaysLeft",{values:{days:e.expectedRepaymentPeriodDays,daysLeft:e.repaymentPeriodLeft}})},{key:"capital.totalFees",value:n(e.feesAmount)},{key:"capital.totalRepaymentAmount",value:n(e.totalAmount)},{key:"capital.repaymentThreshold",value:n(e.thresholdAmount)},{key:"capital.grantID",value:e.id},{key:"accountDescription",value:e.balanceAccountDescription},{key:"accountID",value:e.balanceAccountCode}];return r&&a.splice(5,0,{key:"capital.maximumRepaymentPeriod",value:t.get("capital.xMonths",{values:{months:r}})}),a},[e,n,t]);return o("div",{className:Ar.base,children:o("div",{className:Ar.content,children:[o("div",{className:Ar.header,children:[o(P,{el:J.SPAN,variant:O.BODY,children:t.get("capital.yourRequestedFundsWere")}),o(P,{el:J.SPAN,variant:O.BODY,strongest:!0,children:t.amount(e.grantAmount.value,e.grantAmount.currency)})]}),o(Tn,{renderLabel:(r,a)=>a==="capital.repaymentThreshold"?o(Cn,{isContainerHovered:!0,content:t.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:li}}),children:o("span",{children:o(P,{className:Ar.label,el:J.SPAN,variant:O.CAPTION,children:r})})}):o(P,{className:Ar.label,el:J.SPAN,variant:O.CAPTION,children:r}),renderValue:r=>o(P,{el:J.SPAN,stronger:!0,variant:O.CAPTION,children:r}),items:s})]})})},kd={button:"adyen-pe-grant-action__button"},hR=()=>{var e;return((e=window.top)==null?void 0:e.location.href)||window.location.href},pR=e=>{window.top?window.top.location.href=e:window.location.href=e},fR=({action:e,className:t,offerExpiresAt:n})=>{const{i18n:s,updateCore:r}=W(),{dateFormat:a}=kt(),{signToSActionDetails:i}=Ee().endpoints,[c,d]=F(!1),l=C(async()=>{if(e.type==="signToS")return i==null?void 0:i(z,{query:{redirectUrl:hR(),locale:s.locale}})},[e,s.locale,i]),{data:u,isFetching:h,error:p}=gt({fetchOptions:A(()=>({enabled:!!i&&c}),[i,c]),queryFn:l});return G(()=>{const f=u==null?void 0:u.url;f&&pR(f)},[u,c]),p?o(st,{className:t,type:Oe.CRITICAL,title:s.get("somethingWentWrongTryRefreshingOrComeBackLater"),description:o(ge,{className:kd.button,onClick:r,children:s.get("refresh")})}):o(st,{className:t,type:Oe.WARNING,title:`${s.get("capital.signTermsAndConditionsToReceiveFunds")}${n?` ${s.get("capital.thisOfferExpiresOn",{values:{date:a(n,nh)}})}`:""}`,description:o(ge,{className:kd.button,onClick:()=>d(!0),disabled:h,state:h?"loading":void 0,children:s.get("capital.goToTermsAndConditions")})})},mR=({grant:e,showDetails:t})=>{const{i18n:n}=W(),{dateFormat:s}=kt(),r=A(()=>Vp(e),[e]),a=C(()=>t==null?void 0:t("unscheduledRepayment"),[t]),i=A(()=>{var c,d;return o("div",{className:wt.cardContent,children:[o("div",{className:wt.statusContainer,children:[o(P,{variant:O.CAPTION,className:M({[wt.textSecondary]:r.isLabelColorSecondary}),testId:"grant-amount-label",children:n.get(r.amountLabelKey)}),o("div",{children:e.status==="Active"?o(Q,{children:[o(P,{variant:O.CAPTION,el:J.SPAN,children:n.get("capital.termEnds")}),o(P,{variant:O.CAPTION,stronger:!0,el:J.SPAN,children:s(r.repaymentPeriodEndDate,nh)})]}):r.statusKey?r.statusTooltipKey?o(Cn,{content:n.get(r.statusTooltipKey),children:o("div",{children:o(it,{label:n.get(r.statusKey),variant:r.statusTagVariant})})}):o(it,{label:n.get(r.statusKey),variant:r.statusTagVariant}):null})]}),o(P,{variant:O.TITLE,medium:!0,className:M({[wt.textSecondary]:r.isAmountColorSecondary}),children:n.amount(r.amount.value,r.amount.currency)}),r.isProgressBarVisible&&o(nR,{className:wt.progressBar,value:e.repaidTotalAmount.value,max:e.totalAmount.value,labels:{current:n.get("capital.repaid"),max:n.get("capital.remaining")},tooltips:{remaining:`${n.amount(e.remainingTotalAmount.value,e.remainingTotalAmount.currency)} ${(c=n.get("capital.remaining"))==null?void 0:c.toLowerCase()}`,progress:`${n.amount(e.repaidTotalAmount.value,e.repaidTotalAmount.currency)} ${(d=n.get("capital.repaid"))==null?void 0:d.toLowerCase()}`}}),r.isGrantIdVisible?o("div",{className:wt.grantID,children:o(Ut,{textToCopy:e.id,buttonLabel:n.get("capital.grantID"),isHovered:!0,type:"Text","data-testid":"grant-id-copy-text"})}):null,r.hasAlerts?o(Q,{children:e.missingActions&&e.missingActions.length?e.missingActions.map(l=>o(fR,{action:l,className:wt.alert,offerExpiresAt:e.offerExpiresAt},l.type)):o(st,{className:wt.alert,type:Oe.HIGHLIGHT,title:n.get("capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon")})}):r.hasUnscheduledRepaymentDetails&&o("div",{className:wt.actionsBar,children:o(ge,{onClick:a,className:wt.mainActionBtn,variant:ne.SECONDARY,fullWidth:!0,children:n.get("capital.sendRepayment")})})]})},[n,s,e,r,a]);return o("div",{className:wt.base,children:o(nl,{renderHeader:i,filled:r.isBackgroundFilled,inFlow:!0,children:r.hasDetails&&o(uR,{grant:e})})})},_R={unscheduledRepayment:"unscheduledRepayment"},gR=({className:e,content:t,contentClassName:n,textToCopy:s,label:r,labelClassName:a})=>{const{i18n:i}=W();return o("div",{className:e,children:[o("dt",{className:a,children:o(P,{el:J.SPAN,variant:O.CAPTION,children:i.get(r)})}),o("dd",{className:n,children:s?o(Ut,{buttonLabel:t,textToCopy:s,showCopyTextTooltip:!1,type:"Text"}):o(P,{el:J.SPAN,variant:O.BODY,children:t})})]})},TR=(e,t=!0)=>{const n=t?" ":" ";return e.replace(/\s+/g,"").replace(/([A-Z\d]{4}(?!$))/gi,`$1${n}`)},yR=e=>{switch(e){case"iban":case"accountNumber":case"routingNumber":case"sortCode":return!0;case"region":default:return!1}},AR=(e,t)=>yR(e)?t:void 0,vR=(e,t)=>{switch(e){case"iban":return t&&TR(t);default:return t}},RR=e=>{switch(e){case"region":return"capital.bankCountryOrRegion";case"iban":return"capital.bankAccountIban";case"accountNumber":return"capital.bankAccountNumber";case"routingNumber":return"capital.bankRoutingNumber";case"sortCode":return"capital.bankSortCode";default:return e}},Vo="adyen-pe-capital-account-details",ya={detail:`${Vo}__detail`,detailContent:`${Vo}__detail-content`,detailLabel:`${Vo}__detail-label`},CR=({bankAccount:e,className:t})=>{const n=A(()=>{const{accountNumber:s,iban:r,order:a,region:i,...c}=e,d=Object.keys({iban:r,accountNumber:s,...c,region:i}),l=Array.isArray(a)?a.filter(u=>d.includes(u)):d;return[...new Set(l)]},[e]);return o("dl",{className:M(Vo,t),children:n.map(s=>{const r=e[s];return r?o(Q,{children:o(gR,{className:ya.detail,contentClassName:ya.detailContent,labelClassName:ya.detailLabel,label:RR(s),content:vR(s,r),textToCopy:AR(s,r)})},s):null})})},SR=({children:e,className:t,headerTitleKey:n,headerSubtitleKey:s,onDetailsClose:r})=>{const{i18n:a}=W();return o("div",{className:M("adyen-pe-grant-adjustment-details",t),children:[o(No,{titleKey:n,subtitleKey:s,children:o(ge,{onClick:r,variant:ne.TERTIARY,iconButton:!0,classNameModifiers:["circle"],"aria-label":a.get("dismiss"),children:o(Re,{name:"cross"})})}),e]})},br="adyen-pe-grant-repayment-details",wo={balanceInfo:`${br}__balance-info`,repaymentInfo:`${br}__repayment-info`,repaymentAccount:`${br}__repayment-account`,repaymentNotice:`${br}__repayment-notice`},ER=({grant:e,onDetailsClose:t})=>{const{i18n:n}=W(),s=A(()=>{var a;return(a=e.unscheduledRepaymentAccounts)==null?void 0:a[0]},[e.unscheduledRepaymentAccounts]),r=A(()=>{const{currency:a,value:i}=e.remainingTotalAmount;return n.amount(i,a)},[n,e.remainingTotalAmount]);return s?o(SR,{className:br,onDetailsClose:t,headerTitleKey:"capital.sendRepayment",headerSubtitleKey:"capital.sendRepaymentSubtitle",children:[o("div",{className:wo.repaymentInfo,children:[o("section",{className:wo.repaymentAccount,children:[o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,children:n.get("capital.bankAccountDetails")}),o(CR,{bankAccount:s})]}),o("section",{className:wo.repaymentNotice,children:o(P,{el:J.PARAGRAPH,variant:O.CAPTION,children:n.get("capital.sendRepaymentNotice")})})]}),o(na,{className:wo.balanceInfo,children:o(P,{variant:O.BODY,children:o(hr,{translationKey:"capital.repaymentBalanceInfo",fills:{amount:o(P,{el:J.SPAN,variant:O.BODY,strongest:!0,children:r})}})})})]}):null},rc=e=>(e==null?void 0:e.disabled)===!0,Or=(e,t,n)=>{const s=e.length;if(s){let r=t,a=s;for(;a--;){for(;r<0;)r+=s;if(r>=s&&(r%=s),!rc(e[r]))return r;r+=n}}return 0},wd=(e,t,n=0)=>{if(!t)return n;const s=e.findIndex(i=>i.id===t),r=s===-1?n:s,a=Or(e,r,1);return r===a?r:n},zp=({options:e,activeOption:t,onChange:n})=>{const[s,r]=F(!1),[a,i]=F(wd(e,t)),c=e[a],d=q(c),l=q([]),u=q(Rn().replace(/.*?(?=\d+$)/,"")).current,h=A(()=>{const T=[];for(let g=0;g<e.length;g++)T[g]=y=>l.current[g]=y;return T},[e]),p=C(T=>{const g=l.current.findIndex(y=>y===T.currentTarget);rc(l.current[g])||(T.preventDefault(),i(g))},[]),f=A(()=>{const T={[te.ARROW_LEFT]:()=>i(g=>Or(l.current,g-1,-1)),[te.ARROW_RIGHT]:()=>i(g=>Or(l.current,g+1,1)),[te.HOME]:()=>i(Or(l.current,0,1)),[te.END]:()=>i(Or(l.current,-1,-1))};return g=>{var y;T[g.key]&&(g.preventDefault(),(y=T[g.key])==null||y.call(T),r(!0))}},[]);return G(()=>{i(T=>wd(e,t,T))},[e,t]),G(()=>{if(s){const T=l.current[a];rc(T)||T==null||T.focus(),r(!1)}},[a,s]),G(()=>{d.current!==c&&(d.current=c,n==null||n(c))},[c,n]),{activeIndex:a,onClick:p,onKeyDown:f,refs:h,uniqueId:u}};function NR({activeItem:e,items:t,onChange:n}){const{activeIndex:s,onClick:r,onKeyDown:a,refs:i,uniqueId:c}=zp({onChange:n,options:t,activeOption:e}),{i18n:d}=W();return o("div",{children:[o("div",{role:"radiogroup",className:"adyen-pe-segmented-control",children:t.map((l,u)=>{const h=s===u;return o("button",{role:"radio",name:l.id,ref:i[u],id:`item:${c}-${l.id}`,className:"adyen-pe-segmented-control__item","aria-checked":h,"aria-controls":`segment:${c}-${l.id}`,onClick:h?void 0:r,onKeyDown:a,disabled:l.disabled,tabIndex:h?0:-1,children:o(P,{el:J.SPAN,variant:O.BODY,className:"adyen-pe-segmented-control__item-label",stronger:!0,children:d.get(l.label)})},`item:${c}-${l.id}`)})}),o("div",{className:"adyen-pe-segmented-content-container",children:t.map((l,u)=>o("section",{id:`segment:${c}-${l.id}`,className:"adyen-pe-segmented-content","aria-labelledby":`item:${c}-${l.id}`,hidden:s!==u,children:l.content},`segment:${c}-${l.id}`))})]})}const Aa=({grants:e,showDetails:t})=>o(rl,{classNames:"adyen-pe-grant-list__items",children:e.map(n=>o("li",{children:o(mR,{grant:n,showDetails:t.bind(null,n)})},n.id))}),DR=({grantList:e,hideTitle:t,newOfferAvailable:n,onNewOfferRequest:s})=>{const[r,a]=F(),[i,c]=F(),{i18n:d}=W(),[l,u]=A(()=>{const y=[],_=[];return e==null||e.forEach(v=>{v.status==="Active"||v.status==="Pending"?y.push(v):_.push(v)}),[y,_]},[e]),h=A(()=>e.length>1&&l.length&&u.length?"SegmentedGrants":"UnifiedGrants",[l.length,e.length,u.length]),p=A(()=>n&&!l.some(y=>y.status==="Pending"),[l,n]),f=A(()=>i&&Vp(i),[i]),T=C(()=>a(void 0),[]),g=C((y,_)=>{a(_),c(y)},[]);if(i)switch(r){case _R.unscheduledRepayment:{if(f!=null&&f.hasUnscheduledRepaymentDetails)return o(ER,{grant:i,onDetailsClose:T});break}}return o("div",{className:"adyen-pe-grant-list",children:[o("div",{className:"adyen-pe-grant-list__header-container",children:[o(os,{hideTitle:t,titleKey:"capital.businessFinancing"}),p?o(ge,{onClick:s,className:"adyen-pe-grant-list__offer-button",variant:ne.SECONDARY,children:d.get("capital.seeNewOffer")}):null]}),h==="UnifiedGrants"&&o(Aa,{grants:e,showDetails:g}),h==="SegmentedGrants"&&o(NR,{items:[{label:"capital.inProgress",content:o(Aa,{grants:l,showDetails:g}),id:"active"},{label:"capital.closed",content:o(Aa,{grants:u,showDetails:g}),id:"inactive"}],activeItem:"active"})]})},bR=({externalDynamicOffersConfig:e,grantList:t,newOfferAvailable:n,onFundsRequest:s,onGrantListUpdateRequest:r,onOfferDismiss:a})=>{const[i,c]=F(!1),d=C(()=>c(!1),[]),l=C(()=>c(!0),[]),u=C(()=>{a?a(d):d()},[d,a]),h=C(p=>{s?s(p):(r(p),c(!1))},[s,r]);return o(Q,{children:i?o(il,{externalDynamicOffersConfig:e,onFundsRequest:h,onOfferDismiss:u}):o(DR,{grantList:t,newOfferAvailable:n,onNewOfferRequest:l})})},OR=({hideTitle:e,onContactSupport:t,onFundsRequest:n,onOfferDismiss:s,onOfferOptionsRequest:r,skipPreQualifiedIntro:a})=>{var S,D,R;const i=(D=(S=Ee())==null?void 0:S.extraConfig)==null?void 0:D.legalEntity,c=A(()=>ol(i),[i]),{getGrants:d,getDynamicGrantOffersConfiguration:l}=Ee().endpoints,u=gt({fetchOptions:{enabled:!!d&&c},queryFn:C(async()=>d==null?void 0:d(z),[d])}),h=gt({fetchOptions:{enabled:!!l&&c},queryFn:C(async()=>l==null?void 0:l(z),[l])}),p=h.data,[f,T]=F(),g=A(()=>{var b,E;return f?[f,...((b=u.data)==null?void 0:b.data)||[]]:(E=u.data)==null?void 0:E.data},[(R=u.data)==null?void 0:R.data,f]),y=C(b=>{n?n(b):T(b)},[n]),_=A(()=>!!(h.error&&u.error||h.error&&!(g!=null&&g.length)),[h.error,g==null?void 0:g.length,u.error]),v=A(()=>{if(c){if(_)return"Error";if(!d&&!l||!p&&!g||u.isFetching||h.isFetching)return"Loading";if(g!=null&&g.length)return"GrantList";if(p!=null&&p.maxAmount&&(p!=null&&p.minAmount))return"PreQualified"}else return"UnsupportedRegion";return"Unqualified"},[l,p,h.isFetching,g,d,u.isFetching,_,c]),N=A(()=>!!(p&&p.minAmount&&p.maxAmount),[p]);return o("div",{className:In.base,children:(()=>{switch(v){case"Loading":return o("div",{className:In.skeletonContainer,children:[o("div",{className:In.headerSkeleton}),o("div",{className:In.skeleton})]});case"Error":return o("div",{className:In.errorContainer,children:[o(os,{hideTitle:e,titleKey:"capital.businessFinancing"}),o(Jt,{absolutePosition:!1,outlined:!1,withImage:!0,onContactSupport:t,...$p(h.error,t)})]});case"GrantList":return g&&o(bR,{externalDynamicOffersConfig:p,grantList:g,hideTitle:e,newOfferAvailable:N,onFundsRequest:n,onGrantListUpdateRequest:T,onOfferDismiss:s});case"PreQualified":return o(tR,{onOfferDismiss:s,onOfferOptionsRequest:r,skipPreQualifiedIntro:a,hideTitle:e,dynamicOffer:p,onFundsRequest:y});case"Unqualified":return o(Jv,{hideTitle:e});case"UnsupportedRegion":return o("div",{className:In.errorContainer,children:[o(os,{hideTitle:e,titleKey:"capital.businessFinancing"}),o(ta,{unsupportedRegion:!0})]});default:return null}})()})};class Xp extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(OR,{...this.props,ref:n=>void(this.componentRef=n)}));this.customClassNames="adyen-pe-capital-overview-component",this.componentToRender=this.componentToRender.bind(this)}async getState(){var l,u;const{session:n}=this.props.core;await Xu(n);const{getDynamicGrantOffersConfiguration:s,getGrants:r}=n.context.endpoints,a=(l=n.context.extraConfig)==null?void 0:l.legalEntity;if(!ol(a))return{state:"isInUnsupportedRegion"};const[i,c]=await Promise.all([s==null?void 0:s(z).catch(ue),r==null?void 0:r(z).catch(ue)]);let d="isUnqualified";return c&&((u=c.data)==null?void 0:u.length)>0?d="hasRequestedGrants":i&&i.minAmount&&(d="isPreQualified"),{state:d}}}Y(Xp,"type","capitalOverview");const al="adyen-pe-disputes-overview",IR=`${al}--xs`,PR=`${al}__tabs-container`,kR="2025-05-22T00:00:00.000Z",wR=10,Kp={mc:"Mastercard",visa:"Visa",ach:"ACH Direct Debit",amex:"American Express",discover:"Discover",elo:"Elo",jcb:"JCB",pulse:"PULSE",sepadirectdebit:"SEPA Direct Debit",others:"Others"},sa={FRAUD:"disputes.reasonCategory.fraud",CONSUMER_DISPUTE:"disputes.reasonCategory.consumerDispute",PROCESSING_ERROR:"disputes.reasonCategory.processingError",REQUEST_FOR_INFORMATION:"disputes.reasonCategory.requestForInformation",AUTHORISATION_ERROR:"disputes.reasonCategory.authorisationError",ADJUSTMENT:"disputes.reasonCategory.adjustment",OTHER:"disputes.reasonCategory.other"},cl={CHARGEBACKS:"disputes.statusGroup.chargebacks",FRAUD_ALERTS:"disputes.statusGroup.fraudAlerts",ONGOING_AND_CLOSED:"disputes.statusGroup.ongoingAndClosed"},LR={ACCEPTED:"disputes.status.accepted",EXPIRED:"disputes.status.expired",LOST:"disputes.status.lost",PENDING:"disputes.status.pending",RESPONDED:"disputes.status.responded",UNDEFENDED:"disputes.status.undefended",UNRESPONDED:"disputes.status.unresponded",WON:"disputes.status.won"},FR={CHARGEBACK:"disputes.type.chargeback",NOTIFICATION_OF_FRAUD:"disputes.type.notificationOfFraud",REQUEST_FOR_INFORMATION:"disputes.type.requestForInformation"},Zp=e=>{switch(e.status){case"UNDEFENDED":case"UNRESPONDED":{const t=ic(e.dueDate);if(t!=null){const n=Date.now(),s=new Date(t);if(new Date(s).setHours(s.getHours()-24)<=n)return 7;if(new Date(s).setDate(s.getDate()-wR)<=n)return 3}return 1}}return 0},Qp=e=>Zp(e)>0,Jp=e=>Zp(e)>1,Cs="adyen-pe-disputes-table",ef=({dispute:e})=>{const{i18n:t}=W(),n=A(()=>t.get(LR[e.status]),[t,e]),s=A(()=>e.status==="WON"?be.SUCCESS:Jp(e)?be.ERROR:be.DEFAULT,[e]);return o(it,{variant:s,label:n})},tf={status:"disputes.status",respondBy:"disputes.respondBy",createdAt:"disputes.openedOn",paymentMethod:"disputes.paymentMethod",disputeReason:"disputes.disputeReason",reason:"disputes.reason",currency:"disputes.currency",disputedAmount:"disputes.disputedAmount",totalPaymentAmount:"disputes.totalPaymentAmount"},Ld={CHARGEBACKS:{title:"disputes.empty.noChargebacksFound",message:"disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewChargebacks"},FRAUD_ALERTS:{title:"disputes.empty.noFraudAlertsFound",message:"disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewFraudAlerts"},ONGOING_AND_CLOSED:{title:"disputes.empty.noDisputesFound",message:"disputes.empty.tryDifferentSearchOrCheckAgainLaterForNewDisputes"}},MR=Object.keys(tf),Lt={cellContent:`${Cs}__cell-content`,cellContentVStack:`${Cs}__cell-content--vstack`,cellTextGrey:`${Cs}__cell-text--grey`,statusContent:`${Cs}__status-content`,statusContentUrgent:`${Cs}__status-content--urgent`},xR=({error:e,loading:t,balanceAccountId:n,onContactSupport:s,showPagination:r,onRowClick:a,data:i,customColumns:c,activeBalanceAccount:d,statusGroup:l,...u})=>{const{i18n:h}=W(),{refreshing:p}=Ee(),{dateFormat:f}=kt(d==null?void 0:d.timeZone),[T,g]=F(null),y=A(()=>t||p,[t,p]),_=Pe(Ie.down.xs),v=xi({fields:MR,fieldsKeys:tf,customColumns:c,columnConfig:A(()=>({status:{visible:l==="ONGOING_AND_CLOSED"},reason:{visible:l==="FRAUD_ALERTS"&&!_,flex:2},respondBy:{visible:l==="CHARGEBACKS"},currency:{visible:!_,flex:.5},disputedAmount:{visible:l!=="FRAUD_ALERTS",position:"right"},createdAt:{visible:!_||l==="FRAUD_ALERTS"},paymentMethod:{visible:!_},disputeReason:{visible:l!=="FRAUD_ALERTS"&&!_},totalPaymentAmount:{visible:l==="FRAUD_ALERTS",position:"right"}}),[_,l])}),N=C(()=>g(null),[]),S={title:Ld[l].title,message:[Ld[l].message]},D=A(()=>()=>o(Fi,{error:e,errorMessage:"disputes.error.weCouldNotLoadYourDisputes",onContactSupport:s}),[e,s]);return G(()=>{y&&N()},[y,N]),o("div",{className:Cs,children:[T&&o(st,{onClose:N,type:Oe.WARNING,className:"adyen-pe-disputes-table-alert",...T}),o(nn,{autoFitColumns:_,errorDisplay:D,error:e,columns:v,data:i,loading:y,outline:!1,onRowClick:{callback:a},emptyTableMessage:S,customCells:{status:({item:R})=>o("div",{className:M(Lt.cellContent,{[Lt.cellContentVStack]:_}),children:[o(ef,{dispute:R}),_&&o(bs,{paymentMethod:R.paymentMethod})]}),reason:({item:R})=>R.reason.title,respondBy:({item:R})=>{const b=Jp(R),E=()=>o(Q,{children:[f(R.dueDate,Ul),b&&o(Re,{name:"warning-filled"})]});return o("div",{className:M(Lt.cellContent,{[Lt.cellContentVStack]:_}),children:[R.dueDate?o(P,{variant:O.BODY,className:M(Lt.statusContent,{[Lt.cellTextGrey]:_&&!b,[Lt.statusContentUrgent]:b}),children:_?o(hr,{translationKey:"disputes.gridCell.dueDate",fills:{dueDate:E}}):E()}):null,_&&o(bs,{paymentMethod:R.paymentMethod})]})},currency:({item:R})=>o(it,{children:R.amount.currency}),disputedAmount:({item:R})=>R.amount&&o(P,{variant:O.BODY,stronger:!0,children:h.amount(R.amount.value,R.amount.currency,{hideCurrency:!1})}),createdAt:({item:R})=>o("div",{className:M(Lt.cellContent,{[Lt.cellContentVStack]:_}),children:[o(P,{variant:O.BODY,className:M(Lt.statusContent,{[Lt.cellTextGrey]:_}),children:f(R.createdAt,Ul)}),_&&o(bs,{paymentMethod:R.paymentMethod})]}),paymentMethod:({item:R})=>o(bs,{paymentMethod:R.paymentMethod}),disputeReason:({item:R})=>o("span",{children:h.get(sa[R.reason.category])}),totalPaymentAmount:({item:R})=>R&&o(P,{variant:O.BODY,stronger:!0,children:h.amount(R.amount.value,R.amount.currency,{hideCurrency:!1})})},children:r&&o(nn.Footer,{children:o(Mi,{...u})})})]})},Lo=e=>{const t=new FormData;for(const[n,s]of e.entries())s instanceof File?t.set(n,s,s.name):t.set(n,s);return t},nf=ls(void 0),BR=Ue(({dispute:e,setDispute:t,children:n})=>{const[s,r]=F("details"),[a,i]=F(null),[c,d]=F([]),[l,u]=F(null),[h,p]=F(null),f=C(()=>{u(S=>{if(S){const D=[...S.keys()].filter(R=>R!=="defenseReason");if(D.length>0){const R=Lo(S);return D.forEach(b=>R.delete(b)),R}}return S})},[]),T=C(()=>{switch(s){case"defendReasonSelectionView":r("details");break;case"accept":r("details");break;case"uploadDefenseFilesView":f(),r("defendReasonSelectionView");break;default:r("details");break}},[f,s]),g=C(()=>{i(null),d(null),u(null),p(null),t(void 0)},[t]),y=C((S,D)=>{u(R=>{const b=R?Lo(R):new FormData;return b.set(S,D,D.name),b})},[]),_=C((S,D)=>{u(R=>{if(R&&R.has(S)){const b=R.get(S),E=Lo(R);return E.delete(S),b instanceof File?E.set(D,b,b.name):E.set(D,b),E}return R})},[]),v=C(S=>{u(D=>{if(D&&D.has(S)){const R=Lo(D);return R.delete(S),R}return D})},[]),N=C(S=>{p(S)},[]);return G(()=>{u(()=>{if(a){const S=new FormData;return S.set("defenseReason",a),S}return null})},[a]),o(nf.Provider,{value:{addFileToDefendPayload:y,applicableDocuments:c,clearFiles:f,clearStates:g,defendResponse:h,dispute:e,flowState:s,goBack:T,setApplicableDocuments:d,setFlowState:r,setDispute:t,selectedDefenseReason:a,setSelectedDefenseReason:i,defendDisputePayload:l,onDefendSubmit:N,moveFieldInDefendPayload:_,removeFieldFromDefendPayload:v},children:n})}),Dn=()=>{const e=ds(nf);if(!e)throw new Error("useDisputeFlow must be used within DisputeFlowProvider");return e},$R=({onDisputeAccept:e})=>{const{i18n:t}=W(),{acceptDispute:n}=Ee().endpoints,{dispute:s,clearStates:r,goBack:a}=Dn(),i=q(s).current??s,c=i==null?void 0:i.dispute.pspReference,l=(i==null?void 0:i.dispute.type)==="REQUEST_FOR_INFORMATION",u=q("disputes.accept.disputeAccepted"),h=q("disputes.accept.disputeDisclaimer"),p=q("disputes.accept.chargeback"),f=q("disputes.accept.chargeback"),T=q(l);(T.current||(T.current=l))&&(u.current="disputes.accept.requestForInformationAccepted",h.current="disputes.accept.requestForInformationDisclaimer",p.current="disputes.accept.requestForInformation",f.current="disputes.accept");const[g,y]=F(!1),[_,v]=F(!1),N=lr({queryFn:n,options:{onSuccess:C(()=>{r(),v(!0)},[r])}}),S=N.isLoading||_,D=g&&!S,R=C(()=>{D&&N.mutate(z,{path:{disputePspReference:c}})},[D,c,N]),b=C(()=>{S||y(H=>!H)},[S]),E=A(()=>[{title:t.get(f.current),disabled:!D,state:N.isLoading?"loading":"default",variant:ne.PRIMARY,event:R,classNames:_?["adyen-pe-accept-dispute__accepted-btn"]:void 0,renderTitle:H=>_?o(Q,{children:[o(Re,{name:"checkmark-circle-fill",className:"adyen-pe-accept-dispute__accepted-icon"}),t.get("disputes.accept.accepted")]}):H},{title:t.get("disputes.goBack"),disabled:N.isLoading,variant:ne.SECONDARY,event:a}],[t,R,N.isLoading,D,a,_]),I=q(!1),w=q(Rn()).current;return G(()=>{I.current||_&&c&&ee(e)&&(I.current=!0,e({id:c}))},[_,c,e]),o("div",{className:"adyen-pe-accept-dispute__container",children:_?o("div",{className:"adyen-pe-accept-dispute__success",children:[o(Re,{name:"checkmark-circle-fill",className:"adyen-pe-accept-dispute__success-icon"}),o(P,{variant:O.TITLE,children:t.get(u.current)}),o(ge,{variant:ne.SECONDARY,onClick:a,children:t.get("disputes.showDisputeDetails")})]}):o(Q,{children:[o(P,{className:"adyen-pe-accept-dispute__title",variant:O.TITLE,medium:!0,children:t.get(p.current)}),o(P,{variant:O.BODY,medium:!0,children:t.get(h.current)}),o("div",{className:"adyen-pe-accept-dispute__input",children:[o("input",{type:"checkbox",disabled:S,className:"adyen-pe-visually-hidden",id:w,onInput:b}),o("label",{className:"adyen-pe-accept-dispute__label",htmlFor:w,children:[g?o(Re,{name:"checkmark-square-fill"}):o(Re,{name:"square"}),o(P,{el:J.SPAN,variant:O.BODY,children:t.get("disputes.accept.iAgree")})]})]}),o("div",{className:"adyen-pe-accept-dispute__actions",children:o(hs,{actions:E})})]})})},Xe="adyen-pe-file-input",UR=["application/pdf","image/jpeg","image/jpg","image/png"],Fd=2097152,ot={DISALLOWED_FILE_TYPE:"disallowed_file_type",FILE_REQUIRED:"file_required",TOO_MANY_FILES:"too_many_files",VERY_LARGE_FILE:"very_large_file"},_s={fileBase:`${Xe}__file`,fileButton:`${Xe}__file-button`,fileDetails:`${Xe}__file-details`,fileIcon:`${Xe}__file-icon`,fileName:`${Xe}__file-name`,fileSize:`${Xe}__file-size`};function HR({file:e,deleteFile:t,disabled:n}){const s=A(()=>Zd(e.size),[e.size]);return o("div",{className:_s.fileBase,children:[o("div",{className:_s.fileDetails,children:[o(Re,{name:"checkmark-circle-fill",className:_s.fileIcon}),o("div",{className:_s.fileName,title:e.name,children:o(P,{el:J.SPAN,variant:O.BODY,stronger:!0,children:e.name})}),o(P,{className:_s.fileSize,el:J.SPAN,variant:O.BODY,children:s})]}),o(ge,{className:_s.fileButton,disabled:n,variant:ne.TERTIARY,onClick:t,children:[o(Re,{name:"trash-can"}),o("span",{className:"adyen-pe-visually-hidden",children:o(hr,{translationKey:"uploadedFile.remove",fills:{filename:e.name}})})]})]})}const WR=e=>A(()=>{let t=(e==null?void 0:e.current)??null,n=ue;e&&(n=ee(e)?e:r=>void(e.current=r));const s=r=>{t=r,n(r)};return Object.defineProperty(s,"current",{enumerable:!0,get:()=>t,set:s})},[e]),At={dropzone:`${Xe}__dropzone`,dropzoneDisabled:`${Xe}__dropzone--disabled`,dropzoneDragOver:`${Xe}__dropzone--dragover`,dropzoneError:`${Xe}__dropzone--error`,label:`${Xe}__label`,labelDefault:`${Xe}__label-default-content`,labelIcon:`${Xe}__label-icon`,labelText:`${Xe}__label-text`,error:`${Xe}__error`,errorIcon:`${Xe}__error-icon`,errorText:`${Xe}__error-text`},GR=Je((e,t)=>{const{id:n,name:s,children:r,disabled:a=!1,required:i=!1,maxFileSize:c=Fd,allowedFileTypes:d=UR,mapError:l,uploadFiles:u}=e,{i18n:h}=W(),[p,f]=F(""),[T,g]=F(),[y,_]=F(!1),v=!!p,N=s==null?void 0:s.trim(),S=A(()=>n||Rn(),[n]),D=WR(t),R=L=>{var ie;Array.from(((ie=L.dataTransfer)==null?void 0:ie.types)??[]).some(le=>le==="Files")&&(L.preventDefault(),_(!0))},b=L=>{L.preventDefault(),_(!1)},E=L=>{L.preventDefault(),_(!1),j(L.dataTransfer)},I=L=>{T&&g(void 0),j(L.target)},w=async L=>{var U;L.target!==document.activeElement&&((U=L.target)==null||U.checkValidity())},H=async L=>{!p&&L.target.validity.valueMissing&&x(ot.FILE_REQUIRED)},x=C(L=>{const U=D.current;if(U){const ie=U.required;U.required=!1,U.setCustomValidity(L),f(U.validationMessage??""),U.required=ie}},[D]),j=C(L=>{const U=bf(L);if(U.length>1)return x(ot.TOO_MANY_FILES);try{const ie=U.filter(le=>{if(!d.includes(le.type))throw ot.DISALLOWED_FILE_TYPE;const V=ee(c)?c(le.type)??Fd:c;if(le.size>V)throw g({type:le.type,limit:V}),ot.VERY_LARGE_FILE;return!0});x(""),u(ie)}catch(ie){switch(ie){case ot.DISALLOWED_FILE_TYPE:case ot.VERY_LARGE_FILE:return x(ie)}}},[d,c,x,u]);return o(Q,{children:[o("div",{role:"region",className:M(At.dropzone,{[At.dropzoneDisabled]:a,[At.dropzoneDragOver]:y,[At.dropzoneError]:v}),onDragOver:a?void 0:R,onDragLeave:a?void 0:b,onDrop:a?void 0:E,children:[o("input",{type:"file",className:"adyen-pe-visually-hidden",id:S,ref:D,name:N,disabled:a,required:i,accept:String(d),onBlur:w,onChange:I,onInvalid:H,"aria-invalid":v,"data-testId":"dropzone-input"}),o("label",{className:At.label,htmlFor:S,children:r??o("div",{className:M(At.labelDefault),children:[v?o(Re,{name:"warning-filled",className:At.labelIcon}):o(Re,{name:"upload",className:At.labelIcon}),o(P,{className:At.labelText,el:J.SPAN,variant:O.BODY,stronger:!0,children:h.get("uploadFile.browse")})]})})]}),v&&o("div",{className:At.error,children:[o(Re,{name:"cross-circle-fill",className:At.errorIcon}),o(P,{className:At.errorText,el:J.SPAN,variant:O.BODY,children:ee(l)?l(p,T?{size:T.limit,type:T.type}:void 0):h.get(p)})]})]})}),sf=Je(({onChange:e,mapError:t,onDelete:n,...s},r)=>{const[a,i]=F([]),c=q(a),d=a[0],{i18n:l}=W(),{disabled:u}=s,h=C(g=>{switch(g){case ot.DISALLOWED_FILE_TYPE:return l.get("inputError.disallowedFileType");case ot.FILE_REQUIRED:return l.get("inputError.fileRequired");case ot.TOO_MANY_FILES:return l.get("inputError.tooManyFiles");case ot.VERY_LARGE_FILE:return l.get("inputError.veryLargeFile")}},[l]),p=A(()=>ee(t)?t:h,[t]),f=C(g=>{u||(i(y=>{const _=y.findIndex(N=>N===g);if(_<0)return y;const[...v]=y;return v.splice(_,1),v}),n==null||n())},[u,n]),T=C(g=>{u||i(y=>y.length===0&&g.length===0?y:g)},[u]);return G(()=>{c.current!==a&&(c.current=a,e==null||e([...a]))},[a,e]),o("div",{className:Xe,children:d?o(HR,{disabled:u,file:d,deleteFile:()=>f(d)}):o(GR,{...s,ref:r,mapError:p,uploadFiles:T})})}),YR={title:"clearingText",help:"descriptionOfDisputeReason"},qR={title:"latestRecurringTransactions",help:"latestRecurringTransactions"},jR={title:"acquirerRepresentmentForm",help:"acquirerRepresentmentFormAutomaticallyGenerated"},VR={title:"acquirerRetrievalFulfilmentForm",help:"acquirerRetrievalFulfilmentFormAutomaticallyGenerated"},zR={title:"automaticallyGeneratedTransactionDetails",help:"automaticallyGeneratedTransactionDetails"},XR={title:"proofOfAddendum",help:"cardholderResponsibleForAddendumTransaction"},KR={title:"additionalInformation",help:"docIdentifyTransaction"},ZR={title:"additionalTransactions",help:"additionalTransactionsConnectedWithDisputedFlight"},QR={title:"alternativeDefenseMaterial",help:"docRemediesChargeback"},JR={title:"amexFaxCover",help:"coverPageForAmexDisputes"},eC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},tC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},nC={title:"rebuttalCancellationNotAccepted",help:"rebuttalStatingCancellationNotAccepted"},sC={title:"evidenceCardHolderParticipation",help:"docProvingCardHolderParticipated",helpitems:["receiptOrOther","customerWrittenConfirmation","writtenCorrespondenceExchanged"]},rC={title:"proofRenewedMembership",help:"proofShowingCardholderRenewedMembership"},oC={title:"proofCardPresence",help:"proofCardAndCardholderSignature"},iC={title:"docChargebackCodeNotApplicable"},aC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},cC={title:"defenseMaterial",help:"docViaFraudReporter"},lC={title:"CopyOfSalesDraftTitle",help:"CopyOfSalesDraftDetails"},dC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},uC={title:"defenseMaterial",help:"docCorrectCurrency"},hC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},pC={title:"documentShipmentDate",help:"documentContainingImportantShipmentData"},fC={title:"defenseMaterial",help:"docRemediesChargeback"},mC={title:"disclosureAtPointOfInteraction",help:"rebuttalGivenToCardholder"},_C={title:"firstChargebackNumberAndDate",help:"numberAndDateOfOriginalChargeback"},gC={title:"compellingEvidence",help:"evidenceProofingParticipationOfCardholder"},TC={title:"flightManifest",help:"flightManifestShowingCardholderName"},yC={title:"flightTicket",help:"flightTicketWithCardholderName"},AC={title:"deliveryOfFlightTicketAtAddress",help:"receiptOfFlightTicketAtBillingAddress"},vC={title:"flightTicketUsed",help:"proofAirlineTicketsWereUsed"},RC={title:"flightTookPlace",help:"proofFlightTookPlace"},CC={title:"frequentFlyerInformation",help:"creditsOfMilesShowingConnectionToCardholder"},SC={title:"merchantWrittenRebuttal",help:"statementMerchantDidNotReceiveGoods"},EC={title:"merchantWrittenRebuttal",help:"writtenRebutalGoodsRepairedOrReplaced"},NC={title:"merchantWrittenRebuttal",help:"proofGoodsWereDeliveredAsDescribed"},DC={title:"proofValidIncreaseOfAmount",help:"cardholderResponsibleForDisputedAmount"},bC={title:"explanation",help:"explanationWhyCancellationCodeInvalid"},OC={title:"proofOfInvalidChargeback",help:"chargebackRemediedOrInvalid"},IC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},PC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},kC={title:"merchandiseDescription",help:"descriptionOfMerchandiseOrServices"},wC={title:"defenseMaterial",help:"docMerchandiseNotCounterfeit"},LC={title:"proofOfRecurringTransaction",help:"docAllOfFollowing",helpitems:["evidenceTransactionWasRecurring","moreThanOneTransactionProcessed","previousTransactionsNotDisputed"]},FC={title:"mpiData",help:"resultsOfMpiCalls"},MC={title:"proofOfNoCancellation",help:"proofRecurringContractNotCancelledAtTimeOfSettlement"},xC={title:"proofOfNoChargebackReceived",help:"proofMerchantHadNotReceivedPreviousChargeback"},BC={title:"proofOfNoChargebackReceived",help:"proofMerchantHadNotReceivedPreviousChargebackAutoGenerated"},$C={title:"noNotification",help:"proofMerchantNotNotifiedOfCancellation"},UC={title:"originalAmount",help:"originalAmountIfDisputedRepresentsPartialShipment"},HC={title:"paperAirlineTicket",help:"docCardholderIssuedPaperAirlineTickets"},WC={title:"passengerId",help:"passengerIdLinkedToCardholder"},GC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},YC={title:"appropriateExplanation",help:"appropriateExplanationAndDocTwoSeparateTransactions"},qC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},jC={title:"avsDocumentation",help:"documentationOfPositiveAvsResponseXOrY"},VC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},zC={title:"signedTerminalReceipt",help:"printedSignedReceipt"},XC={title:"proofOfDelayedDelivery",help:"ifDelayedProofShowingMerchantAbleToProvideServices"},KC={title:"proofOfAccountTakeover",help:"provingTransactionResultedFromAccountTakeover"},ZC={title:"proofCardPresence",help:"docTransactionOccurredOnPos"},QC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},JC={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},eS={title:"signatureOrChipPinEvidence"},tS={title:"proofProvidedMerchandise",help:"proofGoodsServicesWereProvided"},nS={title:"proofOfNoShow",help:"merchantObtainedCardAtTimeReservationMade"},sS={title:"proofOfRecurringTransaction",help:"docAllOfFollowing",helpitems:["evidenceTransactionWasRecurring","moreThanOneTransactionProcessed","previousTransactionsNotDisputed"]},rS={title:"proofOfRetailSale",help:"copyOfTid"},oS={title:"reasonForInvalidation",help:"reasonForInvalidationOfChargeback"},iS={title:"retrievalRequestFulfilled",help:"autoGeneratedDocRetrievalRequestFulfilled"},aS={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},cS={title:"defenseMaterial",help:"docTermsOfSaleNotMisrepresented"},lS={title:"shipmentDocumentation",help:"merchandiseSentToAvsConfirmedBillingAddress"},dS={title:"shipToAddress",help:"shipToAddressIfApplicable"},uS={title:"SupplementalDocumentsTitle",help:"SupplementalDocumentsDetails"},hS={title:"TEDocumentTitle",help:"TEDocumentDetails"},pS={title:"copyOfInvoice",help:"copyOfInvoiceOrOtherRelevantTransactionDetails"},fS={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},mS={title:"docTwoDifferentTransactions",help:"docsTwoTransactionsWithSameShopper"},_S={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},gS={title:"memberMessageText",help:"memberMessageTextSentToSchemes"},TS={title:"reasonableAmount",help:"cardholderAgreedToAmountRange"},yS={title:"duplicateProcessing",help:"duplicateProcessingHelp"},AS={title:"chargeToWrongAccountNumber",help:"chargeToWrongAccountNumberHelp"},vS={title:"SplitSales",help:"SplitSalesHelp"},RS={title:"missingSignature",help:"missingSignatureHelp"},CS={title:"processingError",help:"processingErrorHelp"},SS={title:"expiredCard",help:"expiredCardHelp"},ES={title:"latePresentment",help:"latePresentmentgHelp"},NS={title:"falseTransaction",help:"falseTransactionHelp"},DS={title:"authorizationNotObtained",help:"authorizationNotObtainedHelp"},bS={title:"transactionNotRecognizedContactlessAndCardNotPresented",help:"transactionNotRecognizedContactlessAndCardNotPresentedHelp"},OS={title:"transactionNotRecognizedChipLiabilityShift",help:"transactionNotRecognizedChipLiabilityShiftHelp"},IS={title:"deffectiveMerchandise",help:"deffectiveMerchandiseHelp"},PS={title:"merchandiseNotReceived",help:"merchandiseNotReceivedHelp"},kS={title:"serviceNotRendered",help:"serviceNotRenderedHelp"},wS={title:"cardRecoveryBulletinOrExceptionFile",help:"cardRecoveryBulletinOrExceptionFileHelp"},LS={title:"transactionAfterReservationCancelled",help:"transactionAfterReservationCancelledHelp"},FS={title:"differentSignature",help:"differentSignatureHelp"},MS={title:"retrievalRequestNotHonored",help:"retrievalRequestNotHonoredHelp"},xS={title:"creditNotProcessed",help:"creditNotProcessedHelp"},BS={title:"paidByOtherMeansThanJCBCard",help:"paidByOtherMeansThanJCBCardHelp"},$S={title:"nonMatchingAccountNumber",help:"nonMatchingAccountNumberHelp"},US={title:"merchantFraudPerformanceProgram",help:"merchantFraudPerformanceProgramHelp"},HS={title:"other",help:"otherHelp"},WS={title:"proofOfFulfillment",help:"proofShowingTrackingInformation"},GS={title:"proofOfRefund",help:"uploadListOfRefundIds"},YS={title:"merchandiseNotAsDescribed",help:"documentCanBetUrlReturnPolicy"},qS={title:"cancelledRecurringBilling",help:"documentCanBeSubscriptionAgreement"},jS={title:"incorrectAmount",help:"provideRefundId"},VS={title:"incorrectAmount",help:"provideRefundId"},zS={title:"unauthorisedReason",help:"documentCanBeProofOfDelivery"},XS={title:"creditNotProcessedReason",help:"documentCanBeCreditReasonDue"},KS={AcquirerMemberMessageText:YR,AcquirerRecurringTransactionDetails:qR,AcquirerRepresentmentForm:jR,AcquirerRetrievalFulfilmentForm:VR,AcquirerRFItransactionDetails:zR,AddendumDocumentation:XR,AdditionalInformation:KR,AdditionalTransactions:ZR,AlternativeDefenseMaterial:QR,AmexFaxCover:JR,ARDnotProvided:eC,AuthorisedTransaction:tC,CancellationNeverAccepted:nC,CardholderIdentification:sC,CardholderRenewedMembership:rC,CardPresent:oC,ChargebackCodeNotApplicable:iC,ChipLiabilityShift:aC,ChipTransactionReportedToSAFE:cC,CopyOfSalesDraft:lC,CompellingEvidence:dC,CorrectTransactionCurrency:uC,CreditPreviouslyIssued:hC,DateMerchandiseShipped:pC,DefenseMaterial:fC,DisclosureAtPointOfInteraction:mC,DuplicateChargeback:_C,EvidenceOfCardholderParticipation:gC,FlightManifest:TC,FlightTicket:yC,FlightTicketAtBillingAddress:AC,FlightTicketUsed:vC,FligthTookPlace:RC,FrequentFlyer:CC,GoodsNotReturned:SC,GoodsRepairedOrReplaced:EC,GoodsWereAsDescribed:NC,IncreasedTransactionAmount:DC,InvalidCancellationCode:bC,InvalidChargeback:OC,LiabilityShiftFullUCAF:IC,LiabilityShiftMerchantUCAF:PC,MerchandiseDescription:kC,MerchandiseNotCounterfeit:wC,MerchantProofOfRecurringTransaction:LC,MPIdata:FC,NotCancelled:MC,NotChargebacked:xC,NotChargebackedAuto:BC,NotNotified:$C,OriginalAmount:UC,PaperAirlineTicket:HC,PassengerIdentification:WC,PastChargebackTimeLimit:GC,PaymentByOtherMeans:YC,PINTransaction:qC,PositiveAVS:jC,PresentmentWithinTimeLimit:VC,PrintedSignedTerminalReceipt:zC,ProofOfAbilityToProvideServices:XC,ProofOfAccountTakeover:KC,ProofOfAttendedPOSTerminal:ZC,ProofOfCardPresenceAndSignatureChipNoPIN:QC,ProofOfCardPresenceAndSignatureWithTerminalReceipt:JC,ProofOfCardPresenceSignatureOrChipPIN:eS,ProofOfGoodsOrServicesProvided:tS,ProofOfNoShow:nS,ProofOfRecurringTransaction:sS,ProofOfRetailSaleRatherThanCredit:rS,ReasonForReturn:oS,RetrievalRequestFulfilled:iS,ReturnedMerchandiseNotReceived:aS,SaleTermsNotMisrepresented:cS,ShippedToAVS:lS,ShipToAddress:dS,SupplementalDocuments:uS,TEDocument:hS,TIDorInvoice:pS,TransactionNotPOS:fS,TwoDifferentTIDs:mS,TwoPINTransactions:_S,TwoPriorFraudChargebacks:gS,UnreasonableAmount:TS,DuplicateProcessing:yS,ChargeToWrongAccountNumber:AS,SplitSales:vS,MissingSignature:RS,ProcessingError:CS,ExpiredCard:SS,LatePresentment:ES,FalseTransaction:NS,AuthorizationNotObtained:DS,TransactionNotRecognizedContactlessAndCardNotPresented:bS,TransactionNotRecognizedChipLiabilityShift:OS,DeffectiveMerchandise:IS,MerchandiseNotReceived:PS,ServiceNotRendered:kS,CardRecoveryBulletinOrExceptionFile:wS,TransactionAfterReservationCancelled:LS,DifferentSignature:FS,RetrievalRequestNotHonored:MS,CreditNotProcessed:xS,PaidByOtherMeansThanJCBCard:BS,NonMatchingAccountNumber:$S,MerchantFraudPerformanceProgram:US,Other:HS,ProofOfFulfillment:WS,ProofOfRefund:GS,MerchandiseNotAsDescribedReason:YS,CancelledRecurringBillingReason:qS,IncorrectAmountReason:jS,ProofOfRefundForAmountDifference:VS,UnauthorisedReason:zS,CreditNotProcessedReason:XS},ZS={title:"atmDispute",help:"invalidChargebackReasonCode"},QS={title:"accountTakeover",help:"transactionFromAccountTakeover"},JS={title:"additionalInformation",help:"merchantCanProvideAdditionalInformation"},eE={title:"airlineCompellingEvidence",help:"evidenceCardholderAuthorizedTransaction"},tE={title:"airlineFlightProvided",help:"shopperUsedAirlineTicket"},nE={title:"responseToRfiAirlines",help:"provideTransactionalInfoTravelDetails"},sE={title:"transactionWasAuthorised",help:"authorisationReceivedForAmount"},rE={title:"autoResponseToRfi",help:"autoResponseSentToIssuer"},oE={title:"cvc2ValidationProgram",help:"transactionFallsCvc2ValidationProgram"},iE={title:"cancellationOrReturns",help:"useThisDefenseReasonIfApplicable",helpitems:["noCreditSlip","returnNotAccepted","merchandiseNotReturned"]},aE={title:"cancellationContractFailed",help:"cardholderDidNotMeetCancellationTerms"},cE={title:"responseToRfiCarRental",help:"provideTransactionalInfoTravelDetails"},lE={title:"accountNumberNotListedInExceptions",help:"accountNumberNotListedInExceptionsFor60Days"},dE={title:"reponseToRfi",help:"provideTransactionalInformation"},uE={title:"fraudEvidence"},hE={title:"cbCodeNotApplicable",help:"firstChargebackCodeNotApplicable"},pE={title:"reponseToRfiCardPresent",help:"provideTransactionalInformation"},fE={title:"cardholderNotifiedButNoReply",help:"cardholderNotifiedBeforeRecurringTransaction"},mE={title:"cardholderParticipated",help:"evidenceThatCardholderParticipated"},_E={title:"membershipRenewedAfterCancellation",help:"cardholderCancelledRecurringServiceButRenewedLater"},gE={title:"chipLiabilityShift",help:"transactionBetweenChipLiabilityShiftProgramCustomers"},TE={title:"chipTransactionReportedSAFE",help:"intraregionalTransactionReportedSAFE"},yE={title:"reponseToRfi",help:"provideTransactionalInformation"},AE={title:"compellingEvidence",help:"evidenceCardholderAuthorizedTransaction"},vE={title:"compellingEvidenceRecurringTransactions",help:"evidenceServicesProvidedAndReceivedWrittenCorrespondence"},RE={title:"correctTransactionAmount",help:"transactionInformationDocument"},CE={title:"correctTransactionCurrency",help:"chargebackInvalidCorrectAmountAndCurrencyProvided"},SE={title:"correctTransactionDateProvided",help:"acquirerProvidesCorrectDateWithinTimeLimit"},EE={title:"creditOrCancellationPolicyDisclosed",help:"creditOrCancellationPolicyDisclosedToCardholder"},NE={title:"creditPreviouslyIssued",help:"transactionAmountAlreadyRefunded"},DE={title:"deficiencyCorrected",help:"proofDeficiencyCorrected"},bE={title:"disputedSurcharge",help:"surchargeCorrectlyProcessed"},OE={title:"disputedSurchargeIncorrectCalculation",help:"surchargeIncorrectlyCalculatedByIssuer"},IE={title:"duplicateChargeback",help:"issuerProcessedChargebackMoreThanOnce"},PE={title:"emvLiabilityShift",help:"emvDeviceNonEmvCard"},kE={title:"emergencyPaymentAuthorizationService",help:"transactioAuthorisedEmergencyPaymentAuthorizationService"},wE={title:"faceToFaceTransactionNoConflictingInformation",help:"transactionWasInFaceToFaceEnvironment"},LE={title:"faceToFaceTransactionWithConflictingInformation",help:"de22DontMatchInFaceToFaceTransaction"},FE={title:"goodsNotReturned",help:"cardholderShouldHaveReturnedGoods"},ME={title:"goodsOrServicesProvided",help:"proofCardholderReceivedMerchandise",helpitems:["signedImprintedSalesSlipInvoicePosReceipt","parcelServiceReceipt","waiverFormAbsolvingMerchantResponsibility"]},xE={title:"goodsRepairedOrReplaced",help:"goodsWereRepairedOrReplaced"},BE={title:"goodsWereAsDescribed",help:"evidenceGoodsNotDamaged"},$E={title:"identifiedAddendum",help:["cardholderResponsibleForAddendumTransaction","cardholderResponsibleForDisputedAmount","cardholderBilledForSeparateAdditionalAmount"]},UE={title:"documentationReceivedWasIllegible",help:"firstChargebackInvalid"},HE={title:"increasedTransactionAmount",help:"documentationIncreasedDebitCardholderAccount"},WE={title:"invalidAcquirerReferenceData",help:"invalidReferenceDataDocumentationNotRequired"},GE={title:"invalidCancellationCode",help:"cancellationCodeWasInvalidAsShownByExplanationProvided"},YE={title:"invalidChargeback",help:["firstChargebackDoesNotMeetPrerequisites","thisReasonIsTechnical"]},qE={title:"invalidChargeback",help:["firstChargebackDoesNotMeetPrerequisites","thisReasonIsTechnical"]},jE={title:"chargebackBundlingInvalid",help:"chargebackBundlingInvalid"},VE={title:"invalidMessageText",help:"formatCbmmddyyArdXxxExpected"},zE={title:"invalidMessageText",help:"formatMultipleTransactionsNnnExpected"},XE={title:"invalidMessageText",help:"formatRpcsMmddyyExpected"},KE={title:"invalidChargebackBasedOnMcc",help:"merchantCantReceiveThisChargebackBasedOnTheirMcc"},ZE={title:"reponseToRfi",help:"provideTransactionalInformation"},QE={title:"justifiedDelayedPresentment",help:"delayInSubmittingTransaction"},JE={title:"liabilityShiftFullAuthenticated",help:"transactionIssuerApproved3dSecureAuthenticated"},eN={title:"3dSecureFullyAuthenticatedTransaction",help:"transactionApproved3dSecureAuthenticated"},tN={title:"3dSecureLiabilityShiftNotFullyAuthenticated",help:"transactionNotFully3dSecureAuthenticated"},nN={title:"merchandiseWasNotCounterfeit"},sN={title:"merchandiseWasReceivedByShopper",help:"proofCardholderReceivedMerchandise",helpitems:["signedImprintedSalesSlipInvoicePosReceipt","parcelServiceReceipt","waiverFormAbsolvingMerchantResponsibility"]},rN={title:"provideMissingInformation",help:"merchantProvideMissingDocuments"},oN={title:"invalidMessageText",help:"issuerDidNotIncludeTwoSetsOfArns"},iN={title:"noShowTransaction",help:"transactionWasResultOfGuaranteedReservation"},aN={title:"requiredDocumentationNotReceived",help:"issuerDidNotProvideRequiredDocumentation"},cN={title:"requiredDocumentationNotReceived",help:"issuerDidNotProvideRequiredDocumentation"},lN={title:"not3dSecureTransaction",help:"chargebackCodeNA3dSecureNotOffered"},dN={title:"serviceNotCancelled",help:"serviceNotCancelledEvidence"},uN={title:"noPriorChargebackReceived",help:"claimNotJustifiedSinceTransactionNotChargebacked"},hN={title:"noPriorChargebackReceived",help:"transactionNotChargebackedAutoDefense"},pN={title:"merchantNotNotifiedOfCancellation",help:"serviceCancelledButMerchantNotNotified"},fN={title:"additionalInformation",help:"docToProveNoPaymentByOtherMean"},mN={title:"transactionNotRecurring",help:"transactionNotRecurringTransactionInstallment"},_N={title:"pinTransaction",help:"pinUsedToVerifyCardholder"},gN={title:"pastChargebackTimeLimit",help:"chargebackReceivedAfterMastercardTimeLimit"},TN={title:"paypassTransaction",help:"paypassAmountBelowProtectionAmount"},yN={title:"paymentByOtherMeans",help:"validityOfTransactionChargedExplanation"},AN={title:"transactionSettledWithinTimeLimit",help:"timeBetweenAuthorisationAndSettlementWithinTimeLimits"},vN={title:"noPriorChargebackReceived",help:"previousChargebackCancellingRecurringContract"},RN={title:"chipTransaction",help:"cardPresentAndChipUsedNoPinProvided"},CN={title:"transactionsInitiatedDueToLossTheftOrDamages",help:"receiptWithItemsBilledBecauseOfLossTheftDamages"},SN={title:"proofOfCardPresenceMastercardCorporateFleet",help:"cardAndSignatureForCorporateFleetCardTransaction"},EN={title:"proofOfCardPresenceAvailableNotAuthorisedMastercardNetwork",help:"cardWithSignatureNotProcessedMastercardNetwork"},NN={title:"signedTerminalReceiptAvailable",help:"posTransactionAndSignedTerminalReceiptAvailable"},DN={title:"cardPresenceProof",help:"posTransactionCardholderWasPresentProof"},bN={title:"provideInformationForCollectionOrFraudCase"},ON={title:"purchaseProperlyPosted",help:"transactionWasProperlyIdentifiedAsInstallmentTransaction"},IN={title:"qpsTransaction",help:"qpsTransactionWithAmountLessThanChargebackProtectionAmount"},PN={title:"recurringTransactionCompellingEvidence",help:"autoGeneratedRecurringTransactionDetails"},kN={title:"recurringTransactionCompellingMerchantEvidence",help:"merchantCanProvideAdditionalCompellingEvidence"},wN={title:"notAgreeWithRefund",help:"shopperClaimsRefundWasPromisedButNotExecuted"},LN={title:"retrievalRequestFulfilled",help:"documentsSentToFulfillRetrievalRequest"},FN={title:"buyerExceededWindowToFileReturn",help:"uploadReturnPolicyDocument"},MN={title:"termsOfSaleWereNotMisrepresented"},xN={title:"scanningError",help:"defenseReasonIfProblemsWithScans"},BN={title:"goodsOrServicesProvided",help:"merchantProvidedServicesToCardholderProof"},$N={title:"servicesProvidedAfterCancellation",help:"servicesProvidedAndUsedAfterCancellation"},UN={title:"addressVerificationService",help:"addressMerchandiseSentAvsConfirmed"},HN={title:"addressVerificationServiceAdditionalInformation",help:"addressMerchandiseSentAvsConfirmed"},WN={title:"supplyDefenseMaterial",help:"fallbackDefenseReasonCode"},GN={title:"supplyDefenseMaterial",help:"fallbackDefenseReasonCode"},YN={title:"manyFraudulentChargebacks",help:"issuerHasInitiatedTooManyFraudulentDisputes"},qN={title:"authorisedOnline",help:"transactionWasAuthorisedOnline"},jN={title:"notPosTransaction",help:"transactionWasECommerceGivenChargebackReasonNotApplicable"},VN={title:"twoDifferentTransactions",help:"twoSeparateTransactions"},zN={title:"twoDifferentTidsNonAtm",help:"twoDifferentTidsWithSameCardholderAccount"},XN={title:"pinTransaction",help:"pinForOneOrBothTransactions"},KN={title:"twoPreviousFraudRelatedChargebacks",help:"prevChargedbackTwoTransactionsWithSameAccount"},ZN={title:"unfoundedCardholderDispute",help:"acquirerDefendChargebackIfIssuerRequested"},QN={title:"unreasonableAmount",help:"cardholderAgreedToAmountAsReasonable"},JN={ATMDispute:ZS,AccountTakeover:QS,AdditionalInformation:JS,AirlineCompellingEvidence:eE,AirlineFlightProvided:tE,AirlineRFIresponse:nE,AuthorisedTransaction:sE,AutomaticRFIresponse:rE,CVC2ValidationProgram:oE,CancellationOrReturns:iE,CancellationTermsFailed:aE,CarRentalRFIresponse:cE,CardNotOnExceptionFile:lE,CardNotPresentRFIresponse:dE,CardPresentFraud:uE,CardPresentNotApplicable:hE,CardPresentRFIresponse:pE,CardholderNotReplied:fE,CardholderParticipated:mE,CardholderRenewedMembership:_E,ChipLiabilityShift:gE,ChipTransactionReportedToSAFE:TE,CieloRFIresponse:yE,CompellingEvidence:AE,CompellingEvidenceRecurringTransactions:vE,CorrectTransactionAmount:RE,CorrectTransactionCurrency:CE,CorrectTransactionDate:SE,CreditOrCancellationPolicyProperlyDisclosed:EE,CreditPreviouslyIssued:NE,DeficiencyCorrected:DE,DisputedSurcharge:bE,DisputedSurchargeIncorrectProratedCalculation:OE,DuplicateChargeback:IE,EMVLiabilityShift:PE,EmergencyPaymentAuthorizationService:kE,FaceToFace:wE,FaceToFaceConflictingMessages:LE,GoodsNotReturned:FE,GoodsOrServicesProvided:ME,GoodsRepairedOrReplaced:xE,GoodsWereAsDescribed:BE,IdentifiedAddendum:$E,IllegibleDocumentationReceived:UE,IncreasedTransactionAmount:HE,InvalidARD:WE,InvalidCancellationCode:GE,InvalidChargeback:YE,InvalidChargebackAllocation:qE,InvalidChargebackBundling:jE,InvalidDE72CB:VE,InvalidDE72MultipleTransactions:zE,InvalidDE72RPCS:XE,InvalidReasonCodeForMCC:KE,JCBRFIResponse:ZE,JustifiedDelayedPresentment:QE,LiabilityShiftFullAuthenticated:JE,LiabilityShiftFullUCAF:eN,LiabilityShiftMerchantUCAF:tN,MerchandiseNotCounterfeit:nN,MerchandiseReceived:sN,MissingInformation:rN,NoARDprovidedInMessageText:oN,NoShowTransaction:iN,NonReceiptOfRequiredDocuments:aN,NonReceiptOfRequiredDocumentsAutoDefense:cN,Not3DSecure:lN,NotCancelled:dN,NotChargebacked:uN,NotChargebackedAuto:hN,NotNotified:pN,NotPaidByOtherMeans:fN,NotRecurring:mN,PINTransaction:_N,PastChargebackTimeLimit:gN,PayPassTransaction:TN,PaymentByOtherMeans:yN,PresentmentWithinTimeLimit:AN,PreviousTransactionNotChargebacked:vN,ProofOfCardPresenceAndSignatureChipNoPIN:RN,ProofOfCardPresenceAndSignatureLossTheftOrDamage:CN,ProofOfCardPresenceAndSignatureMasterCardCorporateFleetCard:SN,ProofOfCardPresenceAndSignatureNotMasterCardWorldWideNetwork:EN,ProofOfCardPresenceAndSignatureWithTerminalReceipt:NN,ProofOfCardPresenceAndSignatureWithoutTerminalReceipt:DN,ProvideInformation:bN,PurchaseProperlyPosted:ON,QPSTransaction:IN,RecurringTransactionsCompellingEvidence:PN,RecurringTransactionsCompellingMerchantEvidence:kN,RefundNotAgreed:wN,RetrievalRequestFulfilled:LN,ReturnPeriodExpired:FN,SaleTermsNotMisrepresented:MN,ScanningError:xN,ServicesProvided:BN,ServicesProvidedAfterCancellation:$N,ShippedToAVS:UN,ShippedToAVSAdditionalInformation:HN,SupplyDefenseDocument:WN,SupplyDefenseMaterial:GN,TooManyFraudulentChargebacks:YN,TransactionAuthorisedOnline:qN,TransactionNotPOS:jN,TwoDifferentTIDs:VN,TwoDifferentTIDsPOS:zN,TwoPINTransactions:XN,TwoPriorFraudChargebacks:KN,UnfoundedCardholderDispute:ZN,UnreasonableAmount:QN},va=(e,t,n)=>{const s=`${t}.${n}`;return e.has(s)?e.get(s):void 0},rf=(e,t,n,s)=>{const r=t[n];if(!r)return;const a=va(e,s,r.title),i=r.help?Array.isArray(r.help)?r.help:[r.help]:void 0,c=i==null?void 0:i.map(l=>va(e,s,l)).filter(l=>l!==void 0),d=[];return r.helpitems&&r.helpitems.forEach(l=>{const u=va(e,s,l);u&&d.push(u)}),{title:a||"",...c!=null&&c.length?{primaryDescriptionItems:c}:{},...d!=null&&d.length?{secondaryDescriptionItems:d}:{}}},ra=(e,t)=>rf(e,KS,t,"disputes.defenseDocument"),oc=(e,t)=>rf(e,JN,t,"disputes.defenseReason"),Fo={"2MB":2097152,"10MB":10485760},of=["application/pdf","image/jpeg","image/jpg","image/tiff"],af={"application/pdf":Fo["2MB"],"image/jpeg":Fo["10MB"],"image/jpg":Fo["10MB"],"image/tiff":Fo["10MB"]},eD=({document:e,disabled:t,required:n,mapError:s})=>{const{i18n:r}=W(),{title:a,primaryDescriptionItems:i}=A(()=>ra(r,e),[r,e])||{},{removeFieldFromDefendPayload:c,addFileToDefendPayload:d}=Dn();return o("div",{className:"adyen-pe-defend-dispute-document-upload",children:[o("div",{children:[o(P,{strongest:!0,className:"adyen-pe-defend-dispute-document-upload__title",variant:O.BODY,el:J.DIV,children:a||e}),i&&i.length>0?i.map((l,u)=>o(P,{className:"adyen-pe-defend-dispute-document-upload__description",variant:O.BODY,children:l},`${u}-description`)):null]}),o(sf,{allowedFileTypes:of,maxFileSize:l=>af[l],mapError:s,onDelete:()=>{e&&c(e)},disabled:t,required:n,onChange:l=>{l[0]?d(e,l[0]):c(e)}},e)]})},vr="adyen-pe-defend-dispute-document-upload-box",Rr={deleteButton:vr+"__delete-button-container",dropdownList:vr+"__dropdown-list",dropdownListMobile:vr+"__dropdown-list--mobile",extraDocuments:vr+"__extra-documents-selector",extraDocumentsTitle:vr+"__extra-documents-selector-title"},Md=({items:e,selection:t,setSelection:n,disabled:s,required:r,title:a,index:i,onRemoveOption:c,mapError:d})=>{var y,_;const{i18n:l}=W(),{addFileToDefendPayload:u,moveFieldInDefendPayload:h,removeFieldFromDefendPayload:p}=Dn(),f=C(v=>ra(l,v),[l]),T=Pe(Ie.down.xs),g=C(v=>{t&&h(t,v),n(v,i)},[i,h,t,n]);return G(()=>{const v=e.filter(({disabled:N})=>N!==!0);v.length===1&&!t&&g(v[0].id)},[e,t,g]),o("div",{className:Rr.extraDocuments,children:[o("div",{className:Rr.deleteButton,children:[o(P,{strongest:!0,className:Rr.extraDocumentsTitle,variant:O.BODY,el:J.DIV,children:a}),c&&o(ge,{disabled:s,onClick:()=>i!==void 0&&!s&&c(i),variant:ne.TERTIARY,fullWidth:!1,align:"center",children:o(Re,{name:"trash-can"})})]}),o("div",{children:[o(xn,{onChange:v=>{const N=v.target.value;g(N)},filterable:!1,selected:t,readonly:s,multiSelect:!1,items:e,popoverClassNameModifiers:[M(Rr.dropdownList,{[Rr.dropdownListMobile]:T})],showOverlay:!1,placeholder:l.get("disputes.uploadDocuments.selectDocumentType"),fixedPopoverPositioning:!0}),t&&((_=(y=f(t))==null?void 0:y.primaryDescriptionItems)==null?void 0:_.map(v=>o(P,{className:"adyen-pe-defend-dispute-document-upload__description",variant:O.BODY,el:J.PARAGRAPH,children:v},v)))]}),o(sf,{maxFileSize:v=>af[v],allowedFileTypes:of,mapError:d,onDelete:()=>{t&&p(t)},disabled:s||!t,required:r,onChange:v=>{t&&(v[0]?u(t,v[0]):p(t))}})]})},tD=["disputes.documentRequirements.mustBeInEnglish","disputes.documentRequirements.recommendedSize","disputes.documentRequirements.acceptableFormatAndSize"],nD=()=>{const{i18n:e}=W(),{defendDispute:t}=Ee().endpoints,{clearFiles:n,clearStates:s,dispute:r,applicableDocuments:a,goBack:i,defendDisputePayload:c,defendResponse:d,onDefendSubmit:l,removeFieldFromDefendPayload:u,setFlowState:h}=Dn(),p=r==null?void 0:r.dispute.pspReference,[f,T]=F(void 0),[g,y]=F([]),_=C(()=>{s(),h("details")},[s,h]),v=C((V,Z)=>{var me,Ne;switch(V){case ot.DISALLOWED_FILE_TYPE:return e.get("inputError.disallowedFileType");case ot.FILE_REQUIRED:return e.get("disputes.inputError.uploadAtLeastOneSupportingDocumentToContinue");case ot.TOO_MANY_FILES:return e.get("inputError.tooManyFiles");case ot.VERY_LARGE_FILE:return e.get("disputes.inputError.fileIsOverSizeLimitForTypeChooseASmallerFileAndTryAgain",{values:{size:(Z==null?void 0:Z.size)===void 0?void 0:Zd(Z.size),type:(Ne=(me=Z==null?void 0:Z.type)==null?void 0:me.replace(/^([^/]+\/)*/gi,""))==null?void 0:Ne.toUpperCase()}});default:return e.get("disputes.inputError.somethingWentWrongPleaseCheckYourDocuments")}},[e]),{requiredDocuments:N,optionalDocuments:S,oneOrMoreDocuments:D}=A(()=>{const V={requiredDocuments:[],optionalDocuments:[],oneOrMoreDocuments:[]};return(a??[]).forEach(({documentTypeCode:Z,requirementLevel:me})=>{var fe;const Ne=((fe=ra(e,Z))==null?void 0:fe.title)||Z;switch(me){case"REQUIRED":V.requiredDocuments.push(Z);break;case"OPTIONAL":V.optionalDocuments.push({id:Z,name:Ne});break;case"ONE_OR_MORE":V.oneOrMoreDocuments.push({id:Z,name:Ne});break}return V}),V},[a,e]),R=A(()=>{if(!c)return!1;let V=N.every(Z=>c.get(Z)instanceof File);return D.length>0&&V&&(V=D.some(Z=>c.get(Z.id)instanceof File)),V},[c,D,N]),b=lr({queryFn:t,options:{onSuccess:C(()=>{n(),l("success"),h("defenseSubmitResponseView")},[n,l,h]),onError:C(()=>{n(),l("error"),h("defenseSubmitResponseView")},[n,l,h])}}),E=d==="success",I=b.isLoading||E,w=c&&R&&!I,H=C(()=>{w&&b.mutate({contentType:"multipart/form-data",body:c},{path:{disputePspReference:p}})},[w,p,b,c]),x=A(()=>[{title:e.get("disputes.defend.submit"),disabled:!w,state:b.isLoading?"loading":"default",variant:ne.PRIMARY,event:H,classNames:E?["adyen-pe-defend-dispute__defended-btn"]:void 0,renderTitle:V=>E?o(Q,{children:[o(Re,{name:"checkmark-circle-fill",className:"adyen-pe-defend-dispute__defended-icon"}),e.get("disputes.defend.defended")]}):V},{title:e.get("disputes.goBack"),disabled:b.isLoading,variant:ne.SECONDARY,event:E?_:i}],[e,H,b.isLoading,E,i]),j=C((V,Z)=>{V===void 0?y(me=>[...me,V]):Z!==void 0&&y(me=>{if(me[Z]===V)return me;const Ne=[...me];return Ne[Z]=V,Ne})},[]),L=A(()=>{if(I)return!1;const V=S.length+Math.max(0,D.length-1);return!!(V&&V!==g.length)},[I,D,S,g]),U=C(()=>{L&&j()},[L,j]),ie=A(()=>[...D.filter(Z=>Z.id!==f),...S].map(Z=>({...Z,disabled:g.includes(Z.id)})),[D,f,S,g]),le=C(V=>{y(Z=>{if(V<0||V>=Z.length)return Z;const me=Z[V];return me&&u(me),Z.filter((Ne,fe)=>fe!==V)})},[u]);return o(Q,{children:o(Q,{children:[o(P,{className:"adyen-pe-defend-dispute-file-uploader__subtitle",variant:O.BODY,children:e.get("disputes.defend.uploadDocumentsInformation")}),o(Pr,{renderHeader:o(P,{variant:O.BODY,stronger:!0,className:"adyen-pe-defend-dispute-document-requirements",children:e.get("disputes.documentRequirements")}),filled:!0,expandable:!0,compact:!0,children:o("ul",{className:"adyen-pe-defend-dispute-document-requirements--list",children:tD.map((V,Z)=>o("li",{className:"adyen-pe-defend-dispute-document-requirements--item",children:o(P,{variant:O.BODY,children:e.get(V)})},`${V}-${Z}`))})}),o("div",{className:"adyen-pe-defend-dispute-file-uploader__container",children:[N.length||D.length?o("div",{className:"adyen-pe-defend-dispute-document-upload-box",children:[N.length?o("div",{className:"adyen-pe-defend-dispute-document-upload-box__required-documents",children:N==null?void 0:N.map(V=>o(eD,{mapError:v,disabled:I,document:V,required:!0},V))}):null,D.length?o(Md,{mapError:v,disabled:I,selection:f,setSelection:V=>T(V),items:D,title:e.get("disputes.uploadDocuments.extraRequiredDocument"),required:!0}):null]}):null,g.length?g.map((V,Z)=>o("div",{className:"adyen-pe-defend-dispute-document-upload-box",children:o(Md,{mapError:v,disabled:I,onRemoveOption:le,selection:V,setSelection:j,index:Z,items:ie,title:e.get("disputes.uploadDocuments.optionalDocument"),required:!0})},`optional-doc-${Z}`)):null,L&&o(ge,{align:"center",onClick:U,variant:ne.SECONDARY,fullWidth:!0,children:[o(Re,{name:"plus"}),e.get("disputes.uploadDocuments.addOptionalDocument")]})]}),o("div",{className:"adyen-pe-defend-file-uploader__actions",children:o(hs,{actions:x})})]})})},Mo="adyen-pe-defend-dispute-reason",xo={selector:Mo+"__selector",description:Mo+"__description",dropdownList:Mo+"__dropdown-list",dropdownListMobile:Mo+"__dropdown-list--mobile"},sD=()=>{var w,H,x,j;const{i18n:e}=W(),{applicableDocuments:t,dispute:n,goBack:s,setFlowState:r,setSelectedDefenseReason:a,selectedDefenseReason:i,setApplicableDocuments:c}=Dn(),d=(w=n==null?void 0:n.dispute)==null?void 0:w.allowedDefenseReasons,l=(H=n==null?void 0:n.dispute)==null?void 0:H.pspReference,[u,h]=F(!1),p=Pe(Ie.down.xs),f=A(()=>Object.freeze(d==null?void 0:d.map(L=>{var U;return{id:L,disabled:d.length===1,name:((U=oc(e,L))==null?void 0:U.title)??L}}))??[],[e,d]),T=A(()=>{var L,U;return i?(L=f.find(ie=>ie.id===i))==null?void 0:L.id:((U=f==null?void 0:f[0])==null?void 0:U.id)??null},[i,f]),{getApplicableDefenseDocuments:g}=Ee().endpoints,y=C(async()=>g==null?void 0:g(z,{query:{defenseReason:i},path:{disputePspReference:l}}),[i,l,g]),{error:_,isFetching:v}=gt({queryFn:y,fetchOptions:{enabled:u,onSuccess:C(L=>{h(!1),c((L==null?void 0:L.data)??null),L!=null&&L.data&&(L==null?void 0:L.data.length)>0&&r("uploadDefenseFilesView")},[c,h,r])}});G(()=>{h(!1)},[_]);const N=C(()=>{if(t!=null&&t.length)return r("uploadDefenseFilesView");h(!0)},[t,r]),S=C(L=>{var U;i!==L.target.value&&(t!=null&&t.length)&&c([]),(U=L==null?void 0:L.target)!=null&&U.value&&a(L.target.value)},[t,i,c,a]),D=A(()=>[{title:e.get("disputes.defend.continue"),disabled:u||v,event:N},{title:e.get("disputes.goBack"),disabled:u||v,event:s}],[v,u,e,s,N]),[R,b]=F(!0),E=C(()=>{b(!1)},[]),I=A(()=>T?oc(e,T):void 0,[e,T]);return!f||!T?null:o(Q,{children:[o("div",{className:xo.selector,children:[o(P,{className:"adyen-pe-defend-dispute__reason-description",variant:O.BODY,children:e.get("disputes.defend.selectDefenseReason")}),o(xn,{items:f,onChange:S,selected:T,popoverClassNameModifiers:[M(xo.dropdownList,{[xo.dropdownListMobile]:p})],fixedPopoverPositioning:!0}),(x=I==null?void 0:I.primaryDescriptionItems)==null?void 0:x.map((L,U)=>o(P,{el:J.PARAGRAPH,className:xo.description,variant:O.BODY,children:L},`description-${U}`)),((j=I==null?void 0:I.secondaryDescriptionItems)==null?void 0:j.length)&&o("ul",{className:"adyen-pe-defend-dispute-reason__secondary-description-items-container",children:I.secondaryDescriptionItems.map((L,U)=>o("li",{className:"adyen-pe-defend-dispute-reason__secondary-description-item",children:o(P,{el:J.PARAGRAPH,className:"adyen-pe-defend-dispute-reason__description",variant:O.BODY,children:L})},`description-item-${U}`))})]}),R&&o(st,{onClose:E,type:Oe.HIGHLIGHT,variant:at.DEFAULT,children:o(P,{className:"adyen-pe-alert__description",el:J.DIV,variant:O.BODY,wide:!0,children:e.get("disputes.defend.chargebackFeeInformation")})}),o("div",{className:"adyen-pe-defend-dispute__actions",children:o(hs,{actions:D})})]})},rD=({onDisputeDefend:e})=>{const{i18n:t}=W(),{clearFiles:n,clearStates:s,dispute:r,setFlowState:a,defendResponse:i}=Dn(),c=C(()=>{s(),a("details")},[s,a]),d=C(()=>{n(),a("uploadDefenseFilesView")},[n,a]),l=q(!1);return G(()=>{if(!l.current&&i==="success"&&ee(e)){const u=r==null?void 0:r.dispute.pspReference;u&&(l.current=!0,e({id:u}))}},[i,r,e]),o("div",{className:"adyen-pe-defend-dispute__response",children:i==="success"?o("div",{className:"adyen-pe-defend-dispute__success",children:[o(Re,{name:"checkmark-circle-fill",className:"adyen-pe-defend-dispute__success-icon"}),o(P,{variant:O.TITLE,children:t.get("disputes.defend.evidenceSubmitted")}),o(P,{variant:O.BODY,className:"adyen-pe-defend-dispute__success-description",children:t.get("disputes.defend.submitSuccessfulInformation")}),o("div",{className:"adyen-pe-defend-dispute__success-buttons",children:o(ge,{variant:ne.SECONDARY,onClick:c,children:t.get("disputes.showDisputeDetails")})})]}):o("div",{className:"adyen-pe-defend-dispute__error",children:[o(Re,{name:"cross-circle-fill",className:"adyen-pe-defend-dispute__error-icon"}),o(P,{variant:O.TITLE,medium:!0,children:t.get("disputes.defend.somethingWentWrong")}),o(P,{variant:O.BODY,children:t.get("disputes.error.weCouldNotProcessTheDisputePleaseTryAgainOrContactSupport")}),o(ge,{variant:ne.SECONDARY,onClick:d,children:t.get("disputes.goBack")})]})})},oD=({onDisputeDefend:e})=>{const{i18n:t}=W(),{applicableDocuments:n,flowState:s}=Dn();return o("div",{className:"adyen-pe-defend-dispute__container",children:[s!=="defenseSubmitResponseView"&&o(P,{className:"adyen-pe-defend-dispute__title",variant:O.TITLE,medium:!0,children:t.get("disputes.defend.chargeback")}),s==="defendReasonSelectionView"&&o(sD,{}),s==="uploadDefenseFilesView"&&!!(n!=null&&n.length)&&o(nD,{}),s==="defenseSubmitResponseView"&&o(rD,{onDisputeDefend:e})]})},It="adyen-pe-dispute-data",xd="adyen-pe-dispute-data--mobile",iD=`${It}__status-box`,aD=`${It}__action-bar`,cD=`${It}__label`,lD=`${It}__list`,dD=`${It}__list--evidence`,uD=`${It}__list-evidence-error-message`,Bd=`${It}__issuer-comment`,ll=`${It}__issuer-comments`,hD=`${ll}--expanded`,pD=`${ll}--truncated`,fD=`${It}__issuer-comments-alert`,mD=`${It}__issuer-comments-group`,_D="adyen-pe-dispute-data__error-container",gD="adyen-pe-dispute-data__status-box-skeleton",TD="adyen-pe-dispute-data__properties-skeleton",$d="adyen-pe-dispute-data__properties-skeleton-element",yD="adyen-pe-dispute-data__properties-skeleton-container",AD="adyen-pe-dispute-data__status-box-status-container",Ud="adyen-pe-dispute-data__status-box-status",vD="adyen-pe-dispute-data__status-box-amount",Hd="adyen-pe-dispute-data__status-box-payment-method",RD="adyen-pe-dispute-data__skeleton-container",CD="adyen-pe-dispute-data__status-box-payment-method-container",Wd=new Set(["allowedDefenseReasons","balanceAccount","amount","createdAt","defensibility","dueDate","id","latestDefense","paymentMerchantReference","paymentMethod","paymentPspReference","reasonCode","reasonGroup","status"]),SD=({issuerComments:e})=>{const{i18n:t}=W(),[n,s]=F(0),[r,a]=F(0),[i,c]=F(!1),[d,l]=F(!1),u=q(null),h=p=>{var f;p.preventDefault(),l(!d),(f=u.current)==null||f.style.setProperty("max-height",`${d?n:r}px`)};return cr(()=>{var p;if(u.current){const f=u.current,T=f.querySelector(`.${Bd}`),g=T?parseInt(getComputedStyle(T).getPropertyValue("line-height")):0,y=Math.min((T==null?void 0:T.clientHeight)||1/0,g*3),_=f.scrollHeight;s(y),a(_),c(_>y),(p=u.current)==null||p.style.setProperty("max-height",`${y}px`)}},[]),o(st,{type:Oe.HIGHLIGHT,variant:at.TIP,description:o("div",{className:fD,children:[o(P,{el:J.DIV,variant:O.BODY,strongest:!0,children:t.get("disputes.issuerComment.title")}),o("div",{className:M(ll,{[hD]:d,[pD]:i}),children:o("ul",{ref:u,className:mD,children:e.map((p,f)=>o("li",{children:o(P,{className:Bd,el:J.PARAGRAPH,variant:O.BODY,children:p})},f))})}),i&&o(ge,{variant:ne.TERTIARY,onClick:h,children:t.get(d?"disputes.issuerComment.showLess":"disputes.issuerComment.showMore")})]})})},lt={acceptedOn:"disputes.acceptedOn",account:"disputes.account",defendedOn:"disputes.defendedOn",defenseReason:"disputes.defenseReason",disputeEvidence:"disputes.evidence",disputeReason:"disputes.disputeReason",disputeReference:"disputes.disputeReference",expiredOn:"disputes.expiredOn",merchantReference:"disputes.merchantReference",openedOn:"disputes.openedOn",paymentReference:"disputes.paymentReference",reasonCode:"disputes.reasonCode",respondBy:"disputes.respondBy"},ED=["ACCEPTED","EXPIRED"],ND=({dispute:e,dataCustomization:t})=>{var c;const{i18n:n}=W(),{dateFormat:s}=kt(e.payment.balanceAccount.timeZone),[r,a]=F(),i=C(async()=>{var d,l,u;if(e){const h=await((l=(d=t==null?void 0:t.details)==null?void 0:d.onDataRetrieve)==null?void 0:l.call(d,e));a((u=t==null?void 0:t.details)==null?void 0:u.fields.reduce((p,f)=>Wd.has(f.key)||$i.includes(f.key)||(f==null?void 0:f.visibility)==="hidden"?p:{...p,...h!=null&&h[f.key]?{[f.key]:h[f.key]}:{}},{}))}},[e,t]);return G(()=>{i()},[i]),A(()=>{var H;const{pspReference:d,reason:l,acceptedDate:u,createdAt:h,dueDate:p,status:f,type:T}=e.dispute,{pspReference:g,merchantReference:y,balanceAccount:_}=e.payment,{reason:v,defendedOn:N,suppliedDocuments:S}=e.defense||{},D=T==="NOTIFICATION_OF_FRAUD",R=f==="EXPIRED"||f==="LOST"&&!D&&!N,b=Qp(e.dispute)&&e.dispute.defensibility!=="NOT_ACTIONABLE",E=null,w=[...[{key:lt.disputeReason,value:`${n.get(sa[l.category])} - ${l.title}`,id:"disputeReason"},D?E:{key:lt.reasonCode,value:l.code,id:"reasonCode"},{key:lt.openedOn,value:s(h,yr),id:"openedOn"},p&&b?{key:lt.respondBy,value:s(p,yr),id:"respondBy"}:E,{key:lt.disputeReference,value:o(Ut,{type:"Default",textToCopy:d,showCopyTextTooltip:!1}),id:"disputeId"},{key:lt.account,value:_.description,id:"account"},{key:lt.paymentReference,value:o(Ut,{type:"Default",textToCopy:g,showCopyTextTooltip:!1}),id:"paymentPspReference"},y?{key:lt.merchantReference,value:o(Ut,{type:"Default",textToCopy:y,showCopyTextTooltip:!1}),id:"paymentMerchantReference"}:E,v?{key:lt.defenseReason,value:((H=oc(n,v))==null?void 0:H.title)??v,id:"defenseReason"}:E,N?{key:lt.defendedOn,value:s(N,yr),id:"defendedOn"}:E,S&&S.length>0?{key:lt.disputeEvidence,value:o(Q,{children:S.map((x,j)=>{var U;const L={path:{disputePspReference:d},query:{documentType:x}};return o("div",{className:dD,children:[o(it,{label:((U=ra(n,x))==null?void 0:U.title)??x}),o(Wp,{className:"adyen-pe-dispute-document-download",endpointName:"downloadDefenseDocument",disabled:!1,requestParams:L,iconButton:!0,errorMessage:()=>o("div",{className:uD,children:[o(Re,{name:"info-filled"}),o(P,{variant:O.CAPTION,el:J.SPAN,children:n.get("disputes.error.failedRetry")})]}),onDownloadRequested:()=>console.warn("Download failed for",x)})]},`${x}-${j}`)})}),id:"disputeEvidence"}:E,u&&ED.includes(f)?{key:lt.acceptedOn,value:s(u,yr),id:"acceptedOn"}:E,p&&R?{key:lt.expiredOn,value:s(p,yr),id:"expiredOn"}:E].filter(Boolean).filter(x=>{var j,L;return!((L=(j=t==null?void 0:t.details)==null?void 0:j.fields)!=null&&L.some(U=>U.key===x.id&&U.visibility==="hidden"))}),...Object.entries(r||{}).filter(([x,j])=>!Wd.has(x)&&j.type!=="button"&&j.visibility!=="hidden").map(([x,j])=>({key:x,value:en(j)?j.value:j,type:en(j)?j.type:"text",config:en(j)?j.config:void 0}))||{}];return o(Tn,{classNames:lD,items:w,layout:"4-8",align:"start",renderLabel:x=>o("div",{className:cD,children:x}),renderValue:(x,j,L,U)=>{if(L==="link"&&U)return o(wi,{classNames:[M(U==null?void 0:U.className)],href:U.href,target:U.target||"_blank",children:x});if(L==="icon"&&U){const ie={url:U==null?void 0:U.src,alt:U.alt||x};return o("div",{className:M("adyen-pe-dispute-data__list-icon-value",U==null?void 0:U.className),children:[o(Li,{...ie}),o(P,{variant:O.BODY,children:x})]})}return o(P,{className:M(U==null?void 0:U.className),variant:O.BODY,children:x})}})},[e,n,s,r,(c=t==null?void 0:t.details)==null?void 0:c.fields])},DD=(e,t,n)=>{if(!e)return Yr;switch(e.errorCode){case void 0:return{title:"somethingWentWrong",message:[t,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0};case"00_500":{const s=n?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";return{title:"somethingWentWrong",message:[t,s],translationValues:{[s]:e.requestId?o(Ut,{textToCopy:e.requestId}):null},onContactSupport:n}}case"30_112":return{title:"disputes.error.entityWasNotFound",message:["disputes.error.entityWasNotFoundDetail"],onContactSupport:n};default:return Yr}},bD=e=>!!e&&typeof e=="object"&&e.type==="button",OD=({alertMode:e,dispute:t,timeZone:n})=>{const{i18n:s}=W(),{dateFormat:r}=kt(n);switch(e){case"contactSupport":{const{dueDate:a,type:i}=t,c=i==="REQUEST_FOR_INFORMATION"?"disputes.contactSupport.toDefendRequestForInformation":i==="NOTIFICATION_OF_FRAUD"?"disputes.contactSupport.toResolveNotificationOfFraud":"disputes.contactSupport.toDefendDispute";return o(st,{type:Oe.WARNING,variant:at.TIP,description:o(Q,{children:[s.get(c),i!=="NOTIFICATION_OF_FRAUD"&&!!a&&o(Q,{children:[" ",o(hr,{translationKey:"disputes.alert.responseDeadline",fills:{date:o(P,{variant:O.BODY,el:J.SPAN,stronger:!0,children:r(a,J1)})}})]})]})})}case"autoDefended":return o(st,{type:Oe.HIGHLIGHT,variant:at.TIP,description:s.get("disputes.alert.autoDefended")});case"notDefended":{const a=t.status==="EXPIRED"?"disputes.alert.notDefendedExpired":"disputes.alert.notDefendedLost";return o(st,{type:Oe.HIGHLIGHT,variant:at.TIP,description:s.get(a)})}case"notDefendable":return o(st,{type:Oe.HIGHLIGHT,variant:at.TIP,description:s.get("disputes.alert.notDefendable")})}return null},ID=({disputeId:e,dataCustomization:t,onContactSupport:n,onDismiss:s})=>{var Ne,fe,Ce;const{i18n:r}=W(),{dispute:a,setDispute:i,setFlowState:c}=Dn(),{getDisputeDetail:d,getApplicableDefenseDocuments:l,acceptDispute:u}=Ee().endpoints,h=ee(u),p=ee(l),f=Pe(Ie.up.sm),{data:T,isFetching:g,error:y}=gt(A(()=>({fetchOptions:{enabled:!!e&&!!d&&!a,onSuccess:ae=>{i(ae)}},queryFn:async()=>d(z,{path:{disputePspReference:e}})}),[a,e,d,i])),_=a||T,v=(Ne=_==null?void 0:_.dispute)==null?void 0:Ne.defensibility,N=lh({amountData:_==null?void 0:_.dispute.amount,paymentMethodData:_==null?void 0:_.payment.paymentMethod}),S=A(()=>{const{chargeback:ae,preArbitration:Te}=(_==null?void 0:_.dispute.issuerExtraData)??{},He=[];return[Te,ae].forEach(he=>{he&&["LIABILITY_NOT_ACCEPTED_FULLY","PRE_ARB_REASON","NOTE"].forEach($e=>{const We=he[$e],De=We==null?void 0:We.trim();De&&He.push(De)})}),He.filter(Boolean)},[_]),D=A(()=>{const ae=_==null?void 0:_.dispute.type;return ae&&r.get(FR[ae])},[r,_]),R=!!v&&["ACCEPTABLE","DEFENDABLE_EXTERNALLY"].includes(v)||(_==null?void 0:_.dispute.type)==="NOTIFICATION_OF_FRAUD",b=!!v&&v==="DEFENDABLE"&&p,E=!!v&&["ACCEPTABLE","DEFENDABLE"].includes(v)&&h,I=C(()=>{c("accept")},[c]),w=C(()=>{c("defendReasonSelectionView")},[c]),[H,x]=F([]),j=C(async()=>{var Te,He;const ae=T&&await((He=(Te=t==null?void 0:t.details)==null?void 0:Te.onDataRetrieve)==null?void 0:He.call(Te,T));if(ae)return x(Object.values(ae).filter(he=>bD(he)))},[T,t==null?void 0:t.details]);G(()=>{j()},[j]);const L=A(()=>{const ae=[];return b&&ae.push({title:r.get("disputes.defend.chargeback"),event:w}),E&&ae.push({title:r.get("disputes.accept"),event:I,variant:ne.SECONDARY}),R&&ee(n)&&ae.push({title:r.get("contactSupport"),event:n,variant:ne.SECONDARY}),H&&H.length&&H.forEach(Te=>{var He;ae.push({title:Te==null?void 0:Te.value,event:(He=Te==null?void 0:Te.config)==null?void 0:He.action,variant:ne.SECONDARY})}),ae},[b,r,w,E,R,n,H,I]),U=A(()=>!!_&&Qp(_.dispute),[_]),ie=C(()=>o(ge,{variant:ne.SECONDARY,onClick:s,children:r.get("disputes.goBack")}),[r,s]);if(!_&&!y||g){const ae=Array.from({length:5});return o("div",{className:M(It,{[xd]:!f}),children:o("div",{className:RD,children:[o("div",{className:gD,children:[o("div",{className:AD,children:[o("span",{className:Ud}),o("span",{className:Ud})]}),o("span",{className:vD}),o("div",{className:CD,children:[o("span",{className:Hd}),o("span",{className:Hd})]})]}),o("div",{className:yD,children:ae.map((Te,He)=>o("div",{className:TD,children:[o("span",{className:$d}),o("span",{className:$d})]},`skeleton-${He}`))})]})})}const le=(_==null?void 0:_.dispute.type)==="NOTIFICATION_OF_FRAUD",V=!!(_!=null&&_.defense&&_.defense.defendedOn);let Z;((fe=_==null?void 0:_.defense)==null?void 0:fe.autodefended)===!0?Z="autoDefended":U&&v==="NOT_ACTIONABLE"?Z="notDefendable":U&&R||R&&le?Z="contactSupport":((_==null?void 0:_.dispute.status)==="EXPIRED"||(_==null?void 0:_.dispute.status)==="LOST"&&!(le||V))&&(Z="notDefended");const me=DD(y,"disputes.error.weCouldNotLoadYourDispute",n);return o("div",{className:M(It,{[xd]:!f}),children:y?o("div",{className:_D,children:o(Jt,{renderSecondaryButton:s?ie:void 0,withImage:!0,outlined:!1,absolutePosition:!1,withBackground:!1,...me})}):_?o(Q,{children:[o("div",{className:iD,children:o(Oh,{...N,tag:o(Q,{children:[D&&o(it,{label:D}),!le&&o(ef,{dispute:_.dispute})]})})}),S.length>0&&o(SD,{issuerComments:S}),Z&&o(OD,{alertMode:Z,dispute:_.dispute,timeZone:(Ce=_.payment.balanceAccount)==null?void 0:Ce.timeZone}),o(ND,{dispute:_,dataCustomization:t}),L.length>0?o("div",{className:aD,children:o(hs,{actions:L})}):null]}):null})},PD=({id:e,hideTitle:t,dataCustomization:n,onContactSupport:s,onDisputeAccept:r,onDisputeDefend:a,onDismiss:i})=>{const{flowState:c}=Dn(),{i18n:d}=W();switch(c){case"details":return o(Q,{children:[!t&&o(P,{variant:O.TITLE,medium:!0,children:d.get("disputes.disputeManagementTitle")}),o(ID,{disputeId:e,dataCustomization:n,onContactSupport:s,onDismiss:i})]});case"accept":return o($R,{onDisputeAccept:r});case"defendReasonSelectionView":case"defenseSubmitResponseView":case"uploadDefenseFilesView":return o(oD,{onDisputeDefend:a});default:return null}},cf=e=>{const[t,n]=F(),s=C(r=>{n(r)},[]);return o(BR,{dispute:t,setDispute:s,children:o("div",{className:"adyen-pe-dispute__container",children:o(PD,{...e})})})},kD=({children:e,selectedDetail:t,resetDetails:n,dataCustomization:s,onContactSupport:r,refreshDisputesList:a,setModalVisible:i})=>{const{i18n:c}=W(),[d,l]=F(!1),u=!!t,h=C(()=>{d&&(l(!1),a("CHARGEBACKS")),i(!1),n()},[d,a,n,i]),p=C(()=>{l(!0)},[]);return G(()=>{u&&(i(!0),Ns.closeAll())},[u,i]),o("div",{children:[e,t&&o(Lh,{isOpen:u,"aria-label":c.get("disputes.disputeManagementTitle"),onClose:h,isDismissible:!0,headerWithBorder:!1,size:t.modalSize||"large",children:o("div",{className:"adyen-pe-dispute-management-modal-content",children:o(cf,{id:t.selection.data,dataCustomization:s,onDisputeAccept:p,onDisputeDefend:p,onContactSupport:r,onDismiss:n,hideTitle:!0})})})]})};function wD({activeTab:e,tabs:t,onChange:n}){const{activeIndex:s,onClick:r,onKeyDown:a,refs:i,uniqueId:c}=zp({onChange:n,options:t,activeOption:e}),{i18n:d}=W();return o("section",{"aria-label":d.get("tabs"),children:[o("div",{className:"adyen-pe-tabs",role:"tablist","aria-orientation":"horizontal",children:t.map((l,u)=>{const h=s===u;return o("button",{role:"tab",name:l.id,ref:i[u],id:`tab:${c}-${l.id}`,className:"adyen-pe-tabs__tab","aria-controls":`panel:${c}-${l.id}`,"aria-selected":h,onClick:h?void 0:r,onKeyDown:a,disabled:l.disabled,tabIndex:h?0:-1,children:o(P,{el:J.SPAN,variant:O.BODY,className:"adyen-pe-tabs__tab-label",stronger:!0,children:d.get(l.label)})},`tab:${c}-${l.id}`)})}),o("div",{className:"adyen-pe-tabpanels",children:t.map((l,u)=>o("section",{role:"tabpanel",id:`panel:${c}-${l.id}`,className:"adyen-pe-tabpanels__panel","aria-labelledby":`tab:${c}-${l.id}`,hidden:s!==u,children:l.content},`panel:${c}-${l.id}`))})]})}const Gd="CHARGEBACKS",Ra="schemeCodes",gs="reasonCategories",Ca="_t",LD=Object.keys(Kp),FD=Object.keys(sa),MD=Object.keys(cl),lf=Object.entries(cl).map(([e,t])=>({id:e,label:t,content:null})),xD=({activeTab:e,onChange:t})=>{const{i18n:n}=W(),[s,r]=F(e),a=A(()=>Object.entries(cl).map(([i,c])=>({id:i,name:n.get(c)})),[n]);return G(()=>{const i=lf.find(c=>c.id===s);i&&t(i)},[t,s]),G(()=>r(e),[e]),o(xn,{items:a,selected:s,onChange:({target:i})=>r(i.value),showOverlay:!0,multiSelect:!1,filterable:!1})},BD=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n=!0,preferredLimit:s=ur,isLoadingBalanceAccount:r,onContactSupport:a,hideTitle:i,onRecordSelection:c,showDetails:d,dataCustomization:l})=>{const{i18n:u}=W(),{getDisputeList:h}=Ee().endpoints,{activeBalanceAccount:p,balanceAccountSelectionOptions:f,onBalanceAccountSelection:T}=Yi(t,!0),{defaultParams:g,nowTimestamp:y,refreshNowTimestamp:_}=Ji("disputes",p),[v,N]=F(!1),[S,D]=F(),[R,b]=F(Gd),[E,I]=F(!1),[w,H]=F(R),x=A(()=>({showDetails:d??!0,callback:c}),[d,c]),j=A(()=>({dispute:x}),[x]),L=C(async({[Ca]:ve,...Fe},Wt)=>h({signal:Wt,errorLevel:"error"},{query:{...Fe,...(p==null?void 0:p.id)!==ri&&{balanceAccountId:(p==null?void 0:p.id)??""},reasonCategories:Gn(Fe[gs]),schemeCodes:Gn(Fe[Ra]),createdSince:Fe[re.CREATED_SINCE]??g.current.defaultFilterParams[re.CREATED_SINCE],createdUntil:Fe[re.CREATED_UNTIL]??g.current.defaultFilterParams[re.CREATED_UNTIL]}}),[p==null?void 0:p.id,g,h]),U=Hi(),ie=A(()=>ee(e)?e:void 0,[e]),le=A(()=>n?ji:void 0,[n]),V=Object.assign(g.current.defaultFilterParams,{[gs]:void 0,[Ra]:void 0,[Ca]:performance.now(),statusGroup:Gd}),{canResetFilters:Z,error:me,fetching:Ne,filters:fe,limit:Ce,limitOptions:ae,records:Te,resetFilters:He,updateFilters:he,updateLimit:$e,...We}=Vi({fetchRecords:L,dataField:"data",filterParams:V,initialFiltersSameAsDefault:!0,onFiltersChanged:ie,preferredLimit:s,preferredLimitOptions:le,enabled:!!(p!=null&&p.id)&&!!h}),De=q(void 0),yt=Fr({mapFilterOptionName:C(ve=>u.get(sa[ve]),[u]),filterParam:gs,filterValues:FD,defaultFilters:{...V,[gs]:De.current},updateFilters:he,filters:fe}),bn=Fr({mapFilterOptionName:C(ve=>Kp[ve],[]),filterParam:Ra,filterValues:LD,defaultFilters:V,updateFilters:he,filters:fe}),{updateDetails:on,resetDetails:gr,selectedDetail:_e}=Qc(j),we=C(({disputePspReference:ve})=>{on({selection:{type:"dispute",data:ve},modalSize:"small"}).callback({id:ve})},[on]),Le=A(()=>{const ve=new Date(y),Fe=ve.setFullYear(ve.getFullYear()-1),Wt=new Date(kR).getTime();return new Date(Math.max(Wt,Fe)).toString()},[y]),an=q(null),Bn=C(({id:ve})=>{an.current&&clearTimeout(an.current),an.current=setTimeout(()=>{requestAnimationFrame(()=>I(!1));const Fe=gs,Wt={statusGroup:ve,[Fe]:void 0};ve!=="FRAUD_ALERTS"&&(Wt[Fe]=De.current),he(Wt),an.current=null},500),b(ve),I(!0),H(void 0)},[he]),fs=C(ve=>{ve&&MD.includes(ve)&&ve!==R?H(ve):he({[Ca]:performance.now()})},[R,he]),$n=Pe(Ie.down.xs);return G(()=>{D($n&&v?{maxHeight:0,overflowY:"hidden"}:void 0)},[$n,v]),G(()=>{_(),fe.statusGroup!=="FRAUD_ALERTS"&&(De.current=fe[gs])},[fe,_]),o("div",{style:S,className:M(al,{[IR]:$n}),children:[o(No,{hideTitle:i,titleKey:"disputes.title",children:o(Wi,{...U})}),o("div",{children:[o("div",{className:PR,children:$n?o(xD,{activeTab:w??R,onChange:Bn}):o(wD,{tabs:lf,activeTab:w,onChange:Bn})}),o(Gi,{...U,children:[o(qi,{activeBalanceAccount:p,balanceAccountSelectionOptions:f,onBalanceAccountSelection:T}),o(Qi,{canResetFilters:Z,defaultParams:g,filters:fe,nowTimestamp:y,refreshNowTimestamp:_,sinceDate:Le,timezone:p==null?void 0:p.timeZone,updateFilters:he}),o(ii,{...bn,placeholder:u.get("disputes.paymentMethod")}),R!=="FRAUD_ALERTS"&&o(ii,{...yt,placeholder:u.get("disputes.disputeReason")})]})]}),o(kD,{dataCustomization:(l==null?void 0:l.details)&&{details:l==null?void 0:l.details},selectedDetail:_e,resetDetails:gr,onContactSupport:a,refreshDisputesList:fs,setModalVisible:N,children:o(xR,{activeBalanceAccount:p,balanceAccountId:p==null?void 0:p.id,loading:E||Ne||r||!t||!p,data:Te,showPagination:!0,limit:Ce,limitOptions:ae,onContactSupport:a,onLimitSelection:$e,error:me,onRowClick:we,statusGroup:R,...We})})]})};function $D({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:s,error:r}=Eo(e.balanceAccountId);return o(Ui,{balanceAccountsError:r,className:"adyen-pe-disputes-overview-container",errorMessage:"disputes.error.couldNotLoadDisputesOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:o(BD,{...e,balanceAccounts:t,isLoadingBalanceAccount:s})})}class df extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o($D,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(df,"type","disputes");class uf extends Sn{constructor(n){super(n);Y(this,"componentToRender",()=>o(cf,{...this.props,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}Y(uf,"type","disputesManagement");async function UD(e){return await new pc(e).initialize()}exports.AdyenPlatformExperience=UD;exports.CapitalOfferElement=Hp;exports.CapitalOverviewElement=Xp;exports.Core=pc;exports.DisputeManagementElement=uf;exports.DisputesOverviewElement=df;exports.PayoutElement=xh;exports.PayoutsElement=Np;exports.ReportsElement=jp;exports.TransactionElement=Dp;exports.TransactionsElement=xp;exports.all_locales=lc;exports.da_DK=cu;exports.de_DE=lu;exports.en_US=Xo;exports.es_ES=du;exports.fi_FI=uu;exports.fr_FR=hu;exports.it_IT=pu;exports.nl_NL=fu;exports.no_NO=mu;exports.pt_BR=_u;exports.sv_SE=gu;exports.u=o;
|
|
12
|
+
//# sourceMappingURL=index-BKTWT4wv.cjs.map
|