@adyen/adyen-platform-experience-web 1.4.2 → 1.5.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.
Files changed (287) hide show
  1. package/dist/adyen-platform-experience-web.css +1 -1
  2. package/dist/{angle-right-C1JIrQTg.cjs → angle-right-DCDtBphj.cjs} +2 -2
  3. package/dist/{angle-right-C1JIrQTg.cjs.map → angle-right-DCDtBphj.cjs.map} +1 -1
  4. package/dist/{checkmark-B8DhX3p1.cjs → checkmark-BUtjcpAC.cjs} +2 -2
  5. package/dist/{checkmark-B8DhX3p1.cjs.map → checkmark-BUtjcpAC.cjs.map} +1 -1
  6. package/dist/{checkmark-circle-fill-CMpIlMCC.cjs → checkmark-circle-fill-CtUhQzOt.cjs} +2 -2
  7. package/dist/{checkmark-circle-fill-CMpIlMCC.cjs.map → checkmark-circle-fill-CtUhQzOt.cjs.map} +1 -1
  8. package/dist/{checkmark-square-fill-Cy8Hzt9P.cjs → checkmark-square-fill-Cpdn8YWp.cjs} +2 -2
  9. package/dist/{checkmark-square-fill-Cy8Hzt9P.cjs.map → checkmark-square-fill-Cpdn8YWp.cjs.map} +1 -1
  10. package/dist/{chevron-down-CB77LxQY.cjs → chevron-down-CEgNjZK_.cjs} +2 -2
  11. package/dist/{chevron-down-CB77LxQY.cjs.map → chevron-down-CEgNjZK_.cjs.map} +1 -1
  12. package/dist/{chevron-left-DMAmIvLF.cjs → chevron-left-BgN_rxGR.cjs} +2 -2
  13. package/dist/{chevron-left-DMAmIvLF.cjs.map → chevron-left-BgN_rxGR.cjs.map} +1 -1
  14. package/dist/{chevron-right-BxLJu7Zf.cjs → chevron-right-Jwt5BuB-.cjs} +2 -2
  15. package/dist/{chevron-right-BxLJu7Zf.cjs.map → chevron-right-Jwt5BuB-.cjs.map} +1 -1
  16. package/dist/{chevron-up-CT79XJdh.cjs → chevron-up-B_O0vmIX.cjs} +2 -2
  17. package/dist/{chevron-up-CT79XJdh.cjs.map → chevron-up-B_O0vmIX.cjs.map} +1 -1
  18. package/dist/cjs/index.js +1 -1
  19. package/dist/{copy-7UpFtMvt.cjs → copy-DztEPGun.cjs} +2 -2
  20. package/dist/{copy-7UpFtMvt.cjs.map → copy-DztEPGun.cjs.map} +1 -1
  21. package/dist/{cross-DtVirgrN.cjs → cross-B9ojc3kB.cjs} +2 -2
  22. package/dist/{cross-DtVirgrN.cjs.map → cross-B9ojc3kB.cjs.map} +1 -1
  23. package/dist/{cross-circle-fill-C47yImD2.cjs → cross-circle-fill-Dy_LlcFp.cjs} +2 -2
  24. package/dist/{cross-circle-fill-C47yImD2.cjs.map → cross-circle-fill-Dy_LlcFp.cjs.map} +1 -1
  25. package/dist/da-DK-DAJvnb2s.cjs +2 -0
  26. package/dist/da-DK-DAJvnb2s.cjs.map +1 -0
  27. package/dist/de-DE-DFMmcoWN.cjs +2 -0
  28. package/dist/de-DE-DFMmcoWN.cjs.map +1 -0
  29. package/dist/{download-A1m1wB_K.cjs → download-DsN3U6Xn.cjs} +2 -2
  30. package/dist/{download-A1m1wB_K.cjs.map → download-DsN3U6Xn.cjs.map} +1 -1
  31. package/dist/es/components/external/CapitalOffer/components/CapitalOffer/CapitalOffer.js +14 -14
  32. package/dist/es/components/external/CapitalOffer/components/CapitalOfferSelection/CapitalOfferSelection.js +20 -20
  33. package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +73 -62
  34. package/dist/es/components/external/CapitalOffer/components/utils/utils.js +16 -16
  35. package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js +3 -3
  36. package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js +3 -3
  37. package/dist/es/components/external/CapitalOverview/components/AccountDetails/utils.js +3 -3
  38. package/dist/es/components/external/CapitalOverview/components/GrantAction/GrantAction.js +6 -6
  39. package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.js +0 -1
  40. package/dist/es/components/external/CapitalOverview/components/GrantDetails/GrantDetails.js +2 -2
  41. package/dist/es/components/external/CapitalOverview/components/GrantItem/utils.js +14 -14
  42. package/dist/es/components/external/CapitalOverview/components/GrantList/GrantList.js +2 -2
  43. package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +4 -4
  44. package/dist/es/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.js +1 -1
  45. package/dist/es/components/external/CapitalOverview/components/PreQualified/PreQualified.js +13 -13
  46. package/dist/es/components/external/CapitalOverview/components/Unqualified.js +2 -2
  47. package/dist/es/components/external/CapitalOverview/constants.js +0 -1
  48. package/dist/es/components/external/PayoutDetails/components/PayoutData.js +21 -21
  49. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +17 -17
  50. package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +4 -4
  51. package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +16 -16
  52. package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +1 -1
  53. package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +20 -20
  54. package/dist/es/components/external/TransactionDetails/components/details/TransactionDataProperties.js +4 -4
  55. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js +8 -8
  56. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundNotice.js +1 -1
  57. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundReason.js +2 -2
  58. package/dist/es/components/external/TransactionDetails/context/details/context.js +10 -10
  59. package/dist/es/components/external/TransactionDetails/context/refund/context.js +1 -1
  60. package/dist/es/components/external/TransactionDetails/context/refund/hooks/useRefundContextLineItems.js +2 -2
  61. package/dist/es/components/external/TransactionDetails/hooks/useTransaction/transactionNavigator/createDuplexTransactionNavigator.js +20 -20
  62. package/dist/es/components/external/TransactionDetails/hooks/useTransaction/useTransaction.js +3 -3
  63. package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +2 -2
  64. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +4 -4
  65. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +3 -3
  66. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +8 -8
  67. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +66 -66
  68. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +19 -19
  69. package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +3 -3
  70. package/dist/es/components/internal/Accordion/Accordion.js +10 -10
  71. package/dist/es/components/internal/Alert/Alert.js +1 -1
  72. package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +5 -5
  73. package/dist/es/components/internal/Button/hooks/useButton.js +7 -7
  74. package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +104 -104
  75. package/dist/es/components/internal/Calendar/calendar/facade/index.js +12 -12
  76. package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +14 -14
  77. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +4 -4
  78. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +58 -58
  79. package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +4 -4
  80. package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +3 -3
  81. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +2 -2
  82. package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +7 -7
  83. package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +6 -6
  84. package/dist/es/components/internal/Calendar/calendar/utils.js +22 -22
  85. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +11 -11
  86. package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +22 -22
  87. package/dist/es/components/internal/Calendar/hooks/useCalendar.js +7 -7
  88. package/dist/es/components/internal/Calendar/hooks/useTimezone.js +12 -12
  89. package/dist/es/components/internal/CapitalHeader/constants.js +4 -4
  90. package/dist/es/components/internal/CapitalHeader/helpers.js +14 -12
  91. package/dist/es/components/internal/Card/Card.js +9 -9
  92. package/dist/es/components/internal/DataGrid/DataGridCell.js +8 -8
  93. package/dist/es/components/internal/DataGrid/components/TableCells.js +16 -16
  94. package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +13 -13
  95. package/dist/es/components/internal/DataOverviewDetails/useDataOverviewDetailsTitle.js +8 -8
  96. package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +5 -5
  97. package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +3 -3
  98. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +29 -29
  99. package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +1 -2
  100. package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +23 -23
  101. package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +2 -2
  102. package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +31 -31
  103. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +33 -33
  104. package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +15 -15
  105. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +2 -2
  106. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +9 -9
  107. package/dist/es/components/internal/FormFields/InputBase.js +5 -5
  108. package/dist/es/components/internal/FormFields/Select/Select.js +15 -15
  109. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +43 -43
  110. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +14 -14
  111. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +5 -5
  112. package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +2 -2
  113. package/dist/es/components/internal/Header/Header.js +4 -4
  114. package/dist/es/components/internal/Icon/Icon.js +3 -3
  115. package/dist/es/components/internal/Img/Img.js +2 -2
  116. package/dist/es/components/internal/Link/Link.js +2 -2
  117. package/dist/es/components/internal/Modal/Modal.js +4 -4
  118. package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +12 -12
  119. package/dist/es/components/internal/Pagination/hooks/usePagination.js +22 -22
  120. package/dist/es/components/internal/Popover/Popover.js +4 -4
  121. package/dist/es/components/internal/ProgressBar/ProgressBar.js +3 -3
  122. package/dist/es/components/internal/SVGIcons/Checkmark.js +3 -3
  123. package/dist/es/components/internal/SVGIcons/ChevronLeft.js +12 -10
  124. package/dist/es/components/internal/SVGIcons/ChevronRight.js +12 -10
  125. package/dist/es/components/internal/SVGIcons/CloseCircle.js +1 -1
  126. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +13 -13
  127. package/dist/es/components/internal/StructuredList/StructuredList.js +4 -4
  128. package/dist/es/components/internal/Translation/Translation.js +15 -15
  129. package/dist/es/components/utils/getErrorMessage.js +2 -2
  130. package/dist/es/constants/dateFormats.js +3 -3
  131. package/dist/es/core/ConfigContext/context.js +18 -18
  132. package/dist/es/core/ConfigContext/session/AuthSession.js +36 -36
  133. package/dist/es/core/ConfigContext/session/AuthSessionSpecification.js +7 -7
  134. package/dist/es/core/ConfigContext/session/SetupContext.js +5 -5
  135. package/dist/es/core/ConfigContext/session/constants.js +8 -8
  136. package/dist/es/core/ConfigContext/session/utils/sessionReady.js +5 -5
  137. package/dist/es/core/Http/utils.js +1 -1
  138. package/dist/es/core/Localization/Localization.js +32 -32
  139. package/dist/es/core/Localization/datetime/restamper/constants.js +3 -3
  140. package/dist/es/core/Localization/datetime/restamper/restamper.js +1 -1
  141. package/dist/es/core/Localization/utils.js +1 -1
  142. package/dist/es/core/core.js +1 -1
  143. package/dist/es/external/preact/compat/dist/compat.module.js +40 -40
  144. package/dist/es/external/preact/dist/preact.module.js +197 -195
  145. package/dist/es/external/preact/hooks/dist/hooks.module.js +71 -67
  146. package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +9 -9
  147. package/dist/es/hooks/element/useDetachedRender.js +11 -11
  148. package/dist/es/hooks/element/useFocusTrap.js +5 -5
  149. package/dist/es/hooks/useBalanceAccountSelection.js +10 -10
  150. package/dist/es/hooks/useCommitAction/useCommitAction.js +7 -7
  151. package/dist/es/hooks/useContainerQuery.js +4 -4
  152. package/dist/es/hooks/useCustomColumnsData.js +2 -2
  153. package/dist/es/hooks/useDefaultOverviewFilterParams.js +18 -18
  154. package/dist/es/hooks/useFetch.js +22 -22
  155. package/dist/es/hooks/useModalDetails/useModalDetails.js +7 -7
  156. package/dist/es/hooks/useMutation/useMutation.js +3 -3
  157. package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -21
  158. package/dist/es/hooks/useResponsiveContainer.js +7 -10
  159. package/dist/es/hooks/useTabbedControl.js +9 -9
  160. package/dist/es/primitives/async/abortable/main.js +9 -9
  161. package/dist/es/primitives/async/deferred/main.js +1 -1
  162. package/dist/es/primitives/auxiliary/errorContainer/main.js +9 -9
  163. package/dist/es/primitives/auxiliary/indexed/helpers.js +4 -4
  164. package/dist/es/primitives/auxiliary/indexed/main.js +7 -7
  165. package/dist/es/primitives/context/session/internal/autofresher.js +15 -15
  166. package/dist/es/primitives/context/session/internal/deadline.js +22 -22
  167. package/dist/es/primitives/context/session/internal/refresher.js +19 -19
  168. package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -3
  169. package/dist/es/primitives/reactive/eventEmitter/main.js +3 -3
  170. package/dist/es/primitives/reactive/reflex/main.js +22 -22
  171. package/dist/es/primitives/reactive/reflex/register.js +25 -25
  172. package/dist/es/primitives/reactive/watchlist/main.js +24 -24
  173. package/dist/es/primitives/time/clock/main.js +6 -6
  174. package/dist/es/primitives/time/interval/main.js +9 -9
  175. package/dist/es/translations/da-DK.json.js +55 -46
  176. package/dist/es/translations/de-DE.json.js +71 -62
  177. package/dist/es/translations/en-US.json.js +41 -38
  178. package/dist/es/translations/es-ES.json.js +79 -70
  179. package/dist/es/translations/fi-FI.json.js +97 -88
  180. package/dist/es/translations/fr-FR.json.js +75 -66
  181. package/dist/es/translations/it-IT.json.js +107 -98
  182. package/dist/es/translations/nl-NL.json.js +80 -71
  183. package/dist/es/translations/no-NO.json.js +67 -58
  184. package/dist/es/translations/pt-BR.json.js +71 -62
  185. package/dist/es/translations/sv-SE.json.js +95 -86
  186. package/dist/es/utils/abort/internals.js +3 -3
  187. package/dist/es/utils/abort/main.js +19 -19
  188. package/dist/es/utils/collection/main.js +14 -14
  189. package/dist/es/utils/datetime/main.js +3 -3
  190. package/dist/es/utils/preact/className.js +2 -2
  191. package/dist/es/utils/struct/main.js +8 -8
  192. package/dist/es/utils/value/is.js +9 -9
  193. package/dist/es/utils/value/number.js +2 -2
  194. package/dist/es-ES-DWJu_JsZ.cjs +2 -0
  195. package/dist/es-ES-DWJu_JsZ.cjs.map +1 -0
  196. package/dist/{external-link-Ct-WlQoY.cjs → external-link-DgHiKqPL.cjs} +2 -2
  197. package/dist/{external-link-Ct-WlQoY.cjs.map → external-link-DgHiKqPL.cjs.map} +1 -1
  198. package/dist/fi-FI-MXUK5vu0.cjs +2 -0
  199. package/dist/fi-FI-MXUK5vu0.cjs.map +1 -0
  200. package/dist/{filter-DwSaMAG7.cjs → filter-C7stlLTD.cjs} +2 -2
  201. package/dist/{filter-DwSaMAG7.cjs.map → filter-C7stlLTD.cjs.map} +1 -1
  202. package/dist/fr-FR-NK-BqBuh.cjs +2 -0
  203. package/dist/fr-FR-NK-BqBuh.cjs.map +1 -0
  204. package/dist/index-ejbaSyzM.cjs +12 -0
  205. package/dist/index-ejbaSyzM.cjs.map +1 -0
  206. package/dist/{info-filled-bhD2VGA2.cjs → info-filled-Bk8waEjd.cjs} +2 -2
  207. package/dist/{info-filled-bhD2VGA2.cjs.map → info-filled-Bk8waEjd.cjs.map} +1 -1
  208. package/dist/it-IT-CckThmyL.cjs +2 -0
  209. package/dist/it-IT-CckThmyL.cjs.map +1 -0
  210. package/dist/{minus-circle-outline-pNXlRjce.cjs → minus-circle-outline-8LuhQHmx.cjs} +2 -2
  211. package/dist/{minus-circle-outline-pNXlRjce.cjs.map → minus-circle-outline-8LuhQHmx.cjs.map} +1 -1
  212. package/dist/nl-NL-73Hql9dE.cjs +2 -0
  213. package/dist/nl-NL-73Hql9dE.cjs.map +1 -0
  214. package/dist/no-NO-C5RVnfc6.cjs +2 -0
  215. package/dist/no-NO-C5RVnfc6.cjs.map +1 -0
  216. package/dist/{plus-circle-outline-B3Ttq6A2.cjs → plus-circle-outline-x53czuRo.cjs} +2 -2
  217. package/dist/{plus-circle-outline-B3Ttq6A2.cjs.map → plus-circle-outline-x53czuRo.cjs.map} +1 -1
  218. package/dist/pt-BR-DR3yYVRn.cjs +2 -0
  219. package/dist/pt-BR-DR3yYVRn.cjs.map +1 -0
  220. package/dist/{square-C3hb1Bxz.cjs → square-BzY0pIfq.cjs} +2 -2
  221. package/dist/{square-C3hb1Bxz.cjs.map → square-BzY0pIfq.cjs.map} +1 -1
  222. package/dist/sv-SE-C92aO-iv.cjs +2 -0
  223. package/dist/sv-SE-C92aO-iv.cjs.map +1 -0
  224. package/dist/{trash-can-D2GRVBnJ.cjs → trash-can-oPrHRWRq.cjs} +2 -2
  225. package/dist/{trash-can-D2GRVBnJ.cjs.map → trash-can-oPrHRWRq.cjs.map} +1 -1
  226. package/dist/types/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.d.ts.map +1 -1
  227. package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts +1 -1
  228. package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts.map +1 -1
  229. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +71 -0
  230. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
  231. package/dist/types/components/internal/CapitalHeader/constants.d.ts +2 -1
  232. package/dist/types/components/internal/CapitalHeader/constants.d.ts.map +1 -1
  233. package/dist/types/components/internal/CapitalHeader/helpers.d.ts.map +1 -1
  234. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +3 -3
  235. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
  236. package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts +1 -1
  237. package/dist/types/components/internal/SVGIcons/Checkmark.d.ts +1 -1
  238. package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts +1 -1
  239. package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts +1 -1
  240. package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts.map +1 -1
  241. package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts +1 -1
  242. package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts.map +1 -1
  243. package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts +1 -1
  244. package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts +1 -1
  245. package/dist/types/components/internal/SVGIcons/Download.d.ts +1 -1
  246. package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -1
  247. package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts +1 -1
  248. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
  249. package/dist/types/core/ConfigContext/context.d.ts +2 -0
  250. package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
  251. package/dist/types/core/ConfigContext/session/AuthSession.d.ts +4 -0
  252. package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
  253. package/dist/types/core/ConfigContext/session/SetupContext.d.ts +2 -0
  254. package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
  255. package/dist/types/translations/index.d.ts +3 -0
  256. package/dist/types/translations/index.d.ts.map +1 -1
  257. package/dist/types/types/api/resources/CapitalResource.d.ts +1 -0
  258. package/dist/types/types/api/resources/CapitalResource.d.ts.map +1 -1
  259. package/dist/{upload-CeUcEWmW.cjs → upload-CEAJdOXV.cjs} +2 -2
  260. package/dist/{upload-CeUcEWmW.cjs.map → upload-CEAJdOXV.cjs.map} +1 -1
  261. package/dist/{warning-C2NpcmL8.cjs → warning-BzXJLvmN.cjs} +2 -2
  262. package/dist/{warning-C2NpcmL8.cjs.map → warning-BzXJLvmN.cjs.map} +1 -1
  263. package/dist/{warning-filled-Bo82QPPc.cjs → warning-filled-P8HTOKkP.cjs} +2 -2
  264. package/dist/{warning-filled-Bo82QPPc.cjs.map → warning-filled-P8HTOKkP.cjs.map} +1 -1
  265. package/package.json +15 -14
  266. package/dist/da-DK-DHGqGo8Q.cjs +0 -2
  267. package/dist/da-DK-DHGqGo8Q.cjs.map +0 -1
  268. package/dist/de-DE-k_BRPv7a.cjs +0 -2
  269. package/dist/de-DE-k_BRPv7a.cjs.map +0 -1
  270. package/dist/es-ES-Cy-9bm8z.cjs +0 -2
  271. package/dist/es-ES-Cy-9bm8z.cjs.map +0 -1
  272. package/dist/fi-FI-C7ICLuS8.cjs +0 -2
  273. package/dist/fi-FI-C7ICLuS8.cjs.map +0 -1
  274. package/dist/fr-FR-DH8euUOp.cjs +0 -2
  275. package/dist/fr-FR-DH8euUOp.cjs.map +0 -1
  276. package/dist/index-CpBGZ2AH.cjs +0 -12
  277. package/dist/index-CpBGZ2AH.cjs.map +0 -1
  278. package/dist/it-IT-DsfPVAun.cjs +0 -2
  279. package/dist/it-IT-DsfPVAun.cjs.map +0 -1
  280. package/dist/nl-NL-DP_t6EpF.cjs +0 -2
  281. package/dist/nl-NL-DP_t6EpF.cjs.map +0 -1
  282. package/dist/no-NO-ARsXLWv0.cjs +0 -2
  283. package/dist/no-NO-ARsXLWv0.cjs.map +0 -1
  284. package/dist/pt-BR-CuTqntp7.cjs +0 -2
  285. package/dist/pt-BR-CuTqntp7.cjs.map +0 -1
  286. package/dist/sv-SE-DDAIHLKD.cjs +0 -2
  287. package/dist/sv-SE-DDAIHLKD.cjs.map +0 -1
@@ -1,12 +0,0 @@
1
- "use strict";var Q0=Object.defineProperty;var vc=e=>{throw TypeError(e)};var J0=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>J0(e,typeof t!="symbol"?t+"":t,n),ui=(e,t,n)=>t.has(e)||vc("Cannot "+n);var p=(e,t,n)=>(ui(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?vc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),b=(e,t,n,r)=>(ui(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(ui(e,t,"access private method"),n);var En=(e,t,n,r)=>({set _(s){b(e,t,s,n)},get _(){return p(e,t,r)}});const M=require("classnames"),vi="test",e2=e=>{var t;return(t=e==null?void 0:e.replace)==null?void 0:t.call(e,/([^\/])$/,"$1/")},t2=e=>e==null?void 0:e.replace(/^([^\/])/,"/$1"),n2=(()=>{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??vi]||e[vi]})(),Hn=Function.prototype.bind.bind(Function.prototype.call),r2=async()=>{},Uo=e=>e,te=()=>{},s2=Hn(Object.prototype.toString),o2=e=>s2(e).slice(8,-1),Jl=e=>(Object.keys(e).forEach(t=>{const n=e[t];n&&typeof n=="object"&&!Object.isFrozen(n)&&Jl(n)}),Object.freeze(e)),Oi=e=>e===!!e,Q=e=>typeof e=="function",mo=e=>e===null,Ne=e=>e==null,Ur=e=>typeof e=="number",Wo=e=>o2(e)==="Object",gt=e=>typeof e=="string",i2=e=>typeof e=="symbol",Z=e=>e===void 0,vt=(e,t,n)=>(Math.min(e,n)!==e&&([e,n]=[n,e]),Math.max(e,Math.min(t,n))),is=e=>!i2(e)&&e===~~e,Mn=e=>Ur(e)&&1/e===0,eu=(e,t)=>{if(Number.isInteger(e)&&Number.isInteger(t))return e+Math.floor((t-e)/2);throw TypeError(`Expects 2 integer values: [${e}, ${t}]`)},Fs=(e,t)=>(e%t+t)%t,Oc="abort",a2="signal is aborted without reason",Zn=(e,t=e)=>Oi(e)?e:!!t,xe=e=>e===!0,Bt=e=>e!==!1,c2=e=>!1,bi=e=>!0,G=(e,t=!1)=>({writable:xe(t),enumerable:!0,value:e}),ue=(e,t=!0)=>({enumerable:Bt(t),get:e}),xt=Hn(Object.prototype.hasOwnProperty),Gn=(e,t)=>e===t||!(e===e||t===t);if(!xt(AbortSignal.prototype,"reason"))try{Object.defineProperty(AbortSignal.prototype,"reason",{...ue(function(){return this.aborted?as():void 0},!0),configurable:!0})}catch{}xt(AbortSignal.prototype,"throwIfAborted")||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason??as()});const as=(e=a2)=>new DOMException(e,"AbortError"),tu=(e,t)=>{if(!Gn(e.reason,t))try{Object.defineProperty(e,"reason",G(t))}catch{}return e},l2=(e=as())=>{if("abort"in AbortSignal)return AbortSignal.abort(e);const t=new AbortController,n=Z(e)?as():e,{signal:r}=t;return t.abort(n),tu(r,n),r},Ho=e=>{if("any"in AbortSignal)return AbortSignal.any(e);let t=new Set,n=new AbortController;const{signal:r}=n;let s=function(){t.forEach(o=>o.removeEventListener(Oc,s)),t.clear();const i=(this==null?void 0:this.reason)??as();n.abort(i),tu(r,i),n=t=s=void 0};e:{const i=Symbol("<NIL_EXCEPTION>");let o=i;t:{try{for(const c of e){if(!xs(c))throw new TypeError("Failed to convert value to 'AbortSignal'");if(c.aborted)break t;t.add(c)}}catch(c){o=c;break t}t.forEach(c=>c.addEventListener(Oc,s));break e}if(s.call(r),o!==i)throw o}return r},xs=e=>e instanceof AbortSignal,de=Object.freeze([]),U=Object.freeze(Object.create(null)),Pr=Promise.resolve();Promise.race(de);const hn=function(e,...t){return new Promise(n=>n(e.call(this,...t)))},u2=(e,t,n)=>{let r=t.get(e);return Z(r)&&Q(n)&&(Z(r=n(e,t))||t.set(e,r)),r},Vr=(e,t=de)=>{const n=`${e||""}`.trim(),r=n?n.split(/(?:\s*,\s*)+/).filter(Uo):de;return r.length?r:t},qr=(e,t,n)=>e.includes(t)?t:Ne(t)?e[0]:e.includes(n)?n:e[0],bc=Hn(Array.prototype.some),nu=function e(t,n,r=new Set){for(const s of n)Array.isArray(s)?e(t,s,r):(t&&r.delete(s),r.add(s));return r};Hn(nu,void 0,!1);Hn(nu,void 0,!0);const ru=(...e)=>{const[t]=e,r=(e.length>=2?new Date(...e):t instanceof Date?t:new Date(gt(t)||Number.isFinite(t)?t:void 0)).getTime();return Number.isFinite(r)?r:void 0},Mr=(()=>{let e=Date.now();return(t="adyen-pe")=>`${t}-${++e}`})(),aa=(()=>{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)})})(),cs=(e,t=U)=>Wo(e)?e:cs(t,U),Wr=Hn(Object.create,void 0),J=Hn(Wr,void 0,null),Go=(e=U)=>Object.freeze({...e,defineProperty:bi,set:bi}),d2=e=>e&&(e==null?void 0:e.length)>0?`${e[0].toUpperCase()}${e.slice(1)}`:e,Ii=e=>Ne(e)||gt(e)&&/^\s*$/.test(e),h2="/setup",f2=xe(void 0),Ic=(()=>{let e=0;if(Number.isFinite(e)&&(e=Math.max(0,~~e)))return e})();class Di extends Error{constructor(n,r,s,i){super(s);B(this,"type");B(this,"errorCode");B(this,"requestId");this.type=n,this.name=n,this.errorCode=i,this.requestId=r}}const m2=/^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;var po=(e=>(e.NETWORK_ERROR="NETWORK_ERROR",e.CANCEL="CANCEL",e.IMPLEMENTATION_ERROR="IMPLEMENTATION_ERROR",e.ERROR="ERROR",e.EXPIRED_TOKEN="EXPIRED_TOKEN",e))(po||{});const p2=e=>{switch(e){case 401:return"EXPIRED_TOKEN";default:return"NETWORK_ERROR"}},_2=e=>{var t;return(t=e.headers.get("Content-Type"))==null?void 0:t.split(";",1)[0]},y2=e=>{const n=(e.headers.get("Content-Disposition")??"").replace(m2,"$2$3");return decodeURIComponent(n)},g2=e=>{const{headers:t=[],method:n="GET"}=e;return{method:n,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":e.contentType??"application/json",...t,"SDK-Version":"1.4.2"},redirect:"follow",signal:e.signal,referrerPolicy:"no-referrer-when-downgrade",...n==="POST"&&e.body&&{body:JSON.stringify(e.body)}}};function T2({message:e,level:t,errorCode:n,type:r="NETWORK_ERROR",requestId:s}){switch(t){case"silent":break;case"info":case"warn":console[t](e);break;case"error":default:throw new Di(r,s,e,n)}}function A2(e){return e&&e.errorCode&&e.type&&(e.detail||e.invalidFields)&&e.status}function E2(e){const t=new URLSearchParams;for(const n of Object.keys(e)){const r=e[n];Ne(r)||(Array.isArray(r)?r.forEach(s=>t.append(n,s)):t.set(n,String(r)))}return t}const su=e=>{let t,n,r;const s=()=>{if(Z(t))return;const u=t.abort.bind(t);t=void 0,u()},i=()=>(r=new Promise((u,l)=>{if(n.addEventListener("abort",function h(){n.removeEventListener("abort",h),l(e)}),n.aborted)throw e}),r.catch(te),r),o=()=>(Z(t)&&(t=new AbortController,n=t.signal,r=i()),c),c=J({abort:G(s),promise:ue(()=>r),reason:G(e),refresh:G(o),signal:ue(()=>n)});return o()},ou=()=>{let e,t,n;const r=()=>{const i=n??te,o=new Promise((c,u)=>{n=c,t=u});return i(e=o),s},s=J({promise:ue(()=>e),refresh:G(r),reject:G(i=>t(i)),resolve:G(i=>n(i))});return r()},Bs=e=>{const t=su(),n=ou();let r;return Object.defineProperties(function(...i){Z(r)?n.refresh():t.abort();const o=hn.call(this,e,t.refresh().signal,...i);return(async()=>{let c=r===(r=o);try{const u=await o.finally(()=>{c=r===o,c&&(r=void 0)});c&&n.resolve(u)}catch(u){c&&n.reject(u)}})(),o},{abort:G(t.abort),promise:ue(()=>n.promise),refresh:G(()=>void n.refresh())})};class N2{constructor(t){B(this,"_endpoints",U);B(this,"_extraConfig",U);B(this,"_revokeEndpointsProxy",te);B(this,"_beforeHttp",async()=>{await this._refreshPromisor.promise.catch(te)});B(this,"_refreshPromisor",Bs((t,n)=>{const r=xs(n)?Ho([n,t]):t;return this._fetchSetupEndpoint(r)}));this._session=t;let n;this.refresh=r=>(this._refreshPromisor(r).catch(te),n??(n=this._refreshPromisor.promise.finally(()=>n=void 0).then(({endpoints:s,...i})=>{this._resetEndpoints(),{proxy:this._endpoints,revoke:this._revokeEndpointsProxy}=this._getEndpointsProxy(s),this._extraConfig=Jl(i)})))}get endpoints(){return this._endpoints}get extraConfig(){return this._extraConfig}_fetchSetupEndpoint(t){return this._session.http(null,{method:"POST",path:h2,errorLevel:"fatal",loadingContext:this.loadingContext,signal:t})}_getEndpointsProxy(t){const n=new Set(Object.keys(t)),r=J();return Proxy.revocable(U,Go({get:(s,i,o)=>n.has(i)?(r[i]??(r[i]=(()=>{const{method:c="GET",url:u}=t[i];if(!Z(u||void 0))return(...l)=>{const h=this._getHttpOptions(c,u,...l);return this._session.http(this._beforeHttp,h)}})()),r[i]):Reflect.get(s,i,o)}))}_getHttpOptions(t,n,...r){const{loadingContext:s}=this,[i,o]=r,{path:c,query:u}=cs(o),l=u&&E2(u);if(Wo(c))for(const h of Object.keys(c))n=n.replace(`{${h}}`,c[h]);return{loadingContext:s,...i,method:t,params:l,path:n}}_resetEndpoints(){this._revokeEndpointsProxy(),this._revokeEndpointsProxy=te,this._endpoints=U}}const iu=Symbol("Error<SESSION_EXPIRED>"),C2=Symbol("Error<SESSION_FACTORY_UNAVAILABLE>"),S2=Symbol("Error<SESSION_HTTP_UNAVAILABLE>"),R2=Symbol("Error<SESSION_INVALID>"),au=Symbol("Error<SESSION_REFRESH_ABORTED>"),Yo="_sessionExpired",cu="_sessionReady",v2="_sessionRefreshed",O2="_sessionRefreshingEnd",b2="_sessionRefreshingStart",lu="_session.deadline",uu="_session.ready",du="_session.refreshingEnd",hu="_session.refreshingStart",I2=async e=>{const{specification:t}=e.context,n=await hn(async()=>{const r=t.autoRefresh;return Q(r)?r.call(t,e.session):r}).catch(c2);return xe(n)},D2=e=>{let t=e.context.emitter.on(Yo,()=>s(!1)),n,r=Bs(async(c,u=!1)=>{n=c;const l=xe(u)||await I2(e);n===c&&l&&e.pending&&!e.refreshing&&e.refresh(n).catch(te)}),s=(c=!1)=>{e.refreshing||r(c)},i=()=>{t(),r.abort(),r=n=t=void 0,s=i=te};return Object.defineProperties((c=!1)=>s(c),{destruct:ue(()=>i,!1)})},Dc=1e3,k2=2147483647,L2=(e,t=Dc,n=!1)=>{var h;let r=new AbortController,s=vt(0,~~t,k2),i=xe(n);Number.isFinite(s)||(s=Dc);const o=((h=document.timeline)==null?void 0:h.currentTime)??performance.now(),c=()=>{r==null||r.abort(),r=void 0},u=d=>{!r||r.signal.aborted||(l(d),e(d))},l=d=>{let m=0;if(!i){const f=d-o,y=Math.round(f/s)*s;m=o+y+s-performance.now()}setTimeout(()=>requestAnimationFrame(u),m)};return l(o),i=!1,J({cancel:G(c),delay:G(t),signal:G(r.signal)})},w2=e=>{const t={},n=Object.getOwnPropertyDescriptors(e);for(const r of Object.keys(e)){const{get:s,value:i}=n[r];t[r]=ue(s||(Q(i)?i.bind(e):()=>i))}return J(t)},P2=()=>{const e={idle:null,resume:null},t={};for(const n of Object.keys(e))t[n]={get:()=>e[n]??te,set:r=>{Ne(r)?e[n]=null:Q(r)&&r!==e[n]&&(e[n]=r)}};return J(t)},fu=Symbol("<<UNSUBSCRIBE>>"),Yn=e=>e===fu,$s=e=>{let t;const n=w2(e),r=P2(),s=new Map,i=new WeakMap,o=()=>Object.freeze({...n}),c=()=>s.size===0,u=h=>{if(c())return;if(Yn(h)){const m=[];return s.forEach((f,y)=>{m.push(y);const _=i.get(y);for(;f--;)_==null||_()}),m.forEach(f=>f(h)),!0}const d=t;t=o();for(const m of Object.keys(t))if(!Gn(t[m],d[m]))return s.forEach((f,y)=>y(t)),!0;return!1},l=h=>{if(!Q(h))return te;const d=u2(h,i,()=>{let f=()=>{const y=s.get(h)||0;y===1?(f=void 0,s.delete(h),i.delete(h),c()&&(t=void 0,r.idle())):y>1&&s.set(h,y-1)};return()=>{f==null||f()}}),m=c();return s.set(h,(s.get(h)||0)+1),m&&(t=o(),r.resume()),h(t),d};return J({idle:ue(c),on:G(r),cancelSubscriptions:G(()=>u(fu)),requestNotification:G(()=>u()),snapshot:ue(()=>t??o()),subscribe:G(l)})},ca=(()=>{let e;const{cancelSubscriptions:t,requestNotification:n,subscribe:r,on:s}=$s({now:()=>Date.now()});return s.resume=()=>{e=L2(n,1e3,!1)},s.idle=()=>{e==null||e.cancel(),e=void 0},J({cancelSubscriptions:G(t),subscribe:G(r)})})(),la=()=>{const e=new class extends EventTarget{},t=(r,...s)=>{const[i]=s;s.length&&Z(i)&&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 o=new CustomEvent(r,J({bubbles:G(!1),cancelable:G(!1),detail:G(i??null)}));return e.dispatchEvent(o)},n=(r,s)=>{if(!Q(s))return te;const i=o=>s.call(null,J({detail:G(o.detail),timeStamp:G(o.timeStamp),type:G(o.type)}));return e.addEventListener(r,i),()=>e.removeEventListener(r,i)};return J({emit:G(t),on:G(n)})},M2=(e,t)=>{let n,r=1/0,s,i;const o=su(),c=la(),u=()=>{n==null||n.removeEventListener("abort",u),r=1/0,i==null||i(),o.refresh(),c.emit(lu)},l=Bs(async(d,m)=>{s=d;const f=await hn(()=>{const _=t.deadline;return Q(_)?_.call(t,m,d):_}).catch(te);if(s!==d)return;const y=(Array.isArray(f)?f:[f]).filter(_=>_||_===0);if(y.length>0){let _=!1,T=new Set;for(const g of y)if(xs(g)){if(_=g.aborted)break;T.add(g)}else if(r=Math.min(r,ru(g)??1/0),_=r<=Date.now())break;_||(_=T.size<1&&!Number.isFinite(r)),_?n??(n=l2()):(n=Ho([...T,o.signal]),n.addEventListener("abort",u),h()),y.length=0,T.clear()}else n=void 0}),h=()=>{if(!Number.isFinite(r))return;let d=ca.subscribe(m=>{if(Yn(m))return u();m.now>=r&&o.abort()});i=()=>{d==null||d(),d=i=void 0}};return J({elapse:G(o.abort),elapsed:ue(()=>n&&n.aborted),on:G(c.on),refresh:G(l.bind(void 0)),signal:ue(()=>o.signal)})},F2=(e,t)=>{let n=!1,r,s,i=!0,o;const c=Symbol("<next_session>"),u=la();function l(f){var y;try{(y=t.assert)==null||y.call(t,f)}catch{throw R2}}function h(f){if(!Q(f))throw C2}const d=Bs((f,y)=>{if(!s)s=f;else return m(xs(y)?Ho([y,f]):f)}),m=async f=>{let y=c;try{n=!1,s=f,i&&await(r??(r=(async()=>{await Pr,i=!1,u.emit(hu)})())),h(t.onRefresh),y=await hn(()=>t.onRefresh(o,f)).finally(()=>{if(f.aborted)throw au})}finally{if(s===f)try{y!==c&&(l(y),o=y,u.emit(uu))}finally{r=void 0,i=!0,u.emit(du)}}};return e.on(Yo,()=>n=!r),d(),J({context:G(J({emitter:G(e),specification:G(t)})),on:G(u.on),pending:ue(()=>n),promise:ue(()=>d.promise),refresh:G(d.bind(void 0)),refreshing:ue(()=>!!r),session:ue(()=>o),signal:ue(()=>s)})};class x2{constructor(t){B(this,"_session");B(this,"_autofresh");B(this,"_deadline");B(this,"_refresher");B(this,"_eventEmitter",la());this._specification=t,this._deadline=M2(this._eventEmitter,this._specification),this._refresher=F2(this._eventEmitter,this._specification),this._autofresh=D2(this._refresher),this._deadline.on(lu,()=>this._eventEmitter.emit(Yo)),this._refresher.on(hu,()=>this._eventEmitter.emit(b2)),this._refresher.on(du,()=>this._eventEmitter.emit(O2)),this._refresher.on(uu,()=>{this._session=this._refresher.session,this._deadline.refresh(this._session).finally(()=>this._eventEmitter.emit(v2)),this._eventEmitter.emit(cu)}),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(!Q(t))throw S2}async _sessionHttp(t,...n){for(this._autofresh(!0);;)try{await this._refresher.promise.catch(te);const{signal:r}=this._deadline;return await(t==null?void 0:t(this._session,r,...n)),this._assertSessionHttp(this._specification.http),await this._specification.http(this._session,r,...n)}catch(r){if(r!==iu)throw r;if(this._refresher.pending)continue;this._deadline.elapse()}}}const B2="v1",di=(e,t)=>{try{e==null||e(t)}catch{throw t}};async function $2(e){const{errorLevel:t,loadingContext:n="",path:r}=e,s=g2(e),i=new URL(`${e2(n)}${B2}${t2(r)}`);return e.params&&e.params.forEach((o,c)=>{const u=decodeURIComponent(o);u&&i.searchParams.append(c,u)}),(async()=>{let o=!1;const c={level:t};try{const u=await fetch(i,s);if(u.ok){if(u.status===204)return null;try{switch(_2(u)){case"application/json":return await u.json();default:const d=await u.blob(),m=y2(u);return{blob:d,filename:m}}}catch(h){throw o=!0,h}}c.type=p2(u.status);const l=await u.json();c.message=e.errorMessage||`Service at ${i} not available`,c.errorCode=String(l.status),c.requestId=l==null?void 0:l.requestId,A2(l)&&(c.message=l.detail,c.errorCode=l.errorCode,c.status=l.status),di(e.errorHandler,c)}catch(u){if(o)throw di(e.errorHandler,u),u;di(e.errorHandler,u),c.message=e.errorMessage||`Call to ${i} failed. Error: ${u}`}T2(c)})()}class U2{constructor(t){B(this,"assert",t=>{if(Wo(t)){const n=gt(t.id)?t.id.trim():void 0,r=gt(t.token)?t.token.trim():void 0;if(n&&r)return}throw void 0});B(this,"deadline",t=>{const n=[];let r,s;try{({iat:r,exp:s}=JSON.parse(atob(t==null?void 0:t.token.split(".")[1]))),n.push(s)}catch{r=Date.now()}if(!Z(Ic)){const i=new Date(r);n.push(i.setMilliseconds(i.getMilliseconds()+Ic))}return n});B(this,"http",async(t,n,r)=>{const{headers:s,signal:i,...o}=r;try{const c={...o,headers:{...s,...t&&{Authorization:`Bearer ${t.token}`}},errorHandler:this._errorHandler,signal:xs(i)?Ho([n,i]):n};return await $2(c)}catch(c){throw(c==null?void 0:c.type)===po.EXPIRED_TOKEN?iu:c}});this.onSessionCreate=t,this._errorHandler=this._errorHandler.bind(this),Object.defineProperties(this,{autoRefresh:G(f2),onRefresh:G((n,r)=>this.onSessionCreate(r))})}_errorHandler(t){try{this.errorHandler&&this.errorHandler(t)}catch{}throw t}}const Zr=Symbol("<<NO_ERR>>");function W2(e){/* istanbul ignore if -- @preserve */if(e===Zr)throw new TypeError("Illegal error")}const H2=()=>{let e=Zr;const t=()=>{e=Zr},n=r=>{W2(r),e=r};return J({error:ue(()=>e===Zr?void 0:e),hasError:ue(()=>e!==Zr),reset:G(t),set:G(n)})};class G2{constructor(){B(this,"_canSkipSessionRefresh",!1);B(this,"_refreshPromisorSignal");B(this,"_sessionIsFrozen",!1);B(this,"_errorContainer",H2());B(this,"_specification",new U2);B(this,"_sessionContext",new x2(this._specification));B(this,"_setupContext",new N2(this._sessionContext));B(this,"_refreshPromisor",Bs(async(t,n=!1)=>{let r=!this._refreshPromisorSignal,s=this._refreshPromisorSignal===(this._refreshPromisorSignal=t);const i=xe(n)&&this._canSkipSessionRefresh;r&&(r=!1,this._errorContainer.reset(),this._onAuthStateChanged());try{await(i?this._setupContext:this._sessionContext).refresh(t).finally(()=>s=this._refreshPromisorSignal===t)}catch(o){if(!s)return;!t.aborted&&(i||o!==au)&&this._errorContainer.set(o),r=!i}finally{(r||i&&s)&&(this._refreshPromisorSignal=void 0,this._onAuthStateChanged())}}));B(this,"_watchlist",$s({endpoints:()=>this._setupContext.endpoints,extraConfig:()=>this._setupContext.extraConfig,hasError:()=>this._errorContainer.hasError,isExpired:()=>this._sessionContext.isExpired,isFrozen:()=>this._sessionIsFrozen,refreshing:()=>!!this._refreshPromisorSignal}));B(this,"freeze",()=>{this._sessionIsFrozen=!0,this._watchlist.on.resume=void 0,this._watchlist.cancelSubscriptions()});B(this,"http",this._sessionContext.http.bind(this._sessionContext,null));B(this,"refresh",this._refresh.bind(this));B(this,"subscribe",this._watchlist.subscribe);this._watchlist.on.resume=()=>{const t=[this._sessionContext.on(Yo,()=>{this._canSkipSessionRefresh=!1,this._onAuthStateChanged()}),this._sessionContext.on(cu,()=>{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&&Bt(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&&Q(this._specification.onSessionCreate)&&(this._canSkipSessionRefresh=!1,this._refresh()))}_onAuthStateChanged(){this._watchlist.requestNotification()}_refresh(t=!1){this._refreshPromisor(t)}}const Y2="Account",j2="Account Balance",z2="Account description",q2="Account ID",K2="Additions",V2="Adjustments",Z2="Amount",X2="and",Q2="Apply",J2="Back",eh="Balance account",th="Balance account ID",nh="Booked",rh="Captured",sh="Category",oh="Chargebacks",ih="Close",ah="Contact support",ch="Contact support for help.",lh="Contact support for help and share error code %{requestId}",uh="Copied",dh="Copy",hh="Corrections",fh="Currency",mh="Date",ph="Date range",_h="Description",yh="Dismiss",gh="Download",Th="Downloading",Ah="Email",Eh="Entity was not found",Nh="Transaction not found for the specified Account Holder",Ch="Fees",Sh="File",Rh="Filter bar",vh="From",Oh="Full",bh="Funds captured",Ih="Go back",Dh="Grant issued",kh="Grant repayments",Lh="Hide content",wh="ID",Ph="Incomplete field",Mh="In progress",Fh="Loading",xh="max",Bh="min",$h="Mobile",Uh="Net payout",Wh="Next Payouts",Hh="No data",Gh="No negative numbers allowed",Yh="No payouts found",jh="No reports found",zh="No transactions found",qh="Other",Kh="Paginated navigation",Vh="Partial",Zh="Payment ID",Xh="Payment method",Qh="Payout Details",Jh="Payout information is generated each day at midnight, UTC time.",ef="Payouts",tf="Pending",nf="Please come back later.",rf="Please, reach out to support for assistance.",sf="Reach out to support",of="Reference ID",af="Refresh",cf="Refunds",lf="Refund payment",uf="We couldn’t process the refund. Try again later.",df="Something went wrong.",hf="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.",ff="Refund is sent!",mf="Amount to refund",pf="Refunds can take up to 40 days depending on the payment method. Fees are included.",_f="Refund %{amount}",yf="Reason for refund",gf="Reference",Tf="Remaining amount",Af="Report",Ef="Reports are generated each day at midnight, UTC time.",Nf="Reports",Cf="Reset",Sf="Reversed",Rf="Something went wrong.",vf="Something went wrong. Try refreshing the page or come back later.",Of="Status",bf="Structured list",If="Subtractions",Df="Sum of same-day payouts",kf="Tabs",Lf="The error code is %{requestId}",wf="There are no results",Pf="The request is missing required fields or contains invalid data.",Mf="There was an unexpected error",Ff="The selected balance account is incorrect",xf="Timezone",Bf="To",$f="Total incoming",Uf="Total outgoing",Wf="To value should be equal or greater than the From value",Hf="Transaction details",Gf="Transactions",Yf="Transactions overview",jf="Transaction type",zf="Transfers",qf="Try a different search or reset your filters, and we’ll try again.",Kf="Try refreshing the page or come back later.",Vf="Amount",Zf="Type",Xf="Value",Qf="We couldn't load the payouts overview.",Jf="We couldn't load the reports overview.",e1="We couldn't load the transactions overview.",t1="We couldn't load your balance accounts.",n1="We couldn't load your payouts.",r1="We couldn't load your reports.",s1="We couldn't load your transactions.",o1={account:Y2,accountBalance:j2,accountDescription:z2,accountID:q2,additions:K2,adjustments:V2,amount:Z2,and:X2,apply:Q2,back:J2,balanceAccount:eh,balanceAccountId:th,Booked:nh,"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.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.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), 400 7th Street, SW Washington, DC 20219.","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:rh,category:sh,chargeback:oh,closeIconLabel:ih,contactSupport:ah,contactSupportForHelp:ch,contactSupportForHelpAndShareErrorCode:lh,copied:uh,copy:dh,correction:hh,currency:fh,date:mh,dateRange:ph,default:"Default",description:_h,dismiss:yh,download:gh,downloading:Th,email:Ah,entityWasNotFound:Eh,entityWasNotFoundDetail:Nh,"error.pleaseTryAgainLater":"Please try again later.","error.somethingWentWrongWithDownload":"Something went wrong with the download","expandableCard.collapse":"Collapse","expandableCard.expand":"Expand",export:"Export",fee:Ch,file:Sh,"filter.date.since":"Since %{date}","filter.date.until":"Until %{date}",filterBar:Rh,"filterPlaceholder.category":"Type","filterPlaceholder.currency":"Currency","filterPlaceholder.status":"Status",from:vh,full:Oh,fundsCaptured:bh,goBack:Ih,grantIssued:Dh,grantRepayment:kh,hideContent:Lh,id:wh,incompleteField:Ph,inProgress:Mh,"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:Fh,max:xh,min:Bh,mobile:$h,netPayout:Uh,nextPayouts:Wh,noData:Hh,noNegativeNumbersAllowed:Gh,noPayoutsFound:Yh,noReportsFound:jh,noTransactionsFound:zh,other:qh,paginatedNavigation:Kh,"pagination.nextPage":"Next page","pagination.previousPage":"Previous page","pagination.showing":"Showing",partial:Vh,paymentId:Zh,paymentMethod:Xh,payoutDetails:Qh,payoutsNotice:Jh,payoutsTitle:ef,Pending:tf,pleaseComeBackLater:nf,pleaseReachOutToSupportForAssistance:rf,"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:sf,referenceID:of,refresh:af,refund:cf,"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:lf,refundActionErrorSubtitle:uf,refundActionErrorTitle:df,refundActionSuccessSubtitle:hf,refundActionSuccessTitle:ff,refundAmount:mf,"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:pf,refundPayment:_f,refundReason:yf,"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:gf,"refundReference.placeholder":"Enter the reference here",remainingAmount:Tf,report:Af,"reportsError.tooManyDownloads":"We couldn't download all the files. Please try again later.",reportsNotice:Ef,reportsTitle:Nf,"reportType.payout":"Payout",reset:Cf,Reversed:Sf,"select.filter.placeholder":"Placeholder","select.noOptionsFound":"No options match this search",somethingWentWrong:Rf,somethingWentWrongTryRefreshingOrComeBackLater:vf,status:Of,structuredList:bf,subtractions:If,sumOfSameDayPayouts:Df,tabs:kf,theErrorCodeIs:Lf,thereAreNoResults:wf,theRequestIsMissingRequiredFieldsOrContainsInvalidData:Pf,thereWasAnUnexpectedError:Mf,theSelectedBalanceAccountIsIncorrect:Ff,timezone:xf,to:Bf,"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:$f,totalOutgoing:Uf,toValueShouldBeGreaterThanTheFromValue:Wf,transactionDetails:Hf,transactions:Gf,transactionsOverviewTitle:Yf,transactionType:jf,transfer:zf,tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain:qf,tryRefreshingThePageOrComeBackLater:Kf,txAmount:Vf,"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:Zf,"uploadedFile.remove":"Delete %{filename} file","uploadFile.browse":"Browse files",value:Xf,weCouldNotLoadThePayoutsOverview:Qf,weCouldNotLoadTheReportsOverview:Jf,weCouldNotLoadTheTransactionsOverview:e1,weCouldNotLoadYourBalanceAccounts:t1,weCouldNotLoadYourPayouts:n1,weCouldNotLoadYourReports:r1,weCouldNotLoadYourTransactions:s1},i1={...o1},$t=e=>e.then(({default:t})=>t),mu={da_DK:()=>$t(Promise.resolve().then(()=>require("./da-DK-DHGqGo8Q.cjs")))},pu={de_DE:()=>$t(Promise.resolve().then(()=>require("./de-DE-k_BRPv7a.cjs")))},_u={es_ES:()=>$t(Promise.resolve().then(()=>require("./es-ES-Cy-9bm8z.cjs")))},yu={fi_FI:()=>$t(Promise.resolve().then(()=>require("./fi-FI-C7ICLuS8.cjs")))},gu={fr_FR:()=>$t(Promise.resolve().then(()=>require("./fr-FR-DH8euUOp.cjs")))},Tu={it_IT:()=>$t(Promise.resolve().then(()=>require("./it-IT-DsfPVAun.cjs")))},Au={nl_NL:()=>$t(Promise.resolve().then(()=>require("./nl-NL-DP_t6EpF.cjs")))},Eu={no_NO:()=>$t(Promise.resolve().then(()=>require("./no-NO-ARsXLWv0.cjs")))},Nu={pt_BR:()=>$t(Promise.resolve().then(()=>require("./pt-BR-CuTqntp7.cjs")))},Cu={sv_SE:()=>$t(Promise.resolve().then(()=>require("./sv-SE-DDAIHLKD.cjs")))},_o={en_US:i1},ua={...mu,...pu,..._o,..._u,...yu,...gu,...Tu,...Au,...Eu,...Nu,...Cu},Rn="en-US",Su=ua.en_US,da={year:"numeric",month:"2-digit",day:"2-digit"},a1=["constructor","i18n","watch","preferredTranslations"],Ru=e=>[...new Set(Object.keys(e).map(t=>t.replace(/_/g,"-")).sort())],c1=Ru(ua),vu={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$"},l1={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},Ou=e=>l1[e]||100,u1=e=>!!vu[e],bu=e=>u1(e)?vu[e]:null,Iu=(e,t)=>{const n=Ou(t);return parseInt(String(e),10)/n},d1=(e,t,n,r=!1,s={})=>{const i=e.toString(),o=Iu(i,n),c=t.replace("_","-"),u={style:"currency",currency:n,currencyDisplay:"symbol",...s};try{return r?h1(c,u,o):o.toLocaleString(c,u)}catch{return i}},h1=(e,t,n)=>Intl.NumberFormat(e,t).formatToParts(n).filter(r=>r.type!=="currency").reduce((r,s)=>r+s.value,"").trim(),f1=/GMT(?:[-+](?:0?\d|1[0-4])(?::?[0-5]\d)?)?$/,{BASE_FORMAT_OPTIONS:Du,BASE_LOCALE:jo,SYSTEM_TIMEZONE:Vs,SYSTEM_TIMEZONE_FORMATTER:tr}=(()=>{const e="en-US",t="2-digit",n="numeric",o=Object.freeze({year:n,month:"short",day:n,hour:t,minute:t,second:t,fractionalSecondDigits:3,timeZoneName:"longOffset"});let c,u;try{u=new Intl.DateTimeFormat(e,o),c=u.resolvedOptions().timeZone}catch{c=void 0}return{BASE_FORMAT_OPTIONS:o,BASE_LOCALE:e,SYSTEM_TIMEZONE:c,SYSTEM_TIMEZONE_FORMATTER:u}})(),m1=/\+(?=-)|([+-]00:00)/g,p1=/(^\D?)(\d)$/,_1=([e,t])=>(Math.abs(e*60)+t)*(e<0?-1:1),y1=e=>Object.freeze([Math.floor(e/60),Fs(e,60)]),g1=e=>parseInt(e,10)||0,T1=e=>`GMT+${y1(e).map(r=>`${r}`.replace(p1,"$10$2")).join(":")}`.replace(m1,""),ki=e=>{var n;const t=((n=e==null?void 0:e.match(f1))==null?void 0:n[0].replace("GMT","").split(":",2).map(g1))??de;return _1(t.concat(0,0).slice(0,2))},A1=(e,t=tr)=>{const n=ki(tr==null?void 0:tr.format(e));return ki(t==null?void 0:t.format(e))-n},ku=(e,t,n=1)=>{const{offset:r,timestamp:s}=e(t);return s-r*n*6e4},Ft=(e,t)=>ku(e,t,1),Zt=(e,t)=>ku(e,t,-1),Us=(()=>{let e,t;Z(Vs)||(e=function(){return this.TIMEZONE},t=function(r){if(Ne(r))this.TIMEZONE=Vs,this.formatter=tr;else try{const s=new Intl.DateTimeFormat(jo,{...Du,timeZone:r}),i=s.resolvedOptions().timeZone;if(this.TIMEZONE===i)return;this.TIMEZONE=i,this.formatter=s}catch{}});function n(...r){if(r.length===0)return n.call(this,Date.now());const s=r[0],i=new Date(s).getTime(),o=this.formatter??tr;return Object.freeze({formatted:o==null?void 0:o.format(i),offset:A1(i,o),timestamp:i})}return()=>{const r={TIMEZONE:Vs},s=t==null?void 0:t.bind(r),i=J({current:{get:e==null?void 0:e.bind(r),set:s},system:{value:Vs}});return Object.defineProperties(n.bind(r),{tz:{get:()=>i,set:s}})}})(),E1={values:U,count:0},N1=/^[a-z]{2}-[A-Z]{2}$/,yo=e=>e.substring(0,2).toLowerCase();function C1(e,t){if(!e)return null;const n=yo(e);return t.find(r=>yo(r)===n)||null}function ha(e){const t=e.replace("_","-");if(N1.test(t))return t;const[n,r]=t.split("-");if(!n||!r)return null;const s=`${n.toLowerCase()}-${r.toUpperCase()}`;return s.length===5?s:null}function fa(e,t){const n=e.trim();if(!n||n.length<1||n.length>5)return Rn;const r=ha(n);return r&&t.includes(r)?r:C1(r??n,t)}function S1(e=U,t){return e===U?e:Object.keys(e).reduce((n,r)=>{const s=ha(r)||fa(r,t);return s&&e[r]&&(n[s]=e[r]),n},{})}const hi=(e,t)=>{if(Q(t)){const n=new Map;let r=-1;return e.replace(/%{(\w+)}/g,(s,i)=>{let o=n.get(i)??-1;const c=t(i,++r,++o)??"";return n.set(i,o),c})}return e.replace(/%{(\w+)}/g,(n,r)=>(t==null?void 0:t[r])??"")},kc=(e,t,n=E1)=>{const r=n.count??0,s=`${t}__${r}`;if(xt(e,s)&&e[s])return hi(e[s],n.values);const i=`${t}__plural`;return xt(e,i)&&r>1&&e[i]?hi(e[i],n.values):xt(e,t)&&e[t]?hi(e[t],n.values):null},R1=async(e,t=U,n=U)=>{const r=fa(e,Object.keys(t))||Rn,s=t[r];return{...Su,...await(Q(s)?s():s)??U,...cs(n==null?void 0:n[e])}};function v1(){let e=this.locale,t=e,n=[...this.supportedLocales];return J({load:{value:r=>R1(e,this.preferredTranslations,r)},locale:{get:()=>e,set:r=>{t=r,e=ha(r)||fa(r,n)||Rn}},supportedLocales:{get:()=>n,set(r){n=r,this.locale=t}}})}function O1(){var t;const e={};for(const[n,r]of Object.entries(Object.getOwnPropertyDescriptors(zo.prototype)))a1.includes(n)||(Q(r.get)?e[n]={get:r.get.bind(this),...n==="timezone"&&{set:(t=r.set)==null?void 0:t.bind(this)}}:Q(r.value)?e[n]={value:r.value.bind(this)}:e[n]={get:()=>this[n]});return e}var kt,ys,dr,gs,hr,fr,Gt,Ts,On,bn,mr,pr,As,Li;class zo{constructor(t=Rn,n){w(this,As);w(this,kt,Rn);w(this,ys,yo(p(this,kt)));w(this,dr,[Rn]);w(this,gs,p(this,dr));w(this,hr);w(this,fr,Su);w(this,Gt,v1.call(this));w(this,Ts,Pr);w(this,On);w(this,bn);w(this,mr,$s({timestamp:()=>performance.now()}));w(this,pr,Us());B(this,"watch",p(this,mr).subscribe.bind(void 0));B(this,"i18n",J(O1.call(this)));B(this,"preferredTranslations");this.watch(te),this.preferredTranslations=Object.freeze((n==null?void 0:n.reduce((r,s)=>({...r,...s}),_o))??{..._o}),b(this,dr,Ru(this.preferredTranslations)),this.locale=t}get customTranslations(){return p(this,hr)??{}}set customTranslations(t){let n,r=[...p(this,dr)];if(!Ne(t)){n=S1(t,c1);const s=Object.keys(n);r=[...r,...s].sort().filter((i,o,c)=>c.indexOf(i)===o)}p(this,Gt).supportedLocales=r,H(this,As,Li).call(this,n)}get languageCode(){return p(this,ys)}get lastRefreshTimestamp(){return p(this,mr).snapshot.timestamp}get locale(){return p(this,kt)}set locale(t){if(Ne(t))this.locale=Rn;else{if(p(this,Gt).locale=t,p(this,kt)===p(this,Gt).locale)return;H(this,As,Li).call(this,p(this,hr))}}get ready(){return p(this,Ts)}get supportedLocales(){return p(this,gs)}get timezone(){return p(this,pr).tz.current}set timezone(t){p(this,pr).tz=t}get(t,n){const r=kc(p(this,fr),t,n);return mo(r)?t:r}has(t,n){return!!kc(p(this,fr),t,n)}amount(t,n,r){const{hideCurrency:s,...i}=r||{},o=d1(t,p(this,kt),n,s,{...i,currencyDisplay:"symbol",signDisplay:"never"});return t<0?`- ${o}`:o}date(t,n={}){const r={...da,timeZone:p(this,pr).tz.current,...n};return new Date(t).toLocaleDateString(p(this,kt),r)}fullDate(t){return this.date(t,{month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}}kt=new WeakMap,ys=new WeakMap,dr=new WeakMap,gs=new WeakMap,hr=new WeakMap,fr=new WeakMap,Gt=new WeakMap,Ts=new WeakMap,On=new WeakMap,bn=new WeakMap,mr=new WeakMap,pr=new WeakMap,As=new WeakSet,Li=function(t){Z(p(this,bn))&&b(this,Ts,new Promise(s=>{b(this,bn,()=>{s(p(this,On)),b(this,On,b(this,bn,void 0))})}));const n=()=>{var s;p(this,On)===r&&((s=p(this,bn))==null||s.call(this))},r=b(this,On,(async()=>{b(this,fr,await p(this,Gt).load(t)),b(this,kt,p(this,Gt).locale),b(this,gs,Object.freeze(p(this,Gt).supportedLocales)),b(this,hr,t),b(this,ys,yo(p(this,kt))),p(this,mr).requestNotification()})());r.then(n).catch(s=>{n(),console.error(s)})};class ma{constructor(t){B(this,"components",[]);B(this,"options");B(this,"localization");B(this,"loadingContext");B(this,"session",new G2);B(this,"onError");B(this,"update",async(t=U)=>(this.setOptions(t),await this.initialize(),this.components.forEach(n=>{n.props.core===this&&n.update(this.getPropsForComponent(this.options))}),this));B(this,"remove",t=>(this.components=this.components.filter(n=>n._id!==t._id),t.unmount(),this));B(this,"registerComponent",t=>{t.props.core===this&&this.components.push(t)});B(this,"setOptions",t=>{var n,r;return this.options={...this.options,...t},this.localization.locale=(n=this.options)==null?void 0:n.locale,this.localization.customTranslations=(r=this.options)==null?void 0:r.translations,this.session.loadingContext=this.loadingContext,this.session.onSessionCreate=this.options.onSessionCreate,this});this.options={environment:vi,...t},this.localization=new zo(t.locale,t.availableTranslations),this.loadingContext=n2(this.options.environment),this.setOptions(t)}async initialize(){return Promise.all([this.localization.ready]).then(()=>this)}getPropsForComponent(t){return{...t}}}B(ma,"version","1.4.2");var Ws,re,Lu,wu,Cn,Lc,Pu,wi,Mu,pa,Pi,Mi,Fu,ls={},xu=[],b1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qo=Array.isArray;function Xt(e,t){for(var n in t)e[n]=t[n];return e}function _a(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Fr(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?Ws.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return rs(e,o,r,s,null)}function rs(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Lu,__i:-1,__u:0};return s==null&&re.vnode!=null&&re.vnode(i),i}function I1(){return{current:null}}function K(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function xr(e,t){if(t==null)return e.__?xr(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"?xr(e):null}function Bu(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 Bu(e)}}function Fi(e){(!e.__d&&(e.__d=!0)&&Cn.push(e)&&!go.__r++||Lc!==re.debounceRendering)&&((Lc=re.debounceRendering)||Pu)(go)}function go(){var e,t,n,r,s,i,o,c;for(Cn.sort(wi);e=Cn.shift();)e.__d&&(t=Cn.length,r=void 0,i=(s=(n=e).__v).__e,o=[],c=[],n.__P&&((r=Xt({},s)).__v=s.__v+1,re.vnode&&re.vnode(r),ya(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??xr(s),!!(32&s.__u),c),r.__v=s.__v,r.__.__k[r.__i]=r,Wu(o,r,c),r.__e!=i&&Bu(r)),Cn.length>t&&Cn.sort(wi));go.__r=0}function $u(e,t,n,r,s,i,o,c,u,l,h){var d,m,f,y,_,T,g=r&&r.__k||xu,E=t.length;for(u=D1(n,t,g,u,E),d=0;d<E;d++)(f=n.__k[d])!=null&&(m=f.__i===-1?ls:g[f.__i]||ls,f.__i=d,T=ya(e,f,m,s,i,o,c,u,l,h),y=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&ga(m.ref,null,f),h.push(f.ref,f.__c||y,f)),_==null&&y!=null&&(_=y),4&f.__u||m.__k===f.__k?u=Uu(f,u,e):typeof f.type=="function"&&T!==void 0?u=T:y&&(u=y.nextSibling),f.__u&=-7);return n.__e=_,u}function D1(e,t,n,r,s){var i,o,c,u,l,h=n.length,d=h,m=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=i+m,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rs(null,o,null,null,null):qo(o)?rs(K,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?rs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,c=null,(l=o.__i=k1(o,n,u,d))!==-1&&(d--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&m--,typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?m--:l==u+1?m++:(l>u?m--:m++,o.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<h;i++)(c=n[i])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=xr(c)),Hu(c,c));return r}function Uu(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Uu(r[s],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xr(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function yn(e,t){return t=t||[],e==null||typeof e=="boolean"||(qo(e)?e.some(function(n){yn(n,t)}):t.push(e)),t}function k1(e,t,n,r){var s,i,o=e.key,c=e.type,u=t[n];if(u===null||u&&o==u.key&&c===u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(s=n-1,i=n+1;s>=0||i<t.length;){if(s>=0){if((u=t[s])&&(2&u.__u)==0&&o==u.key&&c===u.type)return s;s--}if(i<t.length){if((u=t[i])&&(2&u.__u)==0&&o==u.key&&c===u.type)return i;i++}}return-1}function wc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||b1.test(t)?n:n+"px"}function Zs(e,t,n,r,s){var i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||wc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||wc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Mu,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=pa,e.addEventListener(t,i?Mi:Pi,i)):e.removeEventListener(t,i?Mi:Pi,i);else{if(s=="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 Pc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=pa++;else if(t.t<n.u)return;return n(re.event?re.event(t):t)}}}function ya(e,t,n,r,s,i,o,c,u,l){var h,d,m,f,y,_,T,g,E,v,N,D,C,O,R,F,P,z=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[c=t.__e=n.__e]),(h=re.__b)&&h(t);e:if(typeof z=="function")try{if(g=t.props,E="prototype"in z&&z.prototype.render,v=(h=z.contextType)&&r[h.__c],N=h?v?v.props.value:h.__:r,n.__c?T=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new z(g,N):(t.__c=d=new Jt(g,N),d.constructor=z,d.render=w1),v&&v.sub(d),d.props=g,d.state||(d.state={}),d.context=N,d.__n=r,m=d.__d=!0,d.__h=[],d._sb=[]),E&&d.__s==null&&(d.__s=d.state),E&&z.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xt({},d.__s)),Xt(d.__s,z.getDerivedStateFromProps(g,d.__s))),f=d.props,y=d.state,d.__v=t,m)E&&z.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),E&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(E&&z.getDerivedStateFromProps==null&&g!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,N),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,N)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(j){j&&(j.__=t)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,N),E&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,y,_)})}if(d.context=N,d.props=g,d.__P=e,d.__e=!1,C=re.__r,O=0,E){for(d.state=d.__s,d.__d=!1,C&&C(t),h=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do d.__d=!1,C&&C(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++O<25);d.state=d.__s,d.getChildContext!=null&&(r=Xt(Xt({},r),d.getChildContext())),E&&!m&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(f,y)),c=$u(e,qo(F=h!=null&&h.type===K&&h.key==null?h.props.children:h)?F:[F],t,n,r,s,i,o,c,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),T&&(d.__E=d.__=null)}catch(j){if(t.__v=null,u||i!=null)if(j.then){for(t.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else for(P=i.length;P--;)_a(i[P]);else t.__e=n.__e,t.__k=n.__k;re.__e(j,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=L1(n.__e,t,n,r,s,i,o,u,l);return(h=re.diffed)&&h(t),128&t.__u?void 0:c}function Wu(e,t,n){for(var r=0;r<n.length;r++)ga(n[r],n[++r],n[++r]);re.__c&&re.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){re.__e(i,s.__v)}})}function L1(e,t,n,r,s,i,o,c,u){var l,h,d,m,f,y,_,T=n.props,g=t.props,E=t.type;if(E=="svg"?s="http://www.w3.org/2000/svg":E=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!E&&(E?f.localName==E:f.nodeType==3)){e=f,i[l]=null;break}}if(e==null){if(E==null)return document.createTextNode(g);e=document.createElementNS(s,E,g.is&&g),c&&(re.__m&&re.__m(t,i),c=!1),i=null}if(E===null)T===g||c&&e.data===g||(e.data=g);else{if(i=i&&Ws.call(e.childNodes),T=n.props||ls,!c&&i!=null)for(T={},l=0;l<e.attributes.length;l++)T[(f=e.attributes[l]).name]=f.value;for(l in T)if(f=T[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=f;else if(!(l in g)){if(l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g)continue;Zs(e,l,null,f,s)}}for(l in g)f=g[l],l=="children"?m=f:l=="dangerouslySetInnerHTML"?h=f:l=="value"?y=f:l=="checked"?_=f:c&&typeof f!="function"||T[l]===f||Zs(e,l,f,T[l],s);if(h)c||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),$u(e,qo(m)?m:[m],t,n,r,E=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&xr(n,0),c,u),i!=null)for(l=i.length;l--;)_a(i[l]);c||(l="value",E=="progress"&&y==null?e.removeAttribute("value"):y!==void 0&&(y!==e[l]||E=="progress"&&!y||E=="option"&&y!==T[l])&&Zs(e,l,y,T[l],s),l="checked",_!==void 0&&_!==e[l]&&Zs(e,l,_,T[l],s))}return e}function ga(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(s){re.__e(s,n)}}function Hu(e,t,n){var r,s;if(re.unmount&&re.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ga(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){re.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Hu(r[s],t,n||typeof e.type!="function");n||_a(e.__e),e.__c=e.__=e.__e=void 0}function w1(e,t,n){return this.constructor(e,n)}function nr(e,t,n){var r,s,i,o;t==document&&(t=document.documentElement),re.__&&re.__(e,t),s=(r=!1)?null:t.__k,i=[],o=[],ya(t,e=t.__k=Fr(K,null,[e]),s||ls,ls,t.namespaceURI,s?null:t.firstChild?Ws.call(t.childNodes):null,i,s?s.__e:t.firstChild,r,o),Wu(i,e,o)}function Gu(e,t,n){var r,s,i,o,c=Xt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:c[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(c.children=arguments.length>3?Ws.call(arguments,2):n),rs(e.type,c,r||e.key,s||e.ref,null)}function Hr(e,t){var n={__c:t="__cC"+Fu++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,i;return this.getChildContext||(s=new Set,(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){s=null},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.forEach(function(c){c.__e=!0,Fi(c)})},this.sub=function(o){s.add(o);var c=o.componentWillUnmount;o.componentWillUnmount=function(){s&&s.delete(o),c&&c.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Ws=xu.slice,re={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(c){e=c}throw e}},Lu=0,wu=function(e){return e!=null&&e.constructor==null},Jt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xt({},this.state),typeof e=="function"&&(e=e(Xt({},n),this.props)),e&&Xt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fi(this))},Jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fi(this))},Jt.prototype.render=K,Cn=[],Pu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wi=function(e,t){return e.__v.__b-t.__v.__b},go.__r=0,Mu=/(PointerCapture)$|Capture$/i,pa=0,Pi=Pc(!1),Mi=Pc(!0),Fu=0;var P1=0;function a(e,t,n,r,s,i){t||(t={});var o,c,u=t;if("ref"in u)for(c in u={},t)c=="ref"?o=t[c]:u[c]=t[c];var l={type:e,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--P1,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(c in o)u[c]===void 0&&(u[c]=o[c]);return re.vnode&&re.vnode(l),l}var $n,Ce,fi,Mc,Br=0,Yu=[],we=re,Fc=we.__b,xc=we.__r,Bc=we.diffed,$c=we.__c,Uc=we.unmount,Wc=we.__;function Hs(e,t){we.__h&&we.__h(Ce,e,Br||t),Br=0;var n=Ce.__H||(Ce.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function x(e){return Br=1,Ko(ju,e)}function Ko(e,t,n){var r=Hs($n++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ju(void 0,t),function(c){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,c);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=Ce,!Ce.u)){var s=function(c,u,l){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return!!m.__c});if(h.every(function(m){return!m.__N}))return!i||i.call(this,c,u,l);var d=r.__c.props!==c;return h.forEach(function(m){if(m.__N){var f=m.__[0];m.__=m.__N,m.__N=void 0,f!==m.__[0]&&(d=!0)}}),i&&i.call(this,c,u,l)||d};Ce.u=!0;var i=Ce.shouldComponentUpdate,o=Ce.componentWillUpdate;Ce.componentWillUpdate=function(c,u,l){if(this.__e){var h=i;i=void 0,s(c,u,l),i=h}o&&o.call(this,c,u,l)},Ce.shouldComponentUpdate=s}return r.__N||r.__}function $(e,t){var n=Hs($n++,3);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.i=t,Ce.__H.__h.push(n))}function us(e,t){var n=Hs($n++,4);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.i=t,Ce.__h.push(n))}function Y(e){return Br=5,A(function(){return{current:e}},[])}function M1(e,t,n){Br=6,us(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function A(e,t){var n=Hs($n++,7);return Ta(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function S(e,t){return Br=8,A(function(){return e},t)}function Gr(e){var t=Ce.context[e.__c],n=Hs($n++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ce)),t.props.value):e.__}function F1(){for(var e;e=Yu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(no),e.__H.__h.forEach(xi),e.__H.__h=[]}catch(t){e.__H.__h=[],we.__e(t,e.__v)}}we.__b=function(e){Ce=null,Fc&&Fc(e)},we.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Wc&&Wc(e,t)},we.__r=function(e){xc&&xc(e),$n=0;var t=(Ce=e.__c).__H;t&&(fi===Ce?(t.__h=[],Ce.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(no),t.__h.forEach(xi),t.__h=[],$n=0)),fi=Ce},we.diffed=function(e){Bc&&Bc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yu.push(t)!==1&&Mc===we.requestAnimationFrame||((Mc=we.requestAnimationFrame)||x1)(F1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),fi=Ce=null},we.__c=function(e,t){t.some(function(n){try{n.__h.forEach(no),n.__h=n.__h.filter(function(r){return!r.__||xi(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],we.__e(r,n.__v)}}),$c&&$c(e,t)},we.unmount=function(e){Uc&&Uc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{no(r)}catch(s){t=s}}),n.__H=void 0,t&&we.__e(t,n.__v))};var Hc=typeof requestAnimationFrame=="function";function x1(e){var t,n=function(){clearTimeout(r),Hc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Hc&&(t=requestAnimationFrame(n))}function no(e){var t=Ce,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ce=t}function xi(e){var t=Ce;e.__c=e.__(),Ce=t}function Ta(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ju(e,t){return typeof t=="function"?t(e):t}const rt="adyen-pe-typography";var I=(e=>(e.CAPTION="caption",e.BODY="body",e.SUBTITLE="subtitle",e.TITLE="title",e))(I||{}),It=(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))(It||{}),ne=(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))(ne||{});function zu(e,t){for(var n in t)e[n]=t[n];return e}function Bi(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Gc(e,t){this.props=e,this.context=t}function Ie(e,t){function n(s){var i=this.props.ref,o=i==s.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!o:Bi(this.props,s)}function r(s){return this.shouldComponentUpdate=n,Fr(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Gc.prototype=new Jt).isPureReactComponent=!0,Gc.prototype.shouldComponentUpdate=function(e,t){return Bi(this.props,e)||Bi(this.state,t)};var Yc=re.__b;re.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Yc&&Yc(e)};var B1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Yr(e){function t(n){var r=zu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=B1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $1=re.__e;re.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}$1(e,t,n,r)};var jc=re.unmount;function qu(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=zu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return qu(r,t,n)})),e}function Ku(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ku(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function mi(){this.__u=0,this.o=null,this.__b=null}function Vu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xs(){this.i=null,this.l=null}re.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),jc&&jc(e)},(mi.prototype=new Jt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var s=Vu(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,s?s(c):c())};n.__R=o;var c=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Ku(u,u.__c.__P,u.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},mi.prototype.componentWillUnmount=function(){this.o=[]},mi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qu(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&Fr(K,null,e.fallback);return s&&(s.__u&=-33),[Fr(K,null,t.__a?null:e.children),s]};var zc=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 U1(e){return this.getChildContext=function(){return e.context},e.children}function W1(e){var t=this,n=e.h;t.componentWillUnmount=function(){nr(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(r){this.childNodes.push(r),t.h.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}),nr(Fr(U1,{context:t.context},e.__v),t.v)}function Zu(e,t){var n=Fr(W1,{__v:e,h:t});return n.containerInfo=t,n}(Xs.prototype=new Jt).__a=function(e){var t=this,n=Vu(t.__v),r=t.l.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),zc(t,e,r)):s()};n?n(i):i()}},Xs.prototype.render=function(e){this.i=null,this.l=new Map;var t=yn(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},Xs.prototype.componentDidUpdate=Xs.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){zc(e,n,t)})};var H1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,G1=/^(?: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]/,Y1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,j1=/[A-Z0-9]/g,z1=typeof document<"u",q1=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Jt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Jt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var qc=re.event;function K1(){}function V1(){return this.cancelBubble}function Z1(){return this.defaultPrevented}re.event=function(e){return qc&&(e=qc(e)),e.persist=K1,e.isPropagationStopped=V1,e.isDefaultPrevented=Z1,e.nativeEvent=e};var X1={enumerable:!1,configurable:!0,get:function(){return this.class}},Kc=re.vnode;re.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={},i=r.indexOf("-")===-1;for(var o in n){var c=n[o];if(!(o==="value"&&"defaultValue"in n&&c==null||z1&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var u=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&c===!0?c="":u==="translate"&&c==="no"?c=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?o="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||q1(n.type)?u==="onfocus"?o="onfocusin":u==="onblur"?o="onfocusout":Y1.test(o)&&(o=u):u=o="oninput":i&&G1.test(o)?o=o.replace(j1,"-$&").toLowerCase():c===null&&(c=void 0),u==="oninput"&&s[o=u]&&(o="oninputCapture"),s[o]=c}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=yn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=yn(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",X1)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=H1,Kc&&Kc(e)};var Vc=re.__r;re.__r=function(e){Vc&&Vc(e),e.__c};var Zc=re.diffed;re.diffed=function(e){Zc&&Zc(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 Q1({el:e,className:t,stronger:n,strongest:r,variant:s,medium:i,large:o,testId:c,wide:u,children:l}){const h=e||"p",d=A(()=>({[`${rt}--${I.CAPTION}`]:s===I.CAPTION,[`${rt}--${I.CAPTION}-${It.WIDE}`]:s===I.CAPTION&&u,[`${rt}--${I.CAPTION}-${It.STRONGER}`]:s===I.CAPTION&&n,[`${rt}--${I.BODY}`]:s===I.BODY,[`${rt}--${I.BODY}-${It.WIDE}`]:s===I.BODY&&u,[`${rt}--${I.BODY}-${It.STRONGER}`]:s===I.BODY&&n,[`${rt}--${I.BODY}-${It.STRONGEST}`]:s===I.BODY&&r,[`${rt}--${I.SUBTITLE}`]:s===I.SUBTITLE,[`${rt}--${I.SUBTITLE}-${It.STRONGER}`]:s===I.SUBTITLE&&n,[`${rt}--${I.TITLE}`]:s===I.TITLE&&!i&&!o,[`${rt}--${I.TITLE}-${It.MEDIUM}`]:s===I.TITLE&&i,[`${rt}--${I.TITLE}-${It.LARGE}`]:s===I.TITLE&&o}),[s,u,n,i,o,r]);return a(h,{className:M([`${rt}`,d,t]),"data-testid":c,children:l})}const k=Ie(Q1),Xu=Hr({i18n:new zo().i18n,loadingContext:"",commonProps:{},updateCore:te,componentRef:{current:null}}),W=()=>Gr(Xu),J1="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",Xe=e=>Yr(e),To=(()=>{const e=new Set,t=(r,s,i,o)=>{let c=o==null?void 0:o[i];return c=Q(c)?c:Uo,!Gn(c(r[i]),c(s[i]))};return Object.defineProperty(r=>(s,i)=>{try{for(const o in s)if(e.add(o),t(s,i,o,r))return!1;for(const o in i)if(!e.has(o)&&(e.add(o),t(s,i,o,r)))return!1;return!0}finally{e.clear()}},"exclude",{value:te})})(),Xc=/^\s+|\s+(?=\s|$)/g,Fn=(e,t)=>(t?typeof t=="string"?t:(t==null?void 0:t.value)??"":"").replace(Xc,"")||e.replace(Xc,"")||void 0,Ao=(e,t,n)=>M(Fn("",n),Fn(Fn("",t)||"",e)),Aa=(e,t=[],n=[])=>M([...n,...t==null?void 0:t.map(r=>e?`${e}--${r}`:r)]),Vo=e=>Zn(e,(e==null?void 0:e.value)??e),ut="adyen-pe-button",em="adyen-pe-button__anchor",$i=`${ut}-actions`,tm=`${ut}--icon`,nm=`${ut}--icon-content`,rm=`${$i}__container-wrapper`,sm=`${ut}__label`,om=`${ut}__icon-right`,im=`${ut}__icon-left`,am=`${ut}--condensed`,cm=`${ut}--full-width`,lm=`${ut}--loading`,Ui=({inline:e=!1,size:t="large"})=>a("div",{className:`adyen-pe-spinner__wrapper ${e?"adyen-pe-spinner__wrapper--inline":""}`,children:a("div",{className:`adyen-pe-spinner adyen-pe-spinner--${t}`})}),Zo=(e,t,n,r,s,i)=>{const{children:o,iconLeft:c,iconRight:u,iconButton:l=!1,fullWidth:h,condensed:d,state:m="default"}=s,f=S(g=>{g.preventDefault(),r||i==null||i(g)},[r,i]),y=A(()=>Aa(n,t,[n,e]),[n,t,e]),_=A(()=>({...s,className:M(y,{[tm]:l,[am]:d,[cm]:h,[lm]:m==="loading"}),disabled:r||m==="loading"}),[y,d,r,h,l,s,m]),T=A(()=>l?a("div",{className:`${nm}`,children:o}):a(K,{children:[m==="loading"&&a(Ui,{size:"x-small"}),c&&a("span",{className:im,children:c}),a(k,{className:sm,el:ne.SPAN,variant:I.BODY,children:o}),u&&a("span",{className:om,children:u})]}),[o,l,c,u,m]);return{classes:y,click:f,allChildren:T,allProps:_}};var se=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.TERTIARY_WITH_BACKGROUND="tertiary-with-background",e.LINK="link",e))(se||{});function um(e,t){const n=A(()=>Fn("",e.className)||"",[e.className]),r=A(()=>Vo(e.disabled||!1),[e.disabled]),{click:s,allChildren:i,allProps:o}=Zo(n,[...e.classNameModifiers||[],e.variant||se.PRIMARY],ut,r,e,e.onClick),{classNameModifiers:c,...u}=o;return a("button",{...u,ref:t,type:e.type||"button",onClick:s,children:i})}const he=Xe(um),Qc={md:680,lg:1024},en=({title:e,message:t,imageDesktop:n,imageMobile:r,withImage:s,centered:i,refreshComponent:o,onContactSupport:c,translationValues:u,absolutePosition:l=!0,outlined:h=!0,renderSecondaryButton:d})=>{const{i18n:m,updateCore:f}=W(),y=S(_=>Array.isArray(_)?_.map((T,g)=>g===0?a(K,{children:[m.get(T),u&&u[T]&&a(K,{children:u[T]})]}):a(K,{children:[a("br",{}),m.get(T),u&&u[T]&&a(K,{children:u[T]})]})):m.get(_),[m,u]);return a("div",{className:M(["adyen-pe-error-message-display"],{"adyen-pe-error-message-display--absolute-position":l,"adyen-pe-error-message-display--outlined":h,"adyen-pe-error-message-display--with-background":!h,"adyen-pe-error-message-display--centered":i}),children:[(n||r||s)&&a("div",{className:"adyen-pe-error-message-display__illustration",children:a("picture",{children:[a("source",{type:"image/svg+xml",media:`(min-width: ${Qc.md}px)`,srcSet:n}),a("source",{type:"image/svg+xml",media:`(max-width: ${Qc.md}px)`,srcSet:r}),a("img",{srcSet:n??J1,alt:m.get("thereWasAnUnexpectedError")})]})}),a(k,{variant:I.TITLE,children:m.get(e)}),t&&a(k,{variant:I.BODY,children:y(t)}),(c||o||d)&&a("div",{className:"adyen-pe-error-message-display__button",children:[d&&d(),c&&a(he,{onClick:c,children:m.get("contactSupport")}),!c&&o&&a(he,{onClick:f,children:m.get("refresh")})]})]})},Nn=(e,t)=>Q(e.endpoints[t]),pi={transactions:e=>Nn(e,"getTransactions"),transactionDetails:e=>Nn(e,"getTransaction"),payouts:e=>Nn(e,"getPayouts"),payoutDetails:e=>Nn(e,"getPayout"),reports:e=>Nn(e,"getReports"),capitalOverview:e=>Nn(e,"getDynamicGrantOffersConfiguration"),capitalOffer:e=>Nn(e,"getDynamicGrantOffer")},Qu=async e=>{const t=ou(),n=t.promise,r=e.context.refreshing;let s,i,o=e.subscribe(c=>{if(Yn(c)){t.resolve();return}if(s??(s=e.context.refreshing),!e.context.refreshing){if(Bt(e.context.isExpired)&&(i??(i=!(r||s)))){i=!1,e.refresh();return}t.resolve()}});return n.finally(()=>{o(),o=null}),n},dm=async(e,t)=>{var n;return await Qu(t),xe(await((n=pi[e])==null?void 0:n.call(pi,t.context)))},hm=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"}},Ju=Hr({endpoints:U,extraConfig:U,hasError:!1,http:r2,isExpired:void 0,isFrozen:!1,refresh:te,refreshing:!1}),fm=({children:e,session:t,type:n})=>{const{http:r,refresh:s}=A(()=>t,[t]),[,i]=x(0),[o,c]=x(0),[u,l]=x();return $(()=>{dm(n,t).then(l)},[t,n]),$(()=>t.subscribe(h=>{(Yn(h)?c:i)(m=>m+1)}),[o]),a(Ju.Provider,{value:{...t.context,http:r,refresh:s},children:!Z(u)&&(u?yn(e):a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[hm(n),"contactSupportForHelp"]}))})},Se=()=>Gr(Ju),wt=(e=!1)=>{const[t,n]=x(e),r=S(i=>n(i),[]),s=S(()=>n(i=>!i),[]);return[t,r,s]},mm=({i18n:e=new zo().i18n,children:t,commonProps:n,loadingContext:r,updateCore:s,externalErrorHandler:i,componentRef:o})=>{const[c,u]=wt(!1),l=A(()=>n||{},[n]),h=A(()=>r??"",[r]);return $(()=>{(async()=>{await(e==null?void 0:e.ready),u(!0)})().catch()},[]),c?a(Xu.Provider,{value:{i18n:e,commonProps:l,loadingContext:h,updateCore:s,externalErrorHandler:i,componentRef:o},children:yn(t)}):null};var Zl;class ed{constructor(t){B(this,"_component");B(this,"_node",null);B(this,"_id",`${(Zl=this.constructor)==null?void 0:Zl.type}-${aa()}`);B(this,"defaultProps",{});B(this,"props");B(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=gt(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(),nr(this._component,n),this}update(t){return this.props=this.formatProps({...this.props,...t}),this._component=this.render(),this._node&&nr(this._component,this._node),this}remount(t){if(!this._node)throw new Error("Component is not mounted.");const n=t||this.render();return nr(n,this._node),this}unmount(){return this._node&&nr(null,this._node),this}remove(){this.unmount(),this.props.core.remove(this)}}B(ed,"type");class jn extends ed{constructor(n){super(n);B(this,"componentRef",null);B(this,"componentToRender",null);B(this,"elementRef");B(this,"onContactSupport");B(this,"customClassNames");B(this,"compRef");B(this,"setUIElementStatus");this.setState=this.setState.bind(this),this.onContactSupport=n.onContactSupport,this.elementRef=this,this.compRef=I1()}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,r){var s,i;return(s=this.componentRef)!=null&&s.setStatus?this.componentRef.setStatus(n,r):(i=this.setUIElementStatus)==null||i.call(this,n),this}render(){const n=this.props.core,r=n.update.bind(n),s=this.props.onError||n.onError||null;return n.session.errorHandler=s,a(fm,{type:this.type,session:n.session,children:a(mm,{i18n:n.localization.i18n,loadingContext:n.loadingContext,updateCore:r,externalErrorHandler:s,componentRef:this.compRef,children:this.componentToRender&&a("div",{ref:this.compRef,className:M("adyen-pe-component",this.customClassNames),children:a("div",{className:"adyen-pe-component__container",children:this.componentToRender()})})})},performance.now())}}function Ot({fetchOptions:{keepPrevData:e,onSuccess:t,enabled:n}={keepPrevData:!0},queryFn:r}){const s=Y(!1),i={error:void 0,data:void 0,isFetching:Bt(n)},o=(h,d)=>{switch(d.type){case"loading":return{...i,isFetching:!0,data:e?h.data:void 0};case"fetched":return{...i,data:d.payload,isFetching:!1};case"error":return{...i,error:d.payload,isFetching:!1};default:return h}},[c,u]=Ko(o,i),l=S(async()=>{u({type:"loading"});try{if(s.current)return;const h=await r();t==null||t(h),u({type:"fetched",payload:h})}catch(h){if(s.current)return;u({type:"error",payload:h})}},[u,r,t]);return $(()=>(s.current=!1,Bt(n)&&l(),()=>{s.current=!0}),[n,l]),c}const Xo=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("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"})]})),Ea=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("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"})]})),Na="adyen-pe-accordion",Ca=Na+"__header",pm=Ca+"-container",_m=Ca+"-controller",ym=Na+"__content";function Jc({children:e,classNames:t,header:n,headerInformation:r}){var u;const[s,i]=x(!1),o=Y(null),c=S(()=>{i(!s)},[s]);return a("div",{className:M(Na,t),children:[a("h3",{className:Ca,children:[a("button",{id:"accordion-controller","aria-controls":"accordion-content",className:pm,onClick:c,"aria-expanded":s,children:a("div",{className:_m,children:[n,s?a(Ea,{height:8,width:15}):a(Xo,{height:8,width:15})]})}),r&&a("div",{children:r})]}),a("div",{role:"region",id:"accordion-content","aria-labelledby":"accordion-controller",style:{maxHeight:s?(u=o==null?void 0:o.current)==null?void 0:u.offsetHeight:0},className:ym,children:a("div",{ref:o,children:e})})]})}const nn="adyen-pe-card",td=`${nn}__body`,nd=`${nn}__header`,gm=`${nn}__title`,Tm=`${nn}__subtitle`,Am=`${nd}-content`,Em=`${td}--with-title`,Nm=`${nn}--no-outline`,Cm=`${nn}--no-padding`,Sm=`${nn}--filled`,Rm=`${nn}__footer`,ro=({title:e,subTitle:t,children:n,footer:r,el:s,renderHeader:i,renderFooter:o,filled:c,noOutline:u,noPadding:l,classNameModifiers:h,testId:d})=>{const m=s||"header";return a("section",{className:M(nn,{[Sm]:c,[Nm]:u,[Cm]:l},h),"data-testid":d,children:[(e||i)&&a(m,{className:nd,children:(e||i)&&a("div",{className:Am,children:[i||a("span",{className:gm,children:e}),t&&a("div",{className:Tm,children:t})]})}),a("div",{className:M(td,{[Em]:e||i}),children:n}),(r||o)&&a("footer",{className:Rm,children:o||r})]})},el="2-digit",Sa="long",tl="numeric",rd="short",vm="shortOffset",jr={month:Sa,day:tl,year:tl},sd={hour:el,minute:el},od={...jr,...sd,month:rd,hour12:!1},id={...od,year:void 0},ad={...jr,month:"short"},Om=jr,bm=id,Im={...jr,weekday:Sa},nl={...jr,month:rd},Dm=od,km=id,Lm={...jr,...sd,weekday:Sa,timeZoneName:vm},tt={sm:480,md:768,lg:1024},zr="adyen-pe-structured-list",wm=`${zr}--align-end`,cd=`${zr}__item`,rl=`${zr}__grid`,Pm=`${zr}__content`,Mm=`${zr}__label`,Fm=`${cd}--has-highlight`,xm=e=>{const{i18n:t}=W();return A(()=>e.map(n=>({key:n.key,value:n.value,id:aa(),label:t.get(n.key),type:n.type,config:n.config})),[t,e])},Bm="6-6";function fn({items:e,highlightable:t,renderValue:n,renderLabel:r,layout:s=Bm,grid:i=!0,classNames:o,align:c="end"}){const[u,l]=A(()=>s.split("-").map(m=>`${rl}--width-${m}-of-12`),[s]),h=xm(e),{i18n:d}=W();return a("dl",{"aria-label":d.get("structuredList"),className:M(zr,o,{[wm]:c==="end"}),children:h.map((m,f)=>a("div",{className:M(cd,{[Fm]:t,[rl]:i}),children:[a("dt",{className:M(Mm,u),children:r?r(m.label,e[f].key):a(k,{variant:I.BODY,children:m.label})}),a("dd",{"aria-label":`${d.get(m.key)} ${d.get("value")}`,className:M(Pm,l),children:n?n(m.value,m.key,m.type,m.config):a(k,{variant:I.BODY,children:m.value})})]},`${f}_${m.id||"0"}`))})}const ld="adyen-pe-overview-details",Ra=`${ld}__skeleton`,$m=`${Ra}-container`,Um=`${Ra}--loading-content`,Wm=`${ld}__status-skeleton`,Hm=({skeletonRowNumber:e=0})=>{const t=M(Ra,Um),n=Array.from({length:e}),r=Array.from({length:2});return a("div",{className:$m,children:[a("div",{className:Wm,children:r.map((s,i)=>a("span",{className:t},`status-skeleton-${i}`))}),n.map((s,i)=>a("span",{className:t},`skeleton-${i}`))]})},va=Ie(Hm),Wi=e=>{const{i18n:t}=W();return S((...n)=>{const r=t.timezone;try{return e(...n)}finally{t.timezone=r}},[t,e])},Gm=e=>{const{i18n:t}=W(),n=Wi(S(()=>(t.timezone=void 0,t.timezone=e,t.timezone),[t,e]));return A(n,[n])},rn=e=>{const{i18n:t}=W(),n=Gm(e),r=Wi(S((...i)=>(t.timezone=n,t.date(...i)),[t,n])),s=Wi(S((...i)=>(t.timezone=n,t.fullDate(...i)),[t,n]));return{dateFormat:r,fullDateFormat:s}},bt="adyen-pe-payout-data",Ym=`${bt}__title-container`,jm=`${bt}__title`,zm=`${bt}__title--with-extra-details`,qm=`${bt}__title--ba-id`,Oa=`${bt}__content`,Km=`${bt}__extra-details`,Vm=`${bt}__extra-details-label`,Zm=`${bt}__extra-details-icon`,Xm=`${bt}__button-actions`,Xn=`${Oa}--section`,so=`${Oa}--card`,sl=`${so}-title`,ss=`${Xn}-amount`,ol=`${ss}-gross`,Qm=`${ss}-net`,Jm=`${bt}--unpaid-amount`;var Ee=(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))(Ee||{});const Mt=Ie(({variant:e=Ee.DEFAULT,label:t})=>a("div",{className:M("adyen-pe-tag",{"adyen-pe-tag--success":e===Ee.SUCCESS,"adyen-pe-tag--default":e===Ee.DEFAULT,"adyen-pe-tag--warning":e===Ee.WARNING,"adyen-pe-tag--error":e===Ee.ERROR,"adyen-pe-tag--primary":e===Ee.WHITE,"adyen-pe-tag--light":e===Ee.LIGHT,"adyen-pe-tag--light-with-outline":e===Ee.LIGHT_WITH_OUTLINE,"adyen-pe-tag--blue":e===Ee.BLUE}),children:t})),il={"angle-right":()=>Promise.resolve().then(()=>require("./angle-right-C1JIrQTg.cjs")),"checkmark-circle-fill":()=>Promise.resolve().then(()=>require("./checkmark-circle-fill-CMpIlMCC.cjs")),"checkmark-square-fill":()=>Promise.resolve().then(()=>require("./checkmark-square-fill-Cy8Hzt9P.cjs")),checkmark:()=>Promise.resolve().then(()=>require("./checkmark-B8DhX3p1.cjs")),"chevron-down":()=>Promise.resolve().then(()=>require("./chevron-down-CB77LxQY.cjs")),"chevron-left":()=>Promise.resolve().then(()=>require("./chevron-left-DMAmIvLF.cjs")),"chevron-right":()=>Promise.resolve().then(()=>require("./chevron-right-BxLJu7Zf.cjs")),"chevron-up":()=>Promise.resolve().then(()=>require("./chevron-up-CT79XJdh.cjs")),copy:()=>Promise.resolve().then(()=>require("./copy-7UpFtMvt.cjs")),"cross-circle-fill":()=>Promise.resolve().then(()=>require("./cross-circle-fill-C47yImD2.cjs")),cross:()=>Promise.resolve().then(()=>require("./cross-DtVirgrN.cjs")),download:()=>Promise.resolve().then(()=>require("./download-A1m1wB_K.cjs")),"external-link":()=>Promise.resolve().then(()=>require("./external-link-Ct-WlQoY.cjs")),filter:()=>Promise.resolve().then(()=>require("./filter-DwSaMAG7.cjs")),"info-filled":()=>Promise.resolve().then(()=>require("./info-filled-bhD2VGA2.cjs")),"minus-circle-outline":()=>Promise.resolve().then(()=>require("./minus-circle-outline-pNXlRjce.cjs")),"plus-circle-outline":()=>Promise.resolve().then(()=>require("./plus-circle-outline-B3Ttq6A2.cjs")),square:()=>Promise.resolve().then(()=>require("./square-C3hb1Bxz.cjs")),"trash-can":()=>Promise.resolve().then(()=>require("./trash-can-D2GRVBnJ.cjs")),upload:()=>Promise.resolve().then(()=>require("./upload-CeUcEWmW.cjs")),"warning-filled":()=>Promise.resolve().then(()=>require("./warning-filled-Bo82QPPc.cjs")),warning:()=>Promise.resolve().then(()=>require("./warning-C2NpcmL8.cjs"))},Ze=({className:e,name:t,...n})=>{const[r,s]=x(null);return $(()=>{il[t]?il[t]().then(({default:i})=>{s(a(i,{}))}):(s(null),console.error(`Icon with name "${t}" does not exist.`))},[t]),r&&a("span",{className:M("adyen-pe-icon",e),role:"img","aria-hidden":!0,...n,children:r})};function ba({href:e,children:t,variant:n="default",truncate:r,target:s="_blank",withIcon:i=!0,classNames:o=[],...c}){const u=S(l=>l.stopPropagation(),[]);return a("a",{className:M("adyen-pe-link",[...o],{[`adyen-pe-link--${n}`]:n!=="default","adyen-pe-link--truncate":r}),href:e,target:s,rel:"noopener noreferrer",onClick:u,...c,children:[a(k,{className:"adyen-pe-link__text",el:ne.SPAN,variant:I.BODY,children:t}),i&&s==="_blank"&&a(Ze,{name:"external-link"})]})}const Ia=({className:e,alt:t,url:n})=>a("div",{className:"adyen-pe-data-grid__icon-container",children:a("img",{className:M("adyen-pe-data-grid__icon",e),alt:t,src:n})}),ud=Hr(U),Da=()=>Gr(ud);function al({children:e,column:t,position:n,...r}){const{registerCells:s}=Da(),i=Y(null);return $(()=>{var o;i.current&&s({column:t,width:(o=i.current)==null?void 0:o.getBoundingClientRect().width})},[t,s]),a("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"}),...r,children:e&&wu(e)?Gu(e,{...e==null?void 0:e.props,ref:i,style:{width:"min-content"}}):null})}const xn=e=>!!e&&typeof e=="object"&&"value"in e,cl=e=>!!e&&typeof e=="object"&&e.type==="icon",ep=e=>!!e&&typeof e=="object"&&e.type==="button",tp=e=>!!e&&typeof e=="object"&&e.type==="link",dd=({columns:e,customCells:t,item:n,rowIndex:r})=>a(K,{children:e.map(({key:s,position:i})=>{var d,m,f,y,_,T,g;if(t!=null&&t[s])return a(al,{"aria-labelledby":String(s),column:s,position:i,children:a("div",{style:{width:"min-content"},children:t[s]({key:s,value:n[s],item:n,rowIndex:r})})},s);const o=n[s],{value:c,type:u}=xn(o)?o:{value:o,type:"text"},l=cl(o)?{url:(d=o==null?void 0:o.config)==null?void 0:d.src,alt:((m=o==null?void 0:o.config)==null?void 0:m.alt)!==void 0&&((f=o==null?void 0:o.config)==null?void 0:f.alt)!==null?(y=o==null?void 0:o.config)==null?void 0:y.alt:o.value}:void 0,h=ep(o)?E=>{var v;E.stopPropagation(),(v=o==null?void 0:o.config)==null||v.action()}:void 0;return a(al,{"aria-labelledby":String(s),column:s,position:i,children:a("div",{className:"adyen-pe-data-grid__cell-value",children:[cl(o)&&o.config&&(l==null?void 0:l.url)&&a("div",{className:M("adyen-pe-data-grid__icon-cell",(_=o==null?void 0:o.config)==null?void 0:_.className),children:[a(Ia,{...l}),c.trim()&&a("span",{children:c})]}),u==="text"&&a("span",{className:M((T=o==null?void 0:o.config)==null?void 0:T.className),children:c}),u==="button"&&o.config&&h&&a(he,{className:M((g=o.config)==null?void 0:g.className),onClick:h,variant:se.SECONDARY,children:c}),tp(o)&&o.config&&a(ba,{classNames:o.config.className?[o.config.className]:[],href:o.config.href,target:o.config.target,children:c})]})},s)})});var Gs=(e=>(e.BUTTONS_END="buttons-end",e.FILL_CONTAINER="fill-container",e.SPACE_BETWEEN="space-between",e.VERTICAL_STACK="vertical-stack",e))(Gs||{}),hd=(e=>(e.BUTTONS_START="buttons-start",e))(hd||{});const np={...Gs,...hd};function rp({actions:e,layout:t=np.BUTTONS_END}){const n=()=>`${$i}--${t}`,r=i=>{const o=e.length-1;return i===o?se.PRIMARY:se.SECONDARY},s=A(()=>[...e].reverse(),[e]);return a("div",{className:$i,children:a("div",{className:`${rm} ${n()}`,role:"group",children:s.map((i,o)=>a(he,{className:M(i.classNames),"aria-label":i.title,disabled:i.disabled,variant:i.variant||r(o),onClick:i.event,state:i.state??"default",children:i.renderTitle?i.renderTitle(i.title):i.title},`${o}_${i.title||"0"}`))})})}const ka=Ie(rp),sp=({balanceAccountId:e,balanceAccountDescription:t,payout:n,extraFields:r})=>{var m;const{payout:s}=n??U,{dateFormat:i}=rn("UTC"),{i18n:o}=W(),c=A(()=>{var y,_;const f=(_=(y=n==null?void 0:n.amountBreakdowns)==null?void 0:y.adjustmentBreakdown)==null?void 0:_.reduce((T,g)=>{var C,O,R,F,P,z,j;const E=(C=g==null?void 0:g.amount)!=null&&C.value&&((O=g==null?void 0:g.amount)!=null&&O.currency)?o.amount((R=g==null?void 0:g.amount)==null?void 0:R.value,(F=g==null?void 0:g.amount)==null?void 0:F.currency,{hideCurrency:!0}):(((P=g==null?void 0:g.amount)==null?void 0:P.value)??"").toString(),v=`${g==null?void 0:g.category}`,N=o.get(v),D=g!=null&&g.category&&N!==v?N:g==null?void 0:g.category;return g!=null&&g.category&&E&&D&&T[(z=g==null?void 0:g.amount)!=null&&z.value&&((j=g==null?void 0:g.amount)==null?void 0:j.value)<0?"subtractions":"additions"].push({key:D,value:E}),T},{subtractions:[],additions:[]});return f==null||f.subtractions.sort((T,g)=>T.key.localeCompare(g.key)),f==null||f.additions.sort((T,g)=>T.key.localeCompare(g.key)),f},[o,n]),u=A(()=>{var y,_;const f=(_=(y=n==null?void 0:n.amountBreakdowns)==null?void 0:y.fundsCapturedBreakdown)==null?void 0:_.reduce((T,g)=>{var E,v,N,D;return((E=g==null?void 0:g.amount)==null?void 0:E.value)===0||(v=g==null?void 0:g.amount)!=null&&v.value&&g.category&&T.push({key:g.category,value:o.amount((N=g==null?void 0:g.amount)==null?void 0:N.value,(D=g==null?void 0:g.amount)==null?void 0:D.currency,{hideCurrency:!0})}),T},[]);return f==null||f.sort((T,g)=>T.key==="capture"?-1:g.key==="capture"?1:T.key.localeCompare(g.key)),f},[n,o]),l=A(()=>s!=null&&s.createdAt?i(new Date(s==null?void 0:s.createdAt),Im):"",[s,i]),h=Object.entries(r||{}).filter(([,f])=>f.type!=="button"&&f.visibility!=="hidden").map(([f,y])=>({key:f,value:xn(y)?y.value:y,type:xn(y)?y.type:"text",config:xn(y)?y.config:void 0}))||[],d=A(()=>[...r?Object.values(r).filter(_=>_.type==="button").map(_=>{var T,g,E;return{title:_.value,variant:se.SECONDARY,event:(T=_.config)==null?void 0:T.action,classNames:(g=_==null?void 0:_.config)!=null&&g.className?[(E=_==null?void 0:_.config)==null?void 0:E.className]:[]}}):[]].filter(Boolean),[r]);return a(K,{children:s?a("div",{className:bt,children:[a("div",{className:M(jm,{[zm]:h.length}),children:[a("div",{className:Ym,children:[a(k,{variant:I.SUBTITLE,stronger:!0,children:o.get("netPayout")}),s.isSumOfSameDayPayouts&&a(Mt,{variant:Ee.BLUE,label:o.get("sumOfSameDayPayouts")})]}),a(k,{variant:I.TITLE,large:!0,children:`${o.amount(s.payoutAmount.value,s.payoutAmount.currency,{hideCurrency:!0})} ${s.payoutAmount.currency}`}),a(k,{variant:I.BODY,children:l}),a("div",{className:Xn,children:[t&&a(k,{variant:I.CAPTION,stronger:!0,wide:!0,children:`${t}`}),a(k,{variant:I.CAPTION,className:qm,children:`${e}`})]})]}),h.length>0?a("div",{children:a(fn,{classNames:Km,items:h,align:"start",layout:"5-7",renderLabel:f=>a("div",{className:Vm,children:f}),renderValue:(f,y,_,T)=>{if(_==="link"&&T)return a(ba,{classNames:[M(T==null?void 0:T.className)],href:T.href,target:T.target||"_blank",children:f});if(_==="icon"&&T){const g={url:T.src,alt:T.alt||f};return a("div",{className:M(Zm,T==null?void 0:T.className),children:[a(Ia,{...g}),a(k,{variant:I.BODY,children:f})]})}return a(k,{className:M(T==null?void 0:T.className),variant:I.BODY,children:f})}})}):null,a("div",{className:Oa,children:[a("div",{className:Xn,children:(s==null?void 0:s.fundsCapturedAmount)&&(u&&Object.keys(u).length>0?a(Jc,{header:a(k,{variant:I.BODY,children:o.get("fundsCaptured")}),headerInformation:a(k,{variant:I.BODY,children:o.amount(s.fundsCapturedAmount.value,s.fundsCapturedAmount.currency)}),children:a("div",{className:Xn,children:a("div",{className:so,children:a(ro,{noPadding:!0,children:a(fn,{items:u})})})})}):a("div",{className:M(ss,ol),children:[a(k,{variant:I.BODY,children:o.get("fundsCaptured")}),a(k,{variant:I.BODY,children:o.amount(s.fundsCapturedAmount.value,s.fundsCapturedAmount.currency)})]}))}),a("div",{className:Xn,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?a(Jc,{header:a(k,{variant:I.BODY,children:o.get("adjustments")}),headerInformation:a(k,{variant:I.BODY,children:o.amount(s.adjustmentAmount.value,s.adjustmentAmount.currency)}),children:[(c==null?void 0:c.additions)&&Object.keys(c==null?void 0:c.additions).length>0&&a("div",{className:so,children:a(ro,{noPadding:!0,renderHeader:a(k,{className:sl,variant:I.CAPTION,stronger:!0,children:o.get("additions")}),children:a(fn,{items:c==null?void 0:c.additions})})}),(c==null?void 0:c.subtractions)&&Object.keys(c==null?void 0:c.subtractions).length>0&&a("div",{className:so,children:a(ro,{noPadding:!0,renderHeader:a(k,{className:sl,variant:I.CAPTION,stronger:!0,children:o.get("subtractions")}),children:a(fn,{items:c==null?void 0:c.subtractions})})})]}):a("div",{className:M(ss,ol),children:[a(k,{variant:I.BODY,children:o.get("adjustments")}),a(k,{variant:I.BODY,children:o.amount(s.adjustmentAmount.value,s.adjustmentAmount.currency)})]})}),a("div",{className:M(Xn),children:a("div",{className:M(ss,Qm),children:[a(k,{variant:I.BODY,stronger:!0,children:o.get("netPayout")}),a(k,{variant:I.BODY,stronger:!0,children:o.amount(s.payoutAmount.value,s.payoutAmount.currency)})]})})]}),((m=n==null?void 0:n.payout)==null?void 0:m.unpaidAmount)&&a("div",{className:Jm,children:[a(k,{variant:I.BODY,children:o.get("remainingAmount")}),a(k,{variant:I.BODY,children:o.amount(n.payout.unpaidAmount.value,n.payout.unpaidAmount.currency)})]}),d.length?a("div",{className:Xm,children:a(ka,{actions:d,layout:Gs.BUTTONS_END})}):null]}):a(va,{skeletonRowNumber:6})})};var Fe=(e=>(e.WARNING="warning",e.CRITICAL="critical",e.HIGHLIGHT="highlight",e.SUCCESS="success",e))(Fe||{}),mn=(e=>(e.DEFAULT="default",e.TIP="tip",e))(mn||{});const op=({className:e,type:t})=>{switch(t){case Fe.WARNING:return a(Ze,{name:"warning-filled",className:e});case Fe.CRITICAL:return a(Ze,{name:"cross-circle-fill",className:e});case Fe.HIGHLIGHT:return a(Ze,{name:"info-filled",className:e});case Fe.SUCCESS:default:return a(Ze,{name:"checkmark-circle-fill",className:e})}},pn=({className:e,description:t,title:n,type:r,children:s,onClose:i,variant:o=mn.DEFAULT})=>a("div",{className:M("adyen-pe-alert",`adyen-pe-alert--${r}`,`adyen-pe-alert--${o}`,e),role:"alert",children:[a(op,{type:r,className:"adyen-pe-alert__icon"}),a("div",{className:"adyen-pe-alert__content",children:[n&&o!==mn.TIP&&a(k,{className:"adyen-pe-alert__title",el:ne.DIV,variant:I.BODY,wide:!0,strongest:!0,children:n}),t&&a(k,{className:"adyen-pe-alert__description",el:ne.DIV,variant:o!==mn.TIP?I.CAPTION:I.BODY,wide:!0,children:t}),s]}),i&&o!==mn.TIP&&a("div",{className:"adyen-pe-alert__close-button",children:a(he,{iconButton:!0,variant:se.TERTIARY,onClick:i,children:a(Ze,{name:"cross"})})})]});var lt=(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))(lt||{}),cr=(e=>(e[e.INDETERMINATE=0]="INDETERMINATE",e[e.PARTIAL=1]="PARTIAL",e[e.FULL=2]="FULL",e))(cr||{}),We=(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))(We||{}),Xr=(e=>(e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.FAILED="failed",e))(Xr||{}),vn=(e=>(e.PARTIAL="partial",e.FULL="full",e))(vn||{});const fd=Hr({availableItems:de,primaryAction:te,secondaryAction:te,transaction:U,extraFields:U,dataCustomization:U}),ip=Ie(({children:e,lineItems:t,refundAvailable:n,refundDisabled:r,setActiveView:s,setPrimaryAction:i,setSecondaryAction:o,transaction:c,transactionNavigator:u,extraFields:l,dataCustomization:h})=>{const{i18n:d}=W(),{currentTransaction:m,canNavigateBackward:f,canNavigateForward:y,backward:_,forward:T}=u,g=A(()=>({title:d.get("refundAction")}),[d]),E=A(()=>!n||r,[n,r]),v=S(()=>void(!E&&s(lt.REFUND)),[E,s]),N=A(()=>{if(m===c.id){if(f)return 2;if(y)return 1}},[f,y,m,c]),D=S(()=>{switch(N){case 2:return void _();case 1:return void T()}},[N,_,T]),C=A(()=>{switch(N){case 2:return{title:d.get("refund.returnToRefund"),renderTitle:O=>a(K,{children:[a(Ze,{style:{transform:"scaleX(-1)"},name:"angle-right"}),a("span",{children:O})]})};case 1:return{title:d.get("refund.goToPayment"),renderTitle:O=>a(K,{children:[a(Ze,{name:"angle-right"}),a("span",{children:O})]})}}},[N,d]);return $(()=>{i(n?Object.freeze({disabled:E,event:v,variant:se.PRIMARY,...g}):void 0)},[v,n,E,g,i]),$(()=>{o(N&&C?Object.freeze({disabled:!1,event:D,variant:se.SECONDARY,...C}):void 0)},[N,D,C,o]),a(fd.Provider,{value:{availableItems:t,primaryAction:v,secondaryAction:D,transaction:c,extraFields:l,dataCustomization:h},children:e})}),ap=()=>Gr(fd),La=Object.freeze(["requested_by_customer","issue_with_item_sold","fraudulent","duplicate","other"]),cp=({refundAmount:e,refundReason:t,refundInProgress:n,refundTransaction:r,setActiveView:s,transactionId:i})=>{const{i18n:o}=W(),c=A(()=>{const y=o.amount(e.value,e.currency);return{title:o.get("refundPayment",{values:{amount:y}})}},[e,o]),u=A(()=>({title:o.get("refundAction")}),[o]),l=A(()=>({title:`${o.get("inProgress")}..`,state:"loading"}),[o]),h=A(()=>({path:{transactionId:i}}),[i]),d=A(()=>({amount:e,refundReason:t}),[e,t]),m=S(()=>r==null?void 0:r({body:d,contentType:"application/json"},h).then(()=>{s(lt.REFUND_SUCCESS)}).catch(()=>{s(lt.REFUND_ERROR)}),[r,h,d,s]),f=A(()=>n?l:e.value>0?c:u,[e,n,c,u,l]);return{refundAction:m,refundActionLabel:f}},lp=({interactionsDisabled:e,refundAmount:t,setActiveView:n,setPrimaryAction:r,setSecondaryAction:s,...i})=>{const{refundAction:o,refundActionLabel:c}=cp({...i,refundAmount:t,setActiveView:n}),{i18n:u}=W(),l=A(()=>e||t.value<=0,[t,e]),h=S(()=>!l&&o(),[l,o]),d=e,m=A(()=>u.get("back"),[u]),f=S(()=>void(!d&&n(lt.DETAILS)),[d,n]);return $(()=>{r(Object.freeze({disabled:l,event:h,variant:se.PRIMARY,...c}))},[h,l,c,r]),$(()=>{s(Object.freeze({disabled:d,event:f,title:m,variant:se.SECONDARY}))},[f,d,m,s]),{primaryAction:h,secondaryAction:f}},up=({availableAmount:e,currency:t,interactionsDisabled:n,items:r,refundMode:s})=>{const[i,o]=x(0),c=A(()=>{switch(s){case We.NON_REFUNDABLE:return 0;case We.PARTIAL_LINE_ITEMS:case We.PARTIAL_AMOUNT:return i;case We.FULL_AMOUNT:default:return e}},[e,r,s,i]),u=A(()=>Object.freeze({currency:t,value:c}),[c,t]),l=A(()=>!n&&s===We.PARTIAL_AMOUNT,[n,s]),h=S(d=>void(l&&o(vt(0,d,e))),[e,l]);return $(()=>{o(e)},[e]),[u,h]},ll=(e,t,n,r=0)=>{const{...s}=e.get(n.id),i=vt(0,Math.trunc(r),s.quantity+=n.quantity);s.quantity-=i,e.set(n.id,Object.freeze(s)),i>0&&t.push(Object.freeze({...s,quantity:i}))},ul=(e,t,n=de)=>{const r=new Map((n==null?void 0:n.map(({id:i,quantity:o})=>[i,o]))??de),s=[];return t.forEach(i=>{const o=r.get(i.id);Z(o)?s.push(i):r.delete(i.id)&&ll(e,s,i,o)}),r.forEach((i,o)=>{ll(e,s,{id:o,quantity:0},i)}),s.length>0?Object.freeze(s):de},dp=({currency:e,lineItems:t})=>{const[n,r]=x(de),s=A(()=>{const u=t==null?void 0:t.filter(l=>{if(l.amountIncludingTax.currency!==e)return;const h=l.availableQuantity;return h>0&&Number.isFinite(h)&&Math.trunc(h)===h}).map(({id:l,...h})=>[l,Object.freeze({amount:h.amountIncludingTax.value,quantity:h.availableQuantity,id:l})]);return new Map(u??de)},[e,t]),i=A(()=>(t==null?void 0:t.filter(({id:u})=>s.has(u)))??de,[n,t,s]),o=S(function(u){r(l=>{const d=[...arguments.length===0?new Map(l.map(({id:m})=>[m,0])):new Map((u==null?void 0:u.map(m=>[m,0]))??de)].map(([m,f])=>({id:m,quantity:f}));return ul(s,l,d)})},[s]),c=S(u=>r(l=>ul(s,l,u)),[s]);return{availableItems:i,clearItems:o,items:n,updateItems:c}},hp=({interactionsDisabled:e,refundMode:t})=>{const[n,r]=x(La[0]),s=A(()=>!e&&t!==We.NON_REFUNDABLE,[e,t]),i=S(o=>void(s&&r(o)),[s]);return[n,i]},Qs=e=>{setTimeout(()=>{throw e},0)};function Eo({queryFn:e,options:t}){const{retry:n=!1,retryDelay:r=1e3,onSuccess:s,onError:i,onSettled:o,shouldRetry:c}=t||U,[u,l]=x(null),[h,d]=x(null),[m,f]=x("idle"),y=Y(!0),_=Y(0),T=S(()=>{l(null),d(null),f("idle"),_.current=0},[]),g=S(()=>{_.current=0},[]),E=S(async(...v)=>{try{f("loading"),d(null);const N=await(e==null?void 0:e(...v));return y.current&&(l(N),f("success")),Pr.then(()=>{s&&hn(s,N).catch(Qs),o&&hn(o,N,null).catch(Qs),g()}),N}catch(N){let D=0;if(Ur(n)&&(!c||c(N))?D=Math.max(0,Math.floor(n)):D=0,_.current++<D){const C=Q(r)?r(_.current):r??1e3;return await new Promise(O=>setTimeout(O,C)),E(...v)}throw y.current&&(d(N),f("error")),Pr.then(()=>{i&&hn(i,N).catch(Qs),o&&hn(o,void 0,N).catch(Qs),g()}),N}},[e,s,o,n,c,r,g,i]);return $(()=>()=>{y.current=!1},[]),A(()=>({data:u,error:h,status:m,isIdle:m==="idle",isLoading:m==="loading",isSuccess:m==="success",isError:m==="error",mutate:E,reset:T}),[u,h,m,E,T])}const md=Hr({amount:0,availableAmount:0,availableItems:de,clearItems:te,currency:"",interactionsDisabled:!1,items:de,primaryAction:te,refundMode:We.FULL_AMOUNT,refundReason:La[0],secondaryAction:te,setAmount:te,setRefundReason:te,transactionId:"",updateItems:te}),fp=Ie(({availableAmount:e,children:t,currency:n,lineItems:r,refreshTransaction:s,refundMode:i,setActiveView:o,setPrimaryAction:c,setSecondaryAction:u,transactionId:l})=>{const{isLoading:h,mutate:d}=Eo({queryFn:Se().endpoints.initiateRefund}),{availableItems:m,clearItems:f,items:y,updateItems:_}=dp({currency:n,lineItems:r}),T=h,[g,E]=up({availableAmount:e,currency:n,interactionsDisabled:T,items:y,refundMode:i}),[v,N]=hp({interactionsDisabled:T,refundMode:i}),{value:D}=g,{primaryAction:C,secondaryAction:O}=lp({interactionsDisabled:T,refreshTransaction:s,refundAmount:g,refundInProgress:h,refundReason:v,refundTransaction:d,setActiveView:o,setPrimaryAction:c,setSecondaryAction:u,transactionId:l});return a(md.Provider,{value:{amount:D,availableAmount:e,availableItems:m,clearItems:f,currency:n,interactionsDisabled:T,items:y,primaryAction:C,refundMode:i,refundReason:v,secondaryAction:O,setAmount:E,setRefundReason:N,transactionId:l,updateItems:_},children:t})}),wa=()=>Gr(md),mp=()=>{let[e,t,n,r]=de;const s=()=>!!(e&&e===r&&n),i=()=>!!(e&&e===n&&r);let o=null;const c=()=>{s()&&(t=e,e=n,d())},u=()=>{i()&&(t=e,e=r,d())},l=(m,f)=>{const y=e;e=t=n=r=void 0,!Ii(m)&&!Ii(f)&&(n=m,r=f,e=y===n||y===r?y:n,y!==e&&d())},h=m=>{Ne(m)?o=null:Q(m)&&o!==(o=m)&&d()},d=()=>{const m=t,f=e;t=void 0,o==null||o(J({from:ue(()=>m),to:ue(()=>f)}))};return J({backward:G(c),forward:G(u),canNavigateBackward:ue(s),canNavigateForward:ue(i),currentTransaction:ue(()=>e),onNavigation:{set:h},reset:G(l)})},pp=e=>{const[t,n]=x(e),[r,s]=x(e.id),[i,o]=x(performance.now()),{getTransaction:c}=Se().endpoints,u=Y(mp()),l=u.current,h=Y(!1),d=Y(!1),m=Y(e),f=Y(r),y=A(()=>!!c&&!!r&&h.current,[r,c]),_=S(()=>c(U,{path:{transactionId:r}}),[r,c]),{data:T,error:g,isFetching:E}=Ot({fetchOptions:{enabled:y},queryFn:_}),v=S(()=>s(void 0),[]);return $(()=>{r||s(t.id)},[r,t]),$(()=>{var C;const N=u.current,D=m.current;return D.category==="Refund"&&(N.reset(D.id,(C=D.refundMetadata)==null?void 0:C.originalPaymentId),N.onNavigation=({to:O})=>{h.current=!0,o(performance.now()),O&&s(O)}),()=>{h.current=!1,N.onNavigation=null,N.reset()}},[]),$(()=>{if(d.current!==E&&!(d.current=E))if(!T||g)s(f.current);else{const N=m.current;n(()=>({...T.id===N.id?N:U,...T})),f.current=r}},[T,g,E,r,i]),{fetchingTransaction:E,refreshTransaction:v,transaction:t,transactionNavigator:l}},_p=(e,t)=>{let n=t?(t==null?void 0:t.length)>0:!1,r=!1;return t==null||t.forEach(s=>{const i=!!e(s);n&&(n=i),r||(r=i)}),{every:n,some:r}},Js=["completed","in_progress","failed"],yp=e=>{var v,N,D;const{i18n:t}=W(),n=e==null?void 0:e.refundDetails,r=(n==null?void 0:n.refundMode)??We.FULL_AMOUNT,s=xe(n==null?void 0:n.refundLocked),i=r!==We.NON_REFUNDABLE,o=(v=e==null?void 0:e.originalAmount)==null?void 0:v.value,c=A(()=>{var C;return e?Math.max(0,((C=n==null?void 0:n.refundableAmount)==null?void 0:C.value)??0):0},[n,e]),u=Q(Se().endpoints.initiateRefund),l=u&&i&&c>0,h=((N=n==null?void 0:n.refundableAmount)==null?void 0:N.currency)??(e==null?void 0:e.amount.currency)??"",d=!l||s,m=A(()=>{var O;const C=((O=e==null?void 0:e.refundDetails)==null?void 0:O.refundStatuses)??[];return(C==null?void 0:C.filter(R=>R.amount.value!==0).sort((R,F)=>Js.includes(R.status)&&Js.includes(F.status)&&Js.indexOf(R.status)>Js.indexOf(F.status)?0:-1).reduce((R,F)=>{var j;const P=F.status,z=~F.amount.value+1;return R!=null&&R[P]?((j=R==null?void 0:R[P])==null||j.amounts.push(z),R):{...R,[P]:{amounts:[z],currency:F.amount.currency}}},{}))??{}},[(D=e==null?void 0:e.refundDetails)==null?void 0:D.refundStatuses]),f=A(()=>{var O,R;const C=(R=(O=m.completed)==null?void 0:O.amounts)==null?void 0:R.reduce((F,P)=>F+P,0);return C?Math.max(0,C??0):0},[m]),{some:y,every:_}=A(()=>_p(({status:C})=>C===Xr.COMPLETED,n==null?void 0:n.refundStatuses),[n==null?void 0:n.refundStatuses]),T=A(()=>{var C;return c===0&&f>0&&_&&f===o?[{type:Fe.HIGHLIGHT,label:t.get("refund.fullAmountRefunded")}]:((C=Object.keys(m))==null?void 0:C.map(R=>{var j,ie;const F=R,P=(j=m==null?void 0:m[F])==null?void 0:j.amounts.reduce((q,ce,Te)=>{var _e,De,pe;const me=(_e=m==null?void 0:m[F])==null?void 0:_e.amounts.length;return me>1&&Te===me-1?`${q?`${q}`:""} ${t.get("and")} ${t.amount(ce,(De=m==null?void 0:m[F])==null?void 0:De.currency)}`:`${q?`${q},`:""} ${t.amount(ce,(pe=m==null?void 0:m[F])==null?void 0:pe.currency)}`},""),z=(ie=m==null?void 0:m[F])==null?void 0:ie.amounts.reduce((q,ce)=>q+ce,0);switch(R){case Xr.COMPLETED:return{type:Fe.HIGHLIGHT,label:t.get("refund.amountAlreadyRefunded",{values:{amount:P}})};case Xr.IN_PROGRESS:return z===o?{type:Fe.HIGHLIGHT,label:t.get("refund.theRefundIsBeingProcessed")}:{type:Fe.HIGHLIGHT,label:t.get("refund.amountInProgress",{values:{amount:P}})};case Xr.FAILED:return z===o?{type:Fe.WARNING,label:t.get("refund.fullAmountFailed")}:{type:Fe.WARNING,label:t.get("refund.amountFailed",{values:{amount:P}})};default:return}}))??[]},[c,o,t,f,m,_]),g=A(()=>{if(c>0){const C=t.amount(c,h);switch(r){case We.FULL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.onlyRefundable",{values:{amount:C}})};case We.PARTIAL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.maximumRefundable",{values:{amount:C}})};default:return null}}return null},[t,c,h,r]),E=A(()=>{switch(r){case We.NON_REFUNDABLE:if(c===0&&f>0&&_&&f===o)return cr.FULL}switch(r){case We.PARTIAL_AMOUNT:case We.PARTIAL_LINE_ITEMS:if(c>0&&y&&f>0&&!Z(o)&&f<o)return cr.PARTIAL}return cr.INDETERMINATE},[c,f,r,o,y,_]);return{refundableAmount:c,refundable:i,refundableAmountLabel:g,refundAvailable:l,refundAuthorization:u,refundCurrency:h,refundDisabled:d,refundedAmount:f,refundedState:E,refundStatuses:T,refundLocked:s,refundMode:r}},pt="adyen-pe-popover",pd="adyen-pe-tooltip",gp=`${pt}-container`,dl=`${pt}__header`,Tp=`${pt}__header-title`,_i=`${pt}__content`,_d=`${pd}__content`,Ap=`${pt}__footer`;function Ep({image:e=!0,onClick:t}){const{i18n:n}=W();return a(K,{children:a(he,{className:e?"adyen-pe-popover-dismiss-button--on-image":"",iconButton:!0,variant:se.TERTIARY,onClick:t,"aria-label":n.get("closeIconLabel"),children:a("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",children:[a("title",{children:"dismiss"}),a("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 Np=Ie(Ep);function Cp({title:e,isImageTitle:t=!1}){return a(k,{strongest:!t,variant:t?I.SUBTITLE:I.BODY,children:e})}const Sp=Ie(Cp);var qe=(e=>(e.TOOLTIP="tooltip",e.POPOVER="popover",e))(qe||{}),ge=(e=>(e.TOP="top",e.TOP_LEFT="top-left",e.RIGHT="right",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.LEFT="left",e))(ge||{}),ds=(e=>(e.MEDIUM="medium",e.WIDE="wide",e))(ds||{}),V=(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))(V||{}),ee=(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))(ee||{});const Qr=(()=>{let e=[];const t=o=>{const c=o.reduce((u,l)=>{const h=l instanceof Node?e.findIndex(d=>{const m=d.element.getAttribute("id"),f=l&&(l!=null&&l.getAttribute)?l==null?void 0:l.getAttribute("id"):null;return m===f}):-1;return u===-1&&h!==-1?h:u},-1);c===-1?s(0):c+1<=e.length-1&&s(c+1)},n=o=>{const c=e.findIndex(u=>u.element.getAttribute("id")===o.getAttribute("id"));c>=0&&e.splice(c,1)},r=(o,c)=>{e.findIndex(l=>l.element.getAttribute("id")===o.getAttribute("id"))>=0||e.push({element:o,callback:c})},s=o=>{var u,l;const c=e.length;for(let h=o;h<c;h++)(l=(u=e==null?void 0:e[h])==null?void 0:u.callback)==null||l.call(u);e.splice(o)};return{add:r,remove:n,closeAll:()=>{e.forEach(o=>{var c;return(c=o==null?void 0:o.callback)==null?void 0:c.call(o)}),e=[]},closePopoversOutsideOfClick:t}})(),hs=Symbol("_ref");class yd extends Error{}class Rp extends yd{}class vp extends yd{}function Pa(e){if(!Q(e))throw new vp}const Op=e=>{try{if(Q(e)&&xt(e,"current")&&xt(e,hs)&&!Gn(e,e[hs])){const t=e.actions.get(U),n=e.actions.size;return Z(t)&&Number.isInteger(n)&&n>=0}}catch{}return!1},fs=e=>Op(e)?fs(e[hs]):e;function bp(e){return!!e.current}const Ip=(()=>{const e=(r,s)=>{const i=r.get(s);if(!i)throw new Rp;return i},t=(r,s,i)=>{let o,c;const u=fs(s);try{o=e(r,u)}catch{Pa(i)}if(o)[,c]=o;else{const l=Q(u),h=l?f=>{u(m=f)}:f=>{u&&(u.current=f,m=u.current)},d=f=>{if(c.size===0)return;const y=m;if(h(f),!Gn(m,y))for(const[_]of c)_(m,y)};let m=l?null:u.current;r.set(u,o=[d,c=new Map]),Object.defineProperties(d,{[hs]:{value:u},actions:{value:J({get:{value:c.get.bind(c)},size:{get:()=>c.size}})},current:{get:()=>m,set:l?void 0:d}})}return i&&c.set(i,1+(c.get(i)||0)),o[0]},n=(r,s,i)=>{const o=fs(s),[,c]=e(r,o),u=c.get(i)||0;u===1?c.delete(i):u>1&&c.set(i,u-1),c.size===0&&o&&r.delete(o)};return()=>{const r=new WeakMap;return J({bind:G(t.bind(void 0,r)),unbind:G(n.bind(void 0,r))})}})(),Dp=Ip(),kp=e=>{Pa(e);const t=new WeakMap([[e,1]]),n=s=>{if(Gn(r,s))return;const i=r;e(r=s,i)};let r=null;return Object.defineProperties(n,{[hs]:{value:n},actions:{value:J({get:{value:t.get.bind(t)},size:{value:1}})},current:{get:()=>r,set:n}})},Lp=(e=Dp)=>{let t,n=null,r,s=!1;const i=l=>{t=void 0,n=null,r=l,s=!1},o=()=>{s||(c(),s=!0)},c=()=>{try{if(!n)return;e.unbind(n,r)}catch{}};return J({action:{get:()=>r},reflex:{get:()=>t},release:{value:o},update:{value:(l,h)=>{Pa(l),s&&i(l);const d=Ne(h)?null:h;if(r===l&&n===d){if(t)return}else if(n){if(Gn(fs(n),fs(d))){t=e.bind(n,l),c(),r=l;return}c()}r=l,t=(n=d)?e.bind(n,r):kp(r)}}})},sn=(e,t)=>{const n=Y(Lp());return us(()=>n.current.release,[]),A(()=>(n.current.update(e,t),n.current.reflex),[e,t])},rr=Symbol("__control.Elem.");var gd=(e=>(e.POPOVER="POPOVER",e.DEFAULT="DEFAULT",e))(gd||{});const hl=e=>{e.stopImmediatePropagation()},Ma=(e,t,n,r)=>{const s=Y(null),i=S(c=>{const u=c.composedPath();if(s&&s.current)if(r==="POPOVER")Qr.closePopoversOutsideOfClick(u);else{let l=0,h=!1,d=u[l];for(;d instanceof Element&&!(h||(h=d==null?void 0:d.isSameNode(s.current)));)d=u[++l]??d.parentElement,(d==null?void 0:d[rr])instanceof Element&&(d=d[rr],u.length=0);t&&!h&&t(!0)}},[s,t,r]),o=Y(i);return $(()=>()=>{s.current&&Qr.remove(s.current),document.removeEventListener("click",o.current,!0)},[]),$(()=>(document.removeEventListener("click",o.current,!0),o.current=i,document.addEventListener("click",o.current,!0),r==="POPOVER"&&s.current instanceof Element&&Qr.add(s.current,t),()=>{s.current&&Qr.remove(s.current),document.removeEventListener("click",o.current,!0)}),[i,t,r]),$(()=>{n?document.removeEventListener("click",o.current,!0):document.addEventListener("click",o.current,!0)},[n]),sn(S((c,u)=>{u instanceof Element&&u.removeEventListener("focusout",hl,!0),c instanceof Element&&(n||(c.addEventListener("focusout",hl,!0),s.current=c))},[n,r]),e)},Fa=`
2
- a[href],
3
- audio[controls],
4
- video[controls],
5
- button,
6
- input,
7
- select,
8
- textarea,
9
- [contenteditable],
10
- [tabindex]
11
- `.replace(/\s+/,""),wp=["contenteditable","controls","disabled","hidden","href","inert","tabindex"],fl=new Map,Td=e=>e.tagName==="INPUT",Pp=e=>Td(e)&&e.type==="radio",Mp=e=>{const t=e.name,n=e.form,r=fl.get(n);let s=r==null?void 0:r.get(t);return Z(s)&&n&&(s=n.querySelector(`input[type=radio][name='${t}']:checked`)||null,fl.set(n,(r||new Map).set(t,s))),s===e},Fp=(e,t)=>{for(const n of t)if(n.type!=="attributes"){if(bc(n.addedNodes,r=>r instanceof Element&&Hi(r))||bc(n.removedNodes,r=>e.includes(r)))return!0}else{if(Hi(n.target))return!0;if(e.includes(n.target))return!0}return!1},xa=(e=document.body,t)=>{if(Z(e))return!1;if(Ne(t))return!!document.activeElement&&xa(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},Ba=e=>!(!e.matches(Fa)||e!=null&&e.disabled||/^(true)?$/.test(e.getAttribute("inert"))||Td(e)&&e.hidden),Hi=e=>!(Pp(e)&&!Mp(e)||(e==null?void 0:e.tabIndex)<0||!Ba(e)),xp=()=>{const e=new MutationObserver(c=>Fp(t,c)&&i()),t=[];let n=-1,r=null;const s=c=>{var l;if(c<0)return;const u=Math.min(c,t.length-1);n!==u&&(n=u),(l=t[n])==null||l.focus()},i=()=>{t.length=0,r instanceof Element&&(r.querySelectorAll(Fa).forEach(c=>Hi(c)&&t.push(c)),xa(r)&&(o.current=document.activeElement))},o=Object.create(null,{current:{get:()=>t[n]??null,set:c=>{if(c){if(!Ur(c))return s(t.indexOf(c));if(c===~~c)return s(Fs(n+c,t.length))}}},root:{get:()=>r,set:c=>{c!==r&&(r&&e.disconnect(),r=c instanceof Element?c:null,t.length=0,r&&(e.observe(r,{attributeFilter:wp,attributes:!0,childList:!0,subtree:!0}),i()))}},tabbables:{value:t}});return o},Bp=(e,t)=>{const n=Y(!1),r=Y(null),s=Y(!1),i=A(xp,[]),o=A(()=>{let h=null,d;return m=>{Z(d)||cancelAnimationFrame(d);let f=m.target;for(;f&&f!==m.currentTarget;){if(Ba(f)){h=f,d=requestAnimationFrame(()=>{d=requestAnimationFrame(()=>{var y;r.current!==h&&h instanceof HTMLElement&&((y=r.current=h)==null||y.focus()),h=null,d=void 0})});return}f=f.parentNode}}},[]),c=S(h=>{i.current=r.current=h.target},[]),u=S(h=>{i.tabbables.includes(h.relatedTarget)||xa(h.currentTarget,h.relatedTarget)||s.current||(n.current=!0,requestAnimationFrame(()=>{n.current&&t(n.current=!1)}))},[]),l=A(()=>{let h;return d=>{switch(d.code){case V.ARROW_DOWN:case V.ARROW_LEFT:case V.ARROW_RIGHT:case V.ARROW_UP:case V.END:case V.ESCAPE:case V.HOME:case V.PAGE_DOWN:case V.PAGE_UP:case V.TAB:cancelAnimationFrame(h),h=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>{s.current=!1,h=void 0})}),s.current=!0;break}d.code===V.TAB?(d.preventDefault(),i.current=d.shiftKey?-1:1):d.code===V.ESCAPE&&t(!0)}},[]);return sn(S((h,d)=>{d instanceof Element&&(d.removeEventListener("keydown",l,!0),d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0),h.removeEventListener("click",o,!0)),h instanceof Element?(h.addEventListener("keydown",l,!0),h.addEventListener("focusin",c,!0),h.addEventListener("focusout",u,!0),h.addEventListener("click",o,!0),n.current=!1,i.root=h):i.root=null},[]),e)},yi=(()=>{const e=new WeakMap,t=J({remove:G(function(){r(this.observerCallback)})}),n=s=>{let i=e.get(s);if(Z(i)){const o=new IntersectionObserver(c=>{c.forEach(u=>{s&&s(u)})},{root:null,rootMargin:"",threshold:[1]});i=Wr(t,{observerCallback:G(s),observer:G(o)}),e.set(s,i)}return i},r=s=>{const i=e.get(s);i==null||i.observer.disconnect(),e.delete(s)};return n})(),$p=({popover:e,offset:t,targetElement:n,position:r,variant:s,fullWidth:i})=>{const o=n==null?void 0:n.current;let c=0,u=0;const l=o.getBoundingClientRect(),h=document.body.getBoundingClientRect(),d=e==null?void 0:e.firstChild,m=h.left+h.width/2-d.offsetWidth/2,f=l.left+l.width/2-d.offsetWidth/2,y=l.top+l.height/2-d.offsetHeight/2;switch(r){case ge.BOTTOM:c=i?m:s===qe.TOOLTIP?f+window.scrollX:(l==null?void 0:l.left)+window.scrollX,u=(l==null?void 0:l.top)+(l==null?void 0:l.height)+window.scrollY+t[1];break;case ge.BOTTOM_LEFT:c=(l==null?void 0:l.right)+window.scrollX-e.clientWidth,u=(l==null?void 0:l.top)+(l==null?void 0:l.height)+window.scrollY+t[1];break;case ge.TOP:c=s===qe.TOOLTIP?f+window.scrollX:l.left+window.scrollX,u=(l==null?void 0:l.top)-(d==null?void 0:d.clientHeight)+window.scrollY-t[0];break;case ge.RIGHT:c=l.left+l.width+window.scrollX+t[2],u=s===qe.TOOLTIP?y+window.scrollY:(l==null?void 0:l.top)-(l==null?void 0:l.height)/2+window.scrollY;break;case ge.LEFT:c=(l==null?void 0:l.left)-(e==null?void 0:e.clientWidth)+window.scrollX-t[3],u=s===qe.TOOLTIP?y+window.scrollY:(l==null?void 0:l.top)+window.scrollY-(l==null?void 0:l.height)/2;break}const _=[c,u,0];return`position:absolute;inset:0 auto auto 0;margin: 0;transform: ${_.reduce((g,E,v)=>v===0?g+`${E}px,`:v===_.length-1?g+` ${E}px)`:g+` ${E}px,`,"translate3d(")};visibility:hidden`},Up=(e,t,n,r,s,i,o,c,u)=>{const[l,h]=x(!0),[d,m]=x(c?!c:!!r),[f,y]=x(r||ge.TOP),[_,T]=x([]),g=S(v=>{if(v.intersectionRatio===1)return m(!0);if(!l&&v.intersectionRatio!==1){if(_&&_.length===(c?5:4)){const N=_.reduce((D,C)=>C[1]>D[1]?C:D,_[0]);y(N[0]),m(!0);return}switch(m(!1),f){case ge.TOP:T(N=>[...N,[ge.TOP,v.intersectionRatio]]),y(ge.BOTTOM);break;case ge.BOTTOM:T(N=>[...N,[ge.BOTTOM,v.intersectionRatio]]),y(c?ge.BOTTOM_LEFT:ge.RIGHT);break;case ge.BOTTOM_LEFT:T(N=>[...N,[ge.BOTTOM,v.intersectionRatio]]),y(ge.RIGHT);break;case ge.RIGHT:T(N=>[...N,[ge.RIGHT,v.intersectionRatio]]),y(ge.LEFT);break;case ge.LEFT:T(N=>[...N,[ge.LEFT,v.intersectionRatio]]),y(ge.TOP);break}}},[l,_,f,c]),E=Y(g);return $(()=>{yi(E.current).remove(),E.current=g},[g]),sn(S((v,N)=>{var D,C;if(N&&(!r||c)&&yi(g).observer.unobserve(N),v&&t.current){if((!r||c)&&yi(g).observer.observe(v),!(v instanceof Element))return;const O=$p({popover:v,offset:e,targetElement:t,position:f,variant:n,fullWidth:o??!1}),R=d?O+";visibility:visible":O,F=i?R+";min-width:fit-content;width:"+((D=t.current)==null?void 0:D.clientWidth)+"px":R;v.setAttribute("style",`${F}`),l&&h(!1),n&&n===qe.TOOLTIP&&s&&bp(s)&&((C=s.current)==null||C.setAttribute("data-popover-placement",f))}},[e,t,f,r,n,g,d,l,i,s,o,c]),u)},No=e=>{const t=Y();return sn(S((n,r)=>{r instanceof Element&&r.id===t.current&&(r.id=""),n instanceof Element&&(n.id=t.current||(t.current=Mr()))},[e]),e)},Wp=e=>{var r;let t;const n=(r=e.querySelector(`.${_d}`))==null?void 0:r.querySelectorAll(Fa);return n?(Array.prototype.some.call(n,s=>{if(Ba(s))return t=s}),t):null},Hp=e=>e===qe.TOOLTIP?[10,3,5,5]:[15,15,15,15];function $a({actions:e,disableFocusTrap:t=!1,actionsLayout:n=Gs.SPACE_BETWEEN,variant:r=qe.TOOLTIP,title:s,open:i,dismissible:o,modifiers:c,divider:u,fitContent:l,withoutSpace:h,containerSize:d,position:m,targetElement:f,setToTargetWidth:y,dismiss:_,children:T,withContentPadding:g,classNameModifiers:E,showOverlay:v=!1,fitPosition:N,...D}){const C=A(()=>Q(_)&&Bt(o),[_,o]),O=No(),R=Y(),F=S(pe=>{var ke;_&&_(),pe&&((ke=f==null?void 0:f.current)==null||ke.focus())},[_,f]),P=S(pe=>{pe.code===V.ESCAPE&&(_&&_(),(f==null?void 0:f.current).focus())},[_,f]),z=Y(P),j=Y(),ie=Ma(Up(Hp(r),f,r,m,O,y,v,N),_,r===qe.TOOLTIP&&!i,gd.POPOVER),q=Bp(t?null:ie,F),ce=sn(S((pe,ke)=>{ke instanceof Element&&(ke[rr]=void 0,delete ke[rr]),pe instanceof Element&&(pe[rr]=f.current,cancelAnimationFrame(j.current),j.current=requestAnimationFrame(()=>{if(R.current===i||!(R.current=i))return;const fe=Wp(pe);fe==null||fe.focus()}))},[i,f]),t?ie:q),Te=No(ce),me=A(()=>({[`${pt}--medium`]:d===ds.MEDIUM,[`${pt}--with-divider`]:!!u,[`${pt}--wide`]:d===ds.WIDE,[`${pt}--fit-content`]:l,[`${pt}--without-space`]:h,[`${pt}--auto-width`]:v}),[d,u,h,l,v]);$(()=>{ce.current&&(ce.current[rr]=f.current)},[f]),$(()=>(document.removeEventListener("keydown",z.current),document.addEventListener("keydown",z.current=P),()=>document.removeEventListener("keydown",z.current)),[P]);const _e=r===qe.TOOLTIP?pd:`${pt} ${gp}`,De=r===qe.TOOLTIP?_d:`${_i}`;return Zu(a(K,{children:i?a(K,{children:[v&&a("div",{className:"adyen-pe-popover__overlay"}),a("div",{id:"popover",ref:Te,...D,className:M(_e,me,E),style:{visibility:"hidden"},role:D.role??(r===qe.POPOVER?"dialog":"tooltip"),children:[(s||C)&&a("div",{className:Aa(dl,c,[dl]),children:[s&&a("div",{className:Tp,children:a(Sp,{title:s})}),C&&a(Np,{onClick:_})]}),T&&a(K,{children:[a("div",{className:M(De,{[`${_i}--with-padding`]:g,[`${_i}--overlay`]:v}),children:T}),r===qe.TOOLTIP&&a("span",{"data-popover-placement":"hidden",ref:O,className:"adyen-pe-tooltip__arrow"})]}),e&&a("div",{className:Ap,children:a(ka,{actions:e,layout:n})})]})]}):null}),document.getElementsByTagName("body")[0])}const Gp=()=>{const[e,t]=wt(),n=S(()=>t(!0),[t]),r=S(()=>t(!1),[t]),s=S(i=>{switch(i.code){case V.ESCAPE:r();break}},[r]);return{listeners:{onfocusoutCapture:r,onMouseLeave:r,onKeyDown:s,onFocus:n,onMouseEnter:n},isVisible:e}},Yp=e=>typeof e=="string";function jp(){const e="ontouchstart"in window,t=navigator.maxTouchPoints&&navigator.maxTouchPoints>0||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>0,n=window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;return e||t||n}const gn=({content:e,children:t,triggerRef:n,showTooltip:r,position:s,isContainerHovered:i=!1})=>{var l,h,d;const o=No(),{isVisible:c,listeners:u}=Gp();return jp()?a(K,{children:t}):a(K,{children:[t?Gu(t,{...t==null?void 0:t.props,role:"button",tabIndex:-1,ref:o,className:(l=t==null?void 0:t.props)!=null&&l.className?M(`${(h=t==null?void 0:t.props)==null?void 0:h.className} adyen-pe__tooltip-target`,{" adyen-pe__tooltip-target--hovered":i}):M("adyen-pe__tooltip-target",{"adyen-pe__tooltip-target--hovered":i}),...u,"aria-describedby":`tooltip-${(d=o.current)==null?void 0:d.id}`}):null,(c||r)&&a($a,{variant:qe.TOOLTIP,targetElement:n??o,position:s,open:c||r,children:a(K,{children:e&&Yp(e)?a(k,{variant:I.CAPTION,children:e}):{content:e}})})]})};function zp({value:e,isContainerHovered:t}){const{i18n:n}=W(),r=`tooltip.${e}`;return a(K,{children:n.has(r)&&a(gn,{content:n.get(r),isContainerHovered:t,children:a("span",{children:a(k,{variant:I.BODY,children:n.has(`txType.${e}`)?n.get(`txType.${e}`):`${e}`})})})})}const Gi={title:"thereWasAnUnexpectedError",message:["contactSupportForHelp"]},Ad=(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 Gi;default:return null}},Bn=({textToCopy:e,isHovered:t,buttonLabel:n,showCopyTextTooltip:r=!0,type:s="Link",...i})=>{const{i18n:o}=W(),[c,u]=x(o.get("copy")),l=S(async()=>{if(e)try{await navigator.clipboard.writeText(e),u(o.get("copied"))}catch(d){console.log(d)}},[o,e]),h=S(()=>{u(o.get("copy"))},[o]);return a("span",{className:M("adyen-pe-copy-text__container",{"adyen-pe-copy-text__container--information":s==="Link"}),...i,children:[r?a(gn,{content:e,isContainerHovered:t,children:a("span",{className:M({"adyen-pe-copy-text__label":s!=="Default","adyen-pe-copy-text__information":s==="Link","adyen-pe-copy-text__text":s==="Text"}),children:n||e})}):a("span",{className:M({"adyen-pe-copy-text__label":s!=="Default","adyen-pe-copy-text__information":s==="Link","adyen-pe-copy-text__text":s==="Text"}),children:n||e}),a(gn,{content:c,children:a(he,{variant:se.TERTIARY,className:"adyen-pe-copy-text",onClick:l,onBlur:h,onMouseLeaveCapture:h,"data-testid":"copyText",children:a("div",{className:M("adyen-pe-copy-text__icon",{"adyen-pe-copy-text__icon--information":s==="Link"}),children:a(Ze,{name:"copy","data-testid":"copy-icon"})})})})]})},Ua=(e,t,n)=>{if(!e)return Gi;const r=Ad(e,n);if(r)return r;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?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:n}}default:return Gi}},Wa=({error:e,errorMessage:t,onContactSupport:n})=>{const{title:r,message:s,refreshComponent:i,translationValues:o,onContactSupport:c}=Ua(e,t,n);return a(en,{title:r,message:s,translationValues:o,withImage:!0,centered:!0,refreshComponent:i,onContactSupport:c})},qp=({data:e,columns:t,customCells:n,onRowHover:r})=>{const{i18n:s}=W();return a(K,{children:e==null?void 0:e.map((i,o)=>a("div",{role:"row",tabIndex:0,className:"adyen-pe-data-grid__row",onMouseEnter:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r(o):te,onFocus:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r(o):te,onMouseLeave:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r():te,onBlur:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r():te,children:a(dd,{columns:t,customCells:n,item:i,rowIndex:o})},i))})},Kp=({totalRows:e})=>{const[t,n]=Ko((o,c)=>{const u=e;if(u>1){const l=c.index;if(l<u&&l>=0)return c.type==="ACTIVE"?Object.freeze({...o,index:c.index??0,activeIndex:c.index}):Object.freeze({...o,index:c.index??0,activeIndex:-1})}return o},e_),r=sn(S(o=>{var u;if(!(o instanceof Element))return;const c=Number((u=o.dataset)==null?void 0:u.index);t.activeIndex===-1&&c===0||c===t.index?o.setAttribute("tabindex","0"):o.setAttribute("tabindex","-1"),c===t.activeIndex&&(o==null||o.focus())},[t.activeIndex,t.index])),s=S(o=>{var u,l;if(!(((u=o.target)==null?void 0:u.getAttribute("role"))==="row")){o.code===V.ARROW_LEFT&&n({type:"ACTIVE",index:t.index});return}switch(o.code){case V.ARROW_DOWN:case V.ARROW_UP:n({type:"ACTIVE",index:o.code===V.ARROW_DOWN?t.index+1:t.index-1});break;case V.HOME:n({type:"ACTIVE",index:0});break;case V.END:n({type:"ACTIVE",index:e-1});break;case V.ENTER:(l=o.currentTarget)==null||l.click();break;default:return}o.stopPropagation()},[e,t.index]),i=S(o=>c=>{var l;(!(((l=c.target)==null?void 0:l.localName)==="tr")||t.index===-1)&&n({type:"CURRENT",index:o})},[t.index]);return{listeners:{onKeyDownCapture:s,onFocusCapture:i},ref:r,activeIndex:t.activeIndex,currentIndex:t.index}},Vp=({data:e,columns:t,onRowClick:n,customCells:r,onRowHover:s})=>{const i=S(h=>()=>n==null?void 0:n.callback(n!=null&&n.retrievedField?h[n.retrievedField]:h),[n]),{i18n:o}=W(),{currentIndex:c,listeners:u,ref:l}=Kp({totalRows:(e==null?void 0:e.length)??0});return a(K,{children:e==null?void 0:e.map((h,d)=>a("div",{role:"row",tabIndex:0,onMouseEnter:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s(d):te,onFocus:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s(d):te,onMouseLeave:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s():te,onBlur:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s():te,ref:l,"aria-selected":d===c,"data-index":d,className:"adyen-pe-data-grid__row adyen-pe-data-grid__row--clickable",onClick:i(h),onFocusCapture:u.onFocusCapture(d),onKeyDownCapture:u.onKeyDownCapture,children:a(dd,{columns:t,customCells:r,item:h,rowIndex:d})},h))})},Zp=({columnsNumber:e,loading:t,emptyMessageDisplay:n})=>{const r=Array.from({length:10},(i,o)=>o),s=Array.from({length:e},(i,o)=>o);return a(K,{children:[r.map((i,o)=>a("div",{className:"adyen-pe-data-grid__row",children:s.map((c,u)=>a("div",{className:"adyen-pe-data-grid__cell adyen-pe-data-grid__skeleton-cell",children:a("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-${u}`))},`adyen-pe-data-grid-skeleton-row-${o}`)),!t&&n&&n]})},Xp="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",Qp=({children:e})=>{const t=A(()=>new Map,[]),n=S(({column:s,width:i})=>{if(t.has(s)){const o=t.get(s);i>o&&t.set(s,i)}else t.set(s,i)},[t]),r=S(s=>t.get(s),[t]);return a(ud.Provider,{value:{registerCells:n,getMinWidthByColumn:r},children:yn(e)})},Jp=({cellKey:e,position:t,label:n})=>{const{registerCells:r}=Da(),s=Y(null);return $(()=>{var i;s.current&&r({column:e,width:(i=s.current)==null?void 0:i.getBoundingClientRect().width})},[e,r]),a("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:a("div",{ref:s,className:"adyen-pe-data-grid__cell--heading-content",children:n})})},e_=Object.freeze({activeIndex:-1,index:-1});function Tn({errorDisplay:e,...t}){return a("div",{style:{width:"100%"},children:a(Qp,{children:a(t_,{...t,errorDisplay:e})})})}function t_({errorDisplay:e,...t}){var l,h;const n=A(()=>yn(t.children),[t.children]),r=A(()=>n.find(d=>(d==null?void 0:d.type)===Ed),[n]),s=A(()=>{var d;return((d=t.data)==null?void 0:d.length)===0},[t.data]),i=A(()=>!t.loading&&(s||t.error),[s,t.error,t.loading]),{getMinWidthByColumn:o}=Da(),c=t.columns.filter(d=>d.visible!==!1).map(d=>({...d,minWidth:o(d.key)})),u=c.map(d=>`minmax(${(d.minWidth||100)+40}px, ${d.flex||1}fr)`).join(" ");return a("div",{className:M("adyen-pe-data-grid",{"adyen-pe-data-grid--condensed":t.condensed,"adyen-pe-data-grid--outline":t.outline,"adyen-pe-data-grid--scrollable":t.scrollable,"adyen-pe-data-grid--loading":t.loading,"adyen-pe-data-grid--empty":s||t.error}),style:`--adyen-pe-data-grid-cols: ${c.length}; --adyen-pe-data-grid-cells: ${u};`,children:a(K,{children:[a("div",{className:"adyen-pe-data-grid__table-wrapper",children:[a("div",{role:"table",className:"adyen-pe-data-grid__table",children:[a("div",{className:"adyen-pe-data-grid__head",role:"rowgroup",children:a("div",{role:"rowheader",className:"adyen-pe-data-grid__header",style:t.loading?{width:"100%"}:{},children:c.map(d=>a(Jp,{label:d.label,position:d.position,cellKey:d.key},d.key))})}),a(n_,{...t,columns:c,emptyBody:s})]}),i&&(s&&!t.error?a(en,{title:((l=t.emptyTableMessage)==null?void 0:l.title)??"thereAreNoResults",message:(h=t.emptyTableMessage)==null?void 0:h.message,imageDesktop:Xp,centered:!0}):t.error&&e?e():null)]}),r]})})}function n_(e){const t=A(()=>e.loading||e.emptyBody||e.error,[e.emptyBody,e.error,e.loading]);return a("div",{role:"rowgroup",className:M("adyen-pe-data-grid__body"),style:t&&{display:"grid",gridTemplateColumns:"1fr"},children:t?a(Zp,{columnsNumber:e.columns.length,loading:e.loading}):e.onRowClick?a(Vp,{onRowHover:e.onRowHover,data:e.data,columns:e.columns,onRowClick:e.onRowClick,customCells:e.customCells}):a(qp,{onRowHover:e.onRowHover,data:e.data,customCells:e.customCells,columns:e.columns})})}Tn.Footer=Ed;function Ed({children:e}){return a("div",{className:"adyen-pe-data-grid__footer",children:e})}Tn.defaultProps={condensed:!1,outline:!0,scrollable:!0};const Co="-ariaError";var je=(e=>(e[e.NONE=0]="NONE",e[e.APPLY=1]="APPLY",e[e.CLEAR=2]="CLEAR",e))(je||{});const Nd=({applyDisabled:e,applyTitle:t,resetDisabled:n,resetTitle:r}=U)=>{const{i18n:s}=W(),[i,o]=x(je.NONE),[c,u]=x(i!==je.NONE),l=S(()=>o(je.APPLY),[o]),h=S(()=>o(je.CLEAR),[o]),d=S(()=>o(je.NONE),[o]),m=A(()=>({disabled:xe(e),event:l,title:(t==null?void 0:t.trim())||s.get("apply"),variant:se.PRIMARY}),[s,l,e,t]),f=A(()=>({disabled:xe(n),event:h,title:(r==null?void 0:r.trim())||s.get("reset"),variant:se.SECONDARY}),[s,h,n,r]),y=A(()=>[m,f],[m,f]);return $(()=>{switch(u(i!==je.NONE),i){case je.APPLY:case je.CLEAR:d();break}},[i,u,d]),{commitAction:i,commitActionButtons:y,committing:c,resetCommitAction:d}};function Cd(e){const{backgroundUrl:t="",className:n="",classNameModifiers:r=[],src:s="",alt:i="",showOnError:o=!1}=e,[c,u]=x(!1),l=Y(null),h=()=>{u(!0)},d=()=>{u(o)},m=M([n],"adyen-pe-image",{"adyen-pe-image--loaded":c},...r.map(f=>`adyen-pe-image--${f}`));return $(()=>{const f=t?new Image:l.current;f&&(f.src=t||s,f.onload=h),u(!!(f!=null&&f.complete))},[]),t?a("div",{style:{backgroundUrl:t},...e,className:m}):a("img",{...e,alt:i,ref:l,className:m,onError:d})}const $r="adyen-pe-dropdown",r_=Aa(ut,[se.SECONDARY],[ut]),Ut=`${$r}__button`,s_=`${Ut}--active`,o_=`${Ut}-collapse-indicator`,i_=`${Ut}--has-selection`,a_=`${Ut}-icon`,c_=`${Ut}-multiselect-counter`,l_=`${Ut}--readonly`,u_=`${Ut}-text`,d_=`${Ut}--valid`,h_=`${Ut}--invalid`,on=`${$r}__element`,f_=`${on}--active`,m_=`${on}-checkbox`,p_=`${on}-checkmark`,__=`${on}-content`,y_=`${on}--disabled`,g_=`${on}-icon`,T_=`${on}--no-option`,Sd=`${$r}__list`,A_=`${Sd}--active`,E_=`${$r}--multiselect`,N_=({active:e,disabled:t,className:n,filterable:r,toggleButtonRef:s,...i})=>{const o=A(()=>r?M(r_,n):n,[n,r]);return r?a("div",{...i,className:o,ref:s}):a(he,{...i,className:o,disabled:t,variant:se.SECONDARY,ref:s})},C_=e=>{var m,f;const{i18n:t}=W(),{active:n,filterable:r,multiSelect:s,placeholder:i,readonly:o,showList:c,withoutCollapseIndicator:u}=e,l=A(()=>(i==null?void 0:i.trim())||t.get("select.filter.placeholder"),[t,i]),h=A(()=>xe(s)?void 0:n[0],[n,s]),d=A(()=>{var y;return((y=h==null?void 0:h.name)==null?void 0:y.trim())||l},[h,l]);return a(N_,{active:n,disabled:o,"aria-disabled":o,"aria-expanded":c,"aria-haspopup":"listbox",className:M(Ut,{[s_]:c,[i_]:!!n.length,[l_]:o,[h_]:e.isInvalid,[d_]:e.isValid}),filterable:r,onClick:o?void 0:e.toggleList,onKeyDown:o?void 0:e.onButtonKeyDown,role:r?"button":void 0,tabIndex:0,title:d,toggleButtonRef:e.toggleButtonRef,type:r?void 0:"button","aria-describedby":e.ariaDescribedBy,id:e.id??"",children:[c&&r?a("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"}):a(K,{children:[(h==null?void 0:h.icon)&&a(Cd,{className:a_,src:h.icon,alt:((m=h==null?void 0:h.name)==null?void 0:m.trim())??""}),a("span",{className:u_,children:((f=h==null?void 0:h.selectedOptionName)==null?void 0:f.trim())||d}),s&&e.appliedFilterNumber>0&&a("div",{className:c_,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.appliedFilterNumber})})]}),!u&&a("span",{className:o_,children:a(Xo,{role:"presentation"})})]})},S_=e=>{var u;const{componentRef:t}=W(),[n,r]=x(((u=t.current)==null?void 0:u.offsetWidth)||0),[s,i,o]=e;let c=!1;switch(s){case"up":c=n>=i;break;case"down":c=n<=i;break;case"only":if(o){const{min:l,max:h}=o;c=h?n<=h:l?n>=l:!1}else c=n===i;break}return $(()=>{const l=t.current;if(!l)return;const h=new ResizeObserver(d=>{for(const m of d)m.target===l&&r(l.offsetWidth)});return h.observe(l),()=>{h.unobserve(l),h.disconnect()}},[t]),c},Oe={up:{sm:["up",tt.sm],md:["up",tt.md],lg:["up",tt.lg]},down:{xs:["down",tt.sm-1],sm:["down",tt.md-1],md:["down",tt.lg-1]},only:{xs:["only",tt.sm-1,{max:tt.sm-1}],sm:["only",tt.sm,{max:tt.md-1}],md:["only",tt.md,{max:tt.lg-1}],lg:["only",tt.lg,{min:tt.lg}]}},be=S_,R_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&a("title",{children:e}),a("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"})]})),v_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&a("title",{children:e}),a("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"})]})),O_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"16",viewBox:"0 0 16 16",height:"16",children:[e&&a("title",{children:e}),a("path",{fill:"currentColor","fill-rule":"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","clip-rule":"evenodd"})]})),b_=e=>e.multiSelect?a("span",{className:m_,children:e.selected?a(R_,{role:"presentation"}):a(v_,{role:"presentation"})}):null,Rd=e=>e.multiSelect?null:a("span",{className:p_,children:e.selected&&a(O_,{role:"presentation"})}),I_=e=>a(K,{children:[b_(e),a("div",{className:e.contentClassName,children:[e.item.icon&&a(Cd,{className:e.iconClassName,alt:e.item.name,src:e.item.icon}),a("span",{children:e.item.name})]}),Rd(e)]}),D_=({item:e,multiSelect:t,onKeyDown:n,onSelect:r,renderListItem:s,selected:i})=>{const o=!!e.disabled,c=xe(e.disabled)||null,u=M(on,{[f_]:i,[y_]:o});return a("li",{"aria-disabled":o,"aria-selected":i,className:u,"data-disabled":c,"data-value":e.id,onClick:r,onKeyDown:n,title:e.name,role:"option",tabIndex:-1,children:s({item:e,multiSelect:t,selected:i,contentClassName:__,iconClassName:g_})})},k_=Ie(D_),L_=Xe(({active:e,commitActions:t,items:n,multiSelect:r,onKeyDown:s,onSelect:i,renderListItem:o,selectListId:c,showList:u,textFilter:l,toggleButtonRef:h,dismissPopover:d,setToTargetWidth:m,popoverClassNameModifiers:f,showOverlay:y,fitPosition:_},T)=>{const{i18n:g}=W(),E=be(Oe.down.xs),v=n.filter(R=>!l||R.name.toLowerCase().includes(l)),N=M(Sd,{[A_]:u}),D=M(on,T_),C=A(()=>Q(o)?o:I_,[o]),O=A(()=>xe(r),[r]);return u?a($a,{classNameModifiers:f,actions:O?t:void 0,disableFocusTrap:!0,divider:!0,dismiss:d,dismissible:!1,open:u,setToTargetWidth:m,containerSize:ds.MEDIUM,variant:qe.POPOVER,targetElement:h,withContentPadding:!1,position:ge.BOTTOM,showOverlay:y&&E,fitPosition:_,children:a("ul",{className:N,id:c,ref:T,role:"listbox","aria-multiselectable":O,children:v.length?v.map(R=>a(k_,{item:R,multiSelect:O,onKeyDown:s,onSelect:i,renderListItem:C,selected:e.includes(R)},R.id)):a("div",{className:D,children:g.get("select.noOptionsFound")})})}):null}),w_=Ie(L_),P_=({items:e,multiSelect:t,selected:n})=>{const r=S((u=de)=>{const l=de.concat(u??de).filter(Boolean),h=e.filter(m=>l.includes(m.id)),d=t?h:h.slice(0,1);return d.length?Object.freeze(d):de},[e,t]),[s,i]=x(r(n)),o=S((u=de)=>{const l=u.filter(h=>e.includes(h));i(l.length?Object.freeze(l):de)},[e,i]),c=S(u=>{i(l=>{const h=l.indexOf(u);if(h<0)return Object.freeze((t?l:de).concat(u));if(!t)return l;const d=[...l];return d.splice(h,1),d.length?Object.freeze(d):de})},[t,i]);return $(()=>i(r(n)),[r,n,i]),{resetSelection:o,select:c,selection:s}},Ys=({className:e,classNameModifiers:t=de,popoverClassNameModifiers:n,items:r=de,filterable:s=!1,multiSelect:i=!1,readonly:o=!1,onChange:c=te,selected:u,name:l,isInvalid:h,isValid:d,placeholder:m,uniqueId:f,renderListItem:y,isCollatingErrors:_,setToTargetWidth:T,withoutCollapseIndicator:g=!1,showOverlay:E=!1,fitPosition:v})=>{const{resetSelection:N,select:D,selection:C}=P_({items:r,multiSelect:i,selected:u}),[O,R]=x(!1),[F,P]=x(""),z=Y(null),j=Y(null),ie=Y(null),q=Y(`select-${aa()}`),[ce,Te]=x(0),me=Y(),_e=Y(!0),De=Y(!1),pe=Y(C),ke=Y(C),fe=S(()=>{P(""),R(!1),O&&(N(pe.current),_e.current=!0)},[N,R,P,O]),Ue=A(()=>M([$r,{[E_]:xe(i)},...t.map(ae=>`${$r}--${ae}`),e]),[e,t,i]),{commitAction:oe,commitActionButtons:ze,committing:Qe,resetCommitAction:Tt}=Nd({resetDisabled:!C.length}),Ge=S(()=>{var ae;P(""),R(!1),Tt(),_e.current?_e.current=!1:(ae=ie.current)==null||ae.focus()},[Tt,R,P]),Wt=S(()=>{pe.current=C;const ae=`${C.map(({id:Re})=>Re)}`;c({target:{value:ae,name:l}})},[l,c,C]);$(()=>{switch(oe){case je.APPLY:Wt();break;case je.CLEAR:N(),De.current=!0;break}},[oe,Wt,N]);const Be=S(ae=>{var ve;ae.preventDefault();const Re=ae.currentTarget&&((ve=j==null?void 0:j.current)!=null&&ve.contains(ae.currentTarget))?ae.currentTarget:null;if(Re&&!Re.getAttribute("data-disabled")){const zs=Re.getAttribute("data-value"),qs=r.find(Ks=>Ks.id===zs);D(qs)}},[r,D]);$(()=>{ke.current!==C&&(ke.current=C,(!i||De.current)&&(Wt(),Ge())),De.current=!1},[Ge,Wt,i,C]),$(()=>{Qe&&(Te(C.length),Ge())},[Qe,Ge,Te,C.length]);const An=S(ae=>{switch(ae.code){case V.ESCAPE:case V.TAB:O&&Ge(),_e.current=ae.key===V.TAB;return;case V.ENTER:case V.SPACE:if(s&&O){if(ae.key===V.ENTER)if(F)Be(ae);else break;return}break;case V.ARROW_DOWN:case V.ARROW_UP:break;default:return}ae.preventDefault(),R(!0)},[Ge,s,Be,O,R,F]);$(()=>{O&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(()=>{var ae;e:{let Re=(ae=j.current)==null?void 0:ae.firstElementChild,ve;for(;Re;){if(!(Re.dataset.disabled&&Re.dataset.disabled==="true")){if(Re.getAttribute("aria-selected")==="true"){Re.focus();break e}ve=ve||Re}Re=Re.nextElementSibling}ve&&ve.focus()}}))},[O]);const qn=S(ae=>{const Re=ae.target;switch(ae.code){case V.ESCAPE:ae.preventDefault(),Ge();break;case V.ENTER:case V.SPACE:Be(ae);break;case V.ARROW_DOWN:{ae.preventDefault();let ve=Re.nextElementSibling;for(;ve;){if(!(ve.dataset.disabled&&ve.dataset.disabled==="true")){ve.focus();break}ve=ve.nextElementSibling}break}case V.ARROW_UP:{ae.preventDefault();e:{let ve=Re.previousElementSibling;for(;ve;){if(!(ve.dataset.disabled&&ve.dataset.disabled==="true")){ve.focus();break e}ve=ve.previousElementSibling}s&&z.current&&z.current.focus()}break}case V.TAB:Ge();break}},[Ge,s,Be]),Kn=S(ae=>{const Re=ae.target.value;P(Re.toLowerCase())},[P]),ci=S(ae=>{ae.preventDefault(),R(Re=>!Re),O&&N(pe.current)},[R,O,N]);return $(()=>{var ae;O&&s&&((ae=z.current)==null||ae.focus())},[s,O]),a("div",{className:Ue,children:[a(C_,{id:f??void 0,appliedFilterNumber:ce,active:C,filterInputRef:z,filterable:s,isInvalid:h,isValid:d,onButtonKeyDown:An,onInput:Kn,multiSelect:i,placeholder:m,readonly:o,selectListId:q.current,showList:O,toggleButtonRef:ie,toggleList:ci,withoutCollapseIndicator:g,ariaDescribedBy:!_&&f?`${f}${Co}`:""}),a(w_,{popoverClassNameModifiers:n,setToTargetWidth:T,dismissPopover:fe,active:C,commitActions:ze,items:r,multiSelect:i,onKeyDown:qn,onSelect:Be,selectListId:q.current,ref:j,toggleButtonRef:ie,renderListItem:y,showList:O,showOverlay:E,textFilter:F,fitPosition:v})]})},M_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&a("title",{children:e}),a("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"})]})),F_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&a("title",{children:e}),a("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 Ha({next:e,hasNext:t,hasPrev:n,prev:r,limit:s,limitOptions:i,onLimitSelection:o}){const{i18n:c}=W(),u=A(()=>i&&Object.freeze(i.map(h=>({id:`${h}`,name:`${h}`}))),[i]),l=S(({target:h})=>{Ne(h==null?void 0:h.value)||o==null||o(+h.value)},[o]);return a("div",{"aria-label":c.get("paginatedNavigation"),className:`adyen-pe-pagination ${M({})}`,children:[a("div",{className:"adyen-pe-pagination__context",children:u&&o&&a(K,{children:[a("span",{children:c.get("pagination.showing")}),a("div",{className:"adyen-pe-pagination__limit-selector",children:a(Ys,{setToTargetWidth:!0,filterable:!1,multiSelect:!1,items:u,onChange:l,selected:`${s??""}`})})]})}),a("div",{className:"adyen-pe-pagination__controls",children:[a(he,{"aria-label":c.get("pagination.previousPage"),variant:se.TERTIARY,disabled:!n,iconButton:!0,classNameModifiers:["circle"].concat(n?de:"disabled"),onClick:r,children:a(M_,{disabled:!n})}),a(he,{"aria-label":c.get("pagination.nextPage"),variant:se.TERTIARY,disabled:!t,iconButton:!0,classNameModifiers:["circle"].concat(t?de:"disabled"),onClick:e,children:a(F_,{disabled:!t})})]})]})}const zn="adyen-pe-transactions-table",x_=zn+"__amount",B_=zn+"__payment-method",$_=zn+"__payment-method-logo-container",U_=zn+"__payment-method-logo",W_=zn+"__date-and-payment-method",H_=zn+"__date-and-payment-method--date",G_="https://cdf6519016.cdn.adyen.com/checkoutshopper/",Y_=({name:e,resourceContext:t,imageFolder:n="logos/",parentFolder:r="",extension:s="svg",size:i="",subFolder:o=""})=>{const c=`/images/${n}/${o}/${r}/${e}${i}.${s}`.replace(/\/+/g,"/");return`${t}${c}`},j_=({options:e=U,name:t})=>{const{loadingContext:n}=W();return A(()=>Y_({resourceContext:G_,name:t,...e}),[n,t,e])},vd=({folder:e="components/",className:t,alt:n,name:r,extension:s})=>{const i=j_({options:A(()=>({imageFolder:e,extension:s}),[s,e]),name:r});return a("img",{className:M("adyen-pe__image",t),alt:n,src:i})},z_=Object.freeze({klarna:"Klarna",paypal:"PayPal"});function Od(e,t){return e.lastFourDigits?t==="detail"?"•••• •••• •••• "+e.lastFourDigits:e.lastFourDigits:e.description||z_[e.type]||e.type}const ml=({paymentMethod:e,bankAccount:t})=>{const{i18n:n}=W(),r=be(Oe.down.xs);return a("div",{className:B_,children:e||t?a(K,{children:[a("div",{className:$_,children:a(vd,{name:e?e.type:"bankTransfer",alt:e?e.type:"bankTransfer",folder:"logos/",className:U_})}),a(k,{variant:I.BODY,stronger:r,children:e?Od(e):t==null?void 0:t.accountNumberLastFourDigits})]}):a(Mt,{label:n.get("noData"),variant:Ee.LIGHT_WITH_OUTLINE})})},q_={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"},bd=e=>q_[e]||e;function K_(e){let t={};for(const n of Object.keys(e))Z(e[n])||(t={...t,[n]:e[n]});return t}const Ga=({fields:e,customColumns:t,columnConfig:n})=>{const{i18n:r}=W(),s=A(()=>e.map(c=>({key:c})),[e]),i=be(Oe.up.sm);return A(()=>{const c=(t==null?void 0:t.filter(d=>!(e!=null&&e.some(m=>m===d.key))).map(d=>d.key))||[],u=[...s,...(t==null?void 0:t.filter(d=>d==null?void 0:d.key))||[]],l=(t==null?void 0:t.reduce((d,m)=>(d[m.key]=m,d),{}))||{},h=new Map;return u.forEach(d=>{const m=l[d.key];if((m==null?void 0:m.visibility)!=="hidden")if(h.has(d.key)){const f=h.get(d.key);h.set(d.key,{...f,...d,visible:d.visibility!=="hidden",position:d.align||f.position})}else{const{key:f,flex:y,align:_}=d,T=r.get(bd(f)),g=K_((n==null?void 0:n[f])||U);h.set(d.key,{key:f,label:T,visible:c.includes(d.key)?i:!0,flex:y,position:_,...g})}}),Array.from(h.values())},[n,t,e,r,i,s])},Ya=["createdAt","paymentMethod","transactionType","amount"],V_=({activeBalanceAccount:e,availableCurrencies:t,error:n,hasMultipleCurrencies:r,loading:s,onContactSupport:i,onRowClick:o,showDetails:c,showPagination:u,transactions:l,customColumns:h,...d})=>{const{i18n:m}=W(),{dateFormat:f}=rn(e==null?void 0:e.timeZone),[y,_]=x(),T=be(Oe.up.sm),g=be(Oe.up.md),E=be(Oe.down.xs),v=m.get("amount"),N=Ga({fields:Ya,customColumns:h,columnConfig:{amount:{label:r?void 0:`${v} ${t&&t[0]?`(${bu(t[0])})`:""}`,position:"right",flex:T?1.5:void 0},transactionType:{visible:g},paymentMethod:{visible:T}}}),D={title:"noTransactionsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},C=S(R=>{_(R??void 0)},[_]),O=A(()=>()=>a(Wa,{error:n,onContactSupport:i,errorMessage:"weCouldNotLoadYourTransactions"}),[n,i]);return a("div",{className:zn,children:a(Tn,{errorDisplay:O,error:n,columns:N,data:l,loading:s,outline:!1,onRowClick:{callback:o},onRowHover:C,emptyTableMessage:D,customCells:{transactionType:({item:R,rowIndex:F})=>{const P=`tooltip.${R.category}`;return R.category?m.has(P)?a(zp,{isContainerHovered:F===y,value:R.category}):a(k,{variant:I.BODY,children:m.has(`txType.${R.category}`)?m.get(`txType.${R.category}`):`${R.category}`}):null},amount:({value:R})=>{const F=m.amount(R.value,R.currency,{hideCurrency:!r});return a(k,{variant:I.BODY,className:x_,children:F})},createdAt:({item:R,value:F})=>E?a("div",{className:W_,children:[a(ml,{paymentMethod:R.paymentMethod,bankAccount:R.bankAccount}),a(k,{variant:I.BODY,className:H_,children:f(R.createdAt,km)})]}):a(k,{variant:I.BODY,children:f(F,Dm)}),paymentMethod:({item:R})=>a(ml,{paymentMethod:R.paymentMethod,bankAccount:R.bankAccount})},children:u&&a(Tn.Footer,{children:a(Ha,{...d})})})})},nt="adyen-pe-transaction-data",pl=`${nt}__amount`,Z_=`${nt}__action-bar`,Qo=`${nt}__container`,X_=`${nt}__head-container`,ja=`${nt}__input`,js=`${ja}-container`,Id=`${js}--short`,Q_=`${js}--text-input`,J_=`${js}--with-error`,Dd=`${ja}-head`,kd=`${nt}__label`,e3=`${nt}__list`,za=`${nt}__payment-method`,t3=`${za}-detail`,Ld=`${za}-logo`,n3=`${Ld}-container`,r3=`${nt}__tags`,s3=`${nt}__status-box`,o3=`${nt}__refund-response`,So=`${nt}__refund-response-icon`,i3=`${So}--success`,a3=`${So}--error`,c3=`${nt}__refund-statuses-container`,wd=new Set(["status","category","paymentMethod","bankAccount","balanceAccount","id","balanceAccountId",...Ya,"deductedAmount","lineItems","originalAmount","paymentPspReference","refundDetails","refundMetadata"]),l3=()=>{var s;const{i18n:e}=W(),{transaction:t,extraFields:n,dataCustomization:r}=ap();return A(()=>{const{balanceAccount:i,category:o,id:c,paymentPspReference:u,refundMetadata:l}=t,h=o==="Refund",d=null,m=N=>{if(Ne(N))return null;const{value:D,currency:C}=N;return e.amount(D,C)},f=m(t.deductedAmount),y=m(t.originalAmount),_=h?"refund.refundFee":"refund.fee",T=h?"refund.originalPayment":"refund.originalAmount",g=h?"refund.paymentPspReference":"refund.pspReference",v=[...[y?{key:T,value:y,id:"originalAmount"}:d,f?{key:_,value:f,id:"deductedAmount"}:d,i!=null&&i.description?{key:"account",value:i.description,id:"description"}:d,h&&(l!=null&&l.refundReason)?{key:"refundReason",value:e.has(`refundReason.${l.refundReason}`)?e.get(`refundReason.${l.refundReason}`):l.refundReason,id:"refundReason"}:d,{key:"referenceID",value:a(Bn,{type:"Default",textToCopy:c,showCopyTextTooltip:!1}),id:"id"},h&&(l!=null&&l.refundPspReference)?{key:"refund.refundPspReference",value:l.refundPspReference,id:"refundPspReference"}:d,u?{key:g,value:u,id:"paymentPspReference"}:d].filter(Boolean).filter(N=>{var D,C;return!((C=(D=r==null?void 0:r.details)==null?void 0:D.fields)!=null&&C.some(O=>O.key===N.id&&O.visibility==="hidden"))}),...Object.entries(n||{}).filter(([N,D])=>!wd.has(N)&&D.type!=="button"&&D.visibility!=="hidden").map(([N,D])=>({key:N,value:xn(D)?D.value:D,type:xn(D)?D.type:"text",config:xn(D)?D.config:void 0}))||{}];return a(fn,{classNames:e3,items:v,layout:"5-7",align:"start",renderLabel:N=>a("div",{className:kd,children:N}),renderValue:(N,D,C,O)=>{if(C==="link"&&O)return a(ba,{classNames:[M(O==null?void 0:O.className)],href:O.href,target:O.target||"_blank",children:N});if(C==="icon"&&O){const R={url:O==null?void 0:O.src,alt:O.alt||N};return a("div",{className:M("adyen-pe-transaction-data__list-icon-value",O==null?void 0:O.className),children:[a(Ia,{...R}),a(k,{variant:I.BODY,children:[" ",N," "]})]})}return a(k,{className:M(O==null?void 0:O.className),variant:I.BODY,children:N})}})},[(s=r==null?void 0:r.details)==null?void 0:s.fields,n,e,t])},_l=({children:e,className:t})=>a("div",{className:M(Qo,t),children:e}),u3=e=>{switch(e==null?void 0:e.status){case"Booked":return"default";case"Reversed":return"error";default:return"pending"}},d3=e=>e!=null&&e.paymentMethod?e.paymentMethod.type:e!=null&&e.bankAccount?"bankTransfer":null,h3=e=>{var t;return e!=null&&e.paymentMethod?Od(e.paymentMethod,"detail"):(t=e==null?void 0:e.bankAccount)==null?void 0:t.accountNumberLastFourDigits},f3=e=>{if(e.category==="Refund"){const{refundType:t}=e.refundMetadata??U;switch(t){case vn.FULL:return vn.FULL;case vn.PARTIAL:return vn.PARTIAL}}},m3=({refundedState:e,transaction:t})=>{var d;const{i18n:n}=W(),{dateFormat:r}=rn((d=t==null?void 0:t.balanceAccount)==null?void 0:d.timeZone),{amount:s,category:i,createdAt:o}=t,c=A(()=>{const{currency:m,value:f}=s;return`${n.amount(f,m,{hideCurrency:!0})} ${m}`},[s,n]),[u,l,h]=A(()=>[d3(t),h3(t),f3(t)],[t]);return a(K,{children:[a("div",{className:r3,children:[i&&a(Mt,{label:n.get(`txType.${i}`),variant:Ee.DEFAULT}),h&&a(K,{children:[h===vn.FULL&&a(Mt,{label:n.get("full"),variant:Ee.SUCCESS}),h===vn.PARTIAL&&a(Mt,{label:n.get("partial"),variant:Ee.BLUE})]}),e===cr.FULL&&a(Mt,{label:n.get("refunded.full"),variant:Ee.SUCCESS}),e===cr.PARTIAL&&a(Mt,{label:n.get("refunded.partial"),variant:Ee.BLUE})]}),c&&a("div",{className:M(pl,`${pl}--${u3(t)}`),children:c}),u&&a("div",{className:za,children:[a("div",{className:n3,children:a(vd,{className:Ld,name:u,alt:u,folder:"logos/"})}),a("div",{className:t3,children:l})]}),o&&a("div",{className:kd,children:r(new Date(o),Lm)})]})},p3=Ie(m3),_3=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("g",{"clip-path":"url(#a)",children:a("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"})}),a("defs",{children:a("clipPath",{id:"a",children:a("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}));function Pd({onInput:e,onKeyUp:t,trimOnBlur:n,onBlurHandler:r,onBlur:s,onFocusHandler:i,errorMessage:o,...c},u){const{autoCorrect:l,classNameModifiers:h,isInvalid:d,isValid:m,readonly:f=!1,spellCheck:y,type:_,uniqueId:T,isCollatingErrors:g,disabled:E}=c;xt(c,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const v=S(q=>{e==null||e(q)},[e]),N=S(q=>{t&&t(q)},[t]),D=S(q=>{r==null||r(q),n&&(q.target.value=q.target.value.trim()),s==null||s(q)},[s,r,n]),C=S(q=>{i==null||i(q)},[i]),O=M("adyen-pe-input",[`adyen-pe-input--${_}`],c.className,{"adyen-pe-input--invalid":d,"adyen-pe-input--valid":m},h==null?void 0:h.map(q=>`adyen-pe-input--${q}`)),{classNameModifiers:R,uniqueId:F,isInvalid:P,isValid:z,isCollatingErrors:j,...ie}=c;return a(K,{children:[a("input",{id:T,...ie,type:_,className:O,readOnly:f,"aria-describedby":g?void 0:`${T}${Co}`,"aria-invalid":d,onInput:v,onBlurCapture:D,onFocus:C,onKeyUp:N,disabled:E,ref:u}),d&&o&&a("span",{className:"adyen-pe-input__invalid-value",id:`${T}${Co}`,children:o})]})}Pd.defaultProps={type:"text",classNameModifiers:[],onInput:()=>{}};const Ro=Yr(Pd),Md=(e,t)=>Iu(e,t).toFixed(Yi(t)),Yi=e=>Math.log10(Ou(e)),Fd=({currency:e,disabled:t,errorMessage:n,errorMessageArg:r,onInput:s,value:i})=>{const{i18n:o}=W(),c=Y(Mr()),u=Y(Mr()),l=n?r?o.get(n,{values:{amount:r}}):o.get(n):"";return a("div",{className:Qo,children:[a("div",{className:Dd,children:a("div",{id:u.current,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:o.get("refundAmount")})})}),a("div",{className:M({[js]:!0,[Id]:!0,[Q_]:!0,[J_]:!!n}),children:[a("label",{htmlFor:c.current,"aria-labelledby":u.current,children:[e&&a(Mt,{label:e,variant:Ee.DEFAULT}),a(Ro,{min:0,type:"number",className:ja,disabled:xe(t),lang:o.locale,onInput:s,value:i,uniqueId:c.current})]}),n&&a("div",{className:"adyen-pe-input__refund-invalid-value",id:`${c.current}${Co}`,children:[a(_3,{}),a(k,{el:ne.SPAN,variant:I.BODY,children:l})]})]})]})},y3=()=>{const{availableAmount:e,currency:t}=wa();return a(Fd,{currency:t,errorMessage:null,value:Md(e,t),disabled:!0})},g3=({locale:e})=>{const{availableAmount:t,currency:n,interactionsDisabled:r,setAmount:s}=wa(),[i,o]=x(null),[c,u]=x(`${Md(t,n)}`),{i18n:l}=W(),h=A(()=>{const m=Yi(n);return f=>Math.trunc(+`${parseFloat(f)}e${m}`)||0},[n]),d=m=>{var E;let f=m.currentTarget.value.trim();const y=h(f);let _=null;y||f?(y<0&&(_="noNegativeNumbersAllowed"),y>t&&(_="refundAmount.excess")):_="refundAmount.required";const T=((E=1.1.toLocaleString(e).match(/\d(.*?)\d/))==null?void 0:E[1])||".",g=f.split(T);if(g.length===2){const v=Yi(n),N=g[0];let D=g[1];D.length>=v&&(D=D.substring(0,v),f=N+T+D,m.currentTarget.value=f)}u(f),o(_),s(_?0:y)};return a(Fd,{currency:n,errorMessage:i,errorMessageArg:l.amount(t,n),onInput:d,value:c,disabled:r})},T3=()=>{const{i18n:e}=W();return A(()=>a("div",{className:`${Qo} ${X_}`,children:[a(k,{el:ne.DIV,variant:I.SUBTITLE,stronger:!0,children:e.get("refundAction")}),a(k,{variant:I.BODY,children:e.get("refundNotice")})]}),[e])},A3=()=>{const{i18n:e}=W(),{interactionsDisabled:t,refundReason:n,setRefundReason:r}=wa(),s=A(()=>Object.freeze(La.map(o=>({id:o,name:e.has(`refundReason.${o}`)?e.get(`refundReason.${o}`):o}))),[e]),i=S(o=>{var u;const c=(u=o.target)==null?void 0:u.value;c&&r(c)},[r]);return a("div",{className:Qo,children:[a("div",{className:Dd,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.get("refundReason")})}),a("div",{className:`${js} ${Id}`,children:a(Ys,{items:s,readonly:t,filterable:!1,multiSelect:!1,onChange:i,selected:n})})]})},yl=({children:e,renderViewActionButtons:t,renderViewMessageBox:n})=>a("div",{className:nt,children:[e,n&&n(),t()]}),gl=({action:e,title:t,renderIcon:n,subtitle:r})=>a("div",{className:o3,children:[n&&n(),a(k,{className:It.MEDIUM,variant:I.TITLE,children:t}),a(k,{variant:I.BODY,children:r}),e&&e()]}),E3=({transaction:e,extraFields:t,dataCustomization:n})=>{var Ue;const[r,s]=x(lt.DETAILS),[i,o]=x(),[c,u]=x(),[l,h]=x(!1),{fetchingTransaction:d,refreshTransaction:m,transaction:f,transactionNavigator:y}=pp(e),{refundable:_,refundableAmount:T,refundableAmountLabel:g,refundAvailable:E,refundCurrency:v,refundDisabled:N,refundedState:D,refundStatuses:C,refundMode:O,refundLocked:R}=yp(f),F=A(()=>N||l,[N,l]),{i18n:P}=W(),z=Object.freeze((f==null?void 0:f.lineItems)??de),j=S(oe=>o(oe),[]),ie=S(oe=>u(oe),[]),q=S(oe=>oe===lt.REFUND&&F,[F]),{getBalanceAccounts:ce}=Se().endpoints,{data:Te}=Ot(A(()=>({fetchOptions:{enabled:!!ce&&!f.balanceAccount&&!!f.balanceAccountId,keepPrevData:!0},queryFn:async()=>ce==null?void 0:ce(U)}),[f.balanceAccountId,f.balanceAccount,ce])),me=S(oe=>void(q(oe)||s(oe)),[q]),_e=S(()=>{const oe=t?Object.values(t).filter(Qe=>Qe.type==="button").map(Qe=>{var Tt,Ge;return{title:Qe.value,variant:se.SECONDARY,event:(Tt=Qe.config)==null?void 0:Tt.action,classNames:(Ge=Qe.config)!=null&&Ge.className?[Qe.config.className]:[]}}):[],ze=[i,c,...oe].filter(Boolean);return ze.length?a(_l,{className:Z_,children:a(ka,{actions:ze,layout:Gs.BUTTONS_END})}):null},[t,i,c]),De=S(()=>{m(),h(!0)},[h,m]),pe=S(()=>C!=null&&C.length||R||l?a("div",{className:c3,children:[(R||l)&&a(pn,{type:Fe.HIGHLIGHT,variant:mn.TIP,description:`${P.get("refund.theRefundIsBeingProcessed")} ${P.get("pleaseComeBackLater")}`}),C.map((oe,ze)=>a(pn,{variant:mn.TIP,type:(oe==null?void 0:oe.type)??Fe.HIGHLIGHT,description:oe==null?void 0:oe.label},`${Math.random()}-${ze}`))]}):null,[P,C,R,l]),ke=f.balanceAccount??((Ue=Te==null?void 0:Te.data)==null?void 0:Ue.find(oe=>oe.id===f.balanceAccountId));if(us(()=>{s(lt.DETAILS)},[f]),us(()=>{F&&s(lt.DETAILS)},[F]),d)return a(va,{skeletonRowNumber:5});if(q(r))return null;const fe={lineItems:z,refundAvailable:E,refundDisabled:F,setActiveView:me,setPrimaryAction:j,setSecondaryAction:ie};switch(r){case lt.DETAILS:return a(yl,{renderViewActionButtons:_e,renderViewMessageBox:pe,children:a(ip,{...fe,transaction:!f.balanceAccount&&ke?{...f,balanceAccount:ke}:{...f},transactionNavigator:y,extraFields:t,dataCustomization:n,children:[a(_l,{className:s3,children:a(p3,{transaction:f,refundedState:D})}),a(l3,{})]})});case lt.REFUND:return a(yl,{renderViewActionButtons:_e,children:a(fp,{...fe,availableAmount:T,currency:v,refundMode:O,refreshTransaction:m,transactionId:f.id,children:[a(T3,{}),_&&a(A3,{}),O===We.FULL_AMOUNT&&a(y3,{}),(O===We.PARTIAL_AMOUNT||O===We.PARTIAL_LINE_ITEMS)&&a(g3,{locale:P.locale}),g&&a(pn,{variant:mn.TIP,type:g.type,description:g.description})]})});case lt.REFUND_SUCCESS:return a(gl,{renderIcon:()=>a(Ze,{name:"checkmark-circle-fill",className:M(So,i3)}),title:P.get("refundActionSuccessTitle"),subtitle:P.get("refundActionSuccessSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:De,children:P.get("goBack")})});case lt.REFUND_ERROR:return a(gl,{renderIcon:()=>a(Ze,{name:"cross-circle-fill",className:M(So,a3)}),title:P.get("refundActionErrorTitle"),subtitle:P.get("refundActionErrorSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:m,children:P.get("goBack")})});default:return null}},N3=({error:e,isFetching:t,transaction:n,extraFields:r,dataCustomization:s})=>xe(t)||!(n||e)?a(va,{skeletonRowNumber:5}):n?a(E3,{dataCustomization:s,transaction:n,extraFields:r}):null,Jo=(e,t)=>{const{getBalanceAccounts:n}=Se().endpoints,{data:r,isFetching:s,error:i}=Ot(A(()=>({fetchOptions:{enabled:!!n&&(t??!0),keepPrevData:!0},queryFn:async()=>n==null?void 0:n(U)}),[n])),o=A(()=>r==null?void 0:r.data.filter(u=>e?u.id===e:!0),[r==null?void 0:r.data,e]),c=A(()=>!!e&&!!(r!=null&&r.data.length)&&(o==null?void 0:o.length)===0,[o==null?void 0:o.length,r==null?void 0:r.data.length,e]);return{balanceAccounts:o,isBalanceAccountIdWrong:c,isFetching:s,error:i}},xd=Hr({withinModal:!1}),C3=()=>Gr(xd);function S3({title:e,children:t,classNameModifiers:n=[],isOpen:r,onClose:s,isDismissible:i=!0,headerWithBorder:o=!0,size:c="fluid",...u}){const l=be(Oe.down.xs),{i18n:h}=W(),d=Ma(null,s),m=S(f=>{f.key==="Escape"&&r&&i&&s()},[r,i,s]);return $(()=>(r?window.addEventListener("keydown",m):window.removeEventListener("keydown",m),()=>window.removeEventListener("keydown",m)),[r,m]),a(K,{children:r&&a("div",{className:M("adyen-pe-modal-wrapper",n.map(f=>`adyen-pe-modal-wrapper--${f}`),{"adyen-pe-modal-wrapper--open":r,"adyen-pe-modal-wrapper--dismissible":i}),role:"dialog","aria-modal":"true","aria-hidden":!open,...u,children:a(xd.Provider,{value:{withinModal:!0},children:a("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:d,children:[a("div",{className:M("adyen-pe-modal__header",{"adyen-pe-modal__header--with-title":e,"adyen-pe-modal__header--with-border-bottom":o}),children:[e&&a("div",{className:"adyen-pe-modal__header__title",children:e}),i&&a(he,{onClick:s,variant:se.TERTIARY,iconButton:!0,classNameModifiers:["circle"],className:"adyen-pe-modal__header-icon","aria-label":h.get("dismiss"),children:a(Ze,{name:"cross"})})]}),a("div",{className:"adyen-pe-modal__content",children:t})]})})})})}const R3={transaction:"transactionDetails",payout:"payoutDetails"},v3=({hideTitle:e,type:t})=>{const{i18n:n}=W(),{withinModal:r}=C3(),[s,i]=x(!1),o=A(()=>s||xe(e),[s,e]),c=A(()=>n.get(R3[t]),[n,t]);return $(()=>{i(r)},[r]),{hideTitle:o,title:c}},Bd="adyen-pe-payouts-table",O3=`${Bd}__net-payout`,$d=["fundsCapturedAmount","adjustmentAmount","payoutAmount"],qa=["createdAt",...$d],b3=e=>$d.includes(e),I3=({error:e,loading:t,onContactSupport:n,onRowClick:r,showDetails:s,showPagination:i,data:o,customColumns:c,...u})=>{const{i18n:l}=W(),{dateFormat:h}=rn("UTC"),{refreshing:d}=Se(),m=A(()=>t||d,[t,d]),f=be(Oe.up.sm),y=S(E=>{var N,D,C,O;const v=l.get(bd(E));if(b3(E))return{label:(D=(N=o==null?void 0:o[0])==null?void 0:N[E])!=null&&D.currency?`${v} (${bu((O=(C=o==null?void 0:o[0])==null?void 0:C[E])==null?void 0:O.currency)})`:v,position:"right"}},[o,l]),_=Ga({fields:qa,customColumns:c,columnConfig:A(()=>({fundsCapturedAmount:{...y("fundsCapturedAmount"),visible:f},adjustmentAmount:{...y("adjustmentAmount"),visible:f},payoutAmount:y("payoutAmount")}),[y,f])}),T={title:"noPayoutsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},g=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourPayouts",onContactSupport:n}),[e,n]);return a("div",{className:Bd,children:a(Tn,{errorDisplay:g,error:e,columns:_,data:o,loading:m,outline:!1,onRowClick:{callback:r},emptyTableMessage:T,customCells:{createdAt:({value:E})=>E?f?E&&a(k,{variant:I.BODY,children:h(E,Om)}):h(E,bm):null,fundsCapturedAmount:({value:E})=>E&&a(k,{variant:I.BODY,children:l.amount(E.value,E.currency,{hideCurrency:!0})}),adjustmentAmount:({value:E})=>E&&a(k,{variant:I.BODY,children:l.amount(E.value,E.currency,{hideCurrency:!0})}),payoutAmount:({value:E})=>E&&a(k,{variant:I.BODY,className:M({[`${O3}--strong`]:!f}),children:l.amount(E.value,E.currency,{hideCurrency:f})})},children:i&&a(Tn.Footer,{children:a(Ha,{...u})})})})},D3={transaction:"getTransaction",payout:"getPayout"},eo=e=>!("data"in e);function Ka(e){var E;const t=A(()=>eo(e)?null:e.data,[e]),n=A(()=>eo(e)?e.id:null,[e]),r=Se().endpoints[D3[e.type]],{hideTitle:s,title:i}=v3(e),{data:o,error:c,isFetching:u}=Ot(A(()=>({fetchOptions:{enabled:!!n&&!!r},queryFn:async()=>{const v=e.type==="transaction"?{path:{transactionId:n}}:{query:{balanceAccountId:n,createdAt:e.date}};return r(U,{...v})}}),[n,r,e])),l=e.type==="payout"?e.id:o==null?void 0:o.balanceAccountId,h=e.type==="payout"?e==null?void 0:e.balanceAccountDescription:e==null?void 0:e.balanceAccount,{balanceAccounts:d}=Jo(l,!h),m=A(()=>{if(c)return Ua(c,"weCouldNotLoadYourTransactions",e.onContactSupport)},[c,e.onContactSupport]),f=t??o,[y,_]=x(),T=S(async()=>{var v,N,D,C,O;if(o&&(eo(e)&&e.type==="transaction"||e.type==="payout")){const R=await((D=(N=(v=e.dataCustomization)==null?void 0:v.details)==null?void 0:N.onDataRetrieve)==null?void 0:D.call(N,o));_((O=(C=e.dataCustomization)==null?void 0:C.details)==null?void 0:O.fields.reduce((F,P)=>wd.has(P.key)||qa.includes(P.key)||(P==null?void 0:P.visibility)==="hidden"?F:{...F,...R!=null&&R[P.key]?{[P.key]:R[P.key]}:{}},{}))}},[o,e]),g=eo(e)&&e.type==="transaction"||e.type==="payout"?e.dataCustomization:void 0;return $(()=>{T()},[T]),a("div",{className:"adyen-pe-overview-details",children:[!s&&a("div",{className:"adyen-pe-overview-details--title",children:a(k,{variant:I.TITLE,medium:!0,children:i})}),c&&m&&a("div",{className:"adyen-pe-overview-details--error-container",children:a(en,{withImage:!0,...m})}),e.type==="transaction"&&a(N3,{transaction:f?{...f||U,balanceAccount:(e==null?void 0:e.balanceAccount)||(d==null?void 0:d[0])}:void 0,error:!!(c&&m),isFetching:u,extraFields:y,dataCustomization:g}),e.type==="payout"&&f&&a(sp,{balanceAccountId:n,payout:f,balanceAccountDescription:(e==null?void 0:e.balanceAccountDescription)||((E=d==null?void 0:d[0])==null?void 0:E.description),isFetching:u,extraFields:y,dataCustomization:g})]})}class Ud extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ka,{...this.props,type:"payout",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(Ud,"type","payoutDetails");const k3="adyen-pe-data-overview-container--with-error";function Va({balanceAccountsError:e,children:t,className:n,errorMessage:r,isBalanceAccountIdWrong:s,onContactSupport:i}){const{hasError:o}=Se();return a("div",{className:M(n,{[k3]:o}),children:o?a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[r,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0}):e?a(en,{withImage:!0,centered:!0,...Ua(e,"weCouldNotLoadYourBalanceAccounts",i)}):s?a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[r,"theSelectedBalanceAccountIsIncorrect"]}):a(K,{children:t})})}const L3="adyen-pe-payouts-overview",w3="adyen-pe-payouts-details",P3=new Date("2024-04-16T00:00:00.000Z").toString(),Tl="adyen-pe-filter-bar-mobile-switch",Za=()=>{const e=be(Oe.down.xs),[t,n]=x(!e);return $(()=>{n(!e)},[e]),{isMobileContainer:e,showingFilters:t,setShowingFilters:n}},Xa=({isMobileContainer:e,showingFilters:t,setShowingFilters:n})=>e?a("div",{className:Tl,children:a(he,{iconButton:!0,className:`${Tl}__button`,disabled:!Q(n),onClick:()=>n==null?void 0:n(!t),variant:se.SECONDARY,children:a(Ze,{name:t?"cross":"filter"})})}):null,Qa=e=>{const{i18n:t}=W();return e.showingFilters?a("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&&a(he,{variant:se.TERTIARY,onClick:e.resetFilters,children:t.get("button.clearAll")})]}):null},Ja="adyen-pe-balance-account-selector",M3=`${Ja}__account-id`,Al=`${Ja}__account-label`,ec=Ie(({activeBalanceAccount:e,balanceAccountSelectionOptions:t,onBalanceAccountSelection:n})=>{const r=be(Oe.down.xs),{i18n:s}=W(),i=S(o=>a(K,{children:[a("div",{className:o.contentClassName,children:[o.item.name&&a("span",{className:Al,children:o.item.name}),a("span",{className:o.item.name?M3:Al,children:o.item.id})]}),Rd(o)]}),[]);return t&&t.length>1?a(Ys,{popoverClassNameModifiers:[Ja],onChange:n,filterable:!1,multiSelect:!1,placeholder:(e==null?void 0:e.id)||s.get("balanceAccount"),selected:e==null?void 0:e.id,withoutCollapseIndicator:!0,items:t,renderListItem:i,showOverlay:r}):null}),tc=Object.freeze([10,20]),F3=100,ms=10,ji=e=>{const t=~~e;return t===e&&t>0?Math.min(t,F3):Math.max(t,0)},x3=(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 r=0,s=0,i=n;for(;;){const o=e[r=eu(s,i)];if(s>i||t===o)return o;t>o?s=r+1:i=r-1}},B3=({preferredLimit:e=ms,preferredLimitOptions:t})=>{const n=Y(),r=Y(),s=A(()=>{try{const o=new Set;for(const c of t){const u=ji(c);u>0&&o.add(u)}return Object.freeze([...o].sort((c,u)=>c-u))}catch{}},[t]);return{limit:A(()=>{let o=ji(e)||ms;e:try{if(n.current===s)break e;const c=new Set(n.current=s);if(c.size===0){n.current=void 0;break e}if(r.current!==o)t:{if(c.size===c.add(o).size)break t;if(c.delete(o),c.size===c.add(r.current).size){if(Ur(r.current)){o=r.current;break t}}else c.delete(r.current);o=x3(n.current,o)}}catch{}return r.current=o},[s,e]),limitOptions:s}},nc=e=>{const t=Y(!1),n=A(()=>e,[e]);return $(()=>(t.current=!0,()=>{t.current=!1,n&&n()}),[n]),t},Wd=(e,t,n)=>{const r=Y(),s=Y(),i=Y(),o=Y(),c=nc(S(()=>{var P;(P=r.current)==null||P.abort(),r.current=void 0},[])),[u,l]=x(o.current),[h,d]=wt(!1),m=A(()=>ji(n),[n]),{getPageCount:f,getPageParams:y,resetPageCount:_,updatePagination:T}=e,g=A(()=>t?P=>{var q;if(!(m&&Number.isInteger(P)))return;const z=f(),j=P<0?P+z+1:P;j>0&&(z?j<=z:j===1)&&((q=r.current)==null||q.abort(),r.current=new AbortController,c.current&&(((o.current=j)>1||z)&&l(o.current),(async()=>{const{signal:ce}=r.current,Te={...y(j,m),limit:m,page:j};try{const me=await t(Te,ce);if(!me||!c.current)return;const{size:_e,...De}=me;T(j,m,De),s.current=o.current&&Math.max(o.current,s.current||-1/0),o.current&&o.current===s.current&&(i.current=_e),o.current===1&&_e>0&&l(o.current),o.current=void 0,d(!0)}catch(me){if(ce.aborted)return;console.error(me)}})()))}:te,[m,t]),E=S(()=>{u&&g(Math.min(u+1,f()))},[g,u]),v=S(()=>{u&&g(Math.max(u-1,1))},[g,u]),N=A(()=>f()||u||void 0,[g,h]),D=A(()=>!!(u&&N)&&u<N,[u,N]),C=A(()=>!!u&&u>1,[u]),O=A(()=>s.current?(s.current-1)*m+(i.current||0):0,[g,h]),R=A(()=>m&&Math.min(m,O||1/0)%m,[m,O]),F=S(()=>{_(),s.current=i.current=o.current=void 0,c.current&&l(o.current)},[_]);return $(()=>{c.current&&h&&d(!1)},[h]),{goto:g,hasNext:D,hasPrev:C,limit:m,next:E,page:u,pages:N,pageSize:R,prev:v,resetPagination:F,size:O}},$3=e=>gt(e.next),U3=e=>gt(e.prev),W3=(e,t)=>{const n=A(()=>{const r=[],s=()=>r.length,i=()=>{r.length=0},o=l=>({cursor:r[l-1]}),c=(l,h)=>{const d=r[h-1];(h===1||h===(r.length||1)+1)&&Z(d)&&(r[h-1]=l?decodeURIComponent(l):void 0)};return{getPageCount:s,getPageParams:o,resetPageCount:i,updatePagination:(l,h,d)=>{$3(d)&&c(d.next,l+1),U3(d)&&c(d.prev,l-1)}}},[]);return Wd(n,e,t)},H3=e=>e.next,G3=(e,t)=>{const n=A(()=>{let r=0;return{getPageCount:()=>r,getPageParams:(u,l)=>({offset:(u-1)*l}),resetPageCount:()=>{r=0},updatePagination:(u,l,h)=>{H3(h)&&h.next&&(r=Math.max(r,u+1))}}},[]);return Wd(n,e,t)},Y3=(e=U,t=!0)=>{const n=Y(t),r=Y(Object.freeze({...e})),s=Y(new Set(Object.keys(r.current))),i=Y(new Set),o=nc(),[c,u]=A(()=>{const m=f=>{o.current&&h(f)};return[()=>m("reset"),f=>m(f)]},[o]),[l,h]=Ko((m,f)=>{if(f==="reset")return i.current.clear(),r.current;const y={...f},_=[0];Object.keys(y).forEach((g,E)=>{if(!s.current.has(g))return;const v=m[g]??void 0,N=r.current[g]??void 0,D=y[g]??N;if(D===v)return;const C=Math.floor(E/32),O=1<<E%32;y[g]=D,_[C]|=O,i.current[D===N?"delete":"add"](g)});const T=_.some(g=>g)?n.current&&i.current.size===0?r.current:Object.freeze({...m,...y}):m;return n.current||(r.current=T,n.current=!0),T},r.current),d=A(()=>!!i.current.size,[]);return $(()=>{r.current=Object.freeze({...e}),s.current=new Set(Object.keys(r.current)),n.current=t,c()},[t,e,c]),{canResetState:d,defaultState:r.current,resetState:c,state:l,updateState:u}},j3=(e=U,t)=>{const{canResetState:n,defaultState:r,resetState:s,state:i,updateState:o}=Y3(e,t);return{canResetFilters:n,defaultFilters:r,filters:i,resetFilters:s,updateFilters:o}};var zi=(e=>(e.NEXT="next",e.PREV="prev",e))(zi||{}),rc=(e=>(e.CURSOR="cursor",e.OFFSET="offset",e))(rc||{});const z3=["hasNext","hasPrevious"],Hd=e=>{const t=Object.getOwnPropertyNames(e);return!z3.some(n=>t.includes(n))},q3=(e,t="data")=>{const n=e[t];if(Hd(e)){const r=Object.fromEntries(Object.entries(e._links).map(([s,i])=>[s,i.cursor]));return{records:n,paginationData:r}}throw new TypeError("MALFORMED_PAGINATED_DATA")},K3=(e,t="data")=>{const n=e[t];if(!Hd(e)){const{hasNext:r,hasPrevious:s}=e,i={[zi.NEXT]:xe(r),[zi.PREV]:xe(s)};return{records:n,paginationData:i}}throw new TypeError("MALFORMED_PAGINATED_DATA")},V3=({dataField:e="data",fetchRecords:t,filterParams:n=U,initialFiltersSameAsDefault:r=!0,initialize:s,onFiltersChanged:i,pagination:o,preferredLimit:c,preferredLimitOptions:u,enabled:l})=>{const[h,d]=x([]),[m,f]=wt(!0),[y,_]=x(),[T,g]=x(c),E=nc(),v=Y(!0),N=Y(1),D=j3(n,r),{limit:C,limitOptions:O}=B3({preferredLimit:T,preferredLimitOptions:u}),{defaultFilters:R,filters:F,updateFilters:P,...z}=D,[j,ie]=A(()=>o===rc.CURSOR?[q3,W3]:[K3,G3],[]),q=S(pe=>g(pe),[]),{goto:ce,page:Te,pages:me,resetPagination:_e,...De}=ie(S(async({page:pe,...ke},fe)=>{try{if(_(void 0),N.current=pe,!E.current||f(!0))return;const Ue=await t({...ke,...F},fe),{records:oe,paginationData:ze}=j(Ue,e);return v.current&&(s==null||s([oe,ze],D),v.current=!1),E.current&&(d(oe),f(!1)),{...ze,size:oe==null?void 0:oe.length}}catch(Ue){if(fe!=null&&fe.aborted)return;f(!1),_(Ue),console.error(Ue)}},[t,F,C]),C);return A(()=>{v.current=!0},[n]),A(()=>{_e(),N.current=1},[F,C,_e]),$(()=>{l&&ce(N.current)},[ce,l]),$(()=>{i==null||i(F)},[F]),{error:y,fetching:m,filters:F,goto:ce,limitOptions:O,page:Te,pages:me,records:h,updateFilters:P,updateLimit:q,...z,...De}},sc=e=>V3({...e,pagination:rc.CURSOR}),oc=e=>{const[t,n]=x(0),r=S(()=>n(0),[n]),s=A(()=>e==null?void 0:e[t],[e,t]),i=A(()=>e&&e.length>1?Object.freeze(e.map(({description:c,id:u})=>({id:u,name:d2(c)}))):void 0,[e]),o=S(({target:c})=>{const u=c==null?void 0:c.value,l=e==null?void 0:e.findIndex(({id:h})=>h===u);l>=0&&n(l)},[e,n]);return{activeBalanceAccount:s,balanceAccountSelectionOptions:i,onBalanceAccountSelection:o,resetBalanceAccountSelection:r}},{getTimezoneTime:Z3,getUsedTimezone:X3}=(()=>{const e=/\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i,t=/^GMT|0(?=\d:00)|:00/g,n=Us();return{getTimezoneTime:(i,o=Date.now())=>{n.tz=i;const{formatted:c}=n(o),[u="",l=""]=(c==null?void 0:c.match(e))??de,h=ki(c),d=`${u}${l&&` ${l}`}`,m=T1(h).replace(t,"");return[d,m]},getUsedTimezone:i=>(n.tz=i,n.tz.current)}})(),Q3=({timezone:e,withClock:t=!1}=U)=>{const n=A(()=>xe(t),[t]),r=A(()=>X3(e),[e]),s=Y(te),[i,o]=x(Date.now()),[c,u]=A(()=>Z3(r,i),[i,r]);return A(()=>{s.current(),s.current=n?ca.subscribe(l=>{Yn(l)||o(l.now)}):te},[o,n]),{clockTime:c,GMTOffset:u,timestamp:i,timezone:r}},J3=e=>Object.freeze({systemToTimezone:G(t=>Ft(e,t)),timezoneToSystem:G(t=>Zt(e,t)),timezoneOffset:G(t=>e(t).offset)}),Gd=(e,t,n=e)=>{const r=(s,i)=>{let o=s;Ne(s)?o=n:is(s)||(o=i??n);const c=vt(e,o,t);return c===o?c:i??n};return s=>{const i=ue(()=>o);let o=r(s);return J({value:i,descriptor:G({...i,set(c){const u=o;o=r(c,o),u!==o&&(this.now=this.now)}})})}},ey=(e,t)=>n=>Q(n)?n.call(e,t):n,ty=e=>!xt(e,"offsets"),ny=e=>xt(e,"from"),ei=({now:e})=>e,ry=(()=>{const e=new Map;return t=>{let n=e.get(t);return Z(n)&&(n=Object.freeze([0,0,t,0,0,0,-1]),e.set(t,n)),n}})(),Vn=e=>{try{const t=e instanceof Date||+e===e?e:void 0,n=new Date(t).getTime();return isNaN(n)?void 0:n}catch{}},ti=(e=U,t=U)=>{const n=cs(e),r=cs(t);return()=>{const s=Us(),i=ue(()=>d),o=ue(()=>s.tz.current),c=J({now:i,timezone:o,...J3(s)}),u=ey(n,c);let{from:l,to:h,now:d}=U;const m=y=>{d=Vn(y??Date.now())??d;e:{if(ty(n)){l=Vn(u(n.from))??d,h=Vn(u(n.to))??d;break e}let _,T,g;(g=ny(n))?(_=new Date(l=Vn(u(n.from))??d),T=1):(_=new Date(h=Vn(u(n.to))??d),T=-1),_=new Date(c.timezoneToSystem(_));const[E=0,v=0,N=0,D=0,C=0,O=0,R=0]=u(n.offsets);_.setFullYear(_.getFullYear()+E*T,_.getMonth()+v*T,_.getDate()+N*T),_.setHours(_.getHours()+D*T,_.getMinutes()+C*T,_.getSeconds()+O*T,_.getMilliseconds()+R*T);const F=Vn(c.systemToTimezone(_))??d;g?h=F:l=F}l>h&&([l,h]=[h,l])},f=y=>{const _=s.tz,T=_.current;s.tz=y,_.current!==T&&m(d)};return m(),J({...r,from:ue(()=>l),now:{...i,set:m},timezone:{...o,set:f},to:ue(()=>h)})}},sy=/^(\d{2})\/(\d{2})\/(-?\d+),\s+(\d{2}):(\d{2}):(\d{2}).(\d{3})/,ni=(e=Uo)=>(t,n,...r)=>{const s=tn(n),i=new Date(Zt(s,t));return i.setHours(0,0,0,0),Ft(s,e(i,...r))},Yd=ni(),jd=ni(e=>e.setDate(1)),oy=ni(e=>e.setMonth(0,1)),zd=ni((e,t)=>{const n=ay(e.getDay(),t??0);return e.setDate(e.getDate()-n)}),iy=e=>(e%100?e%4:e%400)===0,gi=(e,t,n=0)=>{const r=e+n,s=Fs(r,12),i=t+Math.floor(r/12);let o=31;switch(s){case 1:o=iy(i)?29:28;break;case 3:case 5:case 8:case 10:o=30;break}return[o,s,i]},ay=(e,t=0)=>(7-t+e)%7,sr=(e,t)=>Mn(e)?0:e-Yd(e,t),El=e=>Z(e)?e:new Date(e),cy=(e,t=U)=>{const n=tn(t.timeZone),r={...da,...t,timeZone:n.tz.current};return new Date(e).toLocaleDateString(jo,r)},an=(e,t)=>{const n=cy(e,{...Du,...da,timeZone:t,hour12:!1}),[,r="",s="",i="",o="",c="",u="",l=""]=n.match(sy)??de;return[+i,+r-1,+s,+o%24,+c,+u,+l]},qi=(e,t,n)=>{if(Mn(e)||Mn(t))return 1/0;const[r,s]=an(e,n),[i,o]=an(t,n);return Math.abs(o-s+(i-r)*12)},tn=(()=>{const e=Us();return t=>(e.tz=void 0,e.tz=t,e)})(),ic=1,ly=ry(7),uy=Gd(0,6,ic),qd=(e=0)=>{const t=~~vt(0,e,1/0)||0;return(n=ic)=>{const r=t?{offsets:ly}:{to:ei},s=uy(n);return ti({from:({now:i,timezone:o,systemToTimezone:c,timezoneToSystem:u})=>{const l=new Date(u(zd(i,o,s.value)));return l.setDate(l.getDate()-t*7),c(l)},...r},{firstWeekDay:s.descriptor})()}},dy=Object.freeze([0,1,0,0,0,0,-1]),Kd=(e=0)=>{const t=~~vt(0,e,1/0)||0;return ti({from:({now:r,timezone:s,systemToTimezone:i,timezoneToSystem:o})=>{const c=new Date(o(jd(r,s)));return c.setMonth(c.getMonth()-t),i(c)},...t?{offsets:dy}:{to:ei}})},hy=Kd(1),fy=365,my=1,py=1,_y=Gd(my,fy,py),Nl=e=>{const t=_y(e);return ti({from:({now:n,timezone:r,systemToTimezone:s,timezoneToSystem:i})=>{const o=new Date(i(Yd(n,r)));return o.setDate(o.getDate()-t.value+1),s(o)},to:ei},{numberOfDays:t.descriptor})()},yy=qd(1),gy=Kd(0),Ty=qd(0),Ay=ti({from:({now:e,timezone:t})=>oy(e,t),to:ei}),Ey=()=>Object.freeze({"rangePreset.last7Days":Nl(7),"rangePreset.last30Days":Nl(30),"rangePreset.thisWeek":Ty(),"rangePreset.lastWeek":yy(),"rangePreset.thisMonth":gy(),"rangePreset.lastMonth":hy(),"rangePreset.yearToDate":Ay()}),Ny=({now:e=Date.now(),options:t,selectedOption:n,timezone:r})=>{const{i18n:s}=W(),[i,o]=x(),[c,u]=x(),[l,h]=x(),d=Y(),m=Y(),[f,y,_]=A(()=>{const C=s.get("rangePreset.custom"),O=Object.keys(t),R=Object.freeze(O.map(P=>s.get(P)));return[C,(P,z=R)=>{const j=z.findIndex(ie=>ie===P);return t[O[j]]},R]},[s,t]),[T,g]=x(n===f),E=A(()=>Object.freeze([..._,f]),[f,_]),v=A(()=>T?E:_,[T,_,E]),N=S(C=>{const O=y(C,_);O&&(o(O.from),u(O.to),g(!1),h(C))},[f,y,l,_]),D=S(()=>{o(void 0),u(void 0),g(!0),h(f)},[f]);return A(()=>{n===f?h(f):N(n)},[]),A(()=>{var C;if(d.current!==e||m.current!==r){const O=Object.values(t);O.forEach(R=>{R.now=e,R.timezone=r}),d.current=e,m.current=(C=O[0])==null?void 0:C.timezone,N(l)}},[e,r,t]),{customSelection:D,from:i,onSelection:N,options:v,selectedOption:l,to:c}},Cy=({calendarRef:e,onTimeRangeSelected:t,timestamp:n,...r})=>{const{customSelection:s,from:i,onSelection:o,options:c,selectedOption:u,to:l}=Ny(r),h=A(()=>Object.freeze(c.map(y=>({id:y,name:y}))),[c]),d=S(({target:y})=>o(y==null?void 0:y.value),[o]),m=Y(!0),f=Y(n);return $(()=>{e!=null&&e.current&&i&&l&&(m.current=!0,e.current.from=new Date(i),e.current.to=new Date(l))},[e,i,l]),$(()=>{f.current!==n&&(f.current=n,m.current?m.current=!1:s())},[s,n]),$(()=>{u&&(t==null||t(u))},[u,t]),a(Ys,{setToTargetWidth:!0,items:h,filterable:!1,multiSelect:!1,onChange:d,selected:u})},_t=(()=>{const e=r=>Object.freeze(Wr(U,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{value:i}])))),t=r=>{try{return Object.getPrototypeOf(r)===U}catch{return!1}},n=(r,s)=>{if(!r)return e(G(s,Bt(r)));let i=s;return e({enumerable:!0,get:()=>i,set:o=>{i=r(o)}})};return Object.defineProperties(n,{is:{value:t},isObject:{value:Wo},immutable:{value:r=>n(!1,r)},mutable:{value:r=>n(void 0,r)},restricted:{value:()=>n(!1)}})})(),Vd=(()=>{const e=(n={},r=!1)=>{const s=J();for(const[i,o]of Object.entries(n)){try{const c=_t.is(o),u=_t.isObject(o);if(c||u){Object.defineProperty(s,i,c?o:e(o,r));continue}else if(r){Object.defineProperty(s,i,_t.immutable(o));continue}}catch{}s[i]=o}return _t((i={})=>Object.assign(s,i),s)};return Object.defineProperties(e,{unwrapped:{value:(n={},r=!1)=>{const s=e(n,r);return J({P:s}).P}}})})();var ac=(e=>(e[e.DATE=0]="DATE",e[e.DAY_OF_WEEK=1]="DAY_OF_WEEK",e[e.MONTH_HEADER=2]="MONTH_HEADER",e))(ac||{});const Zd="adyen-pe-calendar__cell adyen-pe-calendar__cell--date",Xd="adyen-pe-calendar__date",Sy=(e=U,t)=>{const n=Vd.unwrapped({childClassName:_t.mutable(Xd),childProps:{children:_t.restricted(),className:""},className:_t.mutable(Zd),props:{...e,children:_t.restricted(),className:""}},!0);return t==null||t(ac.DATE,n),n},Ry=Xe(({grid:e,prepare:t,datetime:n,flags:r,index:s,label:i,onlyCellsWithin:o},c)=>{const u=r.WITHIN_BLOCK,l={"data-cursor-position":s,"data-within-month":u,tabIndex:-1};if(u){const _=r.WITHIN_RANGE;l["data-today"]=r.CURRENT,l["data-first-week-day"]=r.LINE_START,l["data-last-week-day"]=r.LINE_END,l["data-weekend"]=r.WEEKEND,l["data-first-month-day"]=r.BLOCK_START,l["data-last-month-day"]=r.BLOCK_END,l["data-within-range"]=_,_&&(l["data-range-end"]=r.RANGE_END,l["data-range-start"]=r.RANGE_START,l["data-selection-end"]=r.SELECTION_END,l["data-selection-start"]=r.SELECTION_START,l["data-within-selection"]=r.WITHIN_SELECTION,l["aria-selected"]=`${!!(r.SELECTION_END||r.SELECTION_START||r.WITHIN_SELECTION)}`),s===+e.cursor&&(l.ref=c)}const h=Sy(l,t),{children:d,className:m,...f}=h.props||U,y=Ao(h.className,Zd,m);return a("td",{...f,...l,className:y,children:(!o||u)&&(()=>{const{children:_,className:T,...g}=h.childProps||U,E=Ao(h.childClassName,Xd,T);return a("time",{...g,className:E,dateTime:n,children:i})})()})}),vy=Ie(Ry,To({block:To.exclude,flags:e=>+e})),Qd="adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week",Jd="adyen-pe-calendar__day-of-week",Oy=(e=U,t)=>{const n=Vd.unwrapped({childClassName:_t.mutable(Jd),childProps:{children:_t.restricted(),className:""},className:_t.mutable(Qd),props:{...e,children:_t.restricted(),className:""}},!0);return t==null||t(ac.DAY_OF_WEEK,n),n},by=({prepare:e,flags:t,labels:{long:n,short:r}})=>{const s={"aria-label":n,"data-first-week-day":t.LINE_START,"data-last-week-day":t.LINE_END,"data-weekend":t.WEEKEND,scope:"col"},i=Oy(s,e),{children:o,className:c,...u}=i.props||U,l=Ao(i.className,Qd,c),{children:h,className:d,...m}=i.childProps||U,f=Ao(i.childClassName,Jd,d);return a("th",{...u,ref:u.ref,...s,className:l,children:a("abbr",{...m,className:f,children:r})})},Iy=Ie(by,To({block:To.exclude,flags:e=>+e})),Dy=Yr(({cursorRootProps:e,onlyCellsWithin:t,prepare:n,grid:r},s)=>a("ol",{className:"adyen-pe-calendar",role:"none",...e,children:r.map(i=>a("li",{className:"adyen-pe-calendar__month",role:"none",children:[a("div",{className:"adyen-pe-calendar__month-name",role:"none",children:a("time",{dateTime:i.datetime,"aria-hidden":"true",children:i.label})}),a("table",{role:"grid","aria-multiselectable":!0,"aria-label":`${i.label} calendar`,className:"adyen-pe-calendar__grid",style:{"--adyen-pe-calendar-rowspan":r.rowspan},children:[a("thead",{children:a("tr",{className:"adyen-pe-calendar__row",children:r.weekdays.map((o,c)=>a(Iy,{grid:r,block:i,prepare:n,cell:c,...o},o.labels.long))})}),a("tbody",{children:i.map((o,c)=>a("tr",{className:"adyen-pe-calendar__row",children:o.map((u,l)=>a(vy,{ref:s,grid:r,block:i,prepare:n,cell:l,onlyCellsWithin:t,row:c,...u},`${i.month}:${u.timestamp}`))},`${i.month}:${c}`))})]})]},i.datetime))})),ky=Ie(Dy),ps=864e5,Ly=["narrow","short","long"],e0=[0,1,6],lr=[1,2,3,4,6,12],Cl=42,wy=[0,1],cc=Symbol(),lc=Symbol(),uc=Symbol(),Sl=[uc,lc,cc],Sn=Symbol(),or=Symbol(),ir=Symbol(),Py=[or,ir,Sn],t0=Symbol(),n0=Symbol(),r0=Symbol(),s0=Symbol(),o0=Symbol(),i0=Symbol(),a0=Symbol(),c0=Symbol(),l0=Symbol(),u0=Symbol(),dc=Symbol(),hc=Symbol(),d0=Symbol(),Rl=Symbol(),Ke=Symbol(),vl=Symbol(),dt=Symbol(),h0=Symbol(),oo=Symbol(),io=Symbol(),Ol=(e,t)=>{if(t>=e)return e;let n=Math.max(1,lr.indexOf(e));for(;--n&&t<lr[n];);return lr[n]},My=e=>lr[Math.max(lr.indexOf(e),0)],bl=(e=0)=>Object.freeze(wy.map(t=>Fs(6-e+t,7)));var Es,ot,it,_r,yr;class Il{constructor(...t){w(this,Es,1/0);w(this,ot,1/0);w(this,it,-1/0);w(this,_r,0);w(this,yr,0);if(t.length>=3){let n=new Date(t[1]).getTime();if(typeof t[2]!="symbol")b(this,it,n||p(this,it)),b(this,ot,new Date(t[2]).getTime()||p(this,ot)),p(this,ot)<p(this,it)&&([En(this,ot)._,En(this,it)._]=[p(this,it),p(this,ot)]),b(this,yr,sr(p(this,it),t[0])),b(this,_r,sr(p(this,ot),t[0])),b(this,Es,qi(p(this,it),p(this,ot),t[0])+1);else if(!isNaN(n))switch(t[2]){case hc:b(this,ot,n),b(this,_r,sr(p(this,ot),t[0]));break;case dc:default:b(this,it,n),b(this,yr,sr(p(this,it),t[0]));break}}}get numberOfMonths(){return p(this,Es)}get endTimestamp(){return p(this,ot)}get endTimestampOffset(){return p(this,_r)}get startTimestamp(){return p(this,it)}get startTimestampOffset(){return p(this,yr)}}Es=new WeakMap,ot=new WeakMap,it=new WeakMap,_r=new WeakMap,yr=new WeakMap;const ri=(...e)=>{let t=tn().tz.current,n=new Il(t,...e);return J({from:ue(()=>n.startTimestamp,!1),to:ue(()=>n.endTimestamp,!1),offsets:{value:J({from:ue(()=>n.startTimestampOffset,!1),to:ue(()=>n.endTimestampOffset,!1)})},span:ue(()=>n.numberOfMonths,!1),timezone:{...ue(()=>t,!1),set:r=>{const s=t;t=tn(r??void 0).tz.current,t!==s&&(n=new Il(t,...e))}}})},os=ri(),Fy=()=>ri(Date.now(),dc),xy=()=>ri(Date.now(),hc),f0=(...e)=>e.length===0?os:ri(...e);var Le=(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))(Le||{}),Qn=(e=>(e[e.PREV=1]="PREV",e[e.BLOCK=0]="BLOCK",e[e.FRAME=2]="FRAME",e[e.PERIOD=4]="PERIOD",e))(Qn||{}),Ki=(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))(Ki||{});const m0=(()=>{const e={},t=Object.keys(Le).filter(r=>isNaN(+r)),n=r=>r!=="ALL"&&gt(r)&&t.includes(r);return r=>{const s=r&Le.ALL;return e[s]||(e[s]=new Proxy(J({valueOf:{value:()=>s}}),Go({get:(i,o)=>{switch(o){case"valueOf":return i.valueOf;case Symbol.toStringTag:return"_";default:if(!n(o))return}return s&Le[o]?1:void 0}}))),e[s]}})(),By=e=>(t,n,r)=>{if(gt(n)){const s=+n;if(s>=0&&s<t.length)return e(s)}return Reflect.get(t,n,r)},Dl=function*(e=Uo,t){for(let n=0;n<this.length;n++)yield e.call(t,this[n],n,this)},$y=Object.freeze(J({[Symbol.iterator]:{value(){return Dl.call(this)}},map:{value(e,t){return[...Dl.call(this,e,t)]}}})),Qt=(e,t)=>Q(e)?Qt({length:{get:e}},t):Ur(e)?Qt({length:{value:e}},t):new Proxy(Wr($y,e),{get:By(t),set:bi}),vo=(()=>{const e=new Map,t=Us(),n=(r=Date.now())=>{const s=new Date(Zt(t,r)),i=Ft(t,s.setHours(0,0,0,0)),o=Ft(t,s.setDate(s.getDate()+1));return[i,o-i]};return r=>{t.tz=r;const s=t.tz.current;return e.get(s)??(()=>{let i=null,o=null,c=null;const u=()=>(t.tz=s,i??n()[0]),l=(_=Date.now())=>{t.tz=s,[i,o]=n(_)},{cancelSubscriptions:h,requestNotification:d,subscribe:m,on:f}=$s({timestamp:u});f.resume=()=>{c=ca.subscribe(_=>{if(Yn(_))return;const{now:T}=_;if(mo(i)||mo(o))return l(T);T-i<o||(l(T),d())})},f.idle=()=>{c==null||c(),i=o=c=null};const y=J({cancelSubscriptions:G(h),timestamp:ue(u),timezone:G(s),subscribe:G(m)});return e.set(s,y),y})()}})();var gr,Ve,Ns,Cs,Ss,Rs,Et,at,Yt,Tr,Ar,Er,In,jt,vs,$e,Pe,Me,Nr,zt,Dn,Cr,Nt,Os,bs,ln,qt,Is,Ds,Io,Do,le,p0,_0,Jn,y0,st,Jr,Zi;const ar=class ar{constructor(){w(this,le);w(this,Ve,0);w(this,Ns);w(this,Cs);w(this,Ss,-1);w(this,Rs,-1);w(this,Et);w(this,at);w(this,Yt);w(this,Tr,!1);w(this,Ar);w(this,Er,0);w(this,In,[]);w(this,jt,p(ar,gr));w(this,vs,12);w(this,$e);w(this,Pe);w(this,Me,1);w(this,Nr);w(this,zt);w(this,Dn);w(this,Cr,vo());w(this,Nt);w(this,Os,-1/0);w(this,bs,1/0);w(this,ln,-1/0);w(this,qt,1/0);w(this,Is,1/0);w(this,Ds,0);B(this,"daysInWeek",0);B(this,"origin");B(this,"originTimestamp");w(this,Io,Qt(()=>this.daysInWeek,this.getDayOfWeekAtIndex.bind(this)));w(this,Do,Qt(()=>p(this,Me),H(this,le,y0).bind(this)))}get fromTimestamp(){return p(this,Os)}get toTimestamp(){return p(this,bs)}get numberOfBlocks(){return p(this,Is)}get blankSelection(){return p(this,$e)===p(this,Pe)&&Z(p(this,Pe))}get cursor(){return p(this,Et)??-1}get daysOfWeek(){return p(this,Io)}get dynamicBlockHeight(){return p(this,Tr)}set dynamicBlockHeight(t){Ne(t)?b(this,Tr,!!t):Oi(t)&&b(this,Tr,t)}set effect(t){Ne(t)?b(this,Ar,void 0):Q(t)&&b(this,Ar,t)}get firstWeekDay(){return p(this,Er)}set firstWeekDay(t){if(Ne(t))this.firstWeekDay=0;else if(!e0.includes(t)||p(this,Er)===b(this,Er,t))return}get frameBlocks(){return p(this,Do)}get isAtEnd(){return!Mn(p(this,qt))&&p(this,qt)===p(this,Me)-1}get isAtStart(){return!Mn(p(this,ln))&&p(this,ln)===0}get locale(){return p(this,jt)}set locale(t){const n=p(this,jt);if(Ne(t))b(this,jt,p(ar,gr));else if(typeof Intl<"u")try{b(this,jt,new Intl.Locale(t).toString())}catch{b(this,jt,p(ar,gr))}p(this,jt)!==n&&this.refreshFrame(!0)}get selectionStart(){return p(this,$e)}get selectionEnd(){return p(this,Pe)}get size(){return p(this,Me)}set size(t){const n=Math.min(!Ne(t)&&My(t)||1,p(this,vs));p(this,Me)!==b(this,Me,n)&&(H(this,le,Zi).call(this),this.refreshFrame())}get timeslice(){return p(this,zt)}set timeslice(t){if(t===p(this,Nr)||Ne(t)&&p(this,Nr)===os)return;const{from:n,to:r,timezone:s}=b(this,Nr,t??os);b(this,zt,f0(n,r)),this.timezone=s}get timezone(){return p(this,Dn)}set timezone(t){p(this,zt).timezone=t,b(this,Dn,p(this,zt).timezone),b(this,Cr,vo(p(this,Dn))),p(this,Nt)&&(p(this,Nt).call(this),b(this,Nt,p(this,Cr).subscribe(this.refreshFrame.bind(this,!0)))),H(this,le,p0).call(this)}set trackCurrentDay(t){Oi(t)?t&&!p(this,Nt)?b(this,Nt,p(this,Cr).subscribe(this.refreshFrame.bind(this,!0))):!t&&p(this,Nt)&&(p(this,Nt).call(this),b(this,Nt,void 0)):Ne(t)&&(this.trackCurrentDay=!1)}get units(){return p(this,Ds)}initialize(){this.timeslice=os}refreshFrame(t=!1){var n;if(p(this,In).length=0,!(Z(p(this,at))||t)){const r=this.getFrameBlockAtIndex(p(this,Ve)),{from:s,to:i}=r.inner,[o]=H(this,le,Jn).call(this,this.getTimestampAtIndex(s+p(this,at)),!1);b(this,at,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(s),o));const c=s+p(this,at),u=vt(s,c,i);if(u>c)return b(this,at,this.getUnitsForFrameBlockAtIndex(--En(this,Ve)._)+c-u),p(this,Ve)>=0?this.refreshFrame():(b(this,Ve,p(this,Me)-1),this.shiftFrameByOffset(-1,oo));if(u<c)return b(this,at,c-u-1),++En(this,Ve)._<p(this,Me)?this.refreshFrame():(b(this,Ve,0),this.shiftFrameByOffset(1,oo));b(this,Ns,s),b(this,Cs,i),b(this,Yt,H(this,le,Jn).call(this,this.getTimestampAtIndex(c),!1)[0]),b(this,at,this.getCursorBlockOriginTimestampOffset(p(this,Yt))),b(this,Et,s+p(this,at));const l=p(this,Ve)>0?this.getFrameBlockAtIndex(0):r,h=p(this,Ve)<p(this,Me)-1?this.getFrameBlockAtIndex(p(this,Me)-1):r;b(this,Ss,l.inner.from),b(this,Rs,h.inner.to),b(this,Ds,h.outer.to+1)}this.withCurrentDayTimestamp(),(n=p(this,Ar))==null||n.call(this)}shiftFrameByOffset(t,n){if(t&&is(t))switch(n){case h0:return H(this,le,Jr).call(this,t);case io:return H(this,le,Jr).call(this,t*12);case oo:default:return H(this,le,Jr).call(this,t*p(this,Me))}}shiftFrameCursor(t){switch(t){case t0:return H(this,le,st).call(this,-1);case o0:return H(this,le,st).call(this,1);case u0:return H(this,le,st).call(this,-this.rowspan);case s0:return H(this,le,st).call(this,this.rowspan);case r0:return H(this,le,st).call(this,p(this,Ns)-p(this,Et));case n0:return H(this,le,st).call(this,p(this,Cs)-p(this,Et));case a0:return H(this,le,st).call(this,-(p(this,Et)%this.rowspan));case i0:return H(this,le,st).call(this,this.rowspan-(p(this,Et)%this.rowspan+1));case l0:return H(this,le,st).call(this,-this.getUnitsForFrameBlockAtIndex((p(this,Ve)??0)-1));case c0:return H(this,le,st).call(this,this.getUnitsForFrameBlockAtIndex(p(this,Ve)??0))}if(!(t<0)&&t>=p(this,Ss)&&t<=p(this,Rs))return H(this,le,st).call(this,t-p(this,Et))}shiftFrameToTimestamp(t){b(this,Yt,this.originTimestamp=H(this,le,Jn).call(this,t,!1).reduce((n,r)=>n+r)),b(this,at,this.getCursorBlockOriginTimestampOffset(p(this,Yt))),this.reoriginate(),[En(this,ln)._,En(this,qt)._]=this.getEdgeBlockOffsetsFromOrigin(),H(this,le,Zi).call(this),this.refreshFrame(),H(this,le,st).call(this,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(p(this,Et)),p(this,Yt)))}clearSelection(){this.blankSelection||(b(this,$e,b(this,Pe,void 0)),this.refreshFrame(!0))}updateSelection(t,n){const r=p(this,$e),s=p(this,Pe),i=H(this,le,Jn).call(this,t,!1).reduce((o,c)=>o+c);switch(n===Rl&&(i<=r?n=dt:i>=s&&(n=Ke)),n){case Ke:b(this,$e,i),b(this,Pe,Math.max(p(this,$e),s??i));break;case dt:b(this,Pe,i),b(this,$e,Math.min(r??i,p(this,Pe)));break;case Rl:case vl:{let o=Math.abs(i-(r??i)),c=Math.abs(i-(s??i));n===vl&&([o,c]=[c,o]),o>c?b(this,$e,i):b(this,Pe,i);break}case d0:default:b(this,$e,b(this,Pe,i));break}(p(this,$e)!==r||p(this,Pe)!==s)&&this.refreshFrame(!0)}};gr=new WeakMap,Ve=new WeakMap,Ns=new WeakMap,Cs=new WeakMap,Ss=new WeakMap,Rs=new WeakMap,Et=new WeakMap,at=new WeakMap,Yt=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Er=new WeakMap,In=new WeakMap,jt=new WeakMap,vs=new WeakMap,$e=new WeakMap,Pe=new WeakMap,Me=new WeakMap,Nr=new WeakMap,zt=new WeakMap,Dn=new WeakMap,Cr=new WeakMap,Nt=new WeakMap,Os=new WeakMap,bs=new WeakMap,ln=new WeakMap,qt=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Io=new WeakMap,Do=new WeakMap,le=new WeakSet,p0=function(){const{from:t,to:n,span:r,offsets:s}=p(this,zt);b(this,Os,t-s.from),b(this,bs,n-s.to),b(this,Is,r);const i=Z(p(this,$e))?p(this,$e):Math.max(p(this,$e),t),o=Z(p(this,Pe))?p(this,Pe):Math.min(p(this,Pe),n);i===p(this,$e)||o===p(this,Pe)?(b(this,$e,i),b(this,Pe,o)):b(this,$e,b(this,Pe,void 0)),this.reslice(),b(this,vs,Ol(12,this.numberOfBlocks)),b(this,Me,Ol(p(this,Me),this.numberOfBlocks)),this.shiftFrameToTimestamp(p(this,Yt))},_0=function(t){return vt(p(this,ln),t||0,p(this,qt)-p(this,Me)+1)},Jn=function(t,n=!0){let r=new Date(t).getTime();if(isNaN(r))return H(this,le,Jn).call(this,Date.now());const{from:s,to:i}=p(this,zt),o=vt(s,r,i);o!==r&&n?(r=eu(s,i),(isNaN(r)||Mn(r))&&(r=o)):r=o;const c=sr(r,p(this,Dn));return[r-c,c]},y0=function(t){if(is(t)&&t>=0&&t<p(this,Me)){if(!p(this,In)[t]){const n=this.getFrameBlockAtIndex(t);if(!n)return;const[r,s]=this.getFormattedDataForFrameBlock(n[n.inner.from][0]+ps/2),i=n.outer.from;p(this,In)[t]=Qt({datetime:G(s),label:G(r),length:G(Math.ceil(n.outer.units/this.rowspan)),month:G(n.month),year:G(n.year)},o=>{const c=o*this.rowspan;return Qt(this.rowspan,u=>{const[l,h]=n[u+c],[d,m]=this.getFormattedDataForBlockCell(l+ps/2);return J({datetime:G(m),flags:G(m0(h)),index:G(i+u+c),label:G(d),timestamp:G(l)})})})}return p(this,In)[t]}},st=function(t){t!==0&&(b(this,at,p(this,at)+t),this.refreshFrame())},Jr=function(t){const n=H(this,le,_0).call(this,t);n&&(this.shiftOrigin(n),b(this,ln,p(this,ln)-n),b(this,qt,p(this,qt)-n),b(this,Ve,Fs(p(this,Ve)-n,p(this,Me))),this.refreshFrame())},Zi=function(){const t=p(this,Me)-1,n=Math.min(t-this.origin%p(this,Me),p(this,qt))-t;n&&H(this,le,Jr).call(this,n)},w(ar,gr,jo);let Vi=ar;var kn,Ln,Sr,ks,Rr,vr,Ls,Or,ws,br,Ir,Dr,He,Xi,Qi,er,ao;class Uy extends Vi{constructor(){super();w(this,He);w(this,kn,7);w(this,Ln,[]);w(this,Sr,bl(this.firstWeekDay));w(this,ks);w(this,Rr,-1/0);w(this,vr,1/0);w(this,Ls,1/0);w(this,Or);w(this,ws);w(this,br);w(this,Ir);w(this,Dr);B(this,"daysInWeek",p(this,kn));this.initialize()}get fromTimestamp(){return p(this,Rr)}get toTimestamp(){return p(this,vr)}get numberOfBlocks(){return p(this,Ls)}get currentDayTimestamp(){return p(this,ks)}get dynamicBlockHeight(){return super.dynamicBlockHeight}set dynamicBlockHeight(n){const r=this.dynamicBlockHeight;super.dynamicBlockHeight=n,this.dynamicBlockHeight!==r&&this.refreshFrame(!0)}get rowspan(){return p(this,kn)}get firstWeekDay(){return super.firstWeekDay}set firstWeekDay(n){const r=this.firstWeekDay;super.firstWeekDay=n,this.firstWeekDay!==r&&(p(this,Ln).length=0,b(this,Sr,bl(this.firstWeekDay)),this.reoriginate(),this.refreshFrame())}getCursorBlockOriginTimestampOffset(n){return an(n,this.timezone)[2]-1}getDayOfWeekAtIndex(n){if(!p(this,Ln)[n]){const r=new Date(this.getTimestampAtIndex(n));let s=0;p(this,Sr).includes(n)&&(s|=Le.WEEKEND),n===0?s|=Le.LINE_START:n===6&&(s|=Le.LINE_END);const i={};for(const o of Ly)i[o]=G(r.toLocaleDateString(this.locale,{weekday:o,timeZone:this.timezone}));p(this,Ln)[n]=J({flags:G(m0(s)),labels:G(J(i))})}return p(this,Ln)[n]}getEdgeBlockOffsetsFromOrigin(){return[H(this,He,Xi).call(this,p(this,Rr)),H(this,He,Xi).call(this,p(this,vr))]}getFormattedDataForBlockCell(n){const[r,s,i]=an(n,this.timezone);return[Number(i).toLocaleString(this.locale),`${r}-${`${s+1}`.padStart(2,"0")}-${`${i}`.padStart(2,"0")}`]}getFormattedDataForFrameBlock(n){const[r,s]=an(n,this.timezone);return[new Date(n).toLocaleDateString(this.locale,{month:"long",year:"numeric",timeZone:this.timezone}),`${r}-${`${s+1}`.padStart(2,"0")}`]}getFrameBlockAtIndex(n){const[r,s,i]=gi(this.origin,p(this,br),n),o=n>0?this.getFrameBlockAtIndex(n-1).inner.to+1:p(this,Or),c=o+r-1,u=Math.floor(o/7)*7,l=this.dynamicBlockHeight?Math.ceil((c+1)/7)*7:u+Cl,h=this.dynamicBlockHeight?l-u:Cl,d=new Proxy(J(),Go({get:(m,f,y)=>{if(gt(f)){const _=+f;if(is(_)&&_>=0&&_<h){const T=u+_,g=this.getTimestampAtIndex(T),E=T%p(this,kn);let v=g===this.currentDayTimestamp?Le.CURRENT:0;return T===this.cursor&&(v|=Le.CURSOR),p(this,Sr).includes(E)&&(v|=Le.WEEKEND),E===0?v|=Le.LINE_START:E===p(this,kn)-1&&(v|=Le.LINE_END),T>=o&&T<=c&&(T===o?v|=Le.BLOCK_START:T===c&&(v|=Le.BLOCK_END),v|=Le.WITHIN_BLOCK),g>=this.fromTimestamp&&g<=this.toTimestamp&&(g===this.fromTimestamp&&(v|=Le.RANGE_START),g===this.toTimestamp&&(v|=Le.RANGE_END),v|=Le.WITHIN_RANGE),g>=p(this,Ir)&&g<=p(this,Dr)&&(g===p(this,Ir)&&(v|=Le.SELECTION_START),g===p(this,Dr)&&(v|=Le.SELECTION_END),v|=Le.WITHIN_SELECTION),[g,v]}}return Reflect.get(m,f,y)}}));return Wr(d,{inner:{value:J({from:{value:o},to:{value:c},units:{value:r}})},month:{value:s},outer:{value:J({from:{value:u},to:{value:l-1},units:{value:h}})},year:{value:i}})}getUnitsForFrameBlockAtIndex(n){return gi(this.origin,p(this,br),n)[0]}getUnitsOffsetForTimestamp(n,r){return Math.round((r-n)/ps)}reoriginate(){this.originTimestamp=jd(this.originTimestamp,this.timezone);const[n,r]=an(this.originTimestamp,this.timezone),s=zd(this.originTimestamp,this.timezone,this.firstWeekDay);this.origin=r,b(this,br,n),b(this,Or,this.getUnitsOffsetForTimestamp(s,this.originTimestamp)),b(this,ws,H(this,He,Qi).call(this,this.originTimestamp,-p(this,Or)))}reslice(){H(this,He,ao).call(this),b(this,Rr,H(this,He,er).call(this,super.fromTimestamp)),b(this,vr,H(this,He,er).call(this,super.toTimestamp)),b(this,Ls,qi(super.fromTimestamp,super.toTimestamp,this.timezone)+1)}shiftOrigin(n){const[r,s]=an(this.originTimestamp,this.timezone),[,i,o]=gi(s,r,n),c=tn(this.timezone),u=new Date(Zt(c,this.originTimestamp)).setFullYear(o,i);this.originTimestamp=Ft(c,u),this.reoriginate()}clearSelection(){super.clearSelection(),H(this,He,ao).call(this),this.refreshFrame(!0)}getTimestampAtIndex(n){return H(this,He,Qi).call(this,p(this,ws),n)}updateSelection(n,r){super.updateSelection(n,r),H(this,He,ao).call(this),this.refreshFrame(!0)}withCurrentDayTimestamp(){b(this,ks,H(this,He,er).call(this,Date.now()))}}kn=new WeakMap,Ln=new WeakMap,Sr=new WeakMap,ks=new WeakMap,Rr=new WeakMap,vr=new WeakMap,Ls=new WeakMap,Or=new WeakMap,ws=new WeakMap,br=new WeakMap,Ir=new WeakMap,Dr=new WeakMap,He=new WeakSet,Xi=function(n){const r=qi(n,this.originTimestamp,this.timezone);return n<this.originTimestamp?0-r:r},Qi=function(n,r=0){const s=tn(this.timezone),i=Zt(s,n),o=Ft(s,i+r*ps);let[,,,c,u]=an(o,this.timezone),l=0;return(c>0||u>0)&&(c=(c>12?24:0)-c,u=(c>1?1:-1)*u,l=c*36e5+u*6e4),o+l},er=function(n){return Z(n)||Mn(n)?n:n-sr(n,this.timezone)},ao=function(){b(this,Ir,H(this,He,er).call(this,this.selectionStart)),b(this,Dr,H(this,He,er).call(this,this.selectionEnd))};const kl=Symbol("<<NO_EXCEPTION>>"),Ll=e=>{const t=[];return J({bind:G(r=>function(...s){let i=kl;try{return t.push(r),r.call(this,...s)}catch(o){throw i=o}finally{t.pop(),t.length===0&&i===kl&&e()}}),effect:G(e)})};var Xl,Ql,Ae,Ct,L,St,ht,Rt,Ye,wn,ct,kr,Kt,Vt,ft,Lt,Lr,Ps,un,mt,ko,dn,wr,Pn,Ms,Lo,ye,wo,Po,Mo,Fo,xo,Bo,yt,g0,T0,A0,$o,co,X,es,Ji,E0,N0,C0,S0,ea,R0,ts,ta,lo,na,ra,sa,oa;let Wy=(ye=class{constructor(){w(this,X);B(this,"grid");B(this,"kill");w(this,Ae,U);w(this,Ct,!1);w(this,L);w(this,St);w(this,ht);w(this,Rt,!1);w(this,Ye,or);w(this,wn,!1);w(this,ct);w(this,kr,(Xl=p(this,ct))==null?void 0:Xl.join(" "));w(this,Kt);w(this,Vt);w(this,ft);w(this,Lt);w(this,Lr);w(this,Ps,vo());w(this,un,[]);w(this,mt);w(this,ko,new Proxy(Qt(()=>{var t;return((t=p(this,mt))==null?void 0:t.length)??0},H(this,X,ea).bind(this)),Go({get:(t,n,r)=>{var i,o;const s=((i=p(this,mt))==null?void 0:i.indexOf(n))??-1;return s>=0?(o=H(this,X,ea).call(this,s))==null?void 0:o[1]:Reflect.get(t,n,r)}})));w(this,dn,$s({blocks:()=>{var t;return(t=p(this,L))==null?void 0:t.size},cells:()=>{var t;return(t=p(this,L))==null?void 0:t.units},controls:()=>qr(Sl,p(this,Ae).controls),cursor:()=>{var t;return(t=p(this,L))==null?void 0:t.cursor},from:()=>{var t;return(t=p(this,L))==null?void 0:t.selectionStart},highlight:()=>p(this,Ye),locale:()=>{var t;return(t=p(this,L))==null?void 0:t.locale},minified:()=>Zn(p(this,Ae).minified),origin:()=>{var t;return(t=p(this,L))==null?void 0:t.getTimestampAtIndex(0)},timezone:()=>{var t;return(t=p(this,L))==null?void 0:t.timezone},to:()=>{var t;return(t=p(this,L))==null?void 0:t.selectionEnd},today:()=>p(this,Ps).timestamp}));w(this,wr,(Ql=p(this,dn))==null?void 0:Ql.snapshot);w(this,Pn,Ll(()=>{var t;return p(this,ft)&&((t=p(this,dn))==null?void 0:t.requestNotification())}));w(this,Ms,Ll(()=>{var t;return(t=p(this,ft))==null?void 0:t.call(p(this,X,es))}));w(this,Lo,Wr(Qt(()=>{var t;return((t=p(this,L))==null?void 0:t.size)??0},t=>{var n;return(n=p(this,L))==null?void 0:n.frameBlocks[t]}),{config:{value:Object.defineProperties(t=>(t&&H(this,X,N0).call(this,t),p(this,X,es)),{cursorIndex:{get:()=>p(this,Kt),set:t=>{p(this,Ct)||(Ne(t)?b(this,Kt,void 0):Q(t)&&b(this,Kt,t))}},shiftFactor:{get:()=>p(this,Vt),set:t=>{p(this,Ct)||(Ne(t)?b(this,Vt,void 0):Q(t)&&b(this,Vt,t))}},watch:{get:()=>p(this,ft),set:t=>{var n,r,s,i,o;if(!p(this,Ct))if(Q(t)){if(b(this,ft,t),!p(this,Lt)){const c=(n=p(this,Pn))==null?void 0:n.bind(p(ye,$o).bind(this));c&&(b(this,Lt,(r=p(this,Pn))==null?void 0:r.bind(te)),b(this,Lr,(i=p(this,dn))==null?void 0:i.subscribe((s=p(this,Ms))==null?void 0:s.bind(c))),p(this,L)&&(p(this,L).effect=p(this,Lt)))}if(!p(this,wn))return;b(this,wn,!1),(o=p(this,Lt))==null||o.call(this)}else Ne(t)&&b(this,ft,void 0)}}})},controls:{value:p(this,ko)},cursor:{value:Object.defineProperties(t=>H(ye,yt,co).call(this,n=>!!(n&&H(this,X,C0).call(this,n)))(t),{valueOf:{value:()=>{var t;return((t=p(this,L))==null?void 0:t.cursor)??-1}}})},highlight:{value:(()=>{const t=()=>p(this,St)===p(this,ht)&&Z(p(this,ht)),n=r=>s=>H(ye,yt,co).call(this,i=>{var o,c,u,l,h;if(!(p(this,Ct)||!p(this,Ye)||p(this,Ye)===or)){if(Ne(i))return H(this,X,ta).call(this);t()?(c=p(this,L))==null||c.updateSelection(i,d0):((o=p(this,L))==null||o.updateSelection(i,r),p(this,Ye)===Sn&&p(this,ct)&&H(this,X,lo).call(this,i,r===Ke?dt:Ke,p(this,ct))),b(this,St,(u=p(this,L))==null?void 0:u.selectionStart),b(this,ht,(l=p(this,L))==null?void 0:l.selectionEnd),(h=p(this,L))==null||h.shiftFrameToTimestamp(r===Ke?p(this,St):p(this,ht))}})(s);return J({blank:{get:t},from:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionStart)??p(this,St)},set:n(Ke)},to:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionEnd)??p(this,ht)},set:n(dt)}})})()},rowspan:{get:()=>{var t;return((t=p(this,L))==null?void 0:t.rowspan)??0}},weekdays:{get:()=>{var t;return((t=p(this,L))==null?void 0:t.daysOfWeek)??p(ye,Mo)}}}));this.grid=p(this,Lo),this.kill=H(this,X,S0).bind(this)}},Ae=new WeakMap,Ct=new WeakMap,L=new WeakMap,St=new WeakMap,ht=new WeakMap,Rt=new WeakMap,Ye=new WeakMap,wn=new WeakMap,ct=new WeakMap,kr=new WeakMap,Kt=new WeakMap,Vt=new WeakMap,ft=new WeakMap,Lt=new WeakMap,Lr=new WeakMap,Ps=new WeakMap,un=new WeakMap,mt=new WeakMap,ko=new WeakMap,dn=new WeakMap,wr=new WeakMap,Pn=new WeakMap,Ms=new WeakMap,Lo=new WeakMap,wo=new WeakMap,Po=new WeakMap,Mo=new WeakMap,Fo=new WeakMap,xo=new WeakMap,Bo=new WeakMap,yt=new WeakSet,g0=function(t){if(!gt(t)||!p(ye,wo).test(t))return;const n=t.split(/\s+/);return Array.from({length:6},(r,s)=>parseInt(n[s]??"0"))},T0=function(t){switch(t&~Qn.PREV){case Qn.FRAME:return oo;case Qn.PERIOD:return io;case Qn.BLOCK:default:return h0}},A0=function(t){return t&Qn.PREV?-1:1},$o=new WeakMap,co=function(t){var n;return((n=p(this,Pn))==null?void 0:n.bind(t))??t},X=new WeakSet,es=function(){return{...p(this,Ae)}},Ji=function(){return new Uy},E0=function(t){return!!p(this,L)&&!(t>0?p(this,L).isAtEnd:p(this,L).isAtStart)},N0=function(t){var s,i;if(p(this,Ct))return;b(this,ct,void 0);const n=t==null?void 0:t.highlight,r=Zn(p(this,Ae).minified);if(gt(n)?b(this,ct,H(s=ye,yt,g0).call(s,n))&&b(this,Ye,Sn):b(this,Ye,qr(Py,n,p(this,Ye))),b(this,Ae,{...p(this,Ae),...t,blocks:qr(lr,t==null?void 0:t.blocks,p(this,Ae).blocks),controls:qr(Sl,t==null?void 0:t.controls,p(this,Ae).controls),firstWeekDay:qr(e0,t==null?void 0:t.firstWeekDay,p(this,Ae).firstWeekDay),fixedBlockHeight:Zn(t==null?void 0:t.fixedBlockHeight,p(this,Ae).fixedBlockHeight),highlight:p(this,Ye),minified:Zn(t==null?void 0:t.minified,p(this,Ae).minified),trackCurrentDay:Zn(t==null?void 0:t.trackCurrentDay,p(this,Ae).trackCurrentDay)}),!Q(p(this,ft))){p(this,L)?b(this,wn,!0):(b(this,L,p(this,X,Ji)),H(this,X,ra).call(this),H(this,X,oa).call(this),H(this,X,sa).call(this));return}(!p(this,L)||r!==p(this,Ae).minified)&&(b(this,L,p(this,X,Ji)),p(this,L).effect=p(this,Lt)),H(this,X,ra).call(this),(i=p(this,Lt))==null||i.call(this)},C0=function(t){if(t&&p(this,L)&&Q(p(this,ft))){if(t instanceof KeyboardEvent){switch(t.code){case V.ARROW_LEFT:p(this,L).shiftFrameCursor(t0);break;case V.ARROW_RIGHT:p(this,L).shiftFrameCursor(o0);break;case V.ARROW_UP:p(this,L).shiftFrameCursor(u0);break;case V.ARROW_DOWN:p(this,L).shiftFrameCursor(s0);break;case V.HOME:p(this,L).shiftFrameCursor(t.ctrlKey?r0:a0);break;case V.END:p(this,L).shiftFrameCursor(t.ctrlKey?n0:i0);break;case V.PAGE_UP:t.shiftKey?p(this,L).shiftFrameByOffset(-1,io):p(this,L).shiftFrameCursor(l0);break;case V.PAGE_DOWN:t.shiftKey?p(this,L).shiftFrameByOffset(1,io):p(this,L).shiftFrameCursor(c0);break;case V.SPACE:case V.ENTER:return H(this,X,ts).call(this),!0;default:return}return p(this,Rt)&&H(this,X,ts).call(this,U),!0}if(t instanceof MouseEvent&&p(ye,Po).includes(t.type)&&Q(p(this,Kt))){const n=p(this,Kt).call(p(this,X,es),t);if(!is(n))return;const r=t.type==="click";if(!(r||p(this,Rt)))return;if(p(this,L).shiftFrameCursor(n),p(this,L).cursor===n)return r?H(this,X,ts).call(this):H(this,X,ts).call(this,U),!0}}},S0=function(){var t;p(this,Ct)||((t=p(this,Lr))==null||t.call(this),b(this,Pn,b(this,Ms,b(this,Kt,b(this,L,b(this,Ye,b(this,kr,b(this,wr,b(this,ct,b(this,Vt,b(this,Lr,b(this,dn,b(this,Lt,b(this,ft,void 0))))))))))))),b(this,Ae,U),b(this,Rt,b(this,wn,!1)),b(this,Ct,!0))},ea=function(t){var r,s;if(!p(this,mt)||t<0||t>=p(this,mt).length)return;const n=p(this,mt)[t];if(!p(this,un)[t]){const i=Ki[n],o=H(r=ye,yt,T0).call(r,i),c=H(s=ye,yt,A0).call(s,i);p(this,un)[t]=(...u)=>H(ye,yt,co).call(this,(...l)=>{var m;const h=H(this,X,E0).call(this,c);if(!(h&&l.length))return h;const d=H(this,X,R0).call(this,n,l[0]);return Z(d)?!1:((m=p(this,L))==null||m.shiftFrameByOffset(c*d,o),!0)})(...u)}return[n,p(this,un)[t]]},R0=function(t,n){if(!(p(this,L)&&Q(p(this,ft))))return;if(n instanceof MouseEvent){if(n.type!=="click")return}else if(n instanceof KeyboardEvent){if(!p(ye,Fo).includes(n.code))return}else return;let r=1;if(Q(p(this,Vt))){const s=Number(p(this,Vt).call(p(this,X,es),n,t));r=Number.isInteger(s)&&s>=1?s:r}return r},ts=function(t){if(p(this,Ct)||!p(this,L))return;switch(p(this,Ye)){case Sn:case ir:break;case or:default:return}const n=p(this,L).cursor,r=Math.max(p(this,L).getTimestampAtIndex(n),p(this,L).timeslice.from),s=Math.min(p(this,L).getTimestampAtIndex(n+1)-1,p(this,L).timeslice.to),i=p(this,ct);if(p(this,Ye)===ir||p(this,L).blankSelection||i)if(b(this,Rt,!(p(this,Ye)===ir||i)),p(this,Ye)===Sn&&i){const o=s>=p(this,L).selectionEnd?Ke:dt;o===Ke?p(this,L).updateSelection(s,dt):p(this,L).updateSelection(r,Ke),H(this,X,lo).call(this,o===Ke?p(this,L).selectionEnd:p(this,L).selectionStart,o,i)}else p(this,L).updateSelection(r,Ke),p(this,L).updateSelection(s,dt);else{const o=t===U,c=tn(p(this,L).timezone);if(o||b(this,Rt,!1),r<=p(this,L).selectionStart){const u=new Date(Zt(c,p(this,L).selectionStart)),l=Math.min(Ft(c,u.setDate(u.getDate()+1)-1),p(this,L).timeslice.to);r===p(this,L).selectionStart&&s<=l&&p(this,L).updateSelection(s,dt),p(this,L).updateSelection(r,Ke)}else{const u=new Date(Zt(c,p(this,L).selectionEnd)),l=Math.max(Ft(c,u.setHours(0,0,0,0)),p(this,L).timeslice.from);r<=p(this,L).selectionEnd&&r>=l&&p(this,L).updateSelection(r,Ke),p(this,L).updateSelection(s,dt)}if(o)return}b(this,St,p(this,L).selectionStart),b(this,ht,p(this,L).selectionEnd)},ta=function(){var t;(t=p(this,L))==null||t.clearSelection(),b(this,Rt,!1),b(this,St,b(this,ht,void 0))},lo=function(t,n,r){var f;if(!p(this,L))return;const s=tn((f=p(this,L))==null?void 0:f.timezone),i=new Date(Zt(s,t)),o=n===Ke?-1:1,[c=0,u=0,l=0,h=0,d=0,m=0]=r??[];i.setFullYear(i.getFullYear()+c*o,i.getMonth()+u*o,i.getDate()+l*o),i.setHours(i.getHours()+h*o,i.getMinutes()+d*o,i.getSeconds()+m*o),p(this,L).updateSelection(Ft(s,i.getTime()-o),n)},na=function(){var t,n;p(this,St)&&((t=p(this,L))==null||t.updateSelection(p(this,St),Ke)),p(this,ht)&&((n=p(this,L))==null||n.updateSelection(p(this,ht),dt)),b(this,Rt,!1)},ra=function(){p(this,L)&&(p(this,L).timeslice=p(this,Ae).timeslice,p(this,L).dynamicBlockHeight=!p(this,Ae).fixedBlockHeight,p(this,L).firstWeekDay=p(this,Ae).firstWeekDay,p(this,L).locale=p(this,Ae).locale,p(this,L).size=p(this,Ae).blocks,p(this,L).timezone=p(this,Ae).timezone,p(this,L).trackCurrentDay=p(this,Ae).trackCurrentDay,b(this,Ps,vo(p(this,L).timezone)),H(this,X,na).call(this))},sa=function(){var t,n,r,s,i,o;switch(p(this,Ye)){case Sn:!Bt((t=p(this,L))==null?void 0:t.blankSelection)&&p(this,ct)&&H(this,X,lo).call(this,(n=p(this,L))==null?void 0:n.selectionStart,dt,p(this,ct));break;case ir:if(!Bt((r=p(this,L))==null?void 0:r.blankSelection)){const c=tn((s=p(this,L))==null?void 0:s.timezone),u=new Date(Zt(c,(i=p(this,L))==null?void 0:i.selectionStart));(o=p(this,L))==null||o.updateSelection(Ft(c,u.setHours(23,59,59,999)),dt)}break;case or:default:H(this,X,ta).call(this);return}},oa=function(){var t,n;switch((t=p(this,dn))==null?void 0:t.snapshot.controls){case cc:b(this,mt,p(ye,xo));break;case lc:b(this,mt,p(ye,Bo));break;case uc:default:b(this,mt,void 0)}p(this,un).length=0,p(this,un).length=((n=p(this,mt))==null?void 0:n.length)??0},w(ye,yt),w(ye,wo,/^(?:0|[1-9]\d*)(\s+(?:0|[1-9]\d*)?){0,5}?$/),w(ye,Po,["click","mouseover","pointerover"]),w(ye,Mo,Qt(0,te)),w(ye,Fo,[V.ENTER,V.SPACE]),w(ye,xo,Object.keys(Ki).filter(t=>isNaN(+t))),w(ye,Bo,["PREV","NEXT"]),w(ye,$o,function(t){var o,c;if(Yn(t))return;let n=!1,r=!1,s=!1;const i=(o=p(this,ct))==null?void 0:o.join(" ");for(const u of Object.keys(t))t[u]!==((c=p(this,wr))==null?void 0:c[u])&&(u==="controls"?n=!0:u==="highlight"?r=!0:(u==="from"||u==="to")&&(s=!0));p(this,kr)!==i&&(b(this,kr,i),r=!0),b(this,wr,t),p(this,Rt)&&!s&&H(this,X,na).call(this),n&&H(this,X,oa).call(this),r&&H(this,X,sa).call(this)}),ye);const Dt=Object.defineProperties(t=>{const{grid:n,kill:r}=new Wy;return Ur(t)?n.config({blocks:t}):Q(t)?Pr.then(()=>{n.config.watch=t}):n.config(t),J({grid:G(n),kill:G(r)})},{controls:{value:J({ALL:{value:cc},MINIMAL:{value:lc},NONE:{value:uc}})},highlight:{value:J({ONE:{value:ir},MANY:{value:Sn},NONE:{value:or}})},slice:{value:Object.defineProperties(f0.bind(null),{FROM:{value:dc},TO:{value:hc},UNBOUNDED:{value:os},SINCE_NOW:{get:Fy},UNTIL_NOW:{get:xy}})}}),Hy=({config:e,grid:{controls:t},renderer:n})=>e.controls===Dt.controls.NONE||!Q(n)?null:a(K,{children:t.map(([r,s])=>n(r,s))}),Gy=Ie(Hy),Yy=e=>{const t=S((n,r)=>{r instanceof Element&&r.setAttribute("tabindex","-1"),n instanceof Element&&(n.setAttribute("tabindex","0"),Pr.then(()=>n==null?void 0:n.focus()))},[]);return sn(S((n,r)=>{try{e==null||e(n,r)}finally{t(n,r)}},[e]))},jy=({blocks:e,controls:t,dynamicBlockRows:n,firstWeekDay:r,highlight:s,locale:i,onHighlight:o,originDate:c,renderControl:u,sinceDate:l,timezone:h,trackCurrentDay:d,untilDate:m,useYearView:f},y)=>{const{i18n:_}=W(),[T,g]=x(performance.now()),E=A(()=>Dt.slice(l,m),[l,m]),v=Y(U),N=A(()=>t??(Q(u)?Dt.controls.MINIMAL:Dt.controls.NONE),[t,u]),D=A(()=>s??(Q(o)?Dt.highlight.ONE:Dt.highlight.NONE),[s,o]),{grid:C,kill:O}=A(()=>{const{grid:P,kill:z}=Dt(function(){g(performance.now()),v.current=this,!(j===P.highlight.from&&ie===P.highlight.to)&&(j=P.highlight.from,ie=P.highlight.to,o==null||o(j,ie))});let{from:j,to:ie}=P.highlight;return P.config.cursorIndex=q=>{let ce=q.target;for(;ce&&ce!==q.currentTarget;){const Te=Number(ce.dataset.cursorPosition);if(Number.isFinite(Te))return Te;ce=ce.parentNode}},P.config.shiftFactor=function(q){if(this.controls===Dt.controls.MINIMAL)return q!=null&&q.shiftKey?12:q!=null&&q.altKey?this.blocks:1},{grid:P,kill:z}},[]),R=A(()=>{const P=z=>{C.cursor(z)};return{onClickCapture:P,onMouseOverCapture:P,onPointerOverCapture:P,onKeyDownCapture:z=>{C.cursor(z)&&z.preventDefault()}}},[C]),F=Yy(S((P,z)=>{z instanceof Element&&z.removeAttribute("aria-selected"),P instanceof Element&&P.setAttribute("aria-selected","true")},[]));return M1(y,()=>{const{from:P,to:z}=(C==null?void 0:C.highlight)||U;return{clear:()=>{C!=null&&C.highlight&&(C.highlight.from=void 0)},get config(){return{...v.current??U}},get from(){return El(P)},set from(j){C!=null&&C.highlight&&j&&(C.highlight.from=j.getTime())},get to(){return El(z)},set to(j){C!=null&&C.highlight&&j&&(C.highlight.to=j.getTime())}}},[C,T]),$(()=>{C.config({blocks:e,controls:N,firstWeekDay:r,fixedBlockHeight:!n,highlight:D,locale:i??_.locale,minified:f,timeslice:E,timezone:h,trackCurrentDay:d})},[N,D,e,n,r,C,_,i,E,h,d,f]),$(()=>{const P=[].concat(c).slice(0,2).map(Number).filter(Boolean);return P[0]&&(C.highlight.from=+P[0]),P[1]&&(C.highlight.to=+P[1]),O},[]),{cursorElementRef:F,cursorRootProps:R,grid:C}},zy=Yr((e,t)=>{const n=jy(e,t),r=n.grid.config();return a("div",{role:"none",children:[a(Gy,{config:r,grid:n.grid,renderer:e.renderControl}),a(ky,{ref:n.cursorElementRef,config:r,cursorRootProps:n.cursorRootProps,grid:n.grid,onlyCellsWithin:e.onlyCellsWithin,prepare:e.prepare})]})}),qy=Ie(zy),Ky=(e,t)=>{const[n,r]=x(),s=sn(A(()=>{const i=o=>(...c)=>{const u=e(o,...c);return u&&Zu(u,o)};return r(void 0),o=>r(o instanceof Element?()=>i(o):void 0)},[e,t]),t);return[n,s]},Vy=e=>{const{i18n:t}=W();return Ky(S((n,r,s)=>{if(!(n instanceof HTMLElement))return null;if(Q(e))return e(r,s);let i,o,c;switch(r){case"PREV":i="prev",o="previous",c=Ea;break;case"NEXT":i=o="next",c=Xo;break;default:return null}const u=s();return u?a(he,{"aria-label":t.get(`calendar.${o}Month`),variant:se.TERTIARY,disabled:!u,classNameModifiers:["circle",i],iconButton:!0,onClick:s,children:a(c,{role:"presentation"})},r):null},[t,e]))},Zy=Yr((e,t)=>{const{i18n:n}=W(),[r,s]=Vy(e.renderControl),[i,o]=x(performance.now()),c=A(()=>Bt(e.showTimezoneInfo),[e.showTimezoneInfo]),{clockTime:u,GMTOffset:l}=Q3({timezone:e.timezone,withClock:c}),h=A(()=>M([{"adyen-pe-datepicker--with-timezone":c},"adyen-pe-datepicker"]),[c]),d=A(()=>c?{values:{offset:l,time:u}}:U,[l,u,c]),m=sn(te,t),f=S(()=>{var y,_,T,g,E;o(performance.now()),(y=m.current)!=null&&y.from&&((_=m.current)!=null&&_.to)&&((E=e.onHighlight)==null||E.call(e,+((T=m.current)==null?void 0:T.from),+((g=m.current)==null?void 0:g.to)))},[o,e.onHighlight]);return a("div",{className:h,children:[a("div",{className:"adyen-pe-datepicker__selector-container",children:a(Cy,{now:e.now,calendarRef:m,onTimeRangeSelected:e.onPresetOptionSelected,options:e.timeRangePresetOptions,selectedOption:e.selectedPresetOption,timestamp:i,timezone:e.timezone})}),a("div",{ref:s,role:"group",className:"adyen-pe-datepicker__controls","aria-label":n.get("calendar.controls")}),a(qy,{...e,ref:m,firstWeekDay:ic,dynamicBlockRows:!0,onlyCellsWithin:!0,controls:e.controls??Dt.controls.MINIMAL,highlight:e.highlight??Dt.highlight.MANY,onHighlight:f,renderControl:r,trackCurrentDay:!0}),c&&a("div",{className:"adyen-pe-datepicker__timezone",children:n.get("calendar.timezone",d)})]})}),Xy="adyen-pe-filter-button";function Qy(e,t){const{className:n,classNameModifiers:r=[],children:s,disabled:i,onClick:o,...c}=e,u=A(()=>Fn("",n)||"",[n]),l=A(()=>Vo(i),[i]),{classes:h,click:d}=Zo(u,r,Xy,l,e,o);return a("button",{className:h,ref:t,onClick:d,...c,children:a(k,{el:ne.DIV,variant:I.BODY,stronger:!0,children:s})})}const Jy=Xe(Qy),eg=Yr(function(t,n){return a(Ro,{classNameModifiers:t.classNameModifiers,...t,ref:n,"aria-required":t.required,type:"text"})}),tg=e=>!e||Ii(e),ng=(()=>{const e=t=>{const{editAction:n,name:r,onChange:s,onValueUpdated:i}=t,[o,c]=x(t.value),u=S(l=>{const h=l.target.value.trim();c(h),i(h)},[i]);return $(()=>{if(n===je.CLEAR){const l="";c(l),i(l),s(l)}n===je.APPLY&&s(o??"")},[o,n,s,i]),a(eg,{name:r,value:o,onInput:u})};return t=>a(e,{...t})})(),rg=({render:e,...t})=>{var z;const n=be(Oe.down.xs),[r,s]=wt(!1),[i,o]=wt(!1),c=A(()=>t.isValueEmpty??tg,[t.isValueEmpty]),[u,l]=wt(c(t.value)),[h,d]=wt(!1),[m,f]=wt(!1),[y,_]=wt(c(t.value)),T=No(),g=A(()=>e??ng,[e]),E=S(j=>{const ie=c(j??void 0);l(ie),_(mo(j)),f(h?j!==t.value:!ie)},[c,l,_,f,h,t.value]),{commitAction:v,commitActionButtons:N,committing:D,resetCommitAction:C}=Nd({applyDisabled:y||!m,resetDisabled:u}),[O,R]=A(()=>{const j=ie=>()=>{ie!==r&&(ie&&(C(),f(!1),d(!1)),s(ie),o(ie))};return[j(!1),j(!0)]},[s,r,C,o,d,f]);$(()=>{if(i){const j=c(t.value);o(!1),l(j),d(!j)}},[t.value,i,c,o,l,d]),$(()=>{D&&O(),l(u)},[D,O,l,u]);const F=be(Oe.only.sm),P=be(Oe.only.md);return a(K,{children:[a("div",{className:`adyen-pe-filter adyen-pe-filter--${t.type}`,children:A(()=>a(Jy,{classNameModifiers:[...t.appliedFilterAmount?["with-counter"]:[],...t.classNameModifiers??[],...r?["active"]:[],...u?[]:["has-selection"]],onClick:r?O:R,tabIndex:0,ref:T,children:a("div",{className:"adyen-pe-filter-button__default-container",children:[a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,className:"adyen-pe-filter-button__label",children:t.label}),!!t.appliedFilterAmount&&a("div",{className:"adyen-pe-filter-button__counter-wrapper",children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,className:"adyen-pe-filter-button__counter",children:t.appliedFilterAmount})})]})}),[t.appliedFilterAmount,t.classNameModifiers,t.label,r,u,O,R,T])}),r&&a($a,{actions:N,title:(z=t.title)==null?void 0:z.trim(),variant:qe.POPOVER,modifiers:["filter"],open:r,"aria-label":`${t.label}`,dismiss:O,dismissible:!1,withContentPadding:t.withContentPadding??!0,divider:!0,targetElement:T,disableFocusTrap:!1,position:ge.BOTTOM,containerSize:t.containerSize,showOverlay:n,fitPosition:F||P,children:g({...t,editAction:v,onValueUpdated:E})})]})},v0=Ie(rg);var _s=(e=>(e.FROM="from",e.TO="to",e))(_s||{});const sg={month:"short",day:"numeric",year:"numeric"},O0=(e,t,n,r)=>{const s=n&&t(n),i=r&&t(r);if(s&&i)return`${s} - ${i}`;if(s)return e.get("filter.date.since",{values:{date:s}});if(i)return e.get("filter.date.until",{values:{date:i}})},Pt=e=>{try{return new Date(e||"").toISOString()}catch{return""}},og=(()=>{const e=({editAction:t,from:n,to:r,now:s,onChange:i,onValueUpdated:o,showTimezoneInfo:c,selectedPresetOption:u,timeRangePresetOptions:l,timezone:h,sinceDate:d,untilDate:m})=>{const{i18n:f}=W(),{fullDateFormat:y}=rn(h),[_,T]=x(u),g=A(()=>[new Date(n),new Date(r)],[n,r]),E=Y(),v=S((N,D)=>{o(O0(f,y,Pt(N),Pt(D)))},[f,y,o]);return $(()=>{var N,D,C;switch(t){case je.APPLY:i({selectedPresetOption:_,[_s.FROM]:Pt((N=E.current)==null?void 0:N.from),[_s.TO]:Pt((D=E.current)==null?void 0:D.to)});break;case je.CLEAR:(C=E.current)==null||C.clear(),i()}},[t,i,_]),a(Zy,{ref:E,now:s,originDate:g,onHighlight:v,onPresetOptionSelected:T,selectedPresetOption:u,timeRangePresetOptions:l,timezone:h,showTimezoneInfo:c,sinceDate:Pt(d),untilDate:Pt(m)})};return t=>a(e,{...t})})(),ig=(e,t,n)=>e.formatRange(t,n);function ag({title:e,from:t,to:n,selectedPresetOption:r,...s}){const{i18n:i}=W(),{fullDateFormat:o}=rn(s.timezone),[c,u]=x(),[l,h]=x(),[d,m]=x(),f=S(g=>{const{from:E,to:v,selectedPresetOption:N}=g??U;try{u(c??N),h(Pt(l??E)),m(Pt(d??v))}finally{s.onChange({from:E,to:v,selectedPresetOption:N})}},[c,l,d,s]),y=A(()=>i.get("rangePreset.custom"),[i]),_=A(()=>{const g={...sg,timeZone:s.timezone};let E=new Intl.DateTimeFormat(jo,g);try{E=new Intl.DateTimeFormat(i.locale,g)}catch{}return E},[i,s.timezone]);$(()=>u(r),[r]),$(()=>h(Pt(t||Date.now())),[t]),$(()=>m(Pt(n||Date.now())),[n]);const T=A(()=>r===y&&l&&d?ig(_,new Date(l),new Date(d)):r??s.label,[y,_,l,d,r,s.label]);return a(v0,{...s,from:t,to:n,type:"date",label:T,onChange:f,render:og,selectedPresetOption:r,value:O0(i,o,t,n),withContentPadding:!1})}const fc=({timezone:e,canResetFilters:t,defaultParams:n,filters:r,nowTimestamp:s,refreshNowTimestamp:i,sinceDate:o,untilDate:c,updateFilters:u})=>{const{i18n:l}=W(),h=A(()=>l.get(n.current.defaultTimeRange),[l]),[d,m]=x(h),f=S((y=U)=>{for(const[_,T]of Object.entries(y)){switch(_){case"selectedPresetOption":m(T||h);break;case _s.FROM:u({[ee.CREATED_SINCE]:T||n.current.defaultFilterParams[ee.CREATED_SINCE]});break;case _s.TO:u({[ee.CREATED_UNTIL]:T||n.current.defaultFilterParams[ee.CREATED_UNTIL]});break;default:return}i()}},[h,i,u]);return A(()=>!t&&m(h),[t,h]),a(ag,{label:l.get("dateRange"),name:ee.CREATED_SINCE,sinceDate:o,untilDate:c??new Date(s).toString(),from:r[ee.CREATED_SINCE],to:r[ee.CREATED_UNTIL],selectedPresetOption:d,timeRangePresetOptions:n.current.timeRangeOptions,timezone:e,onChange:f,showTimezoneInfo:!0,now:s})};function cg(e){return"callback"in e}function b0(e){const[t,n]=x(null),r=S(o=>{var c;return o&&cg(e[o.selection.type])?{callback:(c=e==null?void 0:e[o.selection.type])!=null&&c.callback?u=>{var l,h;return(h=(l=e[o.selection.type])==null?void 0:l.callback)==null?void 0:h.call(l,{showModal:()=>n(o),...u})}:()=>{var u;return((u=e[o.selection.type])==null?void 0:u.showDetails)&&n(o)}}:(n(o),{})},[e]),s=S(()=>n(null),[]),i=A(()=>{const o={};for(const c in e){const u=e[c];o[c]=!(u!=null&&u.showDetails)||!!u.callback}return o},[e]);return{selectedDetail:t,updateDetails:r,detailsToShow:i,resetDetails:s}}const wl=Ie(({placeholder:e,selection:t,selectionOptions:n,updateSelection:r})=>{const s=be(Oe.down.xs),i=be(Oe.only.sm),o=be(Oe.only.md);return n&&n.length>1?a(Ys,{onChange:r,filterable:!1,multiSelect:!0,placeholder:e,selected:t,withoutCollapseIndicator:!0,items:n,showOverlay:s,fitPosition:o||i}):null}),lg=e=>Object.freeze(e.map(t=>({id:t,name:t}))),Ti=({filterParam:e,filterValues:t,filters:n,defaultFilters:r,updateFilters:s})=>{const i=A(()=>Vr((n==null?void 0:n[e])??(r==null?void 0:r[e])??""),[r,n,e]),o=A(()=>t&&lg(t),[t]),c=S(({target:u})=>{s==null||s({[e]:(u==null?void 0:u.value)||""})},[s,e]);return{selection:i,selectionOptions:o,updateSelection:c}},ug=[ee.CURRENCIES,ee.CATEGORIES,ee.STATUSES],uo=Object.freeze(Object.fromEntries(ug.map(e=>[e,""]))),dg=["ATM","Capital","Chargeback","Correction","Fee","Payment","Refund","Transfer","Other"],hg=["Booked","Pending","Reversed"],fg=e=>{const t=Ey(),n="rangePreset.last30Days",{from:r,to:s}=t[n];return{defaultFilterParams:{...e==="transactions"&&{...uo,[ee.MIN_AMOUNT]:void 0,[ee.MAX_AMOUNT]:void 0},[ee.BALANCE_ACCOUNT]:void 0,[ee.CREATED_SINCE]:new Date(r).toISOString(),[ee.CREATED_UNTIL]:new Date(s).toISOString()},defaultTimeRange:n,timeRangeOptions:t}},mc=(e,t)=>{const[n,r]=x(Date.now()),s=fg(e),i=Y(s),o=S(()=>r(Date.now()),[r]);return $(()=>{o()},[t,o]),{defaultParams:i,nowTimestamp:n,refreshNowTimestamp:o}},mg="adyen-pe-data-overview-header",pg=({baseClassName:e=mg,children:t,hideTitle:n,titleKey:r,descriptionKey:s})=>{const{i18n:i}=W();return a("header",{className:e,children:[a("div",{className:`${e}__headings`,children:[!n&&r&&a("div",{className:`${e}__title`,children:a(k,{el:ne.SPAN,variant:I.TITLE,medium:!0,children:i.get(r)})}),s&&a("p",{className:`${e}__description`,children:a(k,{el:ne.SPAN,variant:I.BODY,children:i.get(s)})})]}),t&&a("div",{className:`${e}__controls`,children:t})]})},_g={base:"adyen-pe-modal-content"};function yg({type:e,data:t,dataCustomization:n,...r}){const s=A(()=>{switch(e){case"payout":return{...t,type:e,...r};case"transaction":return{id:t,type:e,...r};default:return{data:t,type:e}}},[t,e]);return a(K,{children:s&&a("div",{className:_g.base,children:a(Ka,{...s,dataCustomization:n})})})}const I0=({children:e,className:t,selectedDetail:n,resetDetails:r,dataCustomization:s})=>{const{i18n:i}=W(),o=!!n;return $(()=>{o&&Qr.closeAll()},[o]),a("div",{className:t,children:[e,n&&a(S3,{title:n!=null&&n.title?i.get(n.title):void 0,isOpen:!!n,"aria-label":i.get("payoutDetails"),onClose:r,isDismissible:!0,headerWithBorder:!1,size:(n==null?void 0:n.modalSize)??"large",children:n&&a(yg,{dataCustomization:{details:s},...n==null?void 0:n.selection})})]})},pc=({records:e,hasCustomColumn:t=!1,onDataRetrieve:n,mergeCustomData:r})=>{const[s,i]=x(e),[o,c]=x(!1),u=S(async()=>{try{if(t&&Q(n)){const l=await n(e);if(Array.isArray(l))i(r({records:e,retrievedData:(l==null?void 0:l.filter(Boolean))||[]}));else throw new Error("Retrieved data should be an array")}else i(e)}catch(l){i(e),console.error(l)}finally{c(!1)}},[t,n,r,e]);return $(()=>{e.length&&(c(!0),u())},[u,e]),{customRecords:s,loadingCustomRecords:o}},_c=(e,t=de)=>{var n;if(Array.isArray(e))for(const r of e)try{const s=typeof r=="object"?(n=r==null?void 0:r.key)==null?void 0:n.trim():!1;if(typeof s=="string"&&s&&!t.includes(s))return!0}catch{}return!1},yc=(e,t,n)=>{const r=[];for(let s=0;s<e.length;s++){const i=e[s],o=t.find(c=>n(c,i,s));r[s]={...o??U,...i}}return r},gg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var Qe,Tt,Ge,Wt;const{getPayouts:h}=Se().endpoints,{activeBalanceAccount:d,balanceAccountSelectionOptions:m,onBalanceAccountSelection:f}=oc(t),{defaultParams:y,nowTimestamp:_,refreshNowTimestamp:T}=mc("payouts",d),g=S(async(Be,An)=>h({signal:An,errorLevel:"error"},{query:{...Be,createdSince:Be[ee.CREATED_SINCE]??y.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:Be[ee.CREATED_UNTIL]??y.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(d==null?void 0:d.id)??""}}),[d==null?void 0:d.id,y,h]),E=Za(),v=A(()=>Q(e)?e:void 0,[e]),N=A(()=>n?tc:void 0,[n]),{canResetFilters:D,error:C,fetching:O,filters:R,limit:F,limitOptions:P,records:z,resetFilters:j,updateFilters:ie,updateLimit:q,...ce}=sc({fetchRecords:g,dataField:"data",filterParams:y.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:v,preferredLimit:r,preferredLimitOptions:N,enabled:!!(d!=null&&d.id)&&!!h});$(()=>{T()},[R,T]);const Te=A(()=>({showDetails:i??!0,callback:s}),[i,s]),me=S(({records:Be,retrievedData:An})=>yc(Be,An,(qn,Kn)=>qn.createdAt===Kn.createdAt),[]),_e=A(()=>{var Be;return _c((Be=l==null?void 0:l.list)==null?void 0:Be.fields,qa)},[(Qe=l==null?void 0:l.list)==null?void 0:Qe.fields]),{customRecords:De,loadingCustomRecords:pe}=pc({records:z,hasCustomColumn:_e,onDataRetrieve:(Tt=l==null?void 0:l.list)==null?void 0:Tt.onDataRetrieve,mergeCustomData:me}),ke=A(()=>({payout:Te}),[Te]),{updateDetails:fe,resetDetails:Ue,selectedDetail:oe}=b0(ke),ze=S(Be=>{fe({selection:{type:"payout",data:{id:d==null?void 0:d.id,balanceAccountDescription:(d==null?void 0:d.description)||"",date:Be.createdAt}},modalSize:"small"}).callback({balanceAccountId:(d==null?void 0:d.id)||"",date:Be.createdAt})},[fe,d==null?void 0:d.id,d==null?void 0:d.description]);return a("div",{className:L3,children:[a(pg,{hideTitle:u,titleKey:"payoutsTitle",descriptionKey:"payoutsNotice",children:a(Xa,{...E})}),a(Qa,{...E,children:[a(ec,{activeBalanceAccount:d,balanceAccountSelectionOptions:m,onBalanceAccountSelection:f}),a(fc,{canResetFilters:D,defaultParams:y,filters:R,nowTimestamp:_,refreshNowTimestamp:T,sinceDate:P3,timezone:"UTC",updateFilters:ie})]}),a(I0,{className:w3,onContactSupport:c,selectedDetail:oe,resetDetails:Ue,dataCustomization:l==null?void 0:l.details,children:a(I3,{loading:O||o||!t||pe,data:(Ge=l==null?void 0:l.list)!=null&&Ge.onDataRetrieve?De:z,showPagination:!0,onRowClick:ze,showDetails:i,limit:F,limitOptions:P,onContactSupport:c,onLimitSelection:q,error:C,customColumns:(Wt=l==null?void 0:l.list)==null?void 0:Wt.fields,...ce})})]})},Tg="adyen-pe-payouts-overview-container";function Ag({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:Tg,errorMessage:"weCouldNotLoadThePayoutsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(gg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class D0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ag,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(D0,"type","payouts");class k0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ka,{...this.props,type:"transaction",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(k0,"type","transactionDetails");const Eg={base:"adyen-pe-divider"},Ng=({className:e})=>a("hr",{className:M(Eg.base,e)}),Cg="adyen-pe-header",si=({baseClassName:e=Cg,children:t,hasDivider:n,hideTitle:r,titleKey:s,subtitleKey:i,subtitleConfig:o})=>{const{i18n:c}=W();return a("header",{className:e,children:[a("div",{className:`${e}__headings`,children:[!r&&s&&a("div",{className:`${e}__title`,children:a(k,{el:ne.SPAN,variant:I.TITLE,medium:!0,children:c.get(s)})}),i&&a("div",{className:M(`${e}__subtitle`,o==null?void 0:o.classNames),children:a(k,{el:(o==null?void 0:o.typographyEl)??ne.SPAN,variant:(o==null?void 0:o.variant)??I.BODY,children:c.get(i)})}),n&&a(Ng,{className:`${e}__divider`})]}),t&&a("div",{className:`${e}__controls`,children:t})]})},Sg="adyen-pe-transaction-totals",Pl="adyen-pe-transaction-totals__item",Rg="adyen-pe-base-button";function vg(e,t){const n=A(()=>Fn("",e.className)||"",[e.className]),r=A(()=>Vo(e.disabled||!1),[e.disabled]),{click:s,allProps:i}=Zo(n,[...e.classNameModifiers||[],...e.fullWidth?["full-width"]:[]],Rg,r,e,e.onClick);return a("button",{type:e.type||"button",onClick:s,ref:t,...i,children:e.children})}const Ml=Xe(vg),L0="adyen-pe-expandable-card",oi=L0,_n=oi+"__container",ho=oi+"__content",Fl=oi+"__chevron",xl=_n+"--button",Ai=_n+"--filled",Og=_n+"--hidden",bg=_n+"--in-flow",w0=_n+"--overlay",Bl=ho+"--expandable",$l=`--${L0}-height`,Ei=w0,gc=({renderHeader:e,children:t,filled:n,fullWidth:r,inFlow:s,...i})=>{const{i18n:o}=W(),[c,u]=x(!1),[l,h]=x(0),d=A(()=>s===!0,[s]),m=S(()=>u(E=>!E),[u]),f=Y(null),y=Y(null),_=Y(!1),T=Y(c),g=Ma(void 0,S(()=>{c&&(m(),_.current=!0)},[c,m]));return us(()=>{const E=y.current;E&&(d?E.style.setProperty($l,`${l}px`):c||E.style.removeProperty($l))},[l,d,c]),$(()=>{if(!d)return void h(0);const E=f.current;if(!E)return;const v=new ResizeObserver(N=>{for(const D of N)D.target===E&&h(E.offsetHeight||0)});return v.observe(E),()=>{v.unobserve(E),v.disconnect()}},[d]),$(()=>{var E,v;c?(E=g.current)==null||E.focus():(T.current!==c&&!_.current&&((v=f.current)==null||v.focus()),_.current=!1),T.current=c},[c,g]),a("div",{ref:y,className:oi,children:t?a(K,{children:[a(Ml,{className:M(_n,xl,{[Ai]:n}),disabled:c,fullWidth:r,"aria-controls":Ei,"aria-expanded":c,"aria-hidden":c,onClick:m,ref:f,"data-testid":"expand-button",...i,children:[a("span",{className:"adyen-pe-visually-hidden",children:o.get("expandableCard.expand")}),a("div",{className:M(ho,Bl),children:e}),a("div",{className:Fl,children:a(Xo,{role:"presentation"})})]}),a(Ml,{id:Ei,className:M(_n,xl,w0,{[Ai]:n,[Og]:!c,[bg]:d}),disabled:!c,fullWidth:r,"aria-controls":Ei,"aria-expanded":c,"aria-hidden":!c,onClick:m,ref:g,"data-testid":"collapse-button",...i,children:[a("span",{className:"adyen-pe-visually-hidden",children:o.get("expandableCard.collapse")}),a("div",{className:M(ho,Bl),children:[e,a("div",{children:t})]}),a("div",{className:Fl,children:a(Ea,{role:"presentation"})})]})]}):a("div",{className:M(_n,{[Ai]:n}),...i,children:a("div",{className:ho,children:e})})})},Tc="adyen-pe-amount-skeleton",Ig=Tc+"--has-margin",Dg=Tc+"--loading",kg=({hasMargin:e=!1,isLoading:t=!1,width:n})=>a("span",{className:M(Tc,{[Dg]:t,[Ig]:e}),style:{width:n}}),Un="adyen-pe-summary-item",P0=Un+"__label-container",Lg=P0+"--loading",wg=Un+"--body",M0=Un+"__label",Pg=Un+"__placeholder",Mg=Un+"__amount",Ul=Xe(({config:e,i18n:t,isSkeletonVisible:n,className:r,...s},i)=>a("span",{className:M(P0,r,{[Lg]:n}),style:{cursor:"default"},ref:i,...s,children:e.labelKey&&a(k,{variant:I.CAPTION,className:M0,children:t.get(e.labelKey)})})),F0=({columnConfigs:e,isHeader:t=!1,isHovered:n=!1,isSkeletonVisible:r=!1,isLoading:s=!1,widths:i,onWidthsSet:o,isEmpty:c})=>{const{i18n:u}=W();$(()=>{const m=e.map(f=>{var y,_;return((_=(y=f.ref)==null?void 0:y.current)==null?void 0:_.getBoundingClientRect().width)??0});o(m)},[o]);const l=m=>({width:i&&i[m]?i[m]:"auto"}),h=be(Oe.only.xs),d=S((m,f)=>m.valueHasLabelStyle?I.CAPTION:f&&!h?I.BODY:I.TITLE,[h]);return a("div",{className:M(Un,{[wg]:!t}),children:e.map((m,f)=>{const y=m.getValue(),_=!!y&&y.length>12;return a("div",{children:[t&&(m.tooltipLabel?a(gn,{content:u.get(`${m.tooltipLabel}`),isContainerHovered:n,children:a(Ul,{config:m,i18n:u,isSkeletonVisible:r})}):a(Ul,{config:m,i18n:u,isSkeletonVisible:r})),r?a(kg,{isLoading:s,hasMargin:m.hasSkeletonMargin,width:m.skeletonWidth+"px"}):c?a("span",{className:M([Un,Pg])}):a("div",{ref:m.ref,style:l(f),children:a(k,{variant:d(m,_),className:M({[M0]:m.valueHasLabelStyle,[Mg]:!m.valueHasLabelStyle}),children:y})})]},f)})})},Wl=({total:e,hiddenField:t,isHeader:n=!1,isHovered:r=!1,isSkeleton:s=!1,isLoading:i=!1,widths:o,onWidthsSet:c})=>{const{i18n:u}=W(),l=Y(null),h=Y(null),d=Y(null),m=A(()=>{const f={labelKey:"totalIncoming",ref:l,skeletonWidth:80,getValue:()=>e&&u.amount(e.incomings,e.currency),tooltipLabel:"tooltip.totalIncoming"},y={labelKey:"totalOutgoing",ref:h,skeletonWidth:80,getValue:()=>e&&u.amount(e.expenses,e.currency),tooltipLabel:"tooltip.totalOutgoing"};return[...t!=="incomings"?[f]:[],...t!=="expenses"?[y]:[],{ref:d,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}]},[e,t,u]);return a(F0,{isHovered:r,isEmpty:!e,columnConfigs:m,isHeader:n,isSkeletonVisible:s,isLoading:i,widths:o,onWidthsSet:c})},Fg="adyen-pe-base-list",Ac=({children:e,classNames:t})=>a("ul",{className:M(Fg,[t]),children:e}),x0=()=>{const[e,t]=x([]),n=S(r=>{t(s=>r.every(i=>!i)?r:r.map((i,o)=>{const c=s[o];return!c||i>c?i:c}))},[]);return[e,n]},Ni=Ie(({totals:e,isLoading:t,hiddenField:n,fullWidth:r})=>{const[s,i]=x0(),[o,c]=x(!1),[u,...l]=A(()=>e.map(h=>(h.key=`${h.currency}-${Math.random()}`,h)),[e]);return a(gc,{renderHeader:a(Wl,{isHovered:o,total:u,hiddenField:n,widths:s,isHeader:!0,isSkeleton:t,isLoading:t,onWidthsSet:i}),fullWidth:r,onMouseEnter:()=>c(!0),onFocus:()=>c(!0),onMouseLeave:()=>c(!1),onBlur:()=>c(!1),children:!t&&l.length&&a(Ac,{children:l.map(h=>a("li",{children:a(Wl,{isHovered:o,total:h,hiddenField:n,widths:s,onWidthsSet:i})},h.key))})})}),xg=Ie(({availableCurrencies:e,isAvailableCurrenciesFetching:t,balanceAccountId:n,createdSince:r,createdUntil:s,categories:i,statuses:o,maxAmount:c,minAmount:u,currencies:l,fullWidth:h})=>{const{getTransactionTotals:d}=Se().endpoints,m=S(async()=>d==null?void 0:d(U,{query:{createdSince:r,createdUntil:s,categories:i,statuses:o,maxAmount:c,minAmount:u,currencies:l,balanceAccountId:n}}),[n,i,r,s,l,d,c,u,o]),{data:f,isFetching:y}=Ot({fetchOptions:A(()=>({enabled:!!n&&!!d}),[n,d]),queryFn:m}),_=!n||y||t,g=S(()=>{if(!e||!f)return f==null?void 0:f.data;const v=e.map(N=>f.data.find(C=>C.currency===N)||{currency:N,incomings:0,expenses:0});return v.concat(f.data.filter(N=>!v.includes(N)))},[e,f])()??[],E=be(Oe.only.xs);return a("div",{className:Sg,children:E?a(K,{children:[a("div",{className:Pl,children:a(Ni,{totals:g,isLoading:_,hiddenField:"expenses",fullWidth:h})}),a("div",{className:Pl,children:a(Ni,{totals:g,isLoading:_,hiddenField:"incomings",fullWidth:h})})]}):a(Ni,{totals:g,isLoading:_,fullWidth:h})})}),Bg="adyen-pe-balances",Hl=({balance:e,isHeader:t=!1,isSkeleton:n=!1,isLoading:r=!1,widths:s,onWidthsSet:i,isEmpty:o})=>{const{i18n:c}=W(),u=Y(null),l=Y(null),h=A(()=>[{labelKey:"accountBalance",ref:u,skeletonWidth:80,getValue:()=>e&&c.amount(e.value,e.currency)},{ref:l,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}],[e,u,c]);return a(F0,{isEmpty:o,columnConfigs:h,isHeader:t,isSkeletonVisible:n,isLoading:r,widths:s,onWidthsSet:i})},$g=Ie(({balanceAccountId:e,defaultCurrencyCode:t,onCurrenciesChange:n,fullWidth:r})=>{const{getBalances:s}=Se().endpoints,i=S(async()=>s==null?void 0:s(U,{path:{balanceAccountId:e}}),[e,s]),{data:o,error:c,isFetching:u}=Ot({fetchOptions:A(()=>({enabled:!!e&&!!s}),[e,s]),queryFn:i}),l=!e||u,h=!!c||!(o!=null&&o.data.length),d=A(()=>(o==null?void 0:o.data)&&[...o.data].sort(({currency:T},{currency:g})=>{if(t){if(T===t)return-1;if(g===t)return 1}return T.localeCompare(g)}),[o==null?void 0:o.data,t]),[m,...f]=A(()=>(d==null?void 0:d.map(T=>(T.key=`${T.currency}-${Math.random()}`,T)))??[],[d]),[y,_]=x0();return $(()=>{const T=new Set((d==null?void 0:d.map(({currency:g})=>g))||[]);n(Array.from(T),u)},[d,u,n]),a("div",{className:Bg,children:a(gc,{renderHeader:a(Hl,{isEmpty:h,balance:m,widths:y,isHeader:!0,isSkeleton:l,isLoading:l,onWidthsSet:_}),filled:!0,fullWidth:r,children:f.length&&a(Ac,{children:f.map(T=>a("li",{children:a(Hl,{balance:T,widths:y,onWidthsSet:_})},T.key))})})})}),Ug=(e,t)=>{const n=Ti({filterParam:ee.CATEGORIES,filterValues:dg,defaultFilters:uo,...e}),r=Ti({filterParam:ee.STATUSES,filterValues:hg,defaultFilters:uo,...e}),s=Ti({filterParam:ee.CURRENCIES,filterValues:t,defaultFilters:uo,...e});return{categoriesFilter:n,currenciesFilter:s,statusesFilter:r}},Oo=1e5,Wg=({onChange:e,editAction:t,onValueUpdated:n,selectedCurrencies:r,availableCurrencies:s,value:i,...o})=>{const{i18n:c}=W(),[u,l]=x(Z(o.minAmount)?void 0:parseFloat(o.minAmount)/Oo),[h,d]=x(Z(o.maxAmount)?void 0:parseFloat(o.maxAmount)/Oo),m=S(()=>{e({minAmount:u,maxAmount:h})},[h,u,e]),f=S(()=>{e({minAmount:void 0,maxAmount:void 0}),d(void 0),l(void 0)},[e]);$(()=>{t===je.APPLY&&m(),t===je.CLEAR&&f()},[m,f,t]);const y=A(()=>({minAmount:Number(u),maxAmount:Number(h)}),[h,u]);return $(()=>{const{maxAmount:_,minAmount:T}=y;Z(_)&&Z(T)||T>_?n(null):n(`${T}-${_}`)},[y,n]),a("div",{className:"adyen-pe-range-selection-filter",children:[a("div",{className:"adyen-pe-range-selection-filter__input",children:[a("label",{htmlFor:"minValue",children:`${c.get("from")}:`}),a(Ro,{"data-testid":"minValueFilter",lang:c.locale,name:"minValue",type:"number",value:u,onInput:_=>{_.currentTarget&&l(_.currentTarget.value!==""?_.currentTarget.value:void 0)},min:0,isInvalid:u?u<0:!1,errorMessage:c.get("noNegativeNumbersAllowed")})]}),a("div",{className:"adyen-pe-range-selection-filter__input",children:[a("label",{htmlFor:"maxValue",children:`${c.get("to")}:`}),a(Ro,{"data-testid":"maxValueFilter",lang:c.locale,name:"maxValue",type:"number",value:h,onInput:_=>{_.currentTarget&&d(_.currentTarget.value!==""?_.currentTarget.value:void 0)},min:u,isInvalid:!Z(h)&&!Z(u)&&h<u,errorMessage:c.get("toValueShouldBeGreaterThanTheFromValue")})]})]})},Hg=({updateFilters:e,selectedCurrencies:t,availableCurrencies:n,...r})=>{const{i18n:s}=W(),[i,o]=x(),[c,u]=x(),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]),h=S((m,f)=>{const y=(t==null?void 0:t[0])||(n==null?void 0:n[0]),_=f&&y?{style:"currency",currency:y,currencyDisplay:"symbol"}:void 0;return m.toLocaleString(s.locale,_)},[n,s,t]),d=S(m=>{const{minAmount:f,maxAmount:y}=m??U;o({minAmount:f,maxAmount:y}),Z(f)&&Z(y)&&u(void 0),e({minAmount:Z(f)?void 0:String(Math.round(f*Oo)),maxAmount:Z(y)?void 0:String(Math.round(y*Oo))})},[e]);if(i&&(i.minAmount||i.maxAmount)){const{minAmount:m,maxAmount:f}=i??{};!Z(m)&&!Z(f)&&m<=f?u(`${h(m,l)} ${s.get("to").toLowerCase()} ${h(f,l)}`):!Z(m)&&Z(f)&&m>=0?u(`${s.get("from")} ${h(m,l)}`):Z(m)&&!Z(f)?u(`${s.get("to")} ${h(f,l)}`):u(void 0)}return a(v0,{...r,updateFilters:e,minAmount:r.minAmount,maxAmount:r.maxAmount,onChange:d,value:c,label:c||r.label,type:"text",containerSize:ds.MEDIUM,selectedCurrencies:t,availableCurrencies:n,render:Wg})},B0="adyen-pe-transactions",$0=`${B0}-overview`,Gg=`${B0}-details`,U0=`${$0}__summary`,Gl=`${U0}-item`,Yg=24,jg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var zs,qs,Ks,Sc;const{i18n:h}=W(),{getTransactions:d}=Se().endpoints,{activeBalanceAccount:m,balanceAccountSelectionOptions:f,onBalanceAccountSelection:y}=oc(t),{defaultParams:_,nowTimestamp:T,refreshNowTimestamp:g}=mc("transactions",m),E=S(async({balanceAccount:Je,...et},li)=>d({signal:li,errorLevel:"error"},{query:{...et,statuses:Vr(et[ee.STATUSES]),categories:Vr(et[ee.CATEGORIES]),currencies:Vr(et[ee.CURRENCIES]),createdSince:et[ee.CREATED_SINCE]??_.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:et[ee.CREATED_UNTIL]??_.current.defaultFilterParams[ee.CREATED_UNTIL],sortDirection:"desc",balanceAccountId:(m==null?void 0:m.id)??"",minAmount:Z(et.minAmount)?void 0:parseFloat(et.minAmount),maxAmount:Z(et.maxAmount)?void 0:parseFloat(et.maxAmount)}}),[m==null?void 0:m.id,_,d]),v=Za(),N=A(()=>Q(e)?e:void 0,[e]),D=A(()=>n?tc:void 0,[n]),{canResetFilters:C,error:O,fetching:R,filters:F,limit:P,limitOptions:z,records:j,resetFilters:ie,updateFilters:q,updateLimit:ce,...Te}=sc({fetchRecords:E,dataField:"data",filterParams:_.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:N,preferredLimit:r,preferredLimitOptions:D,enabled:!!(m!=null&&m.id)&&!!d}),[me,_e]=x([]),[De,pe]=x(!1),ke=S((Je,et)=>{_e(Je),pe(et)},[]),{categoriesFilter:fe,currenciesFilter:Ue,statusesFilter:oe}=Ug({filters:F,updateFilters:q},me);$(()=>{_e(void 0),q({[ee.BALANCE_ACCOUNT]:m==null?void 0:m.id,[ee.CURRENCIES]:void 0})},[q,m==null?void 0:m.id]),$(()=>{g()},[F,g]),$(()=>{oe.updateSelection({target:{value:"Booked",name:"status"}})},[oe]);const ze=be(Oe.down.sm),Qe=!!me&&me.length>1,Tt=A(()=>({showDetails:i??!0,callback:s}),[i,s]),Ge=A(()=>({transaction:Tt}),[Tt]),Wt=S(({records:Je,retrievedData:et})=>yc(Je,et,(li,Rc)=>li.id===Rc.id),[]),Be=A(()=>{var Je;return _c((Je=l==null?void 0:l.list)==null?void 0:Je.fields,Ya)},[(zs=l==null?void 0:l.list)==null?void 0:zs.fields]),{customRecords:An,loadingCustomRecords:qn}=pc({records:j,hasCustomColumn:Be,onDataRetrieve:(qs=l==null?void 0:l.list)==null?void 0:qs.onDataRetrieve,mergeCustomData:Wt}),{updateDetails:Kn,resetDetails:ci,selectedDetail:ae}=b0(Ge),Re=S(({id:Je})=>{Kn({selection:{type:"transaction",data:Je,balanceAccount:m||""},modalSize:"small"}).callback({id:Je})},[m,Kn]),ve=A(()=>{const Je=new Date(T);return Je.setMonth(Je.getMonth()-Yg),Je.toString()},[T]);return a("div",{className:$0,children:[a(si,{hideTitle:u,titleKey:"transactionsOverviewTitle",children:a(Xa,{...v})}),a(Qa,{...v,children:[a(ec,{activeBalanceAccount:m,balanceAccountSelectionOptions:f,onBalanceAccountSelection:y}),a(fc,{canResetFilters:C,defaultParams:_,filters:F,nowTimestamp:T,refreshNowTimestamp:g,sinceDate:ve,timezone:m==null?void 0:m.timeZone,updateFilters:q}),a(wl,{...fe,placeholder:h.get("filterPlaceholder.category")}),a(Hg,{availableCurrencies:me,selectedCurrencies:Vr(F[ee.CURRENCIES]),name:"range",label:h.get("amount"),minAmount:F[ee.MIN_AMOUNT],maxAmount:F[ee.MAX_AMOUNT],updateFilters:q,onChange:q}),a(wl,{...Ue,placeholder:h.get("filterPlaceholder.currency")})]}),a("div",{className:U0,children:[a("div",{className:Gl,children:a(xg,{availableCurrencies:me,isAvailableCurrenciesFetching:De,balanceAccountId:m==null?void 0:m.id,statuses:oe.selection,categories:fe.selection,createdUntil:F[ee.CREATED_UNTIL],createdSince:F[ee.CREATED_SINCE],currencies:Ue.selection,minAmount:F[ee.MIN_AMOUNT]?parseFloat(F[ee.MIN_AMOUNT]):void 0,maxAmount:F[ee.MAX_AMOUNT]?parseFloat(F[ee.MAX_AMOUNT]):void 0,fullWidth:ze})}),a("div",{className:Gl,children:a($g,{balanceAccountId:m==null?void 0:m.id,onCurrenciesChange:ke,defaultCurrencyCode:m==null?void 0:m.defaultCurrencyCode,fullWidth:ze})})]}),a(I0,{dataCustomization:l==null?void 0:l.details,selectedDetail:ae,resetDetails:ci,className:Gg,children:a(V_,{activeBalanceAccount:m,availableCurrencies:me,error:O,hasMultipleCurrencies:Qe,limit:P,limitOptions:z,loading:R||o||!t||qn,onContactSupport:c,onLimitSelection:ce,onRowClick:Re,showPagination:!0,transactions:(Ks=l==null?void 0:l.list)!=null&&Ks.onDataRetrieve?An:j,customColumns:(Sc=l==null?void 0:l.list)==null?void 0:Sc.fields,...Te})})]})},zg="adyen-pe-transactions-overview-container";function qg({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:zg,errorMessage:"weCouldNotLoadTheTransactionsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(jg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class W0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(qg,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(W0,"type","transactions");var ur=(e=>(e.AU="AU",e.EU="EU",e.GB="GB",e.US="US",e))(ur||{});const Kg=["AU","GB","US"],Vg=["EU"],H0=e=>{var n;const t=(n=e==null?void 0:e.regions)==null?void 0:n.find(r=>r.type==="capital");return(t==null?void 0:t.value)??""},Zg=e=>{switch(e){case ur.EU:return"capital.legalSubtitleEU";default:return null}},Xg=e=>{switch(e){case ur.AU:return"capital.legalSubtitleAU";case ur.GB:return"capital.legalSubtitleGB";case ur.US:return"capital.legalSubtitleUS";default:return null}},Qg=e=>{const t=H0(e),n=e==null?void 0:e.countryCode;return Xg(n)??Zg(t)},Ec=e=>{const t=H0(e),n=(e==null?void 0:e.countryCode)??"";return Kg.includes(n)||Vg.includes(t)},Ht={contactSupportForHelp:"contactSupportForHelp",couldNotLoadOffers:"capital.weCouldNotLoadFinancialOffers",tryRefreshingThePage:"tryRefreshingThePageOrComeBackLater",somethingWentWrong:"somethingWentWrong"},Ci={title:Ht.somethingWentWrong,message:[Ht.couldNotLoadOffers,Ht.tryRefreshingThePage],refreshComponent:!0},G0=(e,t)=>{if(!e)return Ci;const n=Ad(e,t);if(n)return n;const r=t?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";switch(e.errorCode){case void 0:return{...Ci,...t?{onContactSupport:t}:{}};case"30_016":return{title:Ht.somethingWentWrong,message:[Ht.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_011":return{title:"capital.accountIsInactive",message:[Ht.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_600":return{title:Ht.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"EMPTY_CONFIG":return{title:Ht.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",Ht.contactSupportForHelp]};case"UNSUPPORTED_REGION":return{title:"capital.unsupportedRegionTitle",message:"capital.unsupportedRegionDescription"};default:return{...Ci,refreshComponent:!0}}},ii=({emptyGrantOffer:e,error:t,onContactSupport:n,onBack:r,unsupportedRegion:s})=>{const{i18n:i}=W(),o=S(()=>a(K,{children:r&&a(he,{variant:se.SECONDARY,onClick:r,children:i.get("back")})}),[i,r]),c=A(()=>s?new Di(po.ERROR,"UnsupportedRegion","Unsupported Region Configuration","UNSUPPORTED_REGION"):e?new Di(po.ERROR,"EmptyConfig","Empty Configuration","EMPTY_CONFIG"):t,[e,s,t]);return a(en,{absolutePosition:!1,withImage:!0,onContactSupport:n,renderSecondaryButton:o,outlined:!1,...G0(c,n)})},Yl={base:"adyen-pe-capital-offer",errorContainer:"adyen-pe-capital-offer__error-container"},Wn=e=>{var r;const t=(r=Se().extraConfig)==null?void 0:r.legalEntity,n=A(()=>{const s=Qg(t);return s?{subtitleKey:s}:{}},[t]);return a(si,{...e,...n,subtitleConfig:{variant:I.CAPTION,classNames:"adyen-pe-capital-header__subtitle"}})},ai=({className:e,el:t="div",children:n})=>a(t,{className:M("adyen-pe-info-box",e),children:n}),Jg=(e,t=0)=>new Date(new Date(e).setUTCHours(0,0,0,0)+Math.floor(t)*ps),Y0=e=>ru(Jg(new Date,e)),eT=e=>e?Math.ceil(e/30):null,tT=(e,t)=>{let n,r;function s(...i){clearTimeout(n),r=i,n=setTimeout(()=>{e(r),r=void 0},t)}return s.cancel=()=>{n&&(clearTimeout(n),n=void 0,r=void 0)},s},Nc=e=>e/100;function nT(e,t,n,r){if(t>=n)return 0;const s=r>0?r:1;if(s>n-t)return 0;const o=(Math.round((e-t)/s)*s+t-t)*100/(n-t);return Number(vt(0,o,100).toFixed(2))}function rT(e,t,n){const r=t/2;let s=Math.round(r/n)*n;return s<e?s=e:s>t&&(s=t),s}const sT=({min:e=0,max:t=100,step:n=1,value:r=e,onChange:s,className:i,...o})=>{const c=A(()=>nT(r,e,t,n),[r,e,t,n]);return a("input",{type:"range",className:M("adyen-pe-slider",i),min:e,max:t,step:n,value:r,onChange:s,style:{backgroundSize:`${c}% 100%`},...o})},oT=({dynamicOffersConfig:e,value:t=e.minAmount.value,onValueChange:n,onRelease:r,className:s})=>{const i=Mr(),{i18n:o}=W(),c=l=>{const h=Number(l.target.value);n==null||n(h)},u=l=>{const h=Number(l.target.value);r==null||r(h)};return a("div",{className:M("adyen-pe-capital-slider",s),children:[a("label",{htmlFor:i,className:"adyen-pe-capital-slider__label",children:a(k,{variant:I.BODY,stronger:!0,children:o.get("capital.howMuchMoneyDoYouNeed")})}),a("div",{children:[a("output",{htmlFor:i,className:"adyen-pe-capital-slider__value","aria-live":"polite",children:a(k,{variant:I.TITLE,strongest:!0,children:o.amount(t,e.minAmount.currency,{maximumFractionDigits:0})})}),a(sT,{id:i,value:t,min:e.minAmount.value,max:e.maxAmount.value,step:e.step,onChange:c,onMouseUp:u,onTouchEnd:u,onKeyUp:u,className:"adyen-pe-capital-slider__input"})]}),a("div",{className:"adyen-pe-capital-slider__labels",children:[a("label",{children:[a(k,{variant:I.CAPTION,children:o.get("min")}),a(k,{variant:I.BODY,children:o.amount(e.minAmount.value,e.minAmount.currency,{maximumFractionDigits:0})})]}),a("label",{children:[a(k,{variant:I.CAPTION,children:o.get("max")}),a(k,{variant:I.BODY,children:o.amount(e.maxAmount.value,e.maxAmount.currency,{maximumFractionDigits:0})})]})]})]})},bo=30,iT=()=>a("div",{className:"adyen-pe-capital-offer-selection__loading-container",children:[...Array(4)].map((e,t)=>a("div",{className:"adyen-pe-capital-offer-selection__loading-skeleton"},t))}),aT=({data:e})=>{const{i18n:t}=W(),n=A(()=>{const r=e.expectedRepaymentPeriodDays&&Y0(e.expectedRepaymentPeriodDays);return r?t.date(r,{month:"long"}):null},[e,t]);return a("div",{className:"adyen-pe-capital-offer-selection__information",children:[a(k,{el:ne.SPAN,variant:I.BODY,wide:!0,children:n&&t.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:t.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:bo,date:n}})}),a(fn,{renderValue:r=>a(k,{el:ne.SPAN,stronger:!0,variant:I.CAPTION,children:r}),renderLabel:r=>a(k,{el:ne.SPAN,variant:I.CAPTION,children:r}),items:[{key:"capital.fees",value:t.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.dailyRepaymentRate",value:`${t.get("capital.xPercent",{values:{percentage:Nc(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})}]})]})},cT=({dynamicOffersConfig:e,dynamicOffersConfigError:t,emptyGrantOffer:n,onContactSupport:r,onOfferDismiss:s,onOfferSelect:i,requestedAmount:o})=>{const{i18n:c}=W(),u=A(()=>{if(e)return rT(e.minAmount.value,e.maxAmount.value,e.step)},[e]),[l,h]=x(void 0),d=A(()=>e==null?void 0:e.minAmount.currency,[e==null?void 0:e.minAmount.currency]),{createGrantOffer:m,getDynamicGrantOffer:f}=Se().endpoints,y=Eo({queryFn:f,options:{retry:1,shouldRetry:S(R=>R.status===500,[]),onSettled:S(()=>{v(!1)},[])}}),_=Eo({queryFn:m,options:{onSuccess:R=>i(R)}}),T=S(()=>{var R,F;_.mutate({body:{amount:((R=y.data)==null?void 0:R.grantAmount.value)||l,currency:((F=y.data)==null?void 0:F.grantAmount.currency)||d},contentType:"application/json"})},[d,y.data,l,_]),g=S(R=>y.mutate({},{query:{amount:R,currency:d}}),[d,y]),[E,v]=x(!1),N=tT(g,300),D=S(R=>{N.cancel(),v(!0),h(R)},[N]),C=R=>N(R);$(()=>{e&&!y.data&&!l&&(h(R=>R||(o?Number(o):u||e.minAmount.value)),g(l||u||e.minAmount.value))},[e,y.data,g,u,o,l]);const O=A(()=>_.isLoading||y.isLoading||E,[y.isLoading,E,_.isLoading]);return a("div",{className:"adyen-pe-capital-offer-selection",children:_.error||y.error||n||t?a(ii,{error:_.error||y.error||t,onBack:s,onContactSupport:r,emptyGrantOffer:n}):a(K,{children:[e&&a(oT,{value:l,dynamicOffersConfig:e,onValueChange:D,onRelease:C}),a(ai,{className:"adyen-pe-capital-offer-selection__details",children:!y.data||y.isLoading||E?a(iT,{}):y.data?a(aT,{data:y.data}):null}),a("div",{className:"adyen-pe-capital-offer-selection__buttons",children:[s&&a(he,{variant:se.SECONDARY,onClick:s,children:c.get("back")}),a(he,{variant:se.PRIMARY,state:O?"loading":void 0,onClick:T,disabled:_.isLoading||!(e!=null&&e.minAmount),children:c.get(O?"loading":"capital.reviewOffer")})]})]})})},lT=(e,t)=>{const{variant:n=se.PRIMARY,disabled:r=!1,onClick:s,classNameModifiers:i=[],className:o}=e,c=A(()=>Fn("",o)||"",[o]),u=A(()=>Vo(r),[r]),{click:l,allChildren:h,allProps:d}=Zo(c,[...i,n],`${ut} ${em}`,u,e,s),m=A(()=>({...d,...e.onClick&&l?{onClick:l}:{}}),[l,d,e.onClick]);return a("a",{...m,href:e.href,ref:t,children:h})},uT=Xe(lT),jl=e=>Q(e)?e:()=>e,ia=({count:e,defaultFill:t,fills:n,translationKey:r})=>{const{i18n:s}=W(),i=A(()=>{const o=jl(t);return n!==void 0?(...c)=>{const[u,l]=c;for(const h of[u,l]){const d=jl(n[h])(...c);if(d!=null)return d}return o(...c)}:o},[n,t]);return A(()=>{const o=[],c=Mr("translation"),u=(...d)=>(o.push(i(...d)??null),c),[l,...h]=s.get(r,{count:e,values:u}).split(c);return a(K,{children:[l,h.map((d,m)=>a(K,{children:[o[m],d]},`${c}__${m}`))]})},[s,e,i,r])},zl="capital-support@adyen.com",dT=()=>{var t,n,r;return((r=(n=(t=Se())==null?void 0:t.extraConfig)==null?void 0:n.legalEntity)==null?void 0:r.countryCode)===ur.US?a(ro,{filled:!0,noOutline:!0,children:[a(k,{variant:I.CAPTION,className:"adyen-pe-capital-offer-legal-notice--title",children:a(ia,{translationKey:"capital.offerLegalNoticeTitleUS",fills:{break:a("br",{})}})}),a("br",{}),a(k,{variant:I.CAPTION,className:"adyen-pe-capital-offer-legal-notice--description",children:a(ia,{translationKey:"capital.offerLegalNoticeDescriptionUS",fills:{email:a(uT,{href:`mailto:${zl}`,variant:se.TERTIARY,className:"adyen-pe-capital-offer-summary__info--email",children:zl}),break:a(K,{children:[a("br",{}),a("br",{})]})}})})]}):null},hT=["30_013"],fT=({grantOffer:e,onBack:t,onFundsRequest:n,onContactSupport:r})=>{const{i18n:s}=W(),i=A(()=>{const f=Y0(e.expectedRepaymentPeriodDays);return f?s.date(f,{month:"long"}):null},[e,s]),{requestFunds:o}=Se().endpoints,c=Eo({queryFn:o,options:{onSuccess:f=>n==null?void 0:n(f)}}),u=S(f=>{c.mutate(U,{path:{grantOfferId:f}})},[c]),l=S(()=>{e.id&&u(e.id)},[e.id,u]),h=A(()=>eT(e.maximumRepaymentPeriodDays),[e.maximumRepaymentPeriodDays]),d=A(()=>{const f=c.error?c.error:null;if(f&&hT.includes(f.errorCode))switch(f.errorCode){case"30_013":return{title:s.get("capital.thereIsNoPrimaryAccountConfigured"),message:s.get("capital.weCouldNotContinueWithTheOfferContactSupportForHelp"),errorCode:"30_013"};default:return{title:s.get("somethingWentWrong"),message:s.get("capital.weCouldNotLoadFinancialOffers")}}return null},[s,c.error]),m=A(()=>{const f=[{key:"capital.fees",value:s.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.totalRepaymentAmount",value:s.amount(e.totalAmount.value,e.totalAmount.currency)},{key:"capital.repaymentThreshold",value:s.amount(e.thresholdAmount.value,e.thresholdAmount.currency)},{key:"capital.dailyRepaymentRate",value:s.get("capital.xPercent",{values:{percentage:Nc(e.repaymentRate)}})},{key:"capital.expectedRepaymentPeriod",value:s.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})},{key:"account",value:s.get("capital.primaryAccount")}];return h&&f.splice(4,0,{key:"capital.maximumRepaymentPeriod",value:h===1?s.get("capital.oneMonth"):s.get("capital.xMonths",{values:{months:h}})}),f},[e,s,h]);return!d&&c.error?a(ii,{error:c.error,onBack:t,onContactSupport:r}):a("div",{className:"adyen-pe-capital-offer-summary",children:[a(ai,{className:"adyen-pe-capital-offer-summary__grant-summary",children:[a(k,{el:ne.PARAGRAPH,variant:I.BODY,children:[s.get("capital.youAreRequestingFundingOf")," ",a("strong",{children:`${s.amount(e.grantAmount.value,e.grantAmount.currency,{minimumFractionDigits:0})}.`})]}),a(k,{el:ne.PARAGRAPH,variant:I.CAPTION,children:s.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:s.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:bo,date:i??""}})})]}),a(fn,{classNames:"adyen-pe-capital-offer-summary__details",renderLabel:(f,y)=>y==="capital.repaymentThreshold"?a(gn,{isContainerHovered:!0,content:s.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:bo}}),children:a("span",{children:a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:f})})}):a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:f}),renderValue:(f,y)=>{const _=y==="account"&&c.error&&d&&d.errorCode==="30_013";return a(k,{className:M({"adyen-pe-capital-offer-summary__details--error":_}),el:ne.SPAN,variant:I.CAPTION,stronger:!0,children:[_?a(Ze,{name:"warning-filled","data-testid":"primary-account-warning-icon"}):null,f]})},items:m}),d&&a(pn,{className:"adyen-pe-capital-offer-summary__error-alert",type:Fe.WARNING,title:d.title,description:d.message,children:r?a(he,{className:"adyen-pe-capital-offer-summary__error-alert-button",onClick:r,children:s.get("contactSupport")}):null}),a(dT,{}),a("div",{className:"adyen-pe-capital-offer-summary__buttons",children:[c.error&&!d?null:a(he,{variant:se.SECONDARY,onClick:t,children:s.get("back")}),a(he,{variant:se.PRIMARY,state:c.isLoading?"loading":void 0,onClick:l,disabled:c.isLoading||!!c.error||!!c.data,children:s.get(c.isLoading?"capital.requesting":"capital.requestFunds")})]})]})},Cc=({externalDynamicOffersConfig:e,hideTitle:t,onContactSupport:n,onFundsRequest:r,onOfferDismiss:s,onOfferSelect:i})=>{var D,C;const{getDynamicGrantOffersConfiguration:o}=Se().endpoints,c=(C=(D=Se())==null?void 0:D.extraConfig)==null?void 0:C.legalEntity,u=A(()=>Ec(c),[c]),[l,h]=x(!1),d=S(O=>{h(!O)},[]),{data:m,error:f}=Ot({fetchOptions:{enabled:!e&&!!o&&u,onSuccess:d},queryFn:S(async()=>o==null?void 0:o(U),[o])}),y=e||m,[_,T]=x(),[g,E]=x(),v=S(O=>{i?i(O):(E(O==null?void 0:O.grantAmount.value),T(O))},[i]),N=A(()=>_?"OfferSummary":"OfferSelection",[_]);return u?a("div",{className:Yl.base,children:[a(Wn,{hasDivider:!0,hideTitle:t,titleKey:N==="OfferSummary"?"capital.businessFinancingSummary":"capital.businessFinancingOffer"}),N==="OfferSelection"&&a(cT,{requestedAmount:g,dynamicOffersConfig:y,dynamicOffersConfigError:f,onOfferDismiss:s,onOfferSelect:v,emptyGrantOffer:l,onContactSupport:n}),N==="OfferSummary"&&a(fT,{grantOffer:_,onBack:()=>T(void 0),onFundsRequest:r,onContactSupport:n})]}):a("div",{className:Yl.errorContainer,children:[a(Wn,{hideTitle:t,titleKey:"capital.businessFinancing"}),a(ii,{unsupportedRegion:!0})]})};class j0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Cc,{...this.props}));this.componentToRender=this.componentToRender.bind(this),this.customClassNames="adyen-pe-capital-offer-component"}}B(j0,"type","capitalOffer");const mT=(e=1e3,t=!1)=>{const[n,r]=x(t),s=Y(),i=Y(),o=S(()=>{n||(i.current=setTimeout(()=>{s.current=requestAnimationFrame(()=>r(!1))},e),r(!0))},[n,e]);return $(()=>()=>{cancelAnimationFrame(s.current),clearTimeout(i.current),s.current=i.current=null},[e]),{freeze:o,frozen:n}},ql=({...e})=>a("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[a("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"}),a("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"})]}),pT=(e,t,n)=>{const r=Se().endpoints[e];return Ot({fetchOptions:{enabled:!!r&&n,keepPrevData:!0},queryFn:async()=>r(U,{...t})})};function _T({blob:e,filename:t}){const n=document.createElement("a"),r=URL.createObjectURL(e);n.href=r,n.download=t||"download";const s=()=>{setTimeout(()=>{URL.revokeObjectURL(r)},150)};n.addEventListener("click",s,{once:!0}),n.click()}function yT({className:e,disabled:t,endpointName:n,params:r,setError:s,errorDisplay:i,onDownloadRequested:o}){const{i18n:c}=W(),[u,l]=x(!1),h=be(Oe.down.xs),{data:d,error:m,isFetching:f}=pT(n,r,u);$(()=>{u&&l(!1)},[u]),$(()=>{d&&_T(d)},[d]),$(()=>{s&&m&&s(m)},[m,s]);const y=()=>{l(!0),o==null||o()};return a("div",{className:"adyen-pe-download",children:[h?a(he,{iconButton:!0,variant:se.TERTIARY,onClick:y,children:f?a(Ui,{size:"small"}):a(ql,{})}):a(he,{className:M("adyen-pe-download__button",{"adyen-pe-download__button--loading":f},e),disabled:t||f,variant:se.SECONDARY,onClick:y,iconLeft:f?a(Ui,{size:"small"}):a(ql,{}),children:f?`${c.get("downloading")}..`:c.get("download")}),m&&i&&a("div",{className:"adyen-pe-download__error",children:i})]})}const gT=({...e})=>a("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M8.75 4.58008H7.25V9.08008H8.75V4.58008Z",fill:"currentColor"}),a("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"}),a("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"})]}),TT=1e3,z0="adyen-pe-reports-table",q0=`${z0}-date-report-type`,AT=`${q0}--date`,K0=["createdAt","dateAndReportType","reportType","reportFile"],ET=({error:e,loading:t,balanceAccountId:n,onContactSupport:r,showPagination:s,data:i,customColumns:o,...c})=>{const{i18n:u}=W(),{dateFormat:l}=rn("UTC"),{freeze:h,frozen:d}=mT(TT),[m,f]=x(null),{refreshing:y}=Se(),_=A(()=>t||y,[t,y]),T=be(Oe.up.sm),g=be(Oe.down.xs),E=Ga({fields:K0,customColumns:o,columnConfig:A(()=>({dateAndReportType:{visible:g},createdAt:{visible:T},reportType:{visible:T},reportFile:{visible:!0,position:g?"right":void 0}}),[T,g])}),v=S(()=>{f(null)},[]),N={title:"noReportsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},D=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourReports",onContactSupport:r}),[e,r]),C=A(()=>a(gT,{}),[]),O=A(()=>R=>{const F={};switch(R==null?void 0:R.errorCode){case"999_429_001":F.title=u.get("error.somethingWentWrongWithDownload"),F.description=u.get("reportsError.tooManyDownloads");break;case"00_500":default:F.title=u.get("error.somethingWentWrongWithDownload"),F.description=u.get("error.pleaseTryAgainLater");break}f(F)},[u]);return t&&f(null),a("div",{className:z0,children:[m&&a(pn,{onClose:v,type:Fe.WARNING,className:"adyen-pe-reports-table-alert",...m}),a(Tn,{errorDisplay:D,error:e,columns:E,data:i,loading:_,outline:!1,emptyTableMessage:N,customCells:{createdAt:({value:R})=>R?R&&a(k,{variant:I.BODY,children:l(R,nl)}):null,dateAndReportType:({item:R})=>a("div",{className:q0,children:[a(k,{variant:I.BODY,stronger:!0,children:u.get(`reportType.${R==null?void 0:R.type}`)}),a(k,{className:AT,variant:I.BODY,children:l(R.createdAt,nl)})]}),reportType:({item:R})=>(R==null?void 0:R.type)&&a(k,{variant:I.BODY,children:u.get(`reportType.${R==null?void 0:R.type}`)}),reportFile:({item:R})=>{const F={query:{balanceAccountId:n,createdAt:R.createdAt,type:R.type}};return a(yT,{className:"adyen-pe-reports-table--download",endpointName:"downloadReport",disabled:d,params:F,onDownloadRequested:h,setError:O,errorDisplay:C})}},children:s&&a(Tn.Footer,{children:a(Ha,{...c})})})]})},NT="adyen-pe-reports-overview",CT=new Date("2024-04-16T00:00:00.000Z").toString(),ST=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,isLoadingBalanceAccount:s,onContactSupport:i,hideTitle:o,dataCustomization:c})=>{var _e,De,pe,ke;const{getReports:u}=Se().endpoints,{activeBalanceAccount:l,balanceAccountSelectionOptions:h,onBalanceAccountSelection:d}=oc(t),{defaultParams:m,nowTimestamp:f,refreshNowTimestamp:y}=mc("reports",l),_=S(async(fe,Ue)=>u({signal:Ue,errorLevel:"error"},{query:{...fe,type:"payout",createdSince:fe[ee.CREATED_SINCE]??m.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:fe[ee.CREATED_UNTIL]??m.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(l==null?void 0:l.id)??""}}),[l==null?void 0:l.id,m,u]),T=Za(),g=A(()=>Q(e)?e:void 0,[e]),E=A(()=>n?tc:void 0,[n]),{canResetFilters:v,error:N,fetching:D,filters:C,limit:O,limitOptions:R,records:F,resetFilters:P,updateFilters:z,updateLimit:j,...ie}=sc({fetchRecords:_,dataField:"data",filterParams:m.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:g,preferredLimit:r,preferredLimitOptions:E,enabled:!!(l!=null&&l.id)&&!!u}),q=S(({records:fe,retrievedData:Ue})=>yc(fe,Ue,(oe,ze)=>oe.createdAt===ze.createdAt),[]),ce=A(()=>{var fe;return _c((fe=c==null?void 0:c.list)==null?void 0:fe.fields,K0)},[(_e=c==null?void 0:c.list)==null?void 0:_e.fields]),{customRecords:Te,loadingCustomRecords:me}=pc({records:F,hasCustomColumn:ce,onDataRetrieve:(De=c==null?void 0:c.list)==null?void 0:De.onDataRetrieve,mergeCustomData:q});return $(()=>{y()},[C,y]),a("div",{className:NT,children:[a(si,{hideTitle:o,titleKey:"reportsTitle",subtitleKey:"reportsNotice",children:a(Xa,{...T})}),a(Qa,{...T,children:[a(ec,{activeBalanceAccount:l,balanceAccountSelectionOptions:h,onBalanceAccountSelection:d}),a(fc,{canResetFilters:v,defaultParams:m,filters:C,nowTimestamp:f,refreshNowTimestamp:y,sinceDate:CT,timezone:"UTC",updateFilters:z})]}),a(ET,{balanceAccountId:l==null?void 0:l.id,loading:D||s||!t||!l||me,data:(pe=c==null?void 0:c.list)!=null&&pe.onDataRetrieve?Te:F,showPagination:!0,limit:O,limitOptions:R,onContactSupport:i,onLimitSelection:j,error:N,customColumns:(ke=c==null?void 0:c.list)==null?void 0:ke.fields,...ie})]})},RT="adyen-pe-reports-overview-container";function vT({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:RT,errorMessage:"weCouldNotLoadTheReportsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(ST,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class V0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(vT,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>{this.componentRef=n}}));this.componentToRender=this.componentToRender.bind(this)}}B(V0,"type","reports");const cn={base:"adyen-pe-capital-overview",title:"adyen-pe-capital-overview__title",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"},OT="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",bT=({hideTitle:e})=>{const{i18n:t}=W();return a(K,{children:[a(Wn,{hideTitle:e,titleKey:"capital.needSomeExtraMoney"}),a("div",{className:"adyen-pe-capital-overview__unqualified-state",children:[a("div",{className:"adyen-pe-capital-overview__unqualified-state-img",children:a("img",{srcSet:OT,alt:""})}),a(k,{el:ne.PARAGRAPH,variant:I.BODY,large:!0,children:t.get("capital.youWillSoonQualifyForAFinancialOffer")})]})]})},IT=({dynamicOfferConfig:e,hideTitle:t,onOfferOptionsRequest:n})=>{const{i18n:r}=W();return a(K,{children:[a(Wn,{hideTitle:t,titleKey:"capital.needSomeExtraMoney"}),a("div",{className:cn.preQualifiedGrant,children:[a(ai,{children:a(k,{variant:I.BODY,children:[r.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1"),a("strong",{children:r.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2",{values:{amount:r.amount(e.maxAmount.value,e.maxAmount.currency,{minimumFractionDigits:0})}})})]})}),a(he,{className:cn.preQualifiedGrantButton,onClick:n,children:r.get("capital.seeOptions")})]})]})},DT=({hideTitle:e,dynamicOffer:t,skipPreQualifiedIntro:n,onOfferOptionsRequest:r,onFundsRequest:s,onOfferDismiss:i})=>{const[o,c]=x(n?"capitalOffer":"intro"),u=S(()=>{r?r():c("capitalOffer")},[r]),l=A(()=>!n||!!i,[i,n]),h=S(()=>{i?i():c("intro")},[i]);return a(K,{children:o==="intro"?a(IT,{hideTitle:e,dynamicOfferConfig:t,onOfferOptionsRequest:u}):a(Cc,{onFundsRequest:s,onOfferDismiss:l?h:void 0,externalDynamicOffersConfig:t})})},kT=({max:e=1,value:t,labels:n,tooltips:r,className:s})=>{const i=A(()=>vt(0,t*100/e,100),[t,e]),o=!!(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 a("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,"aria-valuetext":`${i}%`,"aria-label":c,className:M("adyen-pe-progress-bar",s),children:[a("div",{className:"adyen-pe-progress-bar__track",children:[a("div",{className:"adyen-pe-progress-bar__track-background"}),a(Kl,{tooltipContent:r==null?void 0:r.progress,title:n==null?void 0:n.current,percentage:i,className:"adyen-pe-progress-bar__track-fill"}),a(Kl,{tooltipContent:r==null?void 0:r.remaining,title:n==null?void 0:n.max,percentage:100-i,className:"adyen-pe-progress-bar__track-remaining"})]}),o&&a("div",{className:"adyen-pe-progress-bar__legend","aria-hidden":"true",children:[n.current&&a(k,{el:ne.SPAN,variant:I.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.current}),n.max&&a(k,{el:ne.SPAN,variant:I.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.max})]})]})},Kl=({tooltipContent:e,title:t,percentage:n,className:r})=>{const s=i=>a("div",{className:r,title:i,style:{width:`${n}%`}});return e?a(gn,{content:e,children:s()}):s(t)},At={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"},LT=e=>e==="Active",wT=e=>e==="Repaid",PT=e=>e==="Active"?"capital.remaining":"capital.requestedFunds",MT=e=>e.status==="Active"?e.remainingTotalAmount:e.grantAmount,FT=({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"}},xT=({status:e,missingActions:t})=>{switch(e){case"Failed":return Ee.ERROR;case"Pending":return t!=null&&t.length?Ee.WARNING:Ee.DEFAULT;case"Repaid":return Ee.LIGHT;case"Revoked":case"WrittenOff":return Ee.WARNING;default:return Ee.DEFAULT}},BT=e=>{const t=new Date,n=new Date;return n.setDate(t.getDate()+e),n},$T=e=>{var n,r;const t=((n=e.missingActions)==null?void 0:n.some(s=>s.type==="signToS"))||!1;switch(e.status){case"Pending":return(r=e.missingActions)!=null&&r.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}},Z0=e=>{var r;const t=e.status==="Active",n=e.status==="Pending";return{amount:MT(e),amountLabelKey:PT(e.status),hasAlerts:n,hasDetails:LT(e.status),hasUnscheduledRepaymentDetails:t&&!!((r=e.unscheduledRepaymentAccounts)!=null&&r.length),isAmountColorSecondary:!t,isBackgroundFilled:wT(e.status),isGrantIdVisible:!t,isLabelColorSecondary:t,isProgressBarVisible:t,repaymentPeriodEndDate:BT(e.repaymentPeriodLeft),statusKey:FT(e),statusTagVariant:xT(e),statusTooltipKey:$T(e)}},Kr={base:"adyen-pe-grant-details",content:"adyen-pe-grant-details__content",header:"adyen-pe-grant-details__header",label:"adyen-pe-grant-details__label"},UT=({grant:e})=>{const{i18n:t}=W(),n=S(s=>t.amount(s.value,s.currency),[t]),r=A(()=>{const s=e.maximumRepaymentPeriodDays?Math.ceil(e.maximumRepaymentPeriodDays/30):null,i=[{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:Nc(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 s&&i.splice(5,0,{key:"capital.maximumRepaymentPeriod",value:t.get("capital.xMonths",{values:{months:s}})}),i},[e,n,t]);return a("div",{className:Kr.base,children:a("div",{className:Kr.content,children:[a("div",{className:Kr.header,children:[a(k,{el:ne.SPAN,variant:I.BODY,children:t.get("capital.yourRequestedFundsWere")}),a(k,{el:ne.SPAN,variant:I.BODY,strongest:!0,children:t.amount(e.grantAmount.value,e.grantAmount.currency)})]}),a(fn,{renderLabel:(s,i)=>i==="capital.repaymentThreshold"?a(gn,{isContainerHovered:!0,content:t.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:bo}}),children:a("span",{children:a(k,{className:Kr.label,el:ne.SPAN,variant:I.CAPTION,children:s})})}):a(k,{className:Kr.label,el:ne.SPAN,variant:I.CAPTION,children:s}),renderValue:s=>a(k,{el:ne.SPAN,stronger:!0,variant:I.CAPTION,children:s}),items:r})]})})},Vl={button:"adyen-pe-grant-action__button"},WT=()=>{var e;return((e=window.top)==null?void 0:e.location.href)||window.location.href},HT=e=>{window.top?window.top.location.href=e:window.location.href=e},GT=({action:e,className:t,offerExpiresAt:n})=>{const{i18n:r,updateCore:s}=W(),{dateFormat:i}=rn(),{signToSActionDetails:o}=Se().endpoints,[c,u]=x(!1),l=S(async()=>{if(e.type==="signToS")return o==null?void 0:o(U,{query:{redirectUrl:WT(),locale:r.locale}})},[e,r.locale,o]),{data:h,isFetching:d,error:m}=Ot({fetchOptions:A(()=>({enabled:!!o&&c}),[o,c]),queryFn:l});return $(()=>{const f=h==null?void 0:h.url;f&&HT(f)},[h,c]),m?a(pn,{className:t,type:Fe.CRITICAL,title:r.get("somethingWentWrongTryRefreshingOrComeBackLater"),description:a(he,{className:Vl.button,onClick:s,children:r.get("refresh")})}):a(pn,{className:t,type:Fe.WARNING,title:`${r.get("capital.signTermsAndConditionsToReceiveFunds")}${n?` ${r.get("capital.thisOfferExpiresOn",{values:{date:i(n,ad)}})}`:""}`,description:a(he,{className:Vl.button,onClick:()=>u(!0),disabled:d,state:d?"loading":void 0,children:r.get("capital.goToTermsAndConditions")})})},YT=({grant:e,showDetails:t})=>{const{i18n:n}=W(),{dateFormat:r}=rn(),s=A(()=>Z0(e),[e]),i=S(()=>t==null?void 0:t("unscheduledRepayment"),[t]),o=A(()=>{var c,u;return a("div",{className:At.cardContent,children:[a("div",{className:At.statusContainer,children:[a(k,{variant:I.CAPTION,className:M({[At.textSecondary]:s.isLabelColorSecondary}),testId:"grant-amount-label",children:n.get(s.amountLabelKey)}),a("div",{children:e.status==="Active"?a(K,{children:[a(k,{variant:I.CAPTION,el:ne.SPAN,children:n.get("capital.termEnds")}),a(k,{variant:I.CAPTION,stronger:!0,el:ne.SPAN,children:r(s.repaymentPeriodEndDate,ad)})]}):s.statusKey?s.statusTooltipKey?a(gn,{content:n.get(s.statusTooltipKey),children:a("div",{children:a(Mt,{label:n.get(s.statusKey),variant:s.statusTagVariant})})}):a(Mt,{label:n.get(s.statusKey),variant:s.statusTagVariant}):null})]}),a(k,{variant:I.TITLE,medium:!0,className:M({[At.textSecondary]:s.isAmountColorSecondary}),children:n.amount(s.amount.value,s.amount.currency)}),s.isProgressBarVisible&&a(kT,{className:At.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)} ${(u=n.get("capital.repaid"))==null?void 0:u.toLowerCase()}`}}),s.isGrantIdVisible?a("div",{className:At.grantID,children:a(Bn,{textToCopy:e.id,buttonLabel:n.get("capital.grantID"),isHovered:!0,type:"Text","data-testid":"grant-id-copy-text"})}):null,s.hasAlerts?a(K,{children:e.missingActions&&e.missingActions.length?e.missingActions.map(l=>a(GT,{action:l,className:At.alert,offerExpiresAt:e.offerExpiresAt},l.type)):a(pn,{className:At.alert,type:Fe.HIGHLIGHT,title:n.get("capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon")})}):s.hasUnscheduledRepaymentDetails&&a("div",{className:At.actionsBar,children:a(he,{onClick:i,className:At.mainActionBtn,variant:se.SECONDARY,fullWidth:!0,children:n.get("capital.sendRepayment")})})]})},[n,r,e,s,i]);return a("div",{className:At.base,children:a(gc,{renderHeader:o,filled:s.isBackgroundFilled,inFlow:!0,children:s.hasDetails&&a(UT,{grant:e})})})},jT={revocation:"revocation",unscheduledRepayment:"unscheduledRepayment"},zT=({className:e,content:t,contentClassName:n,textToCopy:r,label:s,labelClassName:i})=>{const{i18n:o}=W();return a("div",{className:e,children:[a("dt",{className:i,children:a(k,{el:ne.SPAN,variant:I.CAPTION,children:o.get(s)})}),a("dd",{className:n,children:r?a(Bn,{buttonLabel:t,textToCopy:r,showCopyTextTooltip:!1,type:"Text"}):a(k,{el:ne.SPAN,variant:I.BODY,children:t})})]})},qT=(e,t=!0)=>{const n=t?" ":" ";return e.replace(/\s+/g,"").replace(/([A-Z\d]{4}(?!$))/gi,`$1${n}`)},KT=e=>{switch(e){case"iban":case"accountNumber":case"routingNumber":case"sortCode":return!0;case"region":default:return!1}},VT=(e,t)=>KT(e)?t:void 0,ZT=(e,t)=>{switch(e){case"iban":return t&&qT(t);default:return t}},XT=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}},fo="adyen-pe-capital-account-details",Si={detail:`${fo}__detail`,detailContent:`${fo}__detail-content`,detailLabel:`${fo}__detail-label`},QT=({bankAccount:e,className:t})=>{const n=A(()=>{const{accountNumber:r,iban:s,order:i,region:o,...c}=e,u=Object.keys({iban:s,accountNumber:r,...c,region:o}),l=Array.isArray(i)?i.filter(h=>u.includes(h)):u;return[...new Set(l)]},[e]);return a("dl",{className:M(fo,t),children:n.map(r=>{const s=e[r];return s?a(K,{children:a(zT,{className:Si.detail,contentClassName:Si.detailContent,labelClassName:Si.detailLabel,label:XT(r),content:ZT(r,s),textToCopy:VT(r,s)})},r):null})})},JT=({children:e,className:t,headerTitleKey:n,headerSubtitleKey:r,onDetailsClose:s})=>{const{i18n:i}=W();return a("div",{className:M("adyen-pe-grant-adjustment-details",t),children:[a(si,{titleKey:n,subtitleKey:r,children:a(he,{onClick:s,variant:se.TERTIARY,iconButton:!0,classNameModifiers:["circle"],"aria-label":i.get("dismiss"),children:a(Ze,{name:"cross"})})}),e]})},ns="adyen-pe-grant-repayment-details",to={balanceInfo:`${ns}__balance-info`,repaymentInfo:`${ns}__repayment-info`,repaymentAccount:`${ns}__repayment-account`,repaymentNotice:`${ns}__repayment-notice`},eA=({grant:e,onDetailsClose:t})=>{const{i18n:n}=W(),r=A(()=>{var i;return(i=e.unscheduledRepaymentAccounts)==null?void 0:i[0]},[e.unscheduledRepaymentAccounts]),s=A(()=>{const{currency:i,value:o}=e.remainingTotalAmount;return n.amount(o,i)},[n,e.remainingTotalAmount]);return r?a(JT,{className:ns,onDetailsClose:t,headerTitleKey:"capital.sendRepayment",headerSubtitleKey:"capital.sendRepaymentSubtitle",children:[a("div",{className:to.repaymentInfo,children:[a("section",{className:to.repaymentAccount,children:[a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:n.get("capital.bankAccountDetails")}),a(QT,{bankAccount:r})]}),a("section",{className:to.repaymentNotice,children:a(k,{el:ne.PARAGRAPH,variant:I.CAPTION,children:n.get("capital.sendRepaymentNotice")})})]}),a(ai,{className:to.balanceInfo,children:a(k,{variant:I.BODY,children:a(ia,{translationKey:"capital.repaymentBalanceInfo",fills:{amount:a(k,{el:ne.SPAN,variant:I.BODY,strongest:!0,children:s})}})})})]}):null},tA=(e,t)=>{if(!t)return 0;const n=e.findIndex(r=>r.id===t);return n===-1?0:n},nA=(e,t)=>{const[n,r]=x(!1),[s,i]=x(tA(e,t)),o=Y([]),c=Y(Mr().replace(/.*?(?=\d+$)/,"")).current,u=e.length,l=A(()=>{const f=[];for(let y=0;y<u;y++)f[y]=_=>o.current[y]=_;return f},[u]),h=S((f,y)=>{var T;let _=f;do if(_<0&&(_+=u),_>=u&&(_%=u),((T=o.current[_])==null?void 0:T.disabled)===!1)break;while((_+=y)!==f);return _},[u]),d=S(f=>{var _;const y=o.current.findIndex(T=>T===f.currentTarget);((_=o.current[y])==null?void 0:_.disabled)===!1&&(f.preventDefault(),i(y))},[]),m=A(()=>{const f={[V.ARROW_LEFT]:()=>i(y=>h(y-1,-1)),[V.ARROW_RIGHT]:()=>i(y=>h(y+1,1)),[V.HOME]:()=>i(h(0,1)),[V.END]:()=>i(h(u-1,-1))};return y=>{var _;f[y.key]&&(y.preventDefault(),(_=f[y.key])==null||_.call(f),r(!0))}},[u]);return $(()=>{if(n){const f=o.current[s];(f==null?void 0:f.disabled)===!1&&(f==null||f.focus()),r(!1)}},[s,n]),{activeIndex:s,onClick:d,onKeyDown:m,refs:l,uniqueId:c}};function rA({defaultItem:e,items:t}){const{activeIndex:n,onClick:r,onKeyDown:s,refs:i,uniqueId:o}=nA(t,e),{i18n:c}=W();return a("div",{children:[a("div",{role:"radiogroup",className:"adyen-fp-segmented-control",children:t.map((u,l)=>{const h=n===l;return a("button",{role:"radio",name:u.id,ref:i[l],id:`item:${o}-${u.id}`,className:"adyen-fp-segmented-control__item","aria-checked":h,"aria-controls":`segment:${o}-${u.id}`,onClick:h?void 0:r,onKeyDown:s,disabled:u.disabled,tabIndex:h?0:-1,children:a(k,{el:ne.SPAN,variant:I.BODY,className:"adyen-fp-segmented-control__item-label",stronger:!0,children:c.get(u.label)})},`item:${o}-${u.id}`)})}),a("div",{className:"adyen-fp-segmented-content-container",children:t.map((u,l)=>a("section",{id:`segment:${o}-${u.id}`,className:"adyen-fp-segmented-content","aria-labelledby":`item:${o}-${u.id}`,hidden:n!==l,children:u.content},`segment:${o}-${u.id}`))})]})}const Ri=({grants:e,showDetails:t})=>a(Ac,{classNames:"adyen-pe-grant-list__items",children:e.map(n=>a("li",{children:a(YT,{grant:n,showDetails:t.bind(null,n)})},n.id))}),sA=({grantList:e,hideTitle:t,newOfferAvailable:n,onNewOfferRequest:r})=>{const[s,i]=x(),[o,c]=x(),{i18n:u}=W(),[l,h]=A(()=>{const T=[],g=[];return e==null||e.forEach(E=>{E.status==="Active"||E.status==="Pending"?T.push(E):g.push(E)}),[T,g]},[e]),d=A(()=>e.length>1&&l.length&&h.length?"SegmentedGrants":"UnifiedGrants",[l.length,e.length,h.length]),m=A(()=>n&&!l.some(T=>T.status==="Pending"),[l,n]),f=A(()=>o&&Z0(o),[o]),y=S(()=>i(void 0),[]),_=S((T,g)=>{i(g),c(T)},[]);if(o)switch(s){case jT.unscheduledRepayment:{if(f!=null&&f.hasUnscheduledRepaymentDetails)return a(eA,{grant:o,onDetailsClose:y});break}}return a("div",{className:"adyen-pe-grant-list",children:[a("div",{className:"adyen-pe-grant-list__header-container",children:[a(Wn,{hideTitle:t,titleKey:"capital.businessFinancing"}),m?a(he,{onClick:r,className:"adyen-pe-grant-list__offer-button",variant:se.SECONDARY,children:u.get("capital.seeNewOffer")}):null]}),d==="UnifiedGrants"&&a(Ri,{grants:e,showDetails:_}),d==="SegmentedGrants"&&a(rA,{items:[{label:"capital.inProgress",content:a(Ri,{grants:l,showDetails:_}),id:"active"},{label:"capital.closed",content:a(Ri,{grants:h,showDetails:_}),id:"inactive"}],defaultItem:"active"})]})},oA=({externalDynamicOffersConfig:e,grantList:t,newOfferAvailable:n,onFundsRequest:r,onGrantListUpdateRequest:s,onOfferDismiss:i})=>{const[o,c]=x(!1),u=S(()=>c(!1),[]),l=S(()=>c(!0),[]),h=S(()=>{i?i(u):u()},[u,i]),d=S(m=>{r?r(m):(s(m),c(!1))},[r,s]);return a(K,{children:o?a(Cc,{externalDynamicOffersConfig:e,onFundsRequest:d,onOfferDismiss:h}):a(sA,{grantList:t,newOfferAvailable:n,onNewOfferRequest:l})})},iA=({hideTitle:e,onContactSupport:t,onFundsRequest:n,onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i})=>{var N,D,C;const o=(D=(N=Se())==null?void 0:N.extraConfig)==null?void 0:D.legalEntity,c=A(()=>Ec(o),[o]),{getGrants:u,getDynamicGrantOffersConfiguration:l}=Se().endpoints,h=Ot({fetchOptions:{enabled:!!u&&c},queryFn:S(async()=>u==null?void 0:u(U),[u])}),d=Ot({fetchOptions:{enabled:!!l&&c},queryFn:S(async()=>l==null?void 0:l(U),[l])}),m=d.data,[f,y]=x(),_=A(()=>{var O,R;return f?[f,...((O=h.data)==null?void 0:O.data)||[]]:(R=h.data)==null?void 0:R.data},[(C=h.data)==null?void 0:C.data,f]),T=S(O=>{n?n(O):y(O)},[n]),g=A(()=>!!(d.error&&h.error||d.error&&!(_!=null&&_.length)),[d.error,_==null?void 0:_.length,h.error]),E=A(()=>{if(c){if(g)return"Error";if(!u&&!l||!m&&!_||h.isFetching||d.isFetching)return"Loading";if(_!=null&&_.length)return"GrantList";if(m!=null&&m.maxAmount&&(m!=null&&m.minAmount))return"PreQualified"}else return"UnsupportedRegion";return"Unqualified"},[l,m,d.isFetching,_,u,h.isFetching,g,c]),v=A(()=>!!(m&&m.minAmount&&m.maxAmount),[m]);return a("div",{className:cn.base,children:(()=>{switch(E){case"Loading":return a("div",{className:cn.skeletonContainer,children:[a("div",{className:cn.headerSkeleton}),a("div",{className:cn.skeleton})]});case"Error":return a("div",{className:cn.errorContainer,children:[a(Wn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(en,{absolutePosition:!1,outlined:!1,withImage:!0,onContactSupport:t,...G0(d.error,t)})]});case"GrantList":return _&&a(oA,{externalDynamicOffersConfig:m,grantList:_,hideTitle:e,newOfferAvailable:v,onFundsRequest:n,onGrantListUpdateRequest:y,onOfferDismiss:r});case"PreQualified":return a(DT,{onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i,hideTitle:e,dynamicOffer:m,onFundsRequest:T});case"Unqualified":return a(bT,{hideTitle:e});case"UnsupportedRegion":return a("div",{className:cn.errorContainer,children:[a(Wn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(ii,{unsupportedRegion:!0})]});default:return null}})()})};class X0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(iA,{...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,h;const{session:n}=this.props.core;await Qu(n);const{getDynamicGrantOffersConfiguration:r,getGrants:s}=n.context.endpoints,i=(l=n.context.extraConfig)==null?void 0:l.legalEntity;if(!Ec(i))return{state:"isInUnsupportedRegion"};const[o,c]=await Promise.all([r==null?void 0:r(U).catch(te),s==null?void 0:s(U).catch(te)]);let u="isUnqualified";return c&&((h=c.data)==null?void 0:h.length)>0?u="hasRequestedGrants":o&&o.minAmount&&(u="isPreQualified"),{state:u}}}B(X0,"type","capitalOverview");async function aA(e){return await new ma(e).initialize()}exports.AdyenPlatformExperience=aA;exports.CapitalOfferElement=j0;exports.CapitalOverviewElement=X0;exports.Core=ma;exports.PayoutElement=Ud;exports.PayoutsElement=D0;exports.ReportsElement=V0;exports.TransactionElement=k0;exports.TransactionsElement=W0;exports.all_locales=ua;exports.da_DK=mu;exports.de_DE=pu;exports.en_US=_o;exports.es_ES=_u;exports.fi_FI=yu;exports.fr_FR=gu;exports.it_IT=Tu;exports.nl_NL=Au;exports.no_NO=Eu;exports.pt_BR=Nu;exports.sv_SE=Cu;exports.u=a;
12
- //# sourceMappingURL=index-CpBGZ2AH.cjs.map