| Server IP : 146.59.209.152 / Your IP : 216.73.216.152 Web Server : Apache System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : monpetu ( 144298) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/monpetu/www/ipprint/wp-content/plugins/woocommerce-payments/dist/chunks/ |
Upload File : |
{"version":3,"file":"chunks/wcpay-overview.js?ver=9c79aa3803b6846e3d65","mappings":"iNAmBO,MAAMA,EAAgBA,CAI5BC,EAIAC,KAEAC,EAAAA,EAAAA,IAAa,CACZC,KAAM,WACNC,KAAM,aAAcH,YACpBD,OAoBF,EAPkDK,EAAIL,KAAIC,mBACzDD,GACCM,EAAAA,EAAAA,KAACC,EAAAA,KAAI,CAACC,KAAOT,EAAeC,EAAIC,GAAiBQ,UAChDH,EAAAA,EAAAA,KAACI,EAAAA,EAAe,CAACC,KAAO,OAEtB,I,qDCrCL,MAkBA,EAlBsBC,KAEpBN,EAAAA,EAAAA,KAAA,OACCO,UAAU,iBACVC,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLC,MAAM,6BAA4BT,UAElCH,EAAAA,EAAAA,KAAA,QACCa,EAAE,+5BACFF,KAAK,a,+DCZF,MAAMG,EAAc,CAC1BC,SAASC,EAAAA,EAAAA,IAAI,SAAU,wBACvBC,YAAYD,EAAAA,EAAAA,IAAI,aAAc,yBAQlBE,EACZ,CACCC,MAAMH,EAAAA,EAAAA,IAAI,mBAAoB,wBAC9BI,UAAUJ,EAAAA,EAAAA,IAAI,uBAAwB,wBACtCK,SAASL,EAAAA,EAAAA,IAAI,UAAW,wBACxBM,YAAYN,EAAAA,EAAAA,IAAI,aAAc,wBAC9BO,UAAUP,EAAAA,EAAAA,IAAI,WAAY,wBAC1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B,QAGnB9gB,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAACgf,GAAc,CACdL,eAAiBA,EACjBlE,YAAcyc,EACd9Y,YAAcD,EAAcC,gBAG5B0Y,IACD92B,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAAC4xB,GAAoB,MAGrB0C,IACDt0B,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAACq4B,GAAAA,EAAiB,OAGhBjC,IAAqBC,IACxBr2B,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAACs4B,GAAkB,MAGnBrB,IACDj3B,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAACmf,GAAsB,OAGzBnf,EAAAA,EAAAA,KAAC63B,GAAAA,EAAa,CAAA13B,UACbH,EAAAA,EAAAA,KAACu4B,GAAAA,EAAkB,S,+BChZhB,MAAMC,EAAkBC,GACvBxN,KAAKU,UAAW8M,EAAY3qB,OAAOC,KAAM0qB,GAAa7oB,O","sources":["webpack://woocommerce-payments/./client/components/details-link/index.tsx","webpack://woocommerce-payments/./client/components/stripe-spinner/index.tsx","webpack://woocommerce-payments/./client/deposits/strings.ts","webpack://woocommerce-payments/./client/embedded-components/hooks.tsx","webpack://woocommerce-payments/./client/embedded-components/appearance.ts","webpack://woocommerce-payments/./client/embedded-components/index.tsx","webpack://woocommerce-payments/./client/onboarding/context.tsx","webpack://woocommerce-payments/./client/onboarding/tracking.ts","webpack://woocommerce-payments/./client/onboarding/translations/descriptions.tsx","webpack://woocommerce-payments/./client/onboarding/utils.ts","webpack://woocommerce-payments/./client/components/account-balances/balance-block.tsx","webpack://woocommerce-payments/./client/deposits/instant-payouts/modal.tsx","webpack://woocommerce-payments/./client/deposits/instant-payouts/index.tsx","webpack://woocommerce-payments/./client/components/account-balances/strings.ts","webpack://woocommerce-payments/./client/components/account-balances/balance-tooltip.tsx","webpack://woocommerce-payments/./client/overview/hooks.ts","webpack://woocommerce-payments/./client/components/account-balances/index.tsx","webpack://woocommerce-payments/./client/components/account-details/account-tools/strings.tsx","webpack://woocommerce-payments/./client/components/account-details/account-tools/index.tsx","webpack://woocommerce-payments/./client/components/progress-bar/index.tsx","webpack://woocommerce-payments/./client/components/account-details/account-fees/expiration-bar.js","webpack://woocommerce-payments/./client/components/account-details/account-fees/expiration-description.js","webpack://woocommerce-payments/./client/utils/account-fees.tsx","webpack://woocommerce-payments/./client/components/account-details/account-fees/index.js","webpack://woocommerce-payments/./client/components/account-details/utils.ts","webpack://woocommerce-payments/./client/components/account-details/banner.tsx","webpack://woocommerce-payments/./client/components/account-details/payout-status-wrapper.tsx","webpack://woocommerce-payments/./client/components/account-details/header-title.tsx","webpack://woocommerce-payments/./client/components/account-details/index.tsx","webpack://woocommerce-payments/./client/overview/modal/connection-success/strings.tsx","webpack://woocommerce-payments/./client/overview/modal/connection-success/index.tsx","webpack://woocommerce-payments/./client/components/deposits-overview/recent-deposits-list.tsx","webpack://woocommerce-payments/./client/components/deposits-overview/deposit-notices.tsx","webpack://woocommerce-payments/./client/components/deposits-overview/index.tsx","webpack://woocommerce-payments/./client/components/deposits-overview/hooks.ts","webpack://woocommerce-payments/./client/components/jetpack-idc-notice/index.tsx","webpack://woocommerce-payments/./client/components/inline-label-select/index.tsx","webpack://woocommerce-payments/./client/components/welcome/currency-select.tsx","webpack://woocommerce-payments/./client/components/welcome/index.tsx","webpack://woocommerce-payments/./client/components/welcome/hooks.ts","webpack://woocommerce-payments/./client/overview/inbox-notifications/index.js","webpack://woocommerce-payments/./client/utils/update-woocommerce-user-meta.js","webpack://woocommerce-payments/./client/constants/time.ts","webpack://woocommerce-payments/./client/overview/task-list/index.js","webpack://woocommerce-payments/./client/data/dispute-readiness/action-types.ts","webpack://woocommerce-payments/./client/data/dispute-readiness/reducer.ts","webpack://woocommerce-payments/./client/data/dispute-readiness/actions.ts","webpack://woocommerce-payments/./client/data/dispute-readiness/resolvers.ts","webpack://woocommerce-payments/./client/data/dispute-readiness/selectors.ts","webpack://woocommerce-payments/./client/data/dispute-readiness/store.js","webpack://woocommerce-payments/./client/data/dispute-readiness/hooks.ts","webpack://woocommerce-payments/./client/overview/dispute-readiness/index.tsx","webpack://woocommerce-payments/./client/overview/index.js","webpack://woocommerce-payments/./client/utils/data.js"],"sourcesContent":["/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport InfoOutlineIcon from 'gridicons/dist/info-outline';\nimport { Link } from '@woocommerce/components';\n\n/**\n * Internal dependencies\n */\nimport { getAdminUrl } from 'wcpay/utils';\n\n/**\n * The parent segment is the first part of the URL after the /payments/ path.\n */\ntype ParentSegment = 'payouts' | 'transactions';\n\nexport const getDetailsURL = (\n\t/**\n\t * The ID of the object to link to.\n\t */\n\tid: string,\n\t/**\n\t * The parent segment is the first part of the URL after the /payments/ path.\n\t */\n\tparentSegment: ParentSegment\n): string =>\n\tgetAdminUrl( {\n\t\tpage: 'wc-admin',\n\t\tpath: `/payments/${ parentSegment }/details`,\n\t\tid,\n\t} );\n\ninterface DetailsLinkProps {\n\t/**\n\t * The ID of the object to link to.\n\t */\n\tid?: string;\n\t/**\n\t * The parent segment is the first part of the URL after the /payments/ path.\n\t */\n\tparentSegment: ParentSegment;\n}\nconst DetailsLink: React.FC< DetailsLinkProps > = ( { id, parentSegment } ) =>\n\tid ? (\n\t\t<Link href={ getDetailsURL( id, parentSegment ) }>\n\t\t\t<InfoOutlineIcon size={ 18 } />\n\t\t</Link>\n\t) : null;\n\nexport default DetailsLink;\n","/**\n * External dependencies\n */\nimport React from 'react';\n\n/**\n * Internal dependencies\n */\nimport './style.scss';\n\n/**\n * Copy of the Stripe spinner in order to avoid pulling another Stripe dependency.\n */\nconst StripeSpinner = () => {\n\treturn (\n\t\t<svg\n\t\t\tclassName=\"stripe-spinner\" // Add a class for targeting in CSS\n\t\t\twidth=\"29\"\n\t\t\theight=\"29\"\n\t\t\tviewBox=\"0 0 29 29\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M14.3308 28.3333C14.0453 28.3333 13.7714 28.2199 13.5695 28.018C13.3675 27.816 13.2541 27.5422 13.2541 27.2566C13.2541 26.971 13.3675 26.6972 13.5695 26.4952C13.7714 26.2933 14.0453 26.1799 14.3308 26.1799C17.4727 26.1799 20.4859 24.9317 22.7076 22.7101C24.9293 20.4884 26.1774 17.4752 26.1774 14.3333C26.1774 11.1914 24.9293 8.17821 22.7076 5.95655C20.4859 3.73489 17.4727 2.48677 14.3308 2.48677C12.5754 2.48495 10.8416 2.87419 9.25541 3.62623C7.66923 4.37826 6.27049 5.4742 5.16082 6.83441C5.07124 6.94388 4.96097 7.03464 4.83631 7.1015C4.71165 7.16836 4.57504 7.21001 4.43428 7.22407C4.15001 7.25248 3.8661 7.16679 3.645 6.98587C3.42391 6.80494 3.28374 6.54359 3.25534 6.25932C3.22694 5.97505 3.31262 5.69114 3.49355 5.47005C4.80533 3.86303 6.45849 2.56827 8.33301 1.67977C10.2075 0.791267 12.2564 0.331321 14.3308 0.333319C22.0626 0.333319 28.3308 6.6015 28.3308 14.3333C28.3308 22.0651 22.0626 28.3333 14.3308 28.3333Z\"\n\t\t\t\tfill=\"#4F575D\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n\nexport default StripeSpinner;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport type { DepositStatus, PayoutFailureCode } from 'wcpay/types/deposits';\n\nexport const displayType = {\n\tdeposit: __( 'Payout', 'woocommerce-payments' ),\n\twithdrawal: __( 'Withdrawal', 'woocommerce-payments' ),\n};\n\n/**\n * Labels to display for each deposit status.\n *\n * 'deducted' represents a deposit of the type 'withdrawal' and status 'paid'.\n */\nexport const depositStatusLabels: Record< DepositStatus | 'deducted', string > =\n\t{\n\t\tpaid: __( 'Completed (paid)', 'woocommerce-payments' ),\n\t\tdeducted: __( 'Completed (deducted)', 'woocommerce-payments' ),\n\t\tpending: __( 'Pending', 'woocommerce-payments' ),\n\t\tin_transit: __( 'In transit', 'woocommerce-payments' ),\n\t\tcanceled: __( 'Canceled', 'woocommerce-payments' ),\n\t\tfailed: __( 'Failed', 'woocommerce-payments' ),\n\t};\n\n/**\n * Mapping of payout failure code to display string.\n */\nexport const payoutFailureMessages: Record< PayoutFailureCode, string > = {\n\tinsufficient_funds: __(\n\t\t'Your account has insufficient funds to cover your negative balance.',\n\t\t'woocommerce-payments'\n\t),\n\tbank_account_restricted: __(\n\t\t'The bank account has restrictions on either the type or number of transfers allowed. This normally indicates that the bank account is a savings or other non-checking account.',\n\t\t'woocommerce-payments'\n\t),\n\tdebit_not_authorized: __(\n\t\t'Debit transactions are not approved on your bank account. Bank accounts need to be set up for both credit and debit transfers.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_card: __(\n\t\t'The card used was invalid. This usually means the card number is invalid or the account has been closed.',\n\t\t'woocommerce-payments'\n\t),\n\tdeclined: __(\n\t\t'The bank has declined this transfer. Please contact the bank for more information.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_transaction: __(\n\t\t'The transfer was refused by the issuing bank because this type of payment is not permitted for this card. Please contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\trefer_to_card_issuer: __(\n\t\t'The transfer was refused by the card issuer. Please contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\tunsupported_card: __(\n\t\t'The bank no longer supports transfers to this card.',\n\t\t'woocommerce-payments'\n\t),\n\tlost_or_stolen_card: __(\n\t\t'The card used has been reported lost or stolen. Please contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_issuer: __(\n\t\t'The issuer specified by the card number does not exist. Please verify card details.',\n\t\t'woocommerce-payments'\n\t),\n\texpired_card: __(\n\t\t'The card used has expired. Please switch to a different card or payment method. Contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\tcould_not_process: __(\n\t\t// The same failure code is used if processing is failed by the bank or Stripe.\n\t\t'The bank or the payment processor could not process this transfer.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_account_number: __(\n\t\t'The bank account details on file are probably incorrect. While the routing number appears correct, the account number is invalid.',\n\t\t'woocommerce-payments'\n\t),\n\tincorrect_account_holder_name: __(\n\t\t'The bank account holder name on file appears to be incorrect.',\n\t\t'woocommerce-payments'\n\t),\n\taccount_closed: __(\n\t\t'The bank account has been closed.',\n\t\t'woocommerce-payments'\n\t),\n\tno_account: __(\n\t\t'The bank account details on file are probably incorrect. No bank account could be located with those details.',\n\t\t'woocommerce-payments'\n\t),\n\texceeds_amount_limit: __(\n\t\t'The card issuer has declined the transaction as it will exceed the card limit. Please switch to a different card or payment method. Contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\taccount_frozen: __(\n\t\t'The bank account has been frozen.',\n\t\t'woocommerce-payments'\n\t),\n\tissuer_unavailable: __(\n\t\t'The issuing bank is currently unavailable. Our system will automatically try again on your next payout date, or you can switch to a different payout method.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_currency: __(\n\t\t'The bank was unable to process this transfer because of its currency. This is probably because the bank account cannot accept payments in that currency.',\n\t\t'woocommerce-payments'\n\t),\n\tincorrect_account_type: __(\n\t\t'The bank account type is incorrect. This value can only be checking or savings in most countries. In Japan, it can only be futsu or toza.',\n\t\t'woocommerce-payments'\n\t),\n\tincorrect_account_holder_details: __(\n\t\t'The bank could not process this transfer. Please check that the entered bank account details match the corresponding account bank statement exactly.',\n\t\t'woocommerce-payments'\n\t),\n\tbank_ownership_changed: __(\n\t\t'The destination bank account is no longer valid because its branch has changed ownership.',\n\t\t'woocommerce-payments'\n\t),\n\texceeds_count_limit: __(\n\t\t'The selected card has exceeded its card usage frequency limit. Please switch to a different card or payment method. Contact the issuing bank for clarification.',\n\t\t'woocommerce-payments'\n\t),\n\tincorrect_account_holder_address: __(\n\t\t'Your bank notified us that the bank account holder address on file is incorrect.',\n\t\t'woocommerce-payments'\n\t),\n\tincorrect_account_holder_tax_id: __(\n\t\t'Your bank notified us that the bank account holder tax ID on file is incorrect.',\n\t\t'woocommerce-payments'\n\t),\n\tinvalid_account_number_length: __(\n\t\t'Your bank notified us that the bank account number is too long.',\n\t\t'woocommerce-payments'\n\t),\n};\n","/**\n * External dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { NAMESPACE } from 'wcpay/data/constants';\nimport { AccountSession } from './types';\nimport { OnboardingFields } from 'wcpay/onboarding/types';\nimport { fromDotNotation } from 'wcpay/onboarding/utils';\n\n/**\n * Make an API request to create an account session.\n */\nexport const createAccountSession = async (): Promise< AccountSession > => {\n\treturn await apiFetch< AccountSession >( {\n\t\tpath: addQueryArgs( `${ NAMESPACE }/accounts/session`, {} ),\n\t\tmethod: 'GET',\n\t} );\n};\n\n/**\n * Make an API request to create an KYC account session.\n *\n * @param data The form data.\n */\nexport const createKycAccountSession = async (\n\tdata: OnboardingFields\n): Promise< AccountSession > => {\n\tconst urlParams = new URLSearchParams( window.location.search );\n\tconst isTestDrive = urlParams.get( 'test_drive' ) === 'true';\n\n\treturn await apiFetch< AccountSession >( {\n\t\tpath: `${ NAMESPACE }/onboarding/kyc/session`,\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\tself_assessment: fromDotNotation( data ),\n\t\t\tcapabilities: urlParams.get( 'capabilities' ) || '',\n\t\t\tmode: isTestDrive ? 'test' : 'live',\n\t\t},\n\t} );\n};\n","/* eslint-disable max-len */\n\n/**\n * Customised appearance variables for the external KYC flow.\n */\nexport default {\n\tvariables: {\n\t\tcolorPrimary: '#873EFF',\n\t\tcolorBackground: '#FFFFFF',\n\t\tbuttonPrimaryColorBackground: '#3858E9',\n\t\tbuttonPrimaryColorBorder: '#3858E9',\n\t\tbuttonPrimaryColorText: '#FFFFFF',\n\t\tbuttonSecondaryColorBackground: '#FFFFFF',\n\t\tbuttonSecondaryColorBorder: '#3858E9',\n\t\tbuttonSecondaryColorText: '#3858E9',\n\t\tcolorText: '#101517',\n\t\tcolorSecondaryText: '#50575E',\n\t\tactionPrimaryColorText: '#3858E9',\n\t\tactionSecondaryColorText: '#101517',\n\t\tcolorBorder: '#DDDDDD',\n\t\tformHighlightColorBorder: '#3858E9',\n\t\tformAccentColor: '#3858E9',\n\t\tcolorDanger: '#CC1818',\n\t\toffsetBackgroundColor: '#F0F0F0',\n\t\tformBackgroundColor: '#FFFFFF',\n\t\tbadgeNeutralColorText: '#2C3338',\n\t\tbadgeNeutralColorBackground: '#F6F7F7',\n\t\tbadgeNeutralColorBorder: '#F6F7F7',\n\t\tbadgeSuccessColorText: '#005C12',\n\t\tbadgeSuccessColorBackground: '#EDFAEF',\n\t\tbadgeSuccessColorBorder: '#EDFAEF',\n\t\tbadgeWarningColorText: '#614200',\n\t\tbadgeWarningColorBackground: '#FCF9E8',\n\t\tbadgeWarningColorBorder: '#FCF9E8',\n\t\tbadgeDangerColorText: '#8A2424',\n\t\tbadgeDangerColorBackground: '#FCF0F1',\n\t\tbadgeDangerColorBorder: '#FCF0F1',\n\t\tborderRadius: '2px',\n\t\tbuttonBorderRadius: '2px',\n\t\tformBorderRadius: '2px',\n\t\tbadgeBorderRadius: '2px',\n\t\toverlayBorderRadius: '8px',\n\t\tspacingUnit: '10px',\n\t\tfontFamily:\n\t\t\t\"-apple-system, BlinkMacSystemFont, 'system-ui', 'Segoe UI', 'Helvetica Neue', 'Helvetica', 'Roboto', 'Arial', sans-serif\",\n\t\tfontSizeBase: '16px',\n\t\theadingXlFontSize: '32px',\n\t\theadingXlFontWeight: '400',\n\t\theadingLgFontSize: '24px',\n\t\theadingLgFontWeight: '400',\n\t\theadingMdFontSize: '20px',\n\t\theadingMdFontWeight: '400',\n\t\theadingSmFontSize: '13px',\n\t\theadingSmFontWeight: '600',\n\t\theadingXsFontSize: '12px',\n\t\theadingXsFontWeight: '600',\n\t\tbodyMdFontWeight: '400',\n\t\tbodyMdFontSize: '16px',\n\t\tbodySmFontSize: '13px',\n\t\tbodySmFontWeight: '400',\n\t\tlabelSmFontSize: '12px', // badge font size to match WPDS\n\t\tlabelSmFontWeight: '200', // badges font weight to match WPDS\n\t\tlabelMdFontSize: '13px',\n\t},\n};\n","/**\n * External dependencies\n */\nimport React, { useState, useEffect } from 'react';\nimport {\n\tloadConnectAndInitialize,\n\tLoadError,\n\tLoaderStart,\n\tStripeConnectInstance,\n} from '@stripe/connect-js';\nimport {\n\tConnectAccountOnboarding,\n\tConnectComponentsProvider,\n\tConnectNotificationBanner,\n} from '@stripe/react-connect-js';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { createKycAccountSession, createAccountSession } from './hooks';\nimport appearance from './appearance';\nimport { OnboardingFields } from 'wcpay/onboarding/types';\nimport StripeSpinner from 'wcpay/components/stripe-spinner';\nimport BannerNotice from 'wcpay/components/banner-notice';\nimport { AccountSession } from 'wcpay/embedded-components/types';\nimport { trackRedirected } from 'wcpay/onboarding/tracking';\n\ninterface EmbeddedComponentProps {\n\tonLoaderStart?: ( { elementTagName }: LoaderStart ) => void;\n\tonLoadError?: ( { error, elementTagName }: LoadError ) => void;\n}\n\ninterface EmbeddedAccountOnboardingProps extends EmbeddedComponentProps {\n\tonboardingData: OnboardingFields;\n\tonExit: () => void;\n\tonStepChange?: ( step: string ) => void;\n\tcollectPayoutRequirements?: boolean;\n}\n\ninterface EmbeddedAccountNotificationBannerProps\n\textends EmbeddedComponentProps {\n\tonNotificationsChange: ( {\n\t\ttotal,\n\t\tactionRequired,\n\t}: {\n\t\ttotal: number;\n\t\tactionRequired: number;\n\t} ) => void;\n}\n\n/**\n * Hook to initialize Stripe Connect.\n *\n * @param isOnboarding - Whether this is an onboarding flow.\n * @param onboardingData - Data required for onboarding.\n *\n * @return Returns stripeConnectInstance, error, and loading state.\n */\nconst useInitializeStripe = (\n\tisOnboarding: boolean,\n\tonboardingData: OnboardingFields | null\n) => {\n\tconst [ stripeConnectInstance, setStripeConnectInstance ] =\n\t\tuseState< StripeConnectInstance | null >( null );\n\tconst [ initializationError, setInitializationError ] = useState<\n\t\tstring | null\n\t>( null );\n\tconst [ loading, setLoading ] = useState< boolean >( true );\n\n\tuseEffect( () => {\n\t\tconst initializeStripe = async () => {\n\t\t\ttry {\n\t\t\t\tlet session: AccountSession;\n\n\t\t\t\tif ( isOnboarding && onboardingData ) {\n\t\t\t\t\tsession = await createKycAccountSession( onboardingData );\n\n\t\t\t\t\t// Track the embedded component redirection event.\n\t\t\t\t\ttrackRedirected( true );\n\t\t\t\t} else {\n\t\t\t\t\tsession = await createAccountSession();\n\t\t\t\t}\n\n\t\t\t\tconst { clientSecret, publishableKey } = session;\n\n\t\t\t\tif ( ! publishableKey ) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Unable to start onboarding. If this problem persists, please contact support.',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst instance = loadConnectAndInitialize( {\n\t\t\t\t\tpublishableKey,\n\t\t\t\t\tfetchClientSecret: async () => clientSecret,\n\t\t\t\t\tappearance: {\n\t\t\t\t\t\toverlays: 'drawer',\n\t\t\t\t\t\t...appearance,\n\t\t\t\t\t},\n\t\t\t\t\tlocale: session.locale.replace( '_', '-' ),\n\t\t\t\t} );\n\n\t\t\t\tsetStripeConnectInstance( instance );\n\t\t\t} catch ( err ) {\n\t\t\t\tsetInitializationError(\n\t\t\t\t\terr instanceof Error\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t'Unable to start onboarding. If this problem persists, please contact support.',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t )\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tsetLoading( false );\n\t\t\t}\n\t\t};\n\n\t\tinitializeStripe();\n\t}, [ isOnboarding, onboardingData ] );\n\n\treturn { stripeConnectInstance, initializationError, loading };\n};\n\n/**\n * Embedded Stripe Account Onboarding Component.\n *\n * @param onboardingData - Data required for onboarding.\n * @param onExit - Callback function when the onboarding flow is exited.\n * @param onLoaderStart - Callback function when the onboarding loader starts.\n * @param onLoadError - Callback function when the onboarding load error occurs.\n * @param [onStepChange] - Callback function when the onboarding step changes.\n * @param [collectPayoutRequirements=false] - Whether to collect payout requirements.\n *\n * @return Rendered Account Onboarding component.\n */\nexport const EmbeddedAccountOnboarding: React.FC<\n\tEmbeddedAccountOnboardingProps\n> = ( {\n\tonboardingData,\n\tonExit,\n\tonLoaderStart,\n\tonLoadError,\n\tonStepChange,\n\tcollectPayoutRequirements = false,\n} ) => {\n\tconst { stripeConnectInstance, initializationError } = useInitializeStripe(\n\t\ttrue,\n\t\tonboardingData\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ initializationError && (\n\t\t\t\t<BannerNotice status=\"error\">\n\t\t\t\t\t{ initializationError }\n\t\t\t\t</BannerNotice>\n\t\t\t) }\n\t\t\t{ stripeConnectInstance && (\n\t\t\t\t<ConnectComponentsProvider\n\t\t\t\t\tconnectInstance={ stripeConnectInstance }\n\t\t\t\t>\n\t\t\t\t\t<ConnectAccountOnboarding\n\t\t\t\t\t\tonLoaderStart={ onLoaderStart }\n\t\t\t\t\t\tonLoadError={ onLoadError }\n\t\t\t\t\t\tonExit={ onExit }\n\t\t\t\t\t\tonStepChange={ ( stepChange ) =>\n\t\t\t\t\t\t\tonStepChange?.( stepChange.step )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcollectionOptions={ {\n\t\t\t\t\t\t\tfields: collectPayoutRequirements\n\t\t\t\t\t\t\t\t? 'eventually_due'\n\t\t\t\t\t\t\t\t: 'currently_due',\n\t\t\t\t\t\t\tfutureRequirements: 'omit',\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ConnectComponentsProvider>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\n/**\n * Embedded Stripe Notification Banner Component.\n *\n * @param onLoaderStart - Callback when Stripe component starts rendering.\n * @param onLoadError - Callback when Stripe component load error occurs.\n * @param onNotificationsChange - Callback triggered when notifications change.\n *\n * @return Rendered Notification Banner component.\n */\nexport const EmbeddedConnectNotificationBanner: React.FC<\n\tEmbeddedAccountNotificationBannerProps\n> = ( { onLoaderStart, onLoadError, onNotificationsChange } ) => {\n\tconst { stripeConnectInstance, initializationError, loading } =\n\t\tuseInitializeStripe( false, null );\n\n\treturn (\n\t\t<>\n\t\t\t{ ( loading || ! stripeConnectInstance ) && <StripeSpinner /> }\n\t\t\t{ initializationError && (\n\t\t\t\t<BannerNotice status=\"error\">\n\t\t\t\t\t{ initializationError }\n\t\t\t\t</BannerNotice>\n\t\t\t) }\n\t\t\t{ stripeConnectInstance && (\n\t\t\t\t<ConnectComponentsProvider\n\t\t\t\t\tconnectInstance={ stripeConnectInstance }\n\t\t\t\t>\n\t\t\t\t\t<ConnectNotificationBanner\n\t\t\t\t\t\tonLoaderStart={ onLoaderStart }\n\t\t\t\t\t\tonLoadError={ onLoadError }\n\t\t\t\t\t\tonNotificationsChange={ onNotificationsChange }\n\t\t\t\t\t\tcollectionOptions={ {\n\t\t\t\t\t\t\tfields: 'eventually_due',\n\t\t\t\t\t\t\tfutureRequirements: 'omit',\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ConnectComponentsProvider>\n\t\t\t) }\n\t\t</>\n\t);\n};\n","/**\n * External dependencies\n */\nimport React, { createContext, useContext, useState } from 'react';\nimport { isNil, omitBy } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport { OnboardingFields } from './types';\n\nconst useContextValue = ( initialState = {} as OnboardingFields ) => {\n\tconst [ data, setData ] = useState( initialState );\n\tconst [ errors, setErrors ] = useState( {} as OnboardingFields );\n\tconst [ touched, setTouched ] = useState( {} as OnboardingFields );\n\n\treturn {\n\t\tdata,\n\t\tsetData: ( value: Record< string, string | undefined > ) =>\n\t\t\tsetData( ( prev ) => ( { ...prev, ...value } ) ),\n\t\terrors,\n\t\tsetErrors: ( value: Record< string, string | undefined > ) =>\n\t\t\tsetErrors( ( prev ) => omitBy( { ...prev, ...value }, isNil ) ),\n\t\ttouched,\n\t\tsetTouched: ( value: Record< string, boolean > ) =>\n\t\t\tsetTouched( ( prev ) => ( { ...prev, ...value } ) ),\n\t};\n};\n\ntype ContextValue = ReturnType< typeof useContextValue >;\n\nconst OnboardingContext = createContext< ContextValue | null >( null );\n\nexport const OnboardingContextProvider: React.FC<\n\tReact.PropsWithChildren< {\n\t\tinitialData?: OnboardingFields;\n\t} >\n> = ( { children, initialData } ) => {\n\treturn (\n\t\t<OnboardingContext.Provider value={ useContextValue( initialData ) }>\n\t\t\t{ children }\n\t\t</OnboardingContext.Provider>\n\t);\n};\n\nexport const useOnboardingContext = (): ContextValue => {\n\tconst context = useContext( OnboardingContext );\n\tif ( ! context ) {\n\t\tthrow new Error(\n\t\t\t'useOnboardingContext() must be used within <OnboardingContextProvider>'\n\t\t);\n\t}\n\treturn context;\n};\n","/**\n * External dependencies\n */\nimport { useEffect } from 'react';\n\n/**\n * Internal dependencies\n */\n\nimport { useStepperContext } from 'components/stepper';\nimport { useOnboardingContext } from './context';\nimport { OnboardingFields } from './types';\nimport { recordEvent } from 'tracks';\n\nconst trackedSteps: Set< string > = new Set();\nlet startTime: number;\nlet stepStartTime: number;\n\nconst elapsed = ( time: number ) => Math.round( ( Date.now() - time ) / 1000 );\nconst stepElapsed = () => {\n\tconst result = elapsed( stepStartTime );\n\tstepStartTime = Date.now();\n\treturn result;\n};\n\nexport const trackStarted = (): void => {\n\t// Initialize the elapsed time tracking\n\tstartTime = stepStartTime = Date.now();\n\n\tconst urlParams = new URLSearchParams( window.location.search );\n\n\trecordEvent( 'wcpay_onboarding_flow_started', {\n\t\tsource:\n\t\t\turlParams.get( 'source' )?.replace( /[^\\w-]+/g, '' ) || 'unknown',\n\t} );\n};\n\nexport const trackStepCompleted = ( step: string ): void => {\n\t// We only track a completed step once.\n\tif ( trackedSteps.has( step ) ) return;\n\n\trecordEvent( 'wcpay_onboarding_flow_step_completed', {\n\t\tstep,\n\t\telapsed: stepElapsed(),\n\t} );\n\ttrackedSteps.add( step );\n};\n\nexport const trackRedirected = ( isEmbedded = false ): void => {\n\tconst urlParams = new URLSearchParams( window.location.search );\n\n\trecordEvent( 'wcpay_onboarding_flow_redirected', {\n\t\tis_embedded_onboarding: isEmbedded,\n\t\telapsed: elapsed( startTime ),\n\t\tsource:\n\t\t\turlParams.get( 'source' )?.replace( /[^\\w-]+/g, '' ) || 'unknown',\n\t} );\n};\n\n/**\n * Track a change in the embedded onboarding step.\n *\n * @param step The current step in the embedded onboarding flow. See:\n * https://docs.stripe.com/connect/supported-embedded-components/account-onboarding#step-values\n */\nexport const trackEmbeddedStepChange = ( step: string ): void => {\n\tconst urlParams = new URLSearchParams( window.location.search );\n\n\trecordEvent( 'wcpay_onboarding_flow_embedded_step_change', {\n\t\tstep: step,\n\t\telapsed: elapsed( startTime ),\n\t\tsource:\n\t\t\turlParams.get( 'source' )?.replace( /[^\\w-]+/g, '' ) || 'unknown',\n\t} );\n};\n\nexport const trackKycExit = (): void => {\n\tconst urlParams = new URLSearchParams( window.location.search );\n\n\trecordEvent( 'wcpay_onboarding_kyc_exit', {\n\t\tsource:\n\t\t\turlParams.get( 'source' )?.replace( /[^\\w-]+/g, '' ) || 'unknown',\n\t} );\n};\n\nexport const trackEligibilityModalClosed = (\n\taction: 'dismiss' | 'setup_deposits' | 'enable_payments_only',\n\tsource: string\n): void =>\n\trecordEvent( 'wcpay_onboarding_flow_eligibility_modal_closed', {\n\t\taction,\n\t\tsource,\n\t} );\n\nexport const useTrackAbandoned = (): {\n\ttrackAbandoned: ( method: 'hide' | 'exit' ) => void;\n\tremoveTrackListener: () => void;\n} => {\n\tconst { errors, touched } = useOnboardingContext();\n\tconst { currentStep: step } = useStepperContext();\n\n\tconst trackEvent = ( method = 'hide' ) => {\n\t\tconst event =\n\t\t\tmethod === 'hide'\n\t\t\t\t? 'wcpay_onboarding_flow_hidden'\n\t\t\t\t: 'wcpay_onboarding_flow_exited';\n\t\tconst errored = Object.keys( errors ).filter(\n\t\t\t( field ) => touched[ field as keyof OnboardingFields ]\n\t\t);\n\n\t\tconst urlParams = new URLSearchParams( window.location.search );\n\n\t\trecordEvent( event, {\n\t\t\tstep,\n\t\t\terrored,\n\t\t\telapsed: elapsed( startTime ),\n\t\t\tsource:\n\t\t\t\turlParams.get( 'source' )?.replace( /[^\\w-]+/g, '' ) ||\n\t\t\t\t'unknown',\n\t\t} );\n\t};\n\n\tconst listener = () => {\n\t\tif ( document.visibilityState === 'hidden' ) {\n\t\t\ttrackEvent( 'hide' );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tdocument.addEventListener( 'visibilitychange', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'visibilitychange', listener );\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ step, errors, touched ] );\n\n\treturn {\n\t\ttrackAbandoned: ( method: string ) => {\n\t\t\ttrackEvent( method );\n\t\t\tdocument.removeEventListener( 'visibilitychange', listener );\n\t\t},\n\t\tremoveTrackListener: () =>\n\t\t\tdocument.removeEventListener( 'visibilitychange', listener ),\n\t};\n};\n","/** @format */\n\n/* eslint-disable max-len */\n/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\ninterface DescriptionKeyMap {\n\t[ key: string ]: {\n\t\t[ key: string ]: string;\n\t};\n}\n\nconst businessTypeDescriptionStrings: DescriptionKeyMap = {\n\tgeneric: {\n\t\tindividual: __(\n\t\t\t'Select if you run your own business as an individual and are self-employed',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tcompany: __(\n\t\t\t'Select if you filed documentation to register your business with a government agency',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tnon_profit: __(\n\t\t\t'Select if you run a non-business entity',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tgovernment_entity: __(\n\t\t\t'Select if your business is classed as a government entity',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t},\n\tUS: {\n\t\tindividual: __(\n\t\t\t'Select if you run your own business as an individual and are self-employed',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tcompany: __(\n\t\t\t'Select if you filed documentation to register your business with a government agency',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tnon_profit: __(\n\t\t\t'Select if you have been granted tax-exempt status by the Internal Revenue Service (IRS)',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\tgovernment_entity: __(\n\t\t\t'Select if your business is classed as a government entity',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t},\n};\n\nexport default businessTypeDescriptionStrings;\n","/**\n * External dependencies\n */\nimport { set, toPairs } from 'lodash';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { NAMESPACE } from 'wcpay/data/constants';\nimport { ListItem } from 'components/grouped-select-control';\nimport businessTypeDescriptionStrings from './translations/descriptions';\nimport { Country, FinalizeOnboardingResponse } from './types';\n\nexport const fromDotNotation = (\n\trecord: Record< string, unknown >\n): Record< string, unknown > =>\n\ttoPairs( record ).reduce( ( result, [ key, value ] ) => {\n\t\treturn value != null ? set( result, key, value ) : result;\n\t}, {} );\n\nexport const getAvailableCountries = (): Country[] =>\n\tObject.entries( wcpaySettings?.connect.availableCountries || [] )\n\t\t.map( ( [ key, name ] ) => ( { key, name, types: [] } ) )\n\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) );\n\nexport const getBusinessTypes = (): Country[] => {\n\tconst data = wcpaySettings?.onboardingFieldsData?.business_types;\n\n\treturn (\n\t\t( data || [] )\n\t\t\t.map( ( country ) => ( {\n\t\t\t\t...country,\n\t\t\t\ttypes: country.types.map( ( type ) => ( {\n\t\t\t\t\t...type,\n\t\t\t\t\tdescription: businessTypeDescriptionStrings[ country.key ]\n\t\t\t\t\t\t? businessTypeDescriptionStrings[ country.key ][\n\t\t\t\t\t\t\t\ttype.key\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: businessTypeDescriptionStrings.generic[ type.key ],\n\t\t\t\t} ) ),\n\t\t\t} ) )\n\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) ) || []\n\t);\n};\n\n/**\n * Make an API request to finalize the onboarding process.\n *\n * @param urlSource The source URL.\n */\nexport const finalizeOnboarding = async ( urlSource: string ) => {\n\treturn await apiFetch< FinalizeOnboardingResponse >( {\n\t\tpath: `${ NAMESPACE }/onboarding/kyc/finalize`,\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\tsource: urlSource,\n\t\t\tfrom: 'WCPAY_ONBOARDING_WIZARD',\n\t\t},\n\t} );\n};\n\n/**\n * Get the MCC code for the selected industry.\n *\n * @return {string | undefined} The MCC code for the selected industry. Will return undefined if no industry is selected.\n */\nexport const getMccFromIndustry = (): string | undefined => {\n\tconst industry = wcSettings.admin?.onboarding?.profile?.industry?.[ 0 ];\n\tif ( ! industry ) {\n\t\treturn undefined;\n\t}\n\n\tconst industryToMcc =\n\t\twcpaySettings?.onboardingFieldsData?.industry_to_mcc || {};\n\n\treturn industryToMcc[ industry ];\n};\n\nexport const getMccsFlatList = (): ListItem[] => {\n\tconst data = wcpaySettings?.onboardingFieldsData?.mccs_display_tree;\n\n\t// Right now we support only two levels (top-level groups and items in those groups).\n\t// For safety, we will discard anything else like top-level items or sub-groups.\n\tconst normalizedData = ( data || [] ).filter( ( group ) => {\n\t\tif ( ! group?.items ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst groupItems =\n\t\t\tgroup.items?.filter( ( item ) => ! item?.items ) || [];\n\n\t\treturn groupItems.length;\n\t} );\n\n\treturn normalizedData.reduce( ( acc, group ): ListItem[] => {\n\t\tconst groupItems =\n\t\t\tgroup.items?.map( ( item ): ListItem => {\n\t\t\t\treturn {\n\t\t\t\t\tkey: item.id,\n\t\t\t\t\tname: item.title,\n\t\t\t\t\tgroup: group.id,\n\t\t\t\t\tcontext: item?.keywords ? item.keywords.join( ' ' ) : '',\n\t\t\t\t};\n\t\t\t} ) || [];\n\n\t\treturn [\n\t\t\t...acc,\n\t\t\t{\n\t\t\t\tkey: group.id,\n\t\t\t\tname: group.title,\n\t\t\t\titems: groupItems.map( ( item ) => item.key ),\n\t\t\t},\n\t\t\t...groupItems,\n\t\t];\n\t}, [] as ListItem[] );\n};\n","/**\n * External dependencies\n */\nimport React from 'react';\n\n/**\n * Internal dependencies\n */\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport Loadable from 'components/loadable';\n\n/**\n * BalanceBlockProps\n *\n * @typedef {Object} BalanceBlockProps\n *\n * @property {string} id The balance block id. Used to link the title and amount.\n * @property {string} title The balance title.\n * @property {string} currencyCode Currency code of the balance block.\n * @property {React.ReactElement} tooltip The tooltip element.\n * @property {number} [amount] Optional. The balance amount.\n * @property {boolean} [isLoading] Optional. Whether the balance block is loading.\n */\ninterface BalanceBlockProps {\n\tid: string;\n\ttitle: string;\n\tcurrencyCode: string;\n\ttooltip?: React.ReactElement;\n\tamount?: number;\n\tisLoading?: boolean;\n}\n\n/**\n * Renders a balance block including a title, amount and tooltip.\n *\n * @param {BalanceBlockProps} props Balance block props. See `BalanceBlockProps` interface.\n *\n * @return {JSX.Element} Rendered balance element.\n */\nconst BalanceBlock: React.FC< BalanceBlockProps > = ( {\n\tid,\n\ttitle,\n\tcurrencyCode,\n\ttooltip,\n\tamount = 0,\n\tisLoading = false,\n} ) => {\n\treturn (\n\t\t<div className=\"wcpay-account-balances__balances__item\">\n\t\t\t<p\n\t\t\t\tid={ id }\n\t\t\t\tclassName=\"wcpay-account-balances__balances__item__title\"\n\t\t\t>\n\t\t\t\t<span>{ title }</span>\n\t\t\t\t{ ! isLoading && tooltip }\n\t\t\t</p>\n\t\t\t<p\n\t\t\t\tclassName=\"wcpay-account-balances__balances__item__amount\"\n\t\t\t\taria-labelledby={ id }\n\t\t\t>\n\t\t\t\t<Loadable\n\t\t\t\t\tisLoading={ isLoading }\n\t\t\t\t\tdisplay=\"inline\"\n\t\t\t\t\tplaceholder=\"loading amount\"\n\t\t\t\t\tvalue={ formatCurrency( amount, currencyCode ) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</div>\n\t);\n};\n\nexport default BalanceBlock;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { Button, Modal } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tformatCurrency,\n\tformatExplicitCurrency,\n} from 'multi-currency/interface/functions';\nimport type * as AccountOverview from 'wcpay/types/account-overview';\nimport './style.scss';\n\ninterface InstantPayoutModalProps {\n\tinstantBalance: AccountOverview.InstantBalance;\n\tonClose: () => void;\n\tonSubmit: () => void;\n\tinProgress: boolean;\n}\n\nconst InstantPayoutModal: React.FC< InstantPayoutModalProps > = ( {\n\tinstantBalance: { amount, fee, net, fee_percentage: percentage },\n\tonClose,\n\tonSubmit,\n\tinProgress,\n} ) => {\n\tconst learnMoreHref =\n\t\t'https://woocommerce.com/document/woopayments/payouts/instant-payouts/';\n\tconst feePercentage = `${ percentage }%`;\n\tconst description = createInterpolateElement(\n\t\t/* translators: %s: amount representing the fee percentage, <a>: instant payout doc URL */\n\t\tsprintf(\n\t\t\t__(\n\t\t\t\t'Need cash in a hurry? Instant payouts are available within 30 minutes for a nominal %s service fee. <a>Learn more</a>',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tfeePercentage\n\t\t),\n\t\t{\n\t\t\ta: (\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t<a\n\t\t\t\t\thref={ learnMoreHref }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t/>\n\t\t\t),\n\t\t}\n\t);\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Instant payout', 'woocommerce-payments' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t\tclassName=\"wcpay-instant-payout-modal\"\n\t\t>\n\t\t\t<p>{ description }</p>\n\t\t\t<ul>\n\t\t\t\t<li className=\"wcpay-instant-payout-modal__balance\">\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Balance available for instant payout: ',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t\t<span>{ formatCurrency( amount ) }</span>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"wcpay-instant-payout-modal__fee\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s - amount representing the fee percentage */\n\t\t\t\t\t\t__( '%s service fee: ', 'woocommerce-payments' ),\n\t\t\t\t\t\tfeePercentage\n\t\t\t\t\t) }\n\t\t\t\t\t<span>-{ formatCurrency( fee ) }</span>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"wcpay-instant-payout-modal__net\">\n\t\t\t\t\t{ __( 'Net payout amount: ', 'woocommerce-payments' ) }\n\t\t\t\t\t<span>{ formatExplicitCurrency( net ) }</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\n\t\t\t<div className=\"wcpay-instant-payout-modal__footer\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel', 'woocommerce-payments' ) }\n\t\t\t\t</Button>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ onSubmit }\n\t\t\t\t\tisBusy={ inProgress }\n\t\t\t\t\tdisabled={ inProgress }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s: Monetary amount to pay out */\n\t\t\t\t\t\t__( 'Pay out %s now', 'woocommerce-payments' ),\n\t\t\t\t\t\tformatExplicitCurrency( net )\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n};\n\nexport default InstantPayoutModal;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport './style.scss';\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport InstantPayoutModal from './modal';\nimport { useInstantDeposit } from 'wcpay/data/deposits';\nimport type * as AccountOverview from 'wcpay/types/account-overview';\n\nconst isButtonDisabled = ( instantBalance: AccountOverview.InstantBalance ) => {\n\tlet buttonDisabled = false;\n\tif ( instantBalance.amount === 0 ) {\n\t\tbuttonDisabled = true;\n\t}\n\n\treturn buttonDisabled;\n};\n\ninterface InstantPayoutButtonProps {\n\tinstantBalance: AccountOverview.InstantBalance;\n}\nconst InstantPayoutButton: React.FC< InstantPayoutButtonProps > = ( {\n\tinstantBalance,\n} ) => {\n\tconst [ isModalOpen, setModalOpen ] = useState( false );\n\tconst buttonDisabled = isButtonDisabled( instantBalance );\n\tconst { inProgress, submit } = useInstantDeposit( instantBalance.currency );\n\tconst onClose = () => {\n\t\tsetModalOpen( false );\n\t};\n\tconst onSubmit = () => {\n\t\tsetModalOpen( false );\n\t\tsubmit();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tdisabled={ buttonDisabled }\n\t\t\t\tonClick={ () => setModalOpen( true ) }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t__(\n\t\t\t\t\t\t/* translators: %s: Available instant payout amount */\n\t\t\t\t\t\t'Get %s now',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t),\n\t\t\t\t\tformatCurrency(\n\t\t\t\t\t\tinstantBalance.amount,\n\t\t\t\t\t\tinstantBalance.currency\n\t\t\t\t\t)\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t\t{ ( isModalOpen || inProgress ) && (\n\t\t\t\t<InstantPayoutModal\n\t\t\t\t\tinstantBalance={ instantBalance }\n\t\t\t\t\tinProgress={ inProgress }\n\t\t\t\t\tonSubmit={ onSubmit }\n\t\t\t\t\tonClose={ onClose }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default InstantPayoutButton;\n","/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const fundLabelStrings = {\n\tavailable: __( 'Available funds', 'woocommerce-payments' ),\n\ttotal: __( 'Total balance', 'woocommerce-payments' ),\n};\n\nexport const documentationUrls = {\n\tdepositSchedule:\n\t\t'https://woocommerce.com/document/woopayments/payouts/payout-schedule/',\n\tnegativeBalance:\n\t\t'https://woocommerce.com/document/woopayments/fees/account-showing-negative-balance/',\n};\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport HelpOutlineIcon from 'gridicons/dist/help-outline';\nimport interpolateComponents from '@automattic/interpolate-components';\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ClickTooltip } from 'components/tooltip';\nimport { documentationUrls, fundLabelStrings } from './strings';\nimport InlineNotice from 'components/inline-notice';\n\ntype TotalBalanceTooltipProps = {\n\tbalance: number;\n};\n\ntype AvailableBalanceTooltipProps = {\n\tbalance: number;\n};\n\nexport const TotalBalanceTooltip: React.FC< TotalBalanceTooltipProps > = ( {\n\tbalance,\n} ) => {\n\tconst isBalanceNegative = balance < 0;\n\treturn (\n\t\t<ClickTooltip\n\t\t\tclassName=\"wcpay-account-balances__balances__item__tooltip\"\n\t\t\tbuttonIcon={ <HelpOutlineIcon /> }\n\t\t\tbuttonLabel={ `${ fundLabelStrings.total } tooltip` }\n\t\t\tmaxWidth={ '315px' } // So that tooltip is wide enough and the content in the inline notice is not wrapped.\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ interpolateComponents( {\n\t\t\t\t\t\t\tmixedString: __(\n\t\t\t\t\t\t\t\t'{{bold}}Total balance{{/bold}} combines both pending funds (transactions under processing) and available funds (ready for payout). {{learnMoreLink}}Learn more{{/learnMoreLink}}',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\tbold: <b />,\n\t\t\t\t\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\trel=\"external noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\tdocumentationUrls.depositSchedule\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</>\n\t\t\t\t\t<InlineNotice\n\t\t\t\t\t\tclassName=\"wcpay-account-balances__balances-total-balance-tooltip-notice\"\n\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Total balance = Available funds + Pending funds',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InlineNotice>\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isBalanceNegative &&\n\t\t\t\t\t\t\tinterpolateComponents( {\n\t\t\t\t\t\t\t\tmixedString: __(\n\t\t\t\t\t\t\t\t\t'Negative account balance? {{discoverWhyLink}}Discover why.{{/discoverWhyLink}}',\n\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\t\tdiscoverWhyLink: (\n\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\trel=\"external noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\tdocumentationUrls.negativeBalance\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t</>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n};\n\nexport const AvailableBalanceTooltip: React.FC<\n\tAvailableBalanceTooltipProps\n> = ( { balance } ) => {\n\tconst isBalanceNegative = balance < 0;\n\treturn (\n\t\t<ClickTooltip\n\t\t\tclassName=\"wcpay-account-balances__balances__item__tooltip\"\n\t\t\tbuttonIcon={ <HelpOutlineIcon /> }\n\t\t\tbuttonLabel={ `${ fundLabelStrings.available } tooltip` }\n\t\t\tmaxWidth={ isBalanceNegative ? '280px' : undefined } // So that the negative balance sentence is not wrapped and looks like the design.\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ interpolateComponents( {\n\t\t\t\t\t\t\tmixedString: __(\n\t\t\t\t\t\t\t\t'{{bold}}Available funds{{/bold}} have completed processing and are ready to be dispatched to your bank account. {{learnMoreLink}}Learn more{{/learnMoreLink}}',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\tbold: <b />,\n\t\t\t\t\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\trel=\"external noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\tdocumentationUrls.depositSchedule\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ isBalanceNegative &&\n\t\t\t\t\t\t\tinterpolateComponents( {\n\t\t\t\t\t\t\t\tmixedString: __(\n\t\t\t\t\t\t\t\t\t'Negative account balance? {{discoverWhyLink}}Discover why.{{/discoverWhyLink}}',\n\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\t\tdiscoverWhyLink: (\n\t\t\t\t\t\t\t\t\t\t// @ts-expect-error: children is provided when interpolating the component\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\tdocumentationUrls.negativeBalance\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t</p>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n};\n","/**\n * External dependencies\n */\nimport { getQuery, updateQueryString } from '@woocommerce/navigation';\n\n/**\n * Internal dependencies\n */\nimport { useAllDepositsOverviews } from 'wcpay/data/deposits';\nimport type * as AccountOverview from 'wcpay/types/account-overview';\n\n// Extend the Query interface to include the selected_currency query parameter.\ndeclare module '@woocommerce/navigation' {\n\tinterface Query {\n\t\tselected_currency?: string;\n\t}\n}\n\ntype CurrencyCode = string;\n\ntype UseSelectedCurrencyResult = {\n\tselectedCurrency?: CurrencyCode;\n\tsetSelectedCurrency: ( selectedCurrency: CurrencyCode ) => void;\n};\n\n/**\n * Custom hook for retrieving and updating the selected currency.\n * This is used to determine which currency to display in the overview page.\n * The selected currency is set as a 'selected_currency' query parameter in the URL.\n *\n * @return {UseSelectedCurrencyResult} An object containing the selected currency and a setter function.\n */\nexport const useSelectedCurrency = (): UseSelectedCurrencyResult => {\n\tconst setSelectedCurrency = ( currencyCode: CurrencyCode ) => {\n\t\tupdateQueryString( {\n\t\t\tselected_currency: currencyCode,\n\t\t} );\n\t};\n\n\tconst selectedCurrency = getQuery().selected_currency;\n\n\treturn {\n\t\tsetSelectedCurrency,\n\t\tselectedCurrency,\n\t};\n};\n\ntype SelectedCurrencyOverview = {\n\taccount?: AccountOverview.Account | null;\n\toverview?: AccountOverview.Overview;\n\tisLoading: boolean;\n};\n/**\n * A custom hook to get the selected currency overview.\n * If the selected currency is not valid, the first currency overview is returned.\n * If the selected currency is valid, the overview for that currency is returned.\n *\n * @return {SelectedCurrencyOverview} An object containing the account and the overview for the selected currency.\n */\nexport const useSelectedCurrencyOverview = (): SelectedCurrencyOverview => {\n\tconst { overviews, isLoading: isAccountOverviewsLoading } =\n\t\tuseAllDepositsOverviews();\n\tconst { currencies, account } = overviews;\n\n\tconst { selectedCurrency } = useSelectedCurrency();\n\n\tconst isSelectedCurrencyValid = currencies.some(\n\t\t( currency ) => currency.currency === selectedCurrency\n\t);\n\n\tconst overview = isSelectedCurrencyValid\n\t\t? currencies.find(\n\t\t\t\t( currency ) => currency.currency === selectedCurrency\n\t\t )\n\t\t: currencies[ 0 ];\n\n\treturn {\n\t\taccount,\n\t\toverview,\n\t\tisLoading: isAccountOverviewsLoading,\n\t};\n};\n","/**\n * External dependencies\n */\nimport React, { useState } from 'react';\nimport { __, sprintf } from '@wordpress/i18n';\nimport interpolateComponents from '@automattic/interpolate-components';\nimport { CardBody, Flex, ExternalLink } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type * as AccountOverview from 'wcpay/types/account-overview';\nimport BalanceBlock from './balance-block';\nimport HelpOutlineIcon from 'gridicons/dist/help-outline';\nimport InlineNotice from '../inline-notice';\nimport InstantPayoutButton from 'wcpay/deposits/instant-payouts';\nimport OverviewCard from 'wcpay/components/overview-card';\nimport SendMoneyIcon from 'assets/images/icons/send-money.svg?asset';\nimport {\n\tTotalBalanceTooltip,\n\tAvailableBalanceTooltip,\n} from './balance-tooltip';\nimport { fundLabelStrings } from './strings';\nimport { ClickTooltip } from '../tooltip';\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport { useAllDepositsOverviews } from 'wcpay/data/deposits';\nimport { useSelectedCurrency } from 'wcpay/overview/hooks';\nimport { saveOption } from 'wcpay/data/settings/actions';\nimport './style.scss';\n\nconst useInstantDepositNoticeState = () => {\n\tconst [ isDismissed, setIsDismissed ] = useState(\n\t\twcpaySettings.isInstantDepositNoticeDismissed\n\t);\n\n\tconst setInstantDepositNoticeDismissed = () => {\n\t\tsetIsDismissed( true );\n\t\twcpaySettings.isInstantDepositNoticeDismissed = true;\n\t\tsaveOption( 'wcpay_instant_deposit_notice_dismissed', true );\n\t};\n\n\treturn {\n\t\tisInstantDepositNoticeDismissed: isDismissed,\n\t\thandleDismissInstantDepositNotice: setInstantDepositNoticeDismissed,\n\t};\n};\n\nconst BalancesLoadingState: React.FC = () => {\n\tconst currencyCode = wcpaySettings.accountDefaultCurrency;\n\treturn (\n\t\t<CardBody className=\"wcpay-account-balances__balances\">\n\t\t\t<BalanceBlock\n\t\t\t\tid={ `wcpay-account-balances-${ currencyCode }-total` }\n\t\t\t\ttitle={ fundLabelStrings.total }\n\t\t\t\tamount={ 0 }\n\t\t\t\tcurrencyCode={ currencyCode }\n\t\t\t\tisLoading\n\t\t\t/>\n\t\t\t<BalanceBlock\n\t\t\t\tid={ `wcpay-account-balances-${ currencyCode }-available` }\n\t\t\t\ttitle={ fundLabelStrings.available }\n\t\t\t\tamount={ 0 }\n\t\t\t\tcurrencyCode={ currencyCode }\n\t\t\t\tisLoading\n\t\t\t/>\n\t\t</CardBody>\n\t);\n};\n\n/**\n * Renders account balances for the selected currency.\n */\nconst AccountBalances: React.FC = () => {\n\tconst { overviews, isLoading } = useAllDepositsOverviews();\n\tconst { selectedCurrency } = useSelectedCurrency();\n\n\tconst {\n\t\tisInstantDepositNoticeDismissed,\n\t\thandleDismissInstantDepositNotice,\n\t} = useInstantDepositNoticeState();\n\n\tif ( ! isLoading && overviews.currencies.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<OverviewCard\n\t\t\t\ttitle={ __( 'Balance', 'woocommerce-payments' ) }\n\t\t\t\tclassName=\"wcpay-account-balances\"\n\t\t\t\tisLoading\n\t\t\t\tLoadingState={ BalancesLoadingState }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst { currencies, account } = overviews;\n\n\tconst depositCurrencyOverviews = currencies.map(\n\t\t( overview: AccountOverview.Overview ) => ( {\n\t\t\tname: overview.currency,\n\t\t\tcurrencyCode: overview.currency,\n\t\t\tavailableFunds: overview.available?.amount ?? 0,\n\t\t\tpendingFunds: overview.pending?.amount ?? 0,\n\t\t\tdelayDays: account?.deposits_schedule.delay_days ?? 0,\n\t\t\tinstantBalance: overview.instant,\n\t\t} )\n\t);\n\n\tconst selectedOverview =\n\t\tdepositCurrencyOverviews.find(\n\t\t\t( overview ) => overview.name === selectedCurrency\n\t\t) || depositCurrencyOverviews[ 0 ];\n\n\tconst totalBalance =\n\t\tselectedOverview.availableFunds + selectedOverview.pendingFunds;\n\n\treturn (\n\t\t<>\n\t\t\t<OverviewCard\n\t\t\t\ttitle={ __( 'Balance', 'woocommerce-payments' ) }\n\t\t\t\tclassName=\"wcpay-account-balances\"\n\t\t\t\tisLoading={ false }\n\t\t\t\tLoadingState={ BalancesLoadingState }\n\t\t\t>\n\t\t\t\t<CardBody className=\"wcpay-account-balances__balances\">\n\t\t\t\t\t<BalanceBlock\n\t\t\t\t\t\tid={ `wcpay-account-balances-${ selectedOverview.currencyCode }-total` }\n\t\t\t\t\t\ttitle={ fundLabelStrings.total }\n\t\t\t\t\t\tamount={ totalBalance }\n\t\t\t\t\t\tcurrencyCode={ selectedOverview.currencyCode }\n\t\t\t\t\t\ttooltip={\n\t\t\t\t\t\t\t<TotalBalanceTooltip balance={ totalBalance } />\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<BalanceBlock\n\t\t\t\t\t\tid={ `wcpay-account-balances-${ selectedOverview.currencyCode }-available` }\n\t\t\t\t\t\ttitle={ fundLabelStrings.available }\n\t\t\t\t\t\tamount={ selectedOverview.availableFunds }\n\t\t\t\t\t\tcurrencyCode={ selectedOverview.currencyCode }\n\t\t\t\t\t\ttooltip={\n\t\t\t\t\t\t\t<AvailableBalanceTooltip\n\t\t\t\t\t\t\t\tbalance={ selectedOverview.availableFunds }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</CardBody>\n\t\t\t</OverviewCard>\n\t\t\t{ selectedOverview.instantBalance &&\n\t\t\t\tselectedOverview.instantBalance.amount > 0 && (\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tgap={ 0 }\n\t\t\t\t\t\tclassName=\"wcpay-account-balances__instant-deposit\"\n\t\t\t\t\t\tdirection=\"column\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isInstantDepositNoticeDismissed && (\n\t\t\t\t\t\t\t<InlineNotice\n\t\t\t\t\t\t\t\tclassName=\"wcpay-account-balances__instant-deposit-notice\"\n\t\t\t\t\t\t\t\ticon={ <img src={ SendMoneyIcon } alt=\"\" /> }\n\t\t\t\t\t\t\t\tisDismissible={ true }\n\t\t\t\t\t\t\t\tonRemove={ () =>\n\t\t\t\t\t\t\t\t\thandleDismissInstantDepositNotice()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t/* translators: %$1$s: Available instant payout amount, %2$s: Instant payout fee percentage */\n\t\t\t\t\t\t\t\t\t\t'Get %1$s via instant payout. Funds are typically in your bank account within 30 mins. Fee: %2$s%%.',\n\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tformatCurrency(\n\t\t\t\t\t\t\t\t\t\tselectedOverview.instantBalance.amount,\n\t\t\t\t\t\t\t\t\t\tselectedOverview.instantBalance.currency\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tselectedOverview.instantBalance\n\t\t\t\t\t\t\t\t\t\t.fee_percentage\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</InlineNotice>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<Flex justify=\"flex-start\">\n\t\t\t\t\t\t\t<InstantPayoutButton\n\t\t\t\t\t\t\t\tinstantBalance={\n\t\t\t\t\t\t\t\t\tselectedOverview.instantBalance\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isInstantDepositNoticeDismissed && ( // Show the tooltip only when the notice is dismissed.\n\t\t\t\t\t\t\t\t<ClickTooltip\n\t\t\t\t\t\t\t\t\tbuttonIcon={ <HelpOutlineIcon /> }\n\t\t\t\t\t\t\t\t\tbuttonLabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Learn more about instant payouts',\n\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t\t\t\t/* 'With instant payout you can receive requested funds in your bank account within 30 mins for a 1.5% fee. Learn more' */\n\n\t\t\t\t\t\t\t\t\t\tinterpolateComponents( {\n\t\t\t\t\t\t\t\t\t\t\tmixedString: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: Instant payout fee percentage */\n\t\t\t\t\t\t\t\t\t\t\t\t\t'With {{strong}}instant payout{{/strong}} you can receive requested funds in your bank account within 30 mins for a %s%% fee. {{learnMoreLink}}Learn more{{/learnMoreLink}}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tselectedOverview.instantBalance\n\t\t\t\t\t\t\t\t\t\t\t\t\t.fee_percentage\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\t\t\t\t\tstrong: <strong />,\n\t\t\t\t\t\t\t\t\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t// @ts-expect-error: children is provided when interpolating the component\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://woocommerce.com/document/woopayments/payouts/instant-payouts/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</Flex>\n\t\t\t\t) }\n\t\t\t{ wcpaySettings.instantDepositsPreviouslyEligible &&\n\t\t\t\t( ! selectedOverview.instantBalance ||\n\t\t\t\t\tselectedOverview.instantBalance.amount === 0 ) && (\n\t\t\t\t\t<InlineNotice\n\t\t\t\t\t\tclassName=\"wcpay-account-balances__instant-deposit-unavailable\"\n\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ interpolateComponents( {\n\t\t\t\t\t\t\tmixedString: __(\n\t\t\t\t\t\t\t\t'Instant payouts are currently unavailable for your account. {{learnMoreLink}}Learn about eligibility requirements{{/learnMoreLink}}',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t\t\t\t\t// @ts-expect-error: children is provided when interpolating the component\n\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t'https://woocommerce.com/document/woopayments/payouts/instant-payouts/'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</InlineNotice>\n\t\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default AccountBalances;\n","/* eslint-disable max-len */\n/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { isInTestModeOnboarding } from 'utils';\n\nexport default {\n\ttitle: __( 'Account Tools', 'woocommerce-payments' ),\n\tdescription: isInTestModeOnboarding()\n\t\t? __(\n\t\t\t\t'You are using a test account. If you are experiencing problems completing account setup, or wish to test with a different email/country associated with your account, you can reset your account and start from the beginning.',\n\t\t\t\t'woocommerce-payments'\n\t\t )\n\t\t: __(\n\t\t\t\t'Payments and payouts are disabled until account setup is completed. If you are experiencing problems completing account setup, or need to change the email/country associated with your account, you can reset your account and start from the beginning.',\n\t\t\t\t'woocommerce-payments'\n\t\t ),\n\treset: __( 'Reset account', 'woocommerce-payments' ),\n};\n","/**\n * External dependencies\n */\nimport React, { useState } from 'react';\nimport { addQueryArgs } from '@wordpress/url';\nimport { Button, CardDivider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport strings from './strings';\nimport './styles.scss';\nimport ResetAccountModal from 'wcpay/overview/modal/reset-account';\nimport { isInTestModeOnboarding } from 'wcpay/utils';\n\nconst handleReset = () => {\n\twindow.location.href = addQueryArgs( wcpaySettings.connectUrl, {\n\t\t'wcpay-reset-account': 'true',\n\t\tsource: 'wcpay-reset-account', // Overwrite any existing source because we are starting over.\n\t} );\n};\n\nexport const AccountTools = () => {\n\tconst [ modalVisible, setModalVisible ] = useState( false );\n\n\t// Only render when in test/sandbox mode onboarding.\n\tif ( ! isInTestModeOnboarding() ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"account-tools\">\n\t\t\t\t<CardDivider />\n\t\t\t\t<h4>{ strings.title }</h4>\n\t\t\t\t<p>{ strings.description }</p>\n\t\t\t\t{ /* Use wrapping div to keep buttons grouped together. */ }\n\t\t\t\t<div className=\"account-tools__actions\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ 'secondary' }\n\t\t\t\t\t\tonClick={ () => setModalVisible( true ) }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ strings.reset }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<ResetAccountModal\n\t\t\t\tisVisible={ modalVisible }\n\t\t\t\tonDismiss={ () => setModalVisible( false ) }\n\t\t\t\tonSubmit={ handleReset }\n\t\t\t/>\n\t\t</>\n\t);\n};\n","/** @format */\n/**\n * External dependencies\n */\nimport React from 'react';\n\n/**\n * Internal dependencies\n */\nimport './style.scss';\n\ninterface ProgressBarProps {\n\tprogressLabel: string;\n\ttotalLabel: string;\n\tprogress: number;\n}\n\nconst ProgressBar: React.FunctionComponent< ProgressBarProps > = ( {\n\tprogressLabel,\n\ttotalLabel,\n\tprogress,\n} ) => {\n\tconst useInnerLabel = progress > 0.5;\n\treturn (\n\t\t<div className=\"progressbar\">\n\t\t\t<div className=\"progressbar__container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"progressbar__inner\"\n\t\t\t\t\tstyle={ { width: progress * 100 + '%' } }\n\t\t\t\t>\n\t\t\t\t\t{ useInnerLabel && (\n\t\t\t\t\t\t<span className=\"progressbar__inner-progress-label\">\n\t\t\t\t\t\t\t{ progressLabel }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ ! useInnerLabel && (\n\t\t\t\t\t<span className=\"progressbar__outer-progress-label\">\n\t\t\t\t\t\t{ progressLabel }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t<span className=\"progressbar__total-label\">{ totalLabel }</span>\n\t\t</div>\n\t);\n};\n\nexport default ProgressBar;\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport ProgressBar from 'components/progress-bar';\nimport { formatCurrency } from 'multi-currency/interface/functions';\n\nconst ExpirationBar = ( {\n\tfeeData: {\n\t\tvolume_allowance: volumeAllowance,\n\t\tcurrent_volume: currentVolume,\n\t\t...rest\n\t},\n} ) => {\n\tif ( ! volumeAllowance ) {\n\t\treturn null;\n\t}\n\n\tconst currencyCode = rest.volume_currency ?? rest.currency;\n\n\treturn (\n\t\t<ProgressBar\n\t\t\tprogressLabel={ formatCurrency( currentVolume, currencyCode ) }\n\t\t\ttotalLabel={ formatCurrency( volumeAllowance, currencyCode ) }\n\t\t\tprogress={ currentVolume / volumeAllowance }\n\t\t/>\n\t);\n};\n\nexport default ExpirationBar;\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport { formatDateTimeFromString } from 'wcpay/utils/date-time';\n\nconst ExpirationDescription = ( {\n\tfeeData: { volume_allowance: volumeAllowance, end_time: endTime, ...rest },\n} ) => {\n\tconst currencyCode = rest.volume_currency ?? rest.currency;\n\n\tlet description;\n\tif ( volumeAllowance && endTime ) {\n\t\tdescription = sprintf(\n\t\t\t/* translators: %1: total payment volume until this promotion expires %2: End date of the promotion */\n\t\t\t__(\n\t\t\t\t'Discounted base fee expires after the first %1$s of total payment volume or on %2$s.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tformatCurrency( volumeAllowance, currencyCode ),\n\t\t\tformatDateTimeFromString( endTime )\n\t\t);\n\t} else if ( volumeAllowance ) {\n\t\tdescription = sprintf(\n\t\t\t/* translators: %1: total payment volume until this promotion expires */\n\t\t\t__(\n\t\t\t\t'Discounted base fee expires after the first %1$s of total payment volume.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tformatCurrency( volumeAllowance, currencyCode )\n\t\t);\n\t} else if ( endTime ) {\n\t\tdescription = sprintf(\n\t\t\t/* translators: %1: End date of the promotion */\n\t\t\t__(\n\t\t\t\t'Discounted base fee expires on %1$s.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tformatDateTimeFromString( endTime )\n\t\t);\n\t} else {\n\t\treturn null;\n\t}\n\treturn <p className=\"description\">{ description }</p>;\n};\n\nexport default ExpirationDescription;\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport interpolateComponents from '@automattic/interpolate-components';\nimport { ExternalLink } from '@wordpress/components';\nimport './account-fees.scss';\n\n/**\n * Internal dependencies\n */\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport { formatFee } from 'utils/fees';\nimport { formatDateTimeFromString } from 'wcpay/utils/date-time';\nimport React from 'react';\nimport { BaseFee, DiscountFee, FeeStructure } from 'wcpay/types/fees';\nimport { createInterpolateElement } from '@wordpress/element';\nimport PAYMENT_METHOD_IDS from 'constants/payment-method';\n\nconst countryFeeStripeDocsBaseLink =\n\t'https://woocommerce.com/document/woopayments/fees/';\nconst countryFeeStripeDocsSectionNumbers: Record< string, string > = {\n\tAE: 'united-arab-emirates',\n\tAU: 'australia',\n\tAT: 'austria',\n\tBE: 'belgium',\n\tBG: 'bulgaria',\n\tCA: 'canada',\n\tCY: 'cyprus',\n\tCZ: 'czech-republic',\n\tFR: 'france',\n\tLU: 'luxembourg',\n\tDE: 'germany',\n\tDK: 'denmark',\n\tEE: 'estonia',\n\tFI: 'finland',\n\tGR: 'greece',\n\tHK: 'hong-kong',\n\tHR: 'croatia',\n\tHU: 'hungary',\n\tIE: 'ireland',\n\tIT: 'italy',\n\tJP: 'japan',\n\tLT: 'lithuania',\n\tLV: 'latvia',\n\tMT: 'malta',\n\tNL: 'netherlands',\n\tNO: 'norway',\n\tNZ: 'new-zealand',\n\tPL: 'poland',\n\tPT: 'portugal',\n\tSG: 'singapore',\n\tSI: 'slovenia',\n\tSK: 'slovakia',\n\tSW: 'sweden',\n\tES: 'spain',\n\tCH: 'switzerland',\n\tUK: 'united-kingdom',\n\tUS: 'united-states',\n\tRO: 'romania',\n};\n\nconst getStripeFeeSectionUrl = ( country: string ): string => {\n\treturn `${ countryFeeStripeDocsBaseLink }#${ countryFeeStripeDocsSectionNumbers[ country ] }`;\n};\n\nconst getFeeDescriptionString = (\n\tfee: BaseFee,\n\tdiscountBasedMultiplier = 1\n): string => {\n\tif ( fee.fixed_rate && fee.percentage_rate ) {\n\t\treturn sprintf(\n\t\t\t'%1$f%% + %2$s',\n\t\t\tformatFee( fee.percentage_rate * discountBasedMultiplier ),\n\t\t\tformatCurrency(\n\t\t\t\tfee.fixed_rate * discountBasedMultiplier,\n\t\t\t\tfee.currency\n\t\t\t)\n\t\t);\n\t} else if ( fee.fixed_rate ) {\n\t\treturn sprintf(\n\t\t\t'%1$s',\n\t\t\tformatCurrency(\n\t\t\t\tfee.fixed_rate * discountBasedMultiplier,\n\t\t\t\tfee.currency\n\t\t\t)\n\t\t);\n\t} else if ( fee.percentage_rate ) {\n\t\treturn sprintf(\n\t\t\t'%1$f%%',\n\t\t\tformatFee( fee.percentage_rate * discountBasedMultiplier )\n\t\t);\n\t}\n\treturn '';\n};\n\nexport const getCurrentBaseFee = (\n\taccountFees: FeeStructure\n): BaseFee | DiscountFee => {\n\treturn accountFees.discount.length\n\t\t? accountFees.discount[ 0 ]\n\t\t: accountFees.base;\n};\n\nexport const formatMethodFeesTooltip = (\n\taccountFees?: FeeStructure\n): JSX.Element => {\n\tif ( ! accountFees ) return <></>;\n\n\tconst discountAdjustedFeeRate: number =\n\t\taccountFees.discount.length && accountFees.discount[ 0 ].discount\n\t\t\t? 1 - accountFees.discount[ 0 ].discount\n\t\t\t: 1;\n\n\t// Per https://woocommerce.com/terms-conditions/woopayments-promotion-2023/ we exclude FX fees from discounts.\n\tconst total = {\n\t\tpercentage_rate:\n\t\t\taccountFees.base.percentage_rate * discountAdjustedFeeRate +\n\t\t\taccountFees.additional.percentage_rate * discountAdjustedFeeRate +\n\t\t\taccountFees.fx.percentage_rate,\n\t\tfixed_rate:\n\t\t\taccountFees.base.fixed_rate * discountAdjustedFeeRate +\n\t\t\taccountFees.additional.fixed_rate * discountAdjustedFeeRate +\n\t\t\taccountFees.fx.fixed_rate,\n\t\tcurrency: accountFees.base.currency,\n\t};\n\n\tconst hasFees = ( fee: BaseFee ): boolean => {\n\t\treturn fee.fixed_rate > 0.0 || fee.percentage_rate > 0.0;\n\t};\n\n\treturn (\n\t\t<div className={ 'wcpay-fees-tooltip' }>\n\t\t\t<div>\n\t\t\t\t<div>{ __( 'Base fee', 'woocommerce-payments' ) }</div>\n\t\t\t\t<div>\n\t\t\t\t\t{ getFeeDescriptionString(\n\t\t\t\t\t\taccountFees.base,\n\t\t\t\t\t\tdiscountAdjustedFeeRate\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ hasFees( accountFees.additional ) ? (\n\t\t\t\t<div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'International payment method fee',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ getFeeDescriptionString(\n\t\t\t\t\t\t\taccountFees.additional,\n\t\t\t\t\t\t\tdiscountAdjustedFeeRate\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t''\n\t\t\t) }\n\t\t\t{ hasFees( accountFees.fx ) ? (\n\t\t\t\t<div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Currency conversion fee',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>{ getFeeDescriptionString( accountFees.fx ) }</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t''\n\t\t\t) }\n\t\t\t<div>\n\t\t\t\t<div>\n\t\t\t\t\t{ __( 'Total per transaction', 'woocommerce-payments' ) }\n\t\t\t\t</div>\n\t\t\t\t<div className={ 'wcpay-fees-tooltip__bold' }>\n\t\t\t\t\t{ getFeeDescriptionString( total ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ wcpaySettings &&\n\t\t\twcpaySettings.connect &&\n\t\t\twcpaySettings.connect.country ? (\n\t\t\t\t<div className=\"wcpay-fees-tooltip__hint-text\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{ countryFeeStripeDocsSectionNumbers.hasOwnProperty(\n\t\t\t\t\t\t\twcpaySettings.connect.country\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t? interpolateComponents( {\n\t\t\t\t\t\t\t\t\tmixedString: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: WooPayments */\n\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t'{{linkToStripePage}}Learn more{{/linkToStripePage}} about %s Fees in your country',\n\t\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t'WooPayments'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\t\t\tlinkToStripePage: (\n\t\t\t\t\t\t\t\t\t\t\t// @ts-expect-error: children is provided when interpolating the component\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ getStripeFeeSectionUrl(\n\t\t\t\t\t\t\t\t\t\t\t\t\twcpaySettings.connect\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.country\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t } )\n\t\t\t\t\t\t\t: interpolateComponents( {\n\t\t\t\t\t\t\t\t\tmixedString: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: WooPayments */\n\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t'{{linkToStripePage /}} about %s Fees',\n\t\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t'WooPayments'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\t\t\tlinkToStripePage: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\tcountryFeeStripeDocsBaseLink\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Learn more',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t } ) }\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t''\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const formatAccountFeesDescription = (\n\taccountFees: FeeStructure,\n\tcustomFormats = {}\n): string | JSX.Element => {\n\tconst baseFee = accountFees.base;\n\tconst currentBaseFee = getCurrentBaseFee( accountFees );\n\n\t// Default formats will be used if no matching field was passed in the `formats` parameter.\n\tconst formats = {\n\t\t/* translators: %1: Percentage part of the fee. %2: Fixed part of the fee */\n\t\tfee: __( '%1$f%% + %2$s per transaction', 'woocommerce-payments' ),\n\t\t/* translators: %f percentage discount to apply */\n\t\tdiscount: __( '(%f%% discount)', 'woocommerce-payments' ),\n\t\tdisplayBaseFeeIfDifferent: true,\n\t\t...customFormats,\n\t};\n\n\tconst feeDescription = sprintf(\n\t\tformats.fee,\n\t\tformatFee( baseFee.percentage_rate ),\n\t\tformatCurrency( baseFee.fixed_rate, baseFee.currency )\n\t);\n\tconst isFormattingWithDiscount =\n\t\tcurrentBaseFee.percentage_rate !== baseFee.percentage_rate ||\n\t\tcurrentBaseFee.fixed_rate !== baseFee.fixed_rate ||\n\t\tcurrentBaseFee.currency !== baseFee.currency;\n\tif ( isFormattingWithDiscount ) {\n\t\tconst discountFee = currentBaseFee as DiscountFee;\n\t\t// TODO: Figure out how the UI should work if there are several \"discount\" fees stacked.\n\t\tlet percentage, fixed;\n\n\t\tif ( discountFee.discount ) {\n\t\t\t// Proper discount fee (XX% off)\n\t\t\tpercentage = baseFee.percentage_rate * ( 1 - discountFee.discount );\n\t\t\tfixed = baseFee.fixed_rate * ( 1 - discountFee.discount );\n\t\t} else {\n\t\t\t// Custom base fee (2% + $.20)\n\t\t\tpercentage = currentBaseFee.percentage_rate;\n\t\t\tfixed = currentBaseFee.fixed_rate;\n\t\t}\n\n\t\tlet currentBaseFeeDescription = sprintf(\n\t\t\tformats.fee,\n\t\t\tformatFee( percentage ),\n\t\t\tformatCurrency( fixed, baseFee.currency )\n\t\t);\n\n\t\tif ( formats.displayBaseFeeIfDifferent ) {\n\t\t\tcurrentBaseFeeDescription = sprintf(\n\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t/* translators: %1 Base fee (that don't apply to this account at this moment), %2: Current fee (e.g: \"2.9% + $.30 per transaction\") */\n\t\t\t\t__( '<s>%1$s</s> %2$s', 'woocommerce-payments' ),\n\t\t\t\tfeeDescription,\n\t\t\t\tcurrentBaseFeeDescription\n\t\t\t);\n\t\t}\n\n\t\tif ( discountFee.discount && formats.discount.length > 0 ) {\n\t\t\tcurrentBaseFeeDescription +=\n\t\t\t\t' ' +\n\t\t\t\tsprintf( formats.discount, formatFee( discountFee.discount ) );\n\t\t}\n\n\t\tconst conversionMap: Record< string, any > = {\n\t\t\ts: <s />,\n\t\t};\n\n\t\treturn createInterpolateElement(\n\t\t\tcurrentBaseFeeDescription,\n\t\t\tconversionMap\n\t\t);\n\t}\n\n\treturn feeDescription;\n};\n\nexport const formatMethodFeesDescription = (\n\tmethodFees: FeeStructure | undefined\n): string | JSX.Element => {\n\tif ( ! methodFees ) {\n\t\treturn __( 'missing fees', 'woocommerce-payments' );\n\t}\n\n\t/* translators: %1: Percentage part of the fee. %2: Fixed part of the fee */\n\tconst format = __( 'From %1$f%% + %2$s', 'woocommerce-payments' );\n\n\treturn formatAccountFeesDescription( methodFees, {\n\t\tfee: format,\n\t\tdiscount: '',\n\t\tdisplayBaseFeeIfDifferent: false,\n\t} );\n};\n\nexport const getTransactionsPaymentMethodName = (\n\tpaymentMethod: PAYMENT_METHOD_IDS\n): string => {\n\t// Special cases that won't be in wooPaymentsPaymentMethodsConfig\n\t// `card` WILL be in that config, but it's title is \"Cards\" and we want to show \"Card transactions.\"\n\tswitch ( paymentMethod ) {\n\t\tcase 'card':\n\t\t\treturn __( 'Card transactions', 'woocommerce-payments' );\n\t\tcase 'card_present':\n\t\t\treturn __( 'In-person transactions', 'woocommerce-payments' );\n\t}\n\n\t// Try to get the title from wooPaymentsPaymentMethodsConfig\n\tconst methodConfig = wooPaymentsPaymentMethodsConfig[ paymentMethod ];\n\tif ( methodConfig?.title ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: Payment method title */\n\t\t\t__( '%s transactions', 'woocommerce-payments' ),\n\t\t\tmethodConfig.title\n\t\t);\n\t}\n\n\t// Fallback for unknown payment methods\n\treturn __( 'Unknown transactions', 'woocommerce-payments' );\n};\n\nexport const getDiscountBadgeText = ( discountFee: DiscountFee ): string => {\n\tif ( ! discountFee.discount ) {\n\t\treturn '';\n\t}\n\n\tconst discountPercentage = formatFee( discountFee.discount );\n\n\tif ( discountFee.end_time ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %1$s: discount percentage, %2$s: expiration date */\n\t\t\t__( '%1$s%% off fees through %2$s', 'woocommerce-payments' ),\n\t\t\tdiscountPercentage,\n\t\t\tformatDateTimeFromString( discountFee.end_time )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: %s: discount percentage */\n\t\t__( '%s%% off fees', 'woocommerce-payments' ),\n\t\tdiscountPercentage\n\t);\n};\n\nexport const getDiscountTooltipText = ( discountFee: DiscountFee ): string => {\n\tif ( ! discountFee.discount ) {\n\t\treturn '';\n\t}\n\n\tconst discountPercentage = formatFee( discountFee.discount );\n\tconst currencyCode = discountFee.volume_currency ?? discountFee.currency;\n\n\tif ( discountFee.volume_allowance && discountFee.end_time ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %1$s: discount percentage, %2$s: total payment volume until this promotion expires, %3$s: End date of the promotion */\n\t\t\t__(\n\t\t\t\t'You are saving %1$s%% on processing fees for the first %2$s of total payment volume or through %3$s.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tdiscountPercentage,\n\t\t\tformatCurrency( discountFee.volume_allowance, currencyCode ),\n\t\t\tformatDateTimeFromString( discountFee.end_time )\n\t\t);\n\t} else if ( discountFee.volume_allowance ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %1$s: discount percentage, %2$s: total payment volume until this promotion expires */\n\t\t\t__(\n\t\t\t\t'You are saving %1$s%% on processing fees for the first %2$s of total payment volume.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tdiscountPercentage,\n\t\t\tformatCurrency( discountFee.volume_allowance, currencyCode )\n\t\t);\n\t} else if ( discountFee.end_time ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %1$s: discount percentage, %2$s: End date of the promotion */\n\t\t\t__(\n\t\t\t\t'You are saving %1$s%% on processing fees through %2$s.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tdiscountPercentage,\n\t\t\tformatDateTimeFromString( discountFee.end_time )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: %s: discount percentage */\n\t\t__( 'You are saving %s%% on processing fees.', 'woocommerce-payments' ),\n\t\tdiscountPercentage\n\t);\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CardDivider } from '@wordpress/components';\nimport ExpirationBar from './expiration-bar';\nimport ExpirationDescription from './expiration-description';\nimport {\n\tformatCurrencyName,\n\tgetCurrency,\n} from 'multi-currency/interface/functions';\nimport {\n\tformatAccountFeesDescription,\n\tgetCurrentBaseFee,\n\tgetTransactionsPaymentMethodName,\n} from 'utils/account-fees';\nimport './styles.scss';\n\nconst AccountFee = ( props ) => {\n\tconst { accountFee, paymentMethod } = props;\n\tconst baseFee = accountFee.base;\n\tconst currency = getCurrency( baseFee.currency );\n\tconst currencyName = formatCurrencyName( baseFee.currency );\n\tconst currencyCode = currency?.getCurrencyConfig()?.code;\n\tconst feeDescription = formatAccountFeesDescription( accountFee );\n\tconst currentBaseFee = getCurrentBaseFee( accountFee );\n\n\treturn (\n\t\t<>\n\t\t\t<p>{ getTransactionsPaymentMethodName( paymentMethod ) }:</p>\n\t\t\t{ currencyName ? `${ currencyName } ` : null }\n\t\t\t{ currencyCode ? `(${ currencyCode }) ` : null }\n\t\t\t{ feeDescription }\n\t\t\t<ExpirationBar feeData={ currentBaseFee } />\n\t\t\t<ExpirationDescription feeData={ currentBaseFee } />\n\t\t</>\n\t);\n};\n\nconst AccountFees = ( props ) => {\n\tconst { accountFees } = props;\n\tlet haveDiscounts = false;\n\tconst activeDiscounts = Object.entries( accountFees ).map(\n\t\t( [ key, value ] ) => {\n\t\t\tif ( value.fee.discount.length === 0 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\thaveDiscounts = true;\n\t\t\treturn (\n\t\t\t\t<AccountFee\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tpaymentMethod={ value.payment_method }\n\t\t\t\t\taccountFee={ value.fee }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t);\n\treturn (\n\t\t<>\n\t\t\t{ haveDiscounts && (\n\t\t\t\t<div className=\"account-fees\">\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<h4>\n\t\t\t\t\t\t{ __( 'Active discounts', 'woocommerce-payments' ) }\n\t\t\t\t\t</h4>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ activeDiscounts }\n\t\t</>\n\t);\n};\n\nexport default AccountFees;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport { published, caution, error, info, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { ChipType } from 'wcpay/components/chip';\nimport {\n\tStatusBackgroundColor,\n\tIconName,\n} from 'wcpay/types/account/account-details';\n\nexport const getChipTypeFromColor = (\n\tcolor: StatusBackgroundColor\n): ChipType => {\n\tswitch ( color ) {\n\t\tcase 'green':\n\t\t\treturn 'success';\n\t\tcase 'yellow':\n\t\t\treturn 'warning';\n\t\tcase 'red':\n\t\t\treturn 'alert';\n\t\tcase 'blue':\n\t\t\treturn 'primary';\n\t\tcase 'gray':\n\t\t\treturn 'light';\n\t\tdefault:\n\t\t\treturn 'primary';\n\t}\n};\n\nexport const getIconByName = ( iconName?: IconName ) => {\n\tconst iconMap = {\n\t\tpublished,\n\t\tcaution,\n\t\terror,\n\t\tinfo,\n\t\tcheck,\n\t};\n\n\treturn iconMap[ iconName ?? 'info' ] ?? info;\n};\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { ExternalLink } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport InlineNotice from 'wcpay/components/inline-notice';\nimport {\n\tAccountDetailsData,\n\tBannerBackgroundColor,\n} from 'wcpay/types/account/account-details';\nimport { getIconByName } from './utils';\n\ninterface BannerProps {\n\tbanner: AccountDetailsData[ 'banner' ];\n}\n\nconst getNoticeStatusFromColor = ( color: BannerBackgroundColor ) => {\n\tswitch ( color ) {\n\t\tcase 'green':\n\t\t\treturn 'success';\n\t\tcase 'blue':\n\t\t\treturn 'info';\n\t\tcase 'yellow':\n\t\t\treturn 'warning';\n\t\tcase 'red':\n\t\t\treturn 'error';\n\t\tdefault:\n\t\t\treturn 'info';\n\t}\n};\n\nconst Banner: React.FC< BannerProps > = ( { banner } ) => {\n\tif ( ! banner ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InlineNotice\n\t\t\tstatus={ getNoticeStatusFromColor( banner.background_color ) }\n\t\t\ticon={ getIconByName( banner.icon ) }\n\t\t\tclassName=\"woopayments-account-details__banner\"\n\t\t\tisDismissible={ false }\n\t\t>\n\t\t\t<>\n\t\t\t\t{ banner.text }\n\t\t\t\t{ banner.cta_text && banner.cta_link && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ' ' }\n\t\t\t\t\t\t<ExternalLink href={ banner.cta_link }>\n\t\t\t\t\t\t\t{ banner.cta_text }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</>\n\t\t</InlineNotice>\n\t);\n};\n\nexport default Banner;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { Flex, FlexBlock, FlexItem, ExternalLink } from '@wordpress/components';\nimport HelpOutlineIcon from 'gridicons/dist/help-outline';\n\n/**\n * Internal dependencies\n */\nimport Chip from 'wcpay/components/chip';\nimport { ClickTooltip } from 'wcpay/components/tooltip';\nimport { AccountDetailsData } from 'wcpay/types/account/account-details';\nimport { getChipTypeFromColor } from './utils';\n\nconst PayoutStatus: React.FC< {\n\tpayoutStatus: AccountDetailsData[ 'payout_status' ];\n} > = ( { payoutStatus } ) => {\n\tconst chipType = getChipTypeFromColor( payoutStatus.background_color );\n\n\treturn (\n\t\t<Flex align=\"center\" gap={ 0 } justify=\"flex-start\">\n\t\t\t<Chip type={ chipType } message={ payoutStatus.text } />\n\t\t\t{ payoutStatus.popover && (\n\t\t\t\t<ClickTooltip\n\t\t\t\t\tclassName={ 'payout-click-tooltip' }\n\t\t\t\t\tbuttonIcon={ <HelpOutlineIcon /> }\n\t\t\t\t\tbuttonLabel={ __(\n\t\t\t\t\t\t'More information about payout status',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t\tbuttonSize={ 24 }\n\t\t\t\t\tmaxWidth={ '300px' }\n\t\t\t\t\tcontent={\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ payoutStatus.popover.text }\n\t\t\t\t\t\t\t{ payoutStatus.popover.cta_text &&\n\t\t\t\t\t\t\t\tpayoutStatus.popover.cta_link && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t\t'payout-tooltip-external-link'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\tpayoutStatus.popover.cta_link\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ payoutStatus.popover.cta_text }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Flex>\n\t);\n};\n\ninterface PayoutStatusWrapperProps {\n\tpayoutStatus: AccountDetailsData[ 'payout_status' ];\n}\n\nconst PayoutStatusWrapper: React.FC< PayoutStatusWrapperProps > = ( {\n\tpayoutStatus,\n} ) => {\n\treturn (\n\t\t<Flex\n\t\t\tdirection=\"row\"\n\t\t\talign=\"center\"\n\t\t\tjustify=\"left\"\n\t\t\tgap={ 3 }\n\t\t\tclassName=\"woopayments-account-details__payout-status-item\"\n\t\t>\n\t\t\t<FlexItem className=\"item-label\">\n\t\t\t\t{ __( 'Payouts:', 'woocommerce-payments' ) }\n\t\t\t</FlexItem>\n\t\t\t<FlexBlock className=\"item-value\">\n\t\t\t\t<PayoutStatus payoutStatus={ payoutStatus } />\n\t\t\t</FlexBlock>\n\t\t</Flex>\n\t);\n};\n\nexport default PayoutStatusWrapper;\nexport { PayoutStatus };\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { Button, FlexBlock, FlexItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Chip from 'wcpay/components/chip';\nimport { recordEvent } from 'wcpay/tracks';\nimport { AccountDetailsData } from 'wcpay/types/account/account-details';\nimport { getChipTypeFromColor } from './utils';\n\ninterface HeaderTitleProps {\n\taccountStatus: AccountDetailsData[ 'account_status' ];\n\taccountLink?: string | null;\n}\n\nconst HeaderTitle: React.FC< HeaderTitleProps > = ( {\n\taccountStatus,\n\taccountLink,\n} ) => {\n\treturn (\n\t\t<>\n\t\t\t<FlexItem className=\"account-details\">\n\t\t\t\t{ __( 'Account details', 'woocommerce-payments' ) }\n\t\t\t</FlexItem>\n\t\t\t<FlexBlock className=\"account-status\">\n\t\t\t\t<Chip\n\t\t\t\t\tmessage={ accountStatus.text }\n\t\t\t\t\ttype={ getChipTypeFromColor(\n\t\t\t\t\t\taccountStatus.background_color\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t{ accountLink && (\n\t\t\t\t<FlexItem className=\"edit-details\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\trecordEvent( 'wcpay_account_details_link_clicked', {\n\t\t\t\t\t\t\t\tfrom: 'WCPAY_ACCOUNT_DETAILS',\n\t\t\t\t\t\t\t\tsource: 'wcpay-account-details',\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thref={ accountLink }\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit details', 'woocommerce-payments' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default HeaderTitle;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { Card, CardBody, CardHeader } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport './style.scss';\nimport {\n\tAccountDetailsType,\n\tAccountDetailsData,\n} from 'wcpay/types/account/account-details';\nimport { AccountTools } from './account-tools';\nimport AccountFees from './account-fees';\nimport Banner from './banner';\nimport PayoutStatusWrapper from './payout-status-wrapper';\nimport HeaderTitle from './header-title';\n\ninterface AccountDetailsProps {\n\taccountDetails: AccountDetailsType;\n\taccountFees?: any[];\n\taccountLink?: string;\n}\n\nconst AccountDetailsCard: React.FC< {\n\ttitle: React.ReactNode;\n\tchildren: React.ReactNode;\n} > = ( { title, children } ) => {\n\treturn (\n\t\t<Card size=\"medium\">\n\t\t\t<CardHeader className=\"woopayments-account-details__header\">\n\t\t\t\t{ title }\n\t\t\t</CardHeader>\n\t\t\t<CardBody>{ children }</CardBody>\n\t\t</Card>\n\t);\n};\n\nconst AccountDetailsError: React.FC = () => {\n\tconst cardTitle = __( 'Account details', 'woocommerce-payments' );\n\treturn (\n\t\t<AccountDetailsCard title={ cardTitle }>\n\t\t\t{ __( 'Error loading account details.', 'woocommerce-payments' ) }\n\t\t</AccountDetailsCard>\n\t);\n};\n\nconst AccountDetailsContent: React.FC< {\n\taccountDetails: AccountDetailsData;\n\taccountFees: any[];\n\taccountLink?: string;\n} > = ( { accountDetails, accountFees, accountLink } ) => {\n\tconst processedAccountLink = accountLink\n\t\t? addQueryArgs( accountLink, {\n\t\t\t\tfrom: 'WCPAY_ACCOUNT_DETAILS',\n\t\t\t\tsource: 'wcpay-account-details',\n\t\t } )\n\t\t: null;\n\n\tconst cardTitle = (\n\t\t<>\n\t\t\t<HeaderTitle\n\t\t\t\taccountStatus={ accountDetails.account_status }\n\t\t\t\taccountLink={ processedAccountLink }\n\t\t\t/>\n\t\t\t<Banner banner={ accountDetails.banner } />\n\t\t</>\n\t);\n\n\treturn (\n\t\t<AccountDetailsCard title={ cardTitle }>\n\t\t\t<PayoutStatusWrapper\n\t\t\t\tpayoutStatus={ accountDetails.payout_status }\n\t\t\t/>\n\n\t\t\t<AccountTools />\n\n\t\t\t{ accountFees && accountFees.length > 0 && (\n\t\t\t\t<AccountFees accountFees={ accountFees } />\n\t\t\t) }\n\t\t</AccountDetailsCard>\n\t);\n};\n\nconst AccountDetails: React.FC< AccountDetailsProps > = ( {\n\taccountDetails,\n\taccountFees = [],\n\taccountLink,\n} ) => {\n\treturn accountDetails === null ? (\n\t\t<AccountDetailsError />\n\t) : (\n\t\t<AccountDetailsContent\n\t\t\taccountDetails={ accountDetails }\n\t\t\taccountFees={ accountFees }\n\t\t\taccountLink={ accountLink }\n\t\t/>\n\t);\n};\n\nexport default AccountDetails;\n","/* eslint-disable max-len */\n/**\n * External dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\nexport default {\n\tbutton: __( 'Dismiss', 'woocommerce-payments' ),\n\n\theading: __( \"You're ready to accept payments!\", 'woocommerce-payments' ),\n\n\tdescription: sprintf(\n\t\t__(\n\t\t\t'Great news — your %s account has been activated. You can now start accepting payments on your store.',\n\t\t\t'woocommerce-payments'\n\t\t),\n\t\t'WooPayments'\n\t),\n};\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { Modal, Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport './style.scss';\nimport strings from './strings';\nimport { saveOption } from 'wcpay/data/settings/actions';\n\n/**\n * A modal component displayed when a live account is successfully connected.\n */\nexport const ConnectionSuccessModal = () => {\n\tconst [ isDismissed, setIsDismissed ] = React.useState(\n\t\twcpaySettings.isConnectionSuccessModalDismissed\n\t);\n\n\tconst onDismiss = async () => {\n\t\tsetIsDismissed( true );\n\n\t\t// Update the option to mark the modal as dismissed.\n\t\tsaveOption( 'wcpay_connection_success_modal_dismissed', true );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isDismissed && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ strings.heading }\n\t\t\t\t\tclassName=\"woopayments-connection-success-modal\"\n\t\t\t\t\tisDismissible={ true }\n\t\t\t\t\tonRequestClose={ onDismiss }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"woopayments-connection-success-modal__content\">\n\t\t\t\t\t\t{ strings.description }\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"woopayments-connection-success-modal__actions\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tisBusy={ false }\n\t\t\t\t\t\t\tdisabled={ false }\n\t\t\t\t\t\t\tonClick={ onDismiss }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ strings.button }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default ConnectionSuccessModal;\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { calendar } from '@wordpress/icons';\nimport { Link } from '@woocommerce/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tCardBody,\n\tCardDivider,\n\tFlex,\n\tFlexItem,\n\tIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies.\n */\nimport './style.scss';\nimport DepositStatusChip from 'components/deposit-status-chip';\nimport { getDepositDate } from 'deposits/utils';\nimport { CachedDeposit } from 'wcpay/types/deposits';\nimport { formatCurrency } from 'multi-currency/interface/functions';\nimport { getDetailsURL } from 'wcpay/components/details-link';\n\ninterface RecentDepositsProps {\n\tdeposits: CachedDeposit[];\n}\n\n/**\n * Renders the Recent Deposit list component.\n *\n * This component includes the recent deposit heading, table and notice.\n */\nconst RecentDepositsList: React.FC< RecentDepositsProps > = ( {\n\tdeposits,\n} ) => {\n\tif ( deposits.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tconst tableClass = 'wcpay-deposits-overview__table';\n\n\tconst depositRows = deposits.map( ( deposit ) => (\n\t\t<Flex className={ `${ tableClass }__row` } key={ deposit.id }>\n\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t<Icon icon={ calendar } size={ 17 } />\n\t\t\t\t<Link href={ getDetailsURL( deposit.id, 'payouts' ) }>\n\t\t\t\t\t{ getDepositDate( deposit ) }\n\t\t\t\t</Link>\n\t\t\t</FlexItem>\n\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t<DepositStatusChip deposit={ deposit } />\n\t\t\t</FlexItem>\n\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t{ formatCurrency( deposit.amount, deposit.currency ) }\n\t\t\t</FlexItem>\n\t\t</Flex>\n\t) );\n\n\treturn (\n\t\t<>\n\t\t\t<CardBody className={ `${ tableClass }__container` }>\n\t\t\t\t<Flex className={ `${ tableClass }__row__header` }>\n\t\t\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t\t\t{ __( 'Dispatch date', 'woocommerce-payments' ) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t\t\t{ __( 'Status', 'woocommerce-payments' ) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem className={ `${ tableClass }__cell` }>\n\t\t\t\t\t\t{ __( 'Amount', 'woocommerce-payments' ) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</CardBody>\n\t\t\t<CardDivider />\n\t\t\t<CardBody className={ `${ tableClass }__container` }>\n\t\t\t\t{ depositRows }\n\t\t\t</CardBody>\n\t\t</>\n\t);\n};\n\nexport default RecentDepositsList;\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { __, sprintf } from '@wordpress/i18n';\nimport interpolateComponents from '@automattic/interpolate-components';\nimport { Link } from '@woocommerce/components';\nimport { ExternalLink } from '@wordpress/components';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport InlineNotice from 'components/inline-notice';\nimport { recordEvent } from 'wcpay/tracks';\n\n/**\n * Renders a notice informing the user that their deposits are suspended.\n */\nexport const SuspendedDepositNotice: React.FC = () => {\n\treturn (\n\t\t<InlineNotice\n\t\t\tclassName=\"wcpay-deposits-overview__suspended-notice\"\n\t\t\ticon\n\t\t\tisDismissible={ false }\n\t\t\tstatus=\"warning\"\n\t\t>\n\t\t\t{ interpolateComponents( {\n\t\t\t\t/** translators: {{strong}}: placeholders are opening and closing strong tags. {{suspendLink}}: is a <a> link element */\n\t\t\t\tmixedString: __(\n\t\t\t\t\t'Your payouts are {{strong}}temporarily suspended{{/strong}}. {{suspendLink}}Learn more{{/suspendLink}}',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t),\n\t\t\t\tcomponents: {\n\t\t\t\t\tstrong: <strong />,\n\t\t\t\t\tsuspendLink: (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t'https://woocommerce.com/document/woopayments/payouts/why-payouts-suspended/'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t} ) }\n\t\t</InlineNotice>\n\t);\n};\n\n/**\n * Renders a notice informing the user of the new account deposit waiting period.\n */\nexport const NewAccountWaitingPeriodNotice: React.FC = () => (\n\t<InlineNotice\n\t\tstatus=\"warning\"\n\t\ticon\n\t\tclassName=\"new-account-waiting-period-notice\"\n\t\tisDismissible={ false }\n\t>\n\t\t{ interpolateComponents( {\n\t\t\tmixedString: __(\n\t\t\t\t'Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete. {{learnMoreLink}}Learn more{{/learnMoreLink}}',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tcomponents: {\n\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t// Link content is in the format string above. Consider disabling jsx-a11y/anchor-has-content.\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t<a\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\thref=\"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#new-accounts\"\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t} ) }\n\t</InlineNotice>\n);\n\n/**\n * Renders a notice informing the user that their deposits may be paused due to a negative balance.\n */\nexport const NegativeBalanceDepositsPausedNotice: React.FC = () => (\n\t<InlineNotice\n\t\tstatus=\"warning\"\n\t\ticon\n\t\tclassName=\"negative-balance-deposits-paused-notice\"\n\t\tisDismissible={ false }\n\t>\n\t\t{ interpolateComponents( {\n\t\t\tmixedString: sprintf(\n\t\t\t\t/* translators: %s: WooPayments */\n\t\t\t\t__(\n\t\t\t\t\t'Payouts may be interrupted while your %s balance remains negative. {{whyLink}}Why?{{/whyLink}}',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t),\n\t\t\t\t'WooPayments'\n\t\t\t),\n\t\t\tcomponents: {\n\t\t\t\twhyLink: (\n\t\t\t\t\t// Link content is in the format string above. Consider disabling jsx-a11y/anchor-has-content.\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t<a\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\thref=\"https://woocommerce.com/document/woopayments/fees/account-showing-negative-balance/\"\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t} ) }\n\t</InlineNotice>\n);\n\n/**\n * Renders a notice informing the user that their available balance is below the minimum deposit threshold.\n */\nexport const DepositMinimumBalanceNotice: React.FC< {\n\t/**\n\t * The minimum deposit amount formatted as a currency string (e.g. $5.00 USD).\n\t */\n\tminimumDepositAmountFormatted: string;\n} > = ( { minimumDepositAmountFormatted } ) => {\n\treturn (\n\t\t<InlineNotice status=\"warning\" icon isDismissible={ false }>\n\t\t\t{ interpolateComponents( {\n\t\t\t\tmixedString: sprintf(\n\t\t\t\t\t/* translators: %s: a formatted currency amount, e.g. $5.00 USD */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Payouts are paused while your available funds balance remains below %s. {{learnMoreLink}}Learn more{{/learnMoreLink}}',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t),\n\t\t\t\t\tminimumDepositAmountFormatted\n\t\t\t\t),\n\t\t\t\tcomponents: {\n\t\t\t\t\tlearnMoreLink: (\n\t\t\t\t\t\t// Link content is in the format string above.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\thref=\"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#minimum-payout-amounts\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t} ) }\n\t\t</InlineNotice>\n\t);\n};\n\n/**\n * Renders a notice informing the user that deposits only occur when there are funds available.\n */\nexport const NoFundsAvailableForDepositNotice: React.FC = () => (\n\t<InlineNotice status=\"warning\" icon isDismissible={ false }>\n\t\t{ interpolateComponents( {\n\t\t\tmixedString: __(\n\t\t\t\t'You have no funds available. {{whyLink}}Why?{{/whyLink}}',\n\t\t\t\t'woocommerce-payments'\n\t\t\t),\n\t\t\tcomponents: {\n\t\t\t\twhyLink: (\n\t\t\t\t\t// Link content is in the format string above. Consider disabling jsx-a11y/anchor-has-content.\n\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t<a\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\thref=\"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#pending-funds\"\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t} ) }\n\t</InlineNotice>\n);\n\n/**\n * Renders a notice informing the user that deposits are paused due to a recent deposit failure.\n */\nexport const DepositFailureNotice: React.FC< {\n\t/**\n\t * The link to update the account details.\n\t */\n\tupdateAccountLink?: string;\n} > = ( { updateAccountLink } ) => {\n\tconst accountLinkWithSource = updateAccountLink\n\t\t? addQueryArgs( updateAccountLink, {\n\t\t\t\tfrom: 'WCPAY_PAYOUTS',\n\t\t\t\tsource: 'wcpay-payout-failure-notice',\n\t\t } )\n\t\t: '';\n\n\treturn updateAccountLink !== '' ? (\n\t\t<InlineNotice\n\t\t\tstatus=\"warning\"\n\t\t\ticon\n\t\t\tclassName=\"deposit-failure-notice\"\n\t\t\tisDismissible={ false }\n\t\t>\n\t\t\t{ interpolateComponents( {\n\t\t\t\tmixedString: __(\n\t\t\t\t\t'Payouts are currently paused because a recent payout failed. Please {{updateLink}}update your bank account details{{/updateLink}}.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t),\n\t\t\t\tcomponents: {\n\t\t\t\t\tupdateLink: (\n\t\t\t\t\t\t// @ts-expect-error: children is provided when interpolating the component\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\trecordEvent(\n\t\t\t\t\t\t\t\t\t'wcpay_account_details_link_clicked',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfrom: 'WCPAY_PAYOUTS',\n\t\t\t\t\t\t\t\t\t\tsource: 'wcpay-payout-failure-notice',\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ accountLinkWithSource }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t} ) }\n\t\t</InlineNotice>\n\t) : null;\n};\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { getHistory } from '@woocommerce/navigation';\nimport { Button, CardBody, CardFooter } from '@wordpress/components';\n\n/**\n * Internal dependencies.\n */\nimport { getAdminUrl } from 'wcpay/utils';\nimport { formatExplicitCurrency } from 'multi-currency/interface/functions';\nimport { recordEvent } from 'tracks';\nimport OverviewCard from 'wcpay/components/overview-card';\nimport Loadable, { LoadableBlock } from 'wcpay/components/loadable';\nimport { useSelectedCurrencyOverview } from 'wcpay/overview/hooks';\nimport RecentDepositsList from './recent-deposits-list';\nimport DepositSchedule from './deposit-schedule';\nimport {\n\tDepositMinimumBalanceNotice,\n\tNegativeBalanceDepositsPausedNotice,\n\tNewAccountWaitingPeriodNotice,\n\tNoFundsAvailableForDepositNotice,\n\tSuspendedDepositNotice,\n\tDepositFailureNotice,\n} from './deposit-notices';\nimport { hasAutomaticScheduledDeposits } from 'wcpay/deposits/utils';\nimport useRecentDeposits from './hooks';\nimport './style.scss';\n\nconst DepositsLoadingState: React.FC = () => (\n\t<>\n\t\t<CardBody className=\"wcpay-deposits-overview__schedule__container\">\n\t\t\t<Loadable\n\t\t\t\tisLoading\n\t\t\t\taria-hidden\n\t\t\t\tplaceholder={ __(\n\t\t\t\t\t'Available funds are automatically dispatched every day.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</CardBody>\n\n\t\t<CardBody className=\"wcpay-deposits-overview__heading\">\n\t\t\t<span className=\"wcpay-deposits-overview__heading__title\">\n\t\t\t\t{ __( 'Payout history', 'woocommerce-payments' ) }\n\t\t\t</span>\n\t\t</CardBody>\n\n\t\t<CardBody>\n\t\t\t<LoadableBlock isLoading numLines={ 4 } />\n\t\t</CardBody>\n\n\t\t<CardFooter className=\"wcpay-deposits-overview__footer\">\n\t\t\t<Loadable\n\t\t\t\tisLoading\n\t\t\t\taria-hidden\n\t\t\t\tplaceholder={ __(\n\t\t\t\t\t'View full payout history',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<Loadable\n\t\t\t\tisLoading\n\t\t\t\taria-hidden\n\t\t\t\tplaceholder={ __(\n\t\t\t\t\t'Change payout schedule',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</CardFooter>\n\t</>\n);\n\nconst DepositsOverview: React.FC = () => {\n\tconst {\n\t\taccount,\n\t\toverview,\n\t\tisLoading: isLoadingOverview,\n\t} = useSelectedCurrencyOverview();\n\tconst isDepositsUnrestricted =\n\t\twcpaySettings.accountStatus.deposits?.restrictions ===\n\t\t'deposits_unrestricted';\n\tconst selectedCurrency =\n\t\toverview?.currency || wcpaySettings.accountDefaultCurrency;\n\tconst { isLoading: isLoadingDeposits, deposits } =\n\t\tuseRecentDeposits( selectedCurrency );\n\n\tconst isLoading = isLoadingOverview || isLoadingDeposits;\n\n\tconst availableFunds = overview?.available?.amount ?? 0;\n\tconst pendingFunds = overview?.pending?.amount ?? 0;\n\tconst totalFunds = availableFunds + pendingFunds;\n\n\tconst minimumDepositAmount =\n\t\twcpaySettings.accountStatus.deposits\n\t\t\t?.minimum_scheduled_deposit_amounts?.[ selectedCurrency ] ?? 0;\n\tconst isAboveMinimumDepositAmount = availableFunds >= minimumDepositAmount;\n\t// If the total balance is negative, deposits may be paused.\n\tconst isNegativeBalanceDepositsPaused = totalFunds < 0;\n\t// When there are funds pending but no available funds, deposits are paused.\n\tconst isDepositAwaitingPendingFunds =\n\t\tavailableFunds === 0 && pendingFunds > 0;\n\tconst hasCompletedWaitingPeriod =\n\t\twcpaySettings.accountStatus.deposits?.completed_waiting_period;\n\tconst canChangeDepositSchedule =\n\t\t! account?.deposits_blocked && hasCompletedWaitingPeriod;\n\t// Only show the deposit history section if the page is finished loading and there are deposits. */ }\n\tconst hasRecentDeposits = ! isLoading && deposits?.length > 0 && !! account;\n\tconst hasScheduledDeposits = hasAutomaticScheduledDeposits(\n\t\taccount?.deposits_schedule?.interval\n\t);\n\tconst hasErroredExternalAccount =\n\t\taccount?.default_external_accounts?.some(\n\t\t\t( externalAccount ) =>\n\t\t\t\texternalAccount.currency === selectedCurrency &&\n\t\t\t\texternalAccount.status === 'errored'\n\t\t) ?? false;\n\n\tconst navigateToDepositsHistory = () => {\n\t\trecordEvent( 'wcpay_overview_deposits_view_history_click' );\n\n\t\tconst history = getHistory();\n\t\thistory.push(\n\t\t\tgetAdminUrl( {\n\t\t\t\tpage: 'wc-admin',\n\t\t\t\tpath: '/payments/payouts',\n\t\t\t} )\n\t\t);\n\t};\n\n\tif (\n\t\t! isLoading &&\n\t\t! hasCompletedWaitingPeriod &&\n\t\tavailableFunds === 0 &&\n\t\tpendingFunds === 0\n\t) {\n\t\t// If still in new account waiting period and account has no transactions,\n\t\t// don't render deposits card (nothing to show).\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<OverviewCard\n\t\t\ttitle={ __( 'Payouts', 'woocommerce-payments' ) }\n\t\t\tclassName=\"wcpay-deposits-overview\"\n\t\t\tisLoading={ isLoading }\n\t\t\tLoadingState={ DepositsLoadingState }\n\t\t>\n\t\t\t{ /* Deposit schedule message */ }\n\t\t\t{ isDepositsUnrestricted && !! account && hasScheduledDeposits && (\n\t\t\t\t<CardBody className=\"wcpay-deposits-overview__schedule__container\">\n\t\t\t\t\t<DepositSchedule\n\t\t\t\t\t\tdepositsSchedule={ account.deposits_schedule }\n\t\t\t\t\t/>\n\t\t\t\t</CardBody>\n\t\t\t) }\n\n\t\t\t{ /* Notices */ }\n\t\t\t<CardBody className=\"wcpay-deposits-overview__notices__container\">\n\t\t\t\t{ account?.deposits_blocked ? (\n\t\t\t\t\t<SuspendedDepositNotice />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! hasCompletedWaitingPeriod && (\n\t\t\t\t\t\t\t<NewAccountWaitingPeriodNotice />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasCompletedWaitingPeriod &&\n\t\t\t\t\t\t\tisDepositAwaitingPendingFunds && (\n\t\t\t\t\t\t\t\t<NoFundsAvailableForDepositNotice />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isNegativeBalanceDepositsPaused && (\n\t\t\t\t\t\t\t<NegativeBalanceDepositsPausedNotice />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasErroredExternalAccount && (\n\t\t\t\t\t\t\t<DepositFailureNotice\n\t\t\t\t\t\t\t\tupdateAccountLink={\n\t\t\t\t\t\t\t\t\twcpaySettings.accountStatus.accountLink\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ availableFunds > 0 &&\n\t\t\t\t\t\t\t! isAboveMinimumDepositAmount && (\n\t\t\t\t\t\t\t\t<DepositMinimumBalanceNotice\n\t\t\t\t\t\t\t\t\tminimumDepositAmountFormatted={ formatExplicitCurrency(\n\t\t\t\t\t\t\t\t\t\tminimumDepositAmount,\n\t\t\t\t\t\t\t\t\t\tselectedCurrency\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</CardBody>\n\n\t\t\t{ hasRecentDeposits && (\n\t\t\t\t<>\n\t\t\t\t\t<CardBody className=\"wcpay-deposits-overview__heading\">\n\t\t\t\t\t\t<span className=\"wcpay-deposits-overview__heading__title\">\n\t\t\t\t\t\t\t{ __( 'Payout history', 'woocommerce-payments' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</CardBody>\n\t\t\t\t\t<RecentDepositsList deposits={ deposits } />\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ ( hasRecentDeposits || canChangeDepositSchedule ) && (\n\t\t\t\t<CardFooter className=\"wcpay-deposits-overview__footer\">\n\t\t\t\t\t{ hasRecentDeposits && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={ navigateToDepositsHistory }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'View full payout history',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ canChangeDepositSchedule && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\tgetAdminUrl( {\n\t\t\t\t\t\t\t\t\tpage: 'wc-settings',\n\t\t\t\t\t\t\t\t\ttab: 'checkout',\n\t\t\t\t\t\t\t\t\tsection: 'woocommerce_payments',\n\t\t\t\t\t\t\t\t} ) + '#payout-schedule'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\trecordEvent(\n\t\t\t\t\t\t\t\t\t'wcpay_overview_deposits_change_schedule_click'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Change payout schedule',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</CardFooter>\n\t\t\t) }\n\t\t</OverviewCard>\n\t);\n};\n\nexport default DepositsOverview;\n","/**\n * Internal dependencies\n */\nimport { useDeposits } from 'wcpay/data/deposits';\nimport { CachedDeposit } from 'wcpay/types/deposits';\n\ninterface RecentDeposits {\n\tdeposits: CachedDeposit[];\n\tisLoading: boolean;\n}\n\nconst useRecentDeposits = ( currency?: string ): RecentDeposits => {\n\tconst query = {\n\t\tstore_currency_is: currency,\n\t\torderby: 'date',\n\t\torder: 'desc',\n\t\tper_page: '3',\n\t};\n\tconst deposits = useDeposits( query );\n\n\treturn {\n\t\tdeposits: deposits.deposits,\n\t\tisLoading: deposits.isLoading,\n\t};\n};\n\nexport default useRecentDeposits;\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { Notice } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getPaymentSettingsUrl } from '../../utils';\n\nconst JetpackIdcNotice = () => {\n\treturn (\n\t\twcpaySettings.hasOwnProperty( 'isJetpackIdcActive' ) &&\n\t\twcpaySettings.isJetpackIdcActive && (\n\t\t\t<Notice\n\t\t\t\tstatus=\"error\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tclassName=\"wcpay-jetpack-idc-notice\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your site is currently in Safe Mode.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t) }\n\t\t\t\t<span> </span>\n\t\t\t\t<a href={ getPaymentSettingsUrl() }>\n\t\t\t\t\t{ __( 'Please take action', 'woocommerce-payments' ) }\n\t\t\t\t</a>\n\t\t\t</Notice>\n\t\t)\n\t);\n};\n\nexport default JetpackIdcNotice;\n","/**\n * This is a copy of Gutenberg's CustomSelectControl component, found here:\n * https://github.com/WordPress/gutenberg/tree/7aa042605ff42bb437e650c39132c0aa8eb4ef95/packages/components/src/custom-select-control\n *\n * It has been forked from the existing WooPayments copy of this component (client/components/custom-select-control)\n * to match this specific select input design with an inline label and option hints.\n */\n\n/**\n * External Dependencies\n */\nimport React from 'react';\nimport { Button } from '@wordpress/components';\nimport { check, chevronDown, Icon } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport clsx from 'clsx';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, UseSelectState } from 'downshift';\n\n/**\n * Internal Dependencies\n */\nimport './style.scss';\n\nexport interface SelectItem {\n\t/** The unique key for the item. */\n\tkey: string;\n\t/** The display name of the item. */\n\tname?: string;\n\t/** Descriptive hint for the item, displayed to the right of the name. */\n\thint?: string;\n\t/** Additional class name to apply to the item. */\n\tclassName?: string;\n\t/** Additional inline styles to apply to the item. */\n\tstyle?: React.CSSProperties;\n}\n\nexport interface ControlProps< SelectItemType > {\n\t/** The name attribute for the select input. */\n\tname?: string;\n\t/** Additional class name to apply to the select control. */\n\tclassName?: string;\n\t/** The label for the select control. */\n\tlabel: string;\n\t/** The ID of an element that describes the select control. */\n\tdescribedBy?: string;\n\t/** A list of options/items for the select control. */\n\toptions: SelectItemType[];\n\t/** The currently selected option/item. */\n\tvalue?: SelectItemType | null;\n\t/** A placeholder to display when no item is selected. */\n\tplaceholder?: string;\n\t/** Callback function to run when the selected item changes. */\n\tonChange?: ( changes: Partial< UseSelectState< SelectItemType > > ) => void;\n\t/** A function to render the children of the item. Takes an item as an argument, must return a JSX element. */\n\tchildren?: ( item: SelectItemType ) => JSX.Element;\n}\n\n/**\n * Converts a select option/item object to a string.\n */\nconst itemToString = ( item: { name?: string } | null ) => item?.name || '';\n\n/**\n * State reducer for the select component.\n * This is needed so that in Windows, where the menu does not necessarily open on\n * key up/down, you can still switch between options with the menu closed.\n */\nconst stateReducer = (\n\t{ selectedItem }: any,\n\t{ type, changes, props: { items } }: any\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t],\n\t\t\t};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\n\n/**\n * InlineLabelSelect component.\n * A select control with a list of options, inline label, and option hints.\n */\nfunction InlineLabelSelect< ItemType extends SelectItem >( {\n\tname,\n\tclassName,\n\tlabel,\n\tdescribedBy,\n\toptions: items,\n\tonChange: onSelectedItemChange,\n\tvalue,\n\tplaceholder,\n\tchildren,\n}: ControlProps< ItemType > ): JSX.Element {\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\tselectedItem: value || ( {} as ItemType ),\n\t\tstateReducer,\n\t} );\n\n\tconst itemString = itemToString( selectedItem );\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! itemString ) {\n\t\t\treturn __( 'No selection', 'woocommerce-payments' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf(\n\t\t\t__( 'Currently selected: %s', 'woocommerce-payments' ),\n\t\t\titemString\n\t\t);\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'wcpay-filter components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e: any ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'wcpay-filter components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<Button\n\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t'aria-describedby': getDescribedBy(),\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'wcpay-filter components-custom-select-control__button',\n\t\t\t\t\t\t{ placeholder: ! itemString }\n\t\t\t\t\t),\n\t\t\t\t\tname,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t\t<label\n\t\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t'wcpay-filter components-custom-select-control__label',\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</label>\n\t\t\t\t}\n\t\t\t\t<span className=\"wcpay-filter components-custom-select-control__button-value\">\n\t\t\t\t\t{ itemString || placeholder }\n\t\t\t\t</span>\n\t\t\t\t<Icon\n\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\tclassName=\"wcpay-filter components-custom-select-control__button-icon\"\n\t\t\t\t/>\n\t\t\t</Button>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'wcpay-filter components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\tclassName=\"wcpay-filter components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\tvisibility={\n\t\t\t\t\t\t\t\t\titem === selectedItem ? 'visible' : 'hidden'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ children ? children( item ) : item.name }\n\t\t\t\t\t\t\t{ item.hint && (\n\t\t\t\t\t\t\t\t<span className=\"wcpay-filter components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.hint }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n\nexport default InlineLabelSelect;\n","/**\n * External dependencies\n */\nimport React, { useEffect } from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { useSelectedCurrency } from 'overview/hooks';\nimport { getCurrency } from 'multi-currency/interface/functions';\nimport InlineLabelSelect from '../inline-label-select';\nimport { recordEvent } from 'tracks';\n\n/**\n * Returns an select option object for a currency select control.\n */\nconst getCurrencyOption = (\n\tcurrency: string\n): {\n\tname: string;\n\tkey: string;\n} => {\n\tconst { code, symbol } = getCurrency( currency )?.getCurrencyConfig() || {};\n\tconst currencySymbolDecoded = decodeEntities( symbol || '' );\n\n\tif (\n\t\t// Show just the currency the currency code is used as the name, e.g. 'EUR'\n\t\t// if no currency config is found,\n\t\t! code ||\n\t\t! symbol ||\n\t\t// or if the symbol is identical to the currency code, e.g. 'CHF CHF'.\n\t\tcurrencySymbolDecoded === code\n\t) {\n\t\treturn {\n\t\t\tname: currency.toUpperCase(),\n\t\t\tkey: currency,\n\t\t};\n\t}\n\treturn {\n\t\t// A rendered name of the currency with symbol, e.g. `EUR €`.\n\t\tname: `${ code } ${ currencySymbolDecoded }`,\n\t\tkey: currency,\n\t};\n};\n\n/**\n * Custom hook to get the selected currency from the URL query parameter 'selected_currency'.\n * If no currency is selected, the store's default currency will be selected.\n */\nconst useSelectedCurrencyWithDefault = ( depositCurrencies: string[] ) => {\n\tconst { selectedCurrency, setSelectedCurrency } = useSelectedCurrency();\n\n\tuseEffect( () => {\n\t\t// The selected currency is invalid if:\n\t\t// * no currency is explicitly selected via URL query, or\n\t\t// * no currency is found for the provided query parameter.\n\t\tconst isSelectedCurrencyValid =\n\t\t\tselectedCurrency &&\n\t\t\tdepositCurrencies.find(\n\t\t\t\t( currency ) =>\n\t\t\t\t\tcurrency.toLowerCase() === selectedCurrency.toLowerCase()\n\t\t\t);\n\n\t\t// Select the store's default currency if the selected currency is invalid.\n\t\tif ( ! isSelectedCurrencyValid && depositCurrencies.length > 0 ) {\n\t\t\tsetSelectedCurrency( depositCurrencies[ 0 ].toLowerCase() );\n\t\t}\n\t}, [ depositCurrencies, selectedCurrency, setSelectedCurrency ] );\n\n\treturn { selectedCurrency, setSelectedCurrency };\n};\n\n/**\n * Renders a currency select input used for the Payments Overview page.\n * Should only be rendered if there are multiple deposit currencies available.\n */\nexport const CurrencySelect: React.FC< {\n\t/** An array of available deposit currencies, e.g. ['usd', 'eur']. */\n\tdepositCurrencies: string[];\n} > = ( { depositCurrencies } ) => {\n\tconst currencyOptions = depositCurrencies.map( getCurrencyOption );\n\tconst { selectedCurrency, setSelectedCurrency } =\n\t\tuseSelectedCurrencyWithDefault( depositCurrencies );\n\n\treturn (\n\t\t<InlineLabelSelect\n\t\t\tlabel={ __( 'Currency', 'woocommerce-payments' ) }\n\t\t\tvalue={ currencyOptions.find(\n\t\t\t\t( option ) => option.key === selectedCurrency\n\t\t\t) }\n\t\t\toptions={ currencyOptions }\n\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\tif ( ! selectedItem ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst currencyCode = selectedItem.key.toLowerCase();\n\t\t\t\tsetSelectedCurrency( currencyCode );\n\t\t\t\trecordEvent( 'wcpay_overview_currency_select_change', {\n\t\t\t\t\tselected_currency: currencyCode,\n\t\t\t\t} );\n\t\t\t} }\n\t\t/>\n\t);\n};\n","/**\n * External dependencies\n */\nimport React from 'react';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { CardHeader, Flex, FlexItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useAllDepositsOverviews } from 'wcpay/data/deposits';\nimport { useCurrentWpUser } from './hooks';\nimport { CurrencySelect } from './currency-select';\nimport './style.scss';\n\ntype TimeOfDay = 'morning' | 'afternoon' | 'evening';\nconst greetingStrings = {\n\twithName: {\n\t\t/** translators: %s name of the person being greeted. */\n\t\tmorning: __( 'Good morning, %s', 'woocommerce-payments' ),\n\t\t/** translators: %s name of the person being greeted. */\n\t\tafternoon: __( 'Good afternoon, %s', 'woocommerce-payments' ),\n\t\t/** translators: %s name of the person being greeted. */\n\t\tevening: __( 'Good evening, %s', 'woocommerce-payments' ),\n\t},\n\twithoutName: {\n\t\tmorning: __( 'Good morning', 'woocommerce-payments' ),\n\t\tafternoon: __( 'Good afternoon', 'woocommerce-payments' ),\n\t\tevening: __( 'Good evening', 'woocommerce-payments' ),\n\t},\n};\n\n/**\n * Calculates the time of day based on the browser's time.\n *\n * @param {Date} date A date object to calculate the time of day for. Defaults to the current time.\n * @return {TimeOfDay} The time of day. One of 'morning', 'afternoon' or 'evening'.\n */\nconst getTimeOfDayString = ( date: Date = new Date() ): TimeOfDay => {\n\tconst hour = date.getHours();\n\t// Morning 5am -11.59am\n\tif ( hour >= 5 && hour < 12 ) {\n\t\treturn 'morning';\n\t}\n\t// Afternoon 12pm – 4:59pm\n\tif ( hour >= 12 && hour < 17 ) {\n\t\treturn 'afternoon';\n\t}\n\t// Evening 5pm – 4:59am\n\treturn 'evening';\n};\n\n/**\n * Returns a greeting string based on the time of day and a given name, if provided.\n *\n * @param {string} name A name to include in the greeting, optional.\n * @param {Date} date A date object to calculate the time of day for. Defaults to the current time.\n * @return {string} A greeting string.\n */\nconst getGreeting = ( name?: string, date: Date = new Date() ): string => {\n\tconst timeOfDay = getTimeOfDayString( date );\n\tlet greeting = greetingStrings.withoutName[ timeOfDay ];\n\tif ( name ) {\n\t\tgreeting = sprintf( greetingStrings.withName[ timeOfDay ], name );\n\t}\n\tgreeting += ' 👋';\n\treturn greeting;\n};\n\n/**\n * Renders a welcome card header with a greeting and a currency select input if supported.\n */\nconst Welcome: React.FC = () => {\n\tconst { user } = useCurrentWpUser();\n\tconst greeting = getGreeting( user?.first_name );\n\tconst { overviews } = useAllDepositsOverviews();\n\tconst depositCurrencies =\n\t\toverviews?.currencies.map( ( currencyObj ) => currencyObj.currency ) ||\n\t\t[];\n\tconst renderCurrencySelect = depositCurrencies.length > 1;\n\n\treturn (\n\t\t<CardHeader className=\"wcpay-welcome\">\n\t\t\t<Flex\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\tclassName=\"wcpay-welcome__flex\"\n\t\t\t>\n\t\t\t\t<FlexItem className=\"wcpay-welcome__flex__greeting\">\n\t\t\t\t\t{ greeting }\n\t\t\t\t</FlexItem>\n\n\t\t\t\t{ renderCurrencySelect && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<CurrencySelect\n\t\t\t\t\t\t\tdepositCurrencies={ depositCurrencies }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t</CardHeader>\n\t);\n};\n\nexport default Welcome;\n","/**\n * External dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\ntype WPUser = {\n\tid: number;\n\tusername: string;\n\tname: string;\n\tfirst_name: string;\n\tnickname: string;\n\tlast_name: string;\n\temail: string;\n\tlocale: string;\n};\n\nexport const useCurrentWpUser = (): {\n\tuser?: WPUser;\n\tisLoading: boolean;\n} => {\n\tconst { user, isLoading } = useSelect( ( select ) => {\n\t\tconst { getCurrentUser, isResolving } = select( 'core' );\n\t\treturn {\n\t\t\tuser: getCurrentUser() as WPUser | undefined,\n\t\t\tisLoading: !! isResolving( 'getCurrentUser' ),\n\t\t};\n\t} );\n\n\treturn { user, isLoading };\n};\n","/**\n * External dependencies\n */\nimport { __, _n } from '@wordpress/i18n';\nimport { useEffect, useState, useRef } from '@wordpress/element';\nimport { EmptyContent, Section } from '@woocommerce/components';\nimport { NOTES_STORE_NAME, QUERY_DEFAULTS } from '@woocommerce/data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport {\n\tInboxNoteCard,\n\tInboxDismissConfirmationModal,\n\tInboxNotePlaceholder,\n} from '@woocommerce/experimental';\n\n/**\n * Internal dependencies\n */\nimport { recordEvent } from 'tracks';\nimport { updateWoocommerceUserMeta } from 'utils/update-woocommerce-user-meta';\nimport './index.scss';\n\nconst INBOX_QUERY = {\n\tpage: 1,\n\tper_page: QUERY_DEFAULTS.pageSize,\n\tstatus: 'unactioned',\n\ttype: QUERY_DEFAULTS.noteTypes,\n\torderby: 'date',\n\torder: 'desc',\n\tsource: 'woocommerce-payments',\n\t_fields: [\n\t\t'id',\n\t\t'name',\n\t\t'title',\n\t\t'content',\n\t\t'type',\n\t\t'status',\n\t\t'actions',\n\t\t'date_created',\n\t\t'date_created_gmt',\n\t\t'layout',\n\t\t'image',\n\t\t'is_deleted',\n\t\t'source',\n\t],\n};\n\nconst renderEmptyCard = () => (\n\t<section className=\"woocommerce-empty-activity-card\">\n\t\t{ __(\n\t\t\t'As things begin to happen in your store your inbox will start to fill up. ' +\n\t\t\t\t\"You'll see things like achievements, new feature announcements, extension recommendations and more!\",\n\t\t\t'woocommerce-payments'\n\t\t) }\n\t</section>\n);\n\nfunction hasValidNotes( notes ) {\n\tconst validNotes = notes.filter( ( { is_deleted: isDeleted } ) => {\n\t\treturn ! isDeleted;\n\t} );\n\treturn validNotes.length !== 0;\n}\n\nconst onBodyLinkClick = ( note, innerLink ) => {\n\trecordEvent( 'wcpay_inbox_action_click', {\n\t\tnote_name: note.name,\n\t\tnote_title: note.title,\n\t\tnote_content_inner_link: innerLink,\n\t} );\n};\n\nconst renderNotes = ( {\n\thasNotes,\n\tbatchUpdating,\n\tlastRead,\n\tnotes,\n\tonDismiss,\n\tonNoteActionClick,\n} ) => {\n\tif ( batchUpdating ) {\n\t\treturn;\n\t}\n\n\tif ( ! hasNotes ) {\n\t\treturn renderEmptyCard();\n\t}\n\n\tconst onNoteVisible = ( note ) => {\n\t\trecordEvent( 'wcpay_inbox_note_view', {\n\t\t\tnote_content: note.content,\n\t\t\tnote_name: note.name,\n\t\t\tnote_title: note.title,\n\t\t\tnote_type: note.type,\n\t\t} );\n\t};\n\n\tconst notesArray = Object.keys( notes ).map( ( key ) => notes[ key ] );\n\n\treturn (\n\t\t<TransitionGroup role=\"menu\">\n\t\t\t{ notesArray.map( ( note ) => {\n\t\t\t\tconst { id: noteId, is_deleted: isDeleted } = note;\n\t\t\t\tif ( isDeleted ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<CSSTransition\n\t\t\t\t\t\tkey={ noteId }\n\t\t\t\t\t\ttimeout={ 500 }\n\t\t\t\t\t\tclassNames=\"wcpay-inbox-message\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InboxNoteCard\n\t\t\t\t\t\t\tkey={ noteId }\n\t\t\t\t\t\t\tnote={ note }\n\t\t\t\t\t\t\tlastRead={ lastRead }\n\t\t\t\t\t\t\tonDismiss={ onDismiss }\n\t\t\t\t\t\t\tonNoteActionClick={ onNoteActionClick }\n\t\t\t\t\t\t\tonBodyLinkClick={ onBodyLinkClick }\n\t\t\t\t\t\t\tonNoteVisible={ onNoteVisible }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</CSSTransition>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</TransitionGroup>\n\t);\n};\n\nconst InboxPanel = () => {\n\tconst { createNotice } = useDispatch( 'core/notices' );\n\tconst { batchUpdateNotes, removeNote, updateNote, triggerNoteAction } =\n\t\tuseDispatch( NOTES_STORE_NAME );\n\tconst { isError, resolving, batchUpdating, notes, overviewInboxLastRead } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getNotes, getNotesError, isResolving, isNotesRequesting } =\n\t\t\t\tselect( NOTES_STORE_NAME );\n\t\t\tconst { getCurrentUser } = select( 'core' );\n\t\t\tconst currentUser = getCurrentUser();\n\t\t\tconst woocommerceMeta = currentUser\n\t\t\t\t? currentUser.woocommerce_meta\n\t\t\t\t: {};\n\n\t\t\treturn {\n\t\t\t\tnotes: getNotes( INBOX_QUERY ),\n\t\t\t\tisError: Boolean(\n\t\t\t\t\tgetNotesError( 'getNotes', [ INBOX_QUERY ] )\n\t\t\t\t),\n\t\t\t\tresolving: isResolving( 'getNotes', [ INBOX_QUERY ] ),\n\t\t\t\tbatchUpdating: isNotesRequesting( 'batchUpdateNotes' ),\n\t\t\t\toverviewInboxLastRead:\n\t\t\t\t\twoocommerceMeta.wc_payments_overview_inbox_last_read\n\t\t\t\t\t\t? JSON.parse(\n\t\t\t\t\t\t\t\twoocommerceMeta.wc_payments_overview_inbox_last_read\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t} );\n\tconst [ dismiss, setDismiss ] = useState();\n\t// Make sure we only set lastRead at component mount.\n\tconst lastRead = useRef( overviewInboxLastRead );\n\tif ( ! lastRead.current && overviewInboxLastRead ) {\n\t\tlastRead.current = overviewInboxLastRead;\n\t}\n\n\tuseEffect( () => {\n\t\tconst mountTime = Date.now();\n\n\t\tconst userDataFields = {\n\t\t\twc_payments_overview_inbox_last_read: mountTime,\n\t\t};\n\t\tupdateWoocommerceUserMeta( userDataFields );\n\t}, [] );\n\n\tif ( isError ) {\n\t\tconst title = __(\n\t\t\t'There was an error getting your inbox. Please try again.',\n\t\t\t'woocommerce-payments'\n\t\t);\n\t\tconst actionLabel = __( 'Reload', 'woocommerce-payments' );\n\t\tconst actionCallback = () => {\n\t\t\t// @todo Add tracking for how often an error is displayed, and the reload action is clicked.\n\t\t\twindow.location.reload();\n\t\t};\n\n\t\treturn (\n\t\t\t<EmptyContent\n\t\t\t\ttitle={ title }\n\t\t\t\tactionLabel={ actionLabel }\n\t\t\t\tactionURL={ null }\n\t\t\t\tactionCallback={ actionCallback }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst onDismiss = ( note, type ) => {\n\t\tsetDismiss( { note, type } );\n\t};\n\n\tconst closeDismissModal = async ( confirmed = false ) => {\n\t\tconst noteNameDismissAll = dismiss.type === 'all';\n\n\t\trecordEvent( 'wcpay_inbox_action_dismissed', {\n\t\t\tnote_name: dismiss.note.name,\n\t\t\tnote_title: dismiss.note.title,\n\t\t\tnote_name_dismiss_all: noteNameDismissAll,\n\t\t\tnote_name_dismiss_confirmation: confirmed,\n\t\t} );\n\n\t\tif ( confirmed ) {\n\t\t\tconst noteId = dismiss.note.id;\n\t\t\tconst removeAll = ! noteId || noteNameDismissAll;\n\t\t\ttry {\n\t\t\t\tlet notesRemoved = [];\n\t\t\t\tif ( removeAll ) {\n\t\t\t\t\tawait batchUpdateNotes(\n\t\t\t\t\t\tnotes.map( ( note ) => note.id ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tis_deleted: 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tnotesRemoved = [ ...notes ];\n\t\t\t\t} else {\n\t\t\t\t\tconst noteRemoved = await removeNote( noteId );\n\t\t\t\t\tnotesRemoved = [ noteRemoved ];\n\t\t\t\t}\n\t\t\t\tsetDismiss( undefined );\n\t\t\t\tcreateNotice(\n\t\t\t\t\t'success',\n\t\t\t\t\tnotesRemoved.length > 1\n\t\t\t\t\t\t? __( 'All messages dismissed', 'woocommerce-payments' )\n\t\t\t\t\t\t: __( 'Message dismissed', 'woocommerce-payments' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo', 'woocommerce-payments' ),\n\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\tif ( notesRemoved.length > 1 ) {\n\t\t\t\t\t\t\t\t\t\tbatchUpdateNotes(\n\t\t\t\t\t\t\t\t\t\t\tnotesRemoved.map(\n\t\t\t\t\t\t\t\t\t\t\t\t( note ) => note.id\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tis_deleted: 0,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tupdateNote( noteId, {\n\t\t\t\t\t\t\t\t\t\t\tis_deleted: 0,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} catch ( e ) {\n\t\t\t\tconst numberOfNotes = removeAll ? notes.length : 1;\n\t\t\t\tcreateNotice(\n\t\t\t\t\t'error',\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Message could not be dismissed',\n\t\t\t\t\t\t'Messages could not be dismissed',\n\t\t\t\t\t\tnumberOfNotes,\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tsetDismiss( undefined );\n\t\t\t}\n\t\t} else {\n\t\t\tsetDismiss( undefined );\n\t\t}\n\t};\n\n\tconst onNoteActionClick = ( note, action ) => {\n\t\ttriggerNoteAction( note.id, action.id );\n\t};\n\n\tconst hasNotes = hasValidNotes( notes );\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"wcpay-overview-screen-notes-wrapper\">\n\t\t\t\t{ ( resolving || batchUpdating ) && (\n\t\t\t\t\t<Section>\n\t\t\t\t\t\t<InboxNotePlaceholder className=\"banner message-is-unread\" />\n\t\t\t\t\t</Section>\n\t\t\t\t) }\n\t\t\t\t<Section>\n\t\t\t\t\t{ ! resolving &&\n\t\t\t\t\t\t! batchUpdating &&\n\t\t\t\t\t\trenderNotes( {\n\t\t\t\t\t\t\thasNotes,\n\t\t\t\t\t\t\tbatchUpdating,\n\t\t\t\t\t\t\tlastRead: lastRead.current,\n\t\t\t\t\t\t\tnotes,\n\t\t\t\t\t\t\tonDismiss,\n\t\t\t\t\t\t\tonNoteActionClick,\n\t\t\t\t\t\t} ) }\n\t\t\t\t</Section>\n\t\t\t\t{ dismiss && (\n\t\t\t\t\t<InboxDismissConfirmationModal\n\t\t\t\t\t\tonClose={ closeDismissModal }\n\t\t\t\t\t\tonDismiss={ () => closeDismissModal( true ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default InboxPanel;\n","/**\n * External dependencies\n */\nimport { dispatch, select } from '@wordpress/data';\n\nexport async function updateWoocommerceUserMeta( newMetaData ) {\n\tif ( ! newMetaData || Object.keys( newMetaData ).length === 0 ) {\n\t\treturn;\n\t}\n\tconst user = await select( 'core' ).getCurrentUser();\n\n\tconst metaData = Object.keys( newMetaData ).reduce( ( val, key ) => {\n\t\tlet newValue = newMetaData[ key ];\n\t\tif ( typeof newValue !== 'string' ) {\n\t\t\tnewValue = JSON.stringify( newValue );\n\t\t}\n\t\treturn {\n\t\t\t...val,\n\t\t\t[ key ]: newValue,\n\t\t};\n\t}, {} );\n\tconst updatedUser = await dispatch( 'core' ).saveUser( {\n\t\tid: user.id,\n\t\twoocommerce_meta: {\n\t\t\t...user.woocommerce_meta,\n\t\t\t...metaData,\n\t\t},\n\t} );\n\n\tif ( undefined === updatedUser ) {\n\t\t// Return the encountered error to the caller.\n\t\tconst error = await select( 'core' ).getLastEntitySaveError(\n\t\t\t'root',\n\t\t\t'user',\n\t\t\tuser.id\n\t\t);\n\n\t\treturn {\n\t\t\terror,\n\t\t\tupdatedUser,\n\t\t};\n\t}\n\n\treturn updatedUser.woocommerce_meta;\n}\n","export enum TIME {\n\tDAY_IN_MS = 24 * 60 * 60 * 1000,\n}\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\nimport { CollapsibleList, TaskItem } from '@woocommerce/experimental';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { TIME } from 'wcpay/constants/time';\nimport { saveOption } from 'wcpay/data/settings/actions';\n\nconst TaskList = ( { overviewTasksVisibility, tasks } ) => {\n\tconst { createNotice } = useDispatch( 'core/notices' );\n\tconst [ visibleTasks, setVisibleTasks ] = useState( tasks );\n\tconst { deletedTodoTasks, dismissedTodoTasks, remindMeLaterTodoTasks } =\n\t\toverviewTasksVisibility;\n\n\tconst getVisibleTasks = useCallback( () => {\n\t\tconst nowTimestamp = Date.now();\n\t\treturn tasks.filter(\n\t\t\t( task ) =>\n\t\t\t\t! deletedTodoTasks.includes( task.key ) &&\n\t\t\t\t! dismissedTodoTasks.includes( task.key ) &&\n\t\t\t\t( ! remindMeLaterTodoTasks[ task.key ] ||\n\t\t\t\t\tremindMeLaterTodoTasks[ task.key ] < nowTimestamp )\n\t\t);\n\t}, [\n\t\tdeletedTodoTasks,\n\t\tdismissedTodoTasks,\n\t\tremindMeLaterTodoTasks,\n\t\ttasks,\n\t] );\n\n\tuseEffect( () => {\n\t\tsetVisibleTasks( getVisibleTasks() );\n\t}, [ tasks, getVisibleTasks ] );\n\n\tconst undoDismissTask = async ( key, dismissedTasks, optionName ) => {\n\t\tconst updatedDismissedTasks = dismissedTasks.filter(\n\t\t\t( task ) => task !== key\n\t\t);\n\n\t\tdismissedTasks.splice( dismissedTodoTasks.indexOf( key ), 1 );\n\t\tsetVisibleTasks( getVisibleTasks() );\n\n\t\tsaveOption( optionName, updatedDismissedTasks );\n\t};\n\n\tconst dismissSelectedTask = async ( {\n\t\ttask,\n\t\tdismissedTasks,\n\t\tnoticeMessage,\n\t\toptionName,\n\t} ) => {\n\t\tconst { key, onDismiss } = task;\n\n\t\tdismissedTasks.push( key );\n\t\tsetVisibleTasks( getVisibleTasks() );\n\n\t\tsaveOption( optionName, [ ...dismissedTasks ] );\n\n\t\tcreateNotice( 'success', noticeMessage, {\n\t\t\tactions: [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Undo', 'woocommerce-payments' ),\n\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\tundoDismissTask( key, dismissedTasks, optionName ),\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\t};\n\n\tconst dismissTask = ( task, type ) => {\n\t\tconst params =\n\t\t\ttype === 'dismiss'\n\t\t\t\t? {\n\t\t\t\t\t\ttask,\n\t\t\t\t\t\tdismissedTasks: dismissedTodoTasks,\n\t\t\t\t\t\tnoticeMessage: __(\n\t\t\t\t\t\t\t'Task dismissed',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t),\n\t\t\t\t\t\toptionName: 'woocommerce_dismissed_todo_tasks',\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\ttask,\n\t\t\t\t\t\tdismissedTasks: deletedTodoTasks,\n\t\t\t\t\t\tnoticeMessage: __(\n\t\t\t\t\t\t\t'Task deleted',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t),\n\t\t\t\t\t\toptionName: 'woocommerce_deleted_todo_tasks',\n\t\t\t\t };\n\t\tdismissSelectedTask( params );\n\t};\n\n\tconst undoRemindTaskLater = async ( key ) => {\n\t\tconst {\n\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\t[ key ]: oldValue,\n\t\t\t...updatedRemindMeLaterTasks\n\t\t} = remindMeLaterTodoTasks;\n\n\t\tdelete remindMeLaterTodoTasks[ key ];\n\t\tsetVisibleTasks( getVisibleTasks() );\n\n\t\tsaveOption(\n\t\t\t'woocommerce_remind_me_later_todo_tasks',\n\t\t\tupdatedRemindMeLaterTasks\n\t\t);\n\t};\n\n\tconst remindTaskLater = async ( { key, onDismiss } ) => {\n\t\tconst dismissTime = Date.now() + TIME.DAY_IN_MS;\n\t\tremindMeLaterTodoTasks[ key ] = dismissTime;\n\t\tsetVisibleTasks( getVisibleTasks() );\n\n\t\tsaveOption( 'woocommerce_remind_me_later_todo_tasks', {\n\t\t\t...remindMeLaterTodoTasks,\n\t\t\t[ key ]: dismissTime,\n\t\t} );\n\n\t\tcreateNotice(\n\t\t\t'success',\n\t\t\t__( 'Task postponed until tomorrow', 'woocommerce-payments' ),\n\t\t\t{\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Undo', 'woocommerce-payments' ),\n\t\t\t\t\t\tonClick: () => undoRemindTaskLater( key ),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\t};\n\n\tif ( ! visibleTasks.length ) {\n\t\treturn <div></div>;\n\t}\n\n\treturn (\n\t\t<CollapsibleList\n\t\t\tclassName={ 'wcpay-task-list' }\n\t\t\tcollapsed={ false }\n\t\t\tshow={ 5 }\n\t\t\tcollapseLabel={ __( 'Hide tasks', 'woocommerce-payments' ) }\n\t\t\texpandLabel={ __( 'Show tasks', 'woocommerce-payments' ) }\n\t\t>\n\t\t\t{ visibleTasks.map( ( task ) => (\n\t\t\t\t<TaskItem\n\t\t\t\t\tkey={ task.key }\n\t\t\t\t\tdata-key={ task.key }\n\t\t\t\t\t// Pass in optional data attributes.\n\t\t\t\t\t{ ...( task.dataAttrs || {} ) }\n\t\t\t\t\ttitle={ task.title }\n\t\t\t\t\tactionLabel={ task.actionLabel }\n\t\t\t\t\tcompleted={ task.completed }\n\t\t\t\t\tcontent={ task.content }\n\t\t\t\t\tadditionalInfo={ task.additionalInfo }\n\t\t\t\t\tshowActionButton={ task.showActionButton }\n\t\t\t\t\texpandable={ task.expandable }\n\t\t\t\t\texpanded={ task.expanded }\n\t\t\t\t\tenter={ task.enter !== undefined ? task.enter : false }\n\t\t\t\t\taction={\n\t\t\t\t\t\ttask.action !== undefined ? task.action : task.onClick\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ task.onClick }\n\t\t\t\t\ttime={ task.time }\n\t\t\t\t\tlevel={ task.level }\n\t\t\t\t\tonDelete={\n\t\t\t\t\t\ttask.isDeletable && task.completed\n\t\t\t\t\t\t\t? () => dismissTask( task, 'delete' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tonDismiss={\n\t\t\t\t\t\ttask.isDismissable\n\t\t\t\t\t\t\t? () => dismissTask( task, 'dismiss' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tonSnooze={\n\t\t\t\t\t\ttask.allowSnooze\n\t\t\t\t\t\t\t? () => remindTaskLater( task )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</CollapsibleList>\n\t);\n};\n\nexport default TaskList;\n","/** @format */\n\nexport enum ACTION_TYPES {\n\tSET_DISPUTE_READINESS = 'SET_DISPUTE_READINESS',\n\tSET_ERROR_FOR_DISPUTE_READINESS = 'SET_ERROR_FOR_DISPUTE_READINESS',\n}\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport { ACTION_TYPES } from './action-types';\nimport { DisputeReadinessAction, DisputeReadinessState } from './types';\n\nconst defaultState: DisputeReadinessState = {\n\tdisputeReadiness: undefined,\n\tdisputeReadinessError: undefined,\n};\n\nexport default function disputeReadiness(\n\tstate: DisputeReadinessState = defaultState,\n\taction: DisputeReadinessAction\n): DisputeReadinessState {\n\tswitch ( action.type ) {\n\t\tcase ACTION_TYPES.SET_DISPUTE_READINESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tdisputeReadiness: action.data,\n\t\t\t\tdisputeReadinessError: undefined,\n\t\t\t};\n\t\tcase ACTION_TYPES.SET_ERROR_FOR_DISPUTE_READINESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tdisputeReadinessError: action.error,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { apiFetch } from '@wordpress/data-controls';\nimport { controls } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { ACTION_TYPES } from './action-types';\nimport { NAMESPACE } from '../constants';\nimport { DISPUTE_READINESS_STORE_NAME as STORE_NAME } from '../store-names';\nimport { ApiError } from '../../types/errors';\nimport {\n\tDisputeReadinessData,\n\tErrorDisputeReadinessAction,\n\tUpdateDisputeReadinessAction,\n} from './types';\n\nexport const updateDisputeReadiness = (\n\tdata: DisputeReadinessData\n): UpdateDisputeReadinessAction => ( {\n\ttype: ACTION_TYPES.SET_DISPUTE_READINESS,\n\tdata,\n} );\n\nexport const updateErrorForDisputeReadiness = (\n\terror: ApiError\n): ErrorDisputeReadinessAction => ( {\n\ttype: ACTION_TYPES.SET_ERROR_FOR_DISPUTE_READINESS,\n\terror,\n} );\n\nexport function* dismissDisputeReadinessCard(): unknown {\n\ttry {\n\t\tconst result = yield apiFetch( {\n\t\t\tpath: `${ NAMESPACE }/dispute-readiness/dismiss`,\n\t\t\tmethod: 'POST',\n\t\t} );\n\n\t\tyield controls.dispatch( STORE_NAME, 'updateDisputeReadiness', result );\n\t} catch ( error ) {\n\t\tyield controls.dispatch(\n\t\t\tSTORE_NAME,\n\t\t\t'updateErrorForDisputeReadiness',\n\t\t\terror\n\t\t);\n\t}\n}\n\nexport function* confirmStatementDescriptor(): unknown {\n\ttry {\n\t\tconst result = yield apiFetch( {\n\t\t\tpath: `${ NAMESPACE }/dispute-readiness/statement-descriptor/confirm`,\n\t\t\tmethod: 'POST',\n\t\t} );\n\n\t\tyield controls.dispatch( STORE_NAME, 'updateDisputeReadiness', result );\n\t} catch ( error ) {\n\t\tyield controls.dispatch(\n\t\t\tSTORE_NAME,\n\t\t\t'updateErrorForDisputeReadiness',\n\t\t\terror\n\t\t);\n\t}\n}\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { apiFetch } from '@wordpress/data-controls';\nimport { controls } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { NAMESPACE } from '../constants';\nimport { DISPUTE_READINESS_STORE_NAME as STORE_NAME } from '../store-names';\n\nexport function* getDisputeReadiness(): unknown {\n\ttry {\n\t\tconst result = yield apiFetch( {\n\t\t\tpath: `${ NAMESPACE }/dispute-readiness`,\n\t\t} );\n\n\t\tyield controls.dispatch( STORE_NAME, 'updateDisputeReadiness', result );\n\t} catch ( error ) {\n\t\tyield controls.dispatch(\n\t\t\tSTORE_NAME,\n\t\t\t'updateErrorForDisputeReadiness',\n\t\t\terror\n\t\t);\n\t}\n}\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport { ApiError } from '../../types/errors';\nimport { DisputeReadinessData, DisputeReadinessState } from './types';\n\ninterface State {\n\tdisputeReadiness: DisputeReadinessState;\n}\n\nexport const getDisputeReadiness = (\n\tstate: State\n): DisputeReadinessData | undefined => state.disputeReadiness?.disputeReadiness;\n\nexport const getDisputeReadinessError = (\n\tstate: State\n): ApiError | undefined => state.disputeReadiness?.disputeReadinessError;\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { createReduxStore, register, combineReducers } from '@wordpress/data';\nimport { controls } from '@wordpress/data-controls';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\nimport { DISPUTE_READINESS_STORE_NAME } from '../store-names';\n\nexport const STORE_NAME = DISPUTE_READINESS_STORE_NAME;\n\n// The reducer is nested under its slice key so selectors keep reading\n// `state.disputeReadiness.…`, exactly as they did under the old combined store.\nexport const store = createReduxStore( STORE_NAME, {\n\treducer: combineReducers( { disputeReadiness: reducer } ),\n\tactions,\n\tselectors,\n\tresolvers,\n\tcontrols,\n} );\n\nregister( store );\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { useCallback } from 'react';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './store';\nimport { DisputeReadinessActions, DisputeReadinessResponse } from './types';\n\nexport const useDisputeReadiness = (): DisputeReadinessResponse =>\n\tuseSelect( ( select ) => {\n\t\tconst { getDisputeReadiness, getDisputeReadinessError, isResolving } =\n\t\t\tselect( STORE_NAME );\n\n\t\treturn {\n\t\t\tdisputeReadiness: getDisputeReadiness(),\n\t\t\tdisputeReadinessError: getDisputeReadinessError(),\n\t\t\tisLoading: isResolving( 'getDisputeReadiness' ),\n\t\t};\n\t} );\n\nexport const useDisputeReadinessActions = (): DisputeReadinessActions => {\n\tconst {\n\t\tdismissDisputeReadinessCard,\n\t\tconfirmStatementDescriptor,\n\t\tinvalidateResolutionForStoreSelector,\n\t} = useDispatch( STORE_NAME );\n\tconst refreshDisputeReadiness = useCallback( () => {\n\t\tinvalidateResolutionForStoreSelector( 'getDisputeReadiness' );\n\t}, [ invalidateResolutionForStoreSelector ] );\n\n\treturn {\n\t\tdismissDisputeReadinessCard,\n\t\tconfirmStatementDescriptor,\n\t\trefreshDisputeReadiness,\n\t};\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React, { useEffect, useRef, useState } from 'react';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tCard,\n\tCardBody,\n\tCardHeader,\n\tDropdownMenu,\n\tExternalLink,\n\tMenuGroup,\n\tMenuItem,\n\tModal,\n\tSpinner,\n} from '@wordpress/components';\nimport { HorizontalRule } from '@wordpress/primitives';\nimport { moreVertical } from '@wordpress/icons';\nimport { CollapsibleList, TaskItem } from '@woocommerce/experimental';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseDisputeReadiness,\n\tuseDisputeReadinessActions,\n} from 'wcpay/data/dispute-readiness';\nimport { recordEvent } from 'wcpay/tracks';\nimport { DisputeReadinessSignal } from 'wcpay/data/dispute-readiness/types';\nimport './style.scss';\n\nconst learnMoreUrl =\n\t'https://woocommerce.com/document/woopayments/fraud-and-disputes/preventing-disputes/';\n\nconst LoadingState = () => (\n\t<Card className=\"wcpay-dispute-readiness-card\">\n\t\t<CardHeader className=\"wcpay-dispute-readiness-card__header\">\n\t\t\t{ __( 'Dispute readiness', 'woocommerce-payments' ) }\n\t\t</CardHeader>\n\t\t<CardBody className=\"wcpay-dispute-readiness-card__body is-loading\">\n\t\t\t<Spinner />\n\t\t</CardBody>\n\t</Card>\n);\n\nconst DisputeReadinessCard = () => {\n\tconst { disputeReadiness, isLoading } = useDisputeReadiness();\n\tconst {\n\t\tdismissDisputeReadinessCard,\n\t\tconfirmStatementDescriptor,\n\t\trefreshDisputeReadiness,\n\t} = useDisputeReadinessActions();\n\tconst viewedRef = useRef( false );\n\tconst [ statementDescriptorSignal, setStatementDescriptorSignal ] =\n\t\tuseState< DisputeReadinessSignal | null >( null );\n\tconst overview = disputeReadiness?.overview;\n\n\tuseEffect( () => {\n\t\trefreshDisputeReadiness();\n\t}, [ refreshDisputeReadiness ] );\n\n\tuseEffect( () => {\n\t\tif ( ! overview || overview.isDismissed || viewedRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\trecordEvent( 'wcpay_dispute_readiness_overview_viewed', {\n\t\t\tscore: overview.score,\n\t\t\ttotal: overview.total,\n\t\t\tcomplete_signal_ids: overview.completeSignalIds,\n\t\t\tincomplete_signal_ids: overview.incompleteSignalIds,\n\t\t\tis_dismissed: overview.isDismissed,\n\t\t} );\n\t\tviewedRef.current = true;\n\t}, [ overview ] );\n\n\tif ( isLoading && ! overview ) {\n\t\treturn <LoadingState />;\n\t}\n\n\tif ( ! overview || ! overview.enabled || overview.isDismissed ) {\n\t\treturn null;\n\t}\n\n\tconst handleDismiss = () => {\n\t\trecordEvent( 'wcpay_dispute_readiness_card_dismissed', {\n\t\t\tscore: overview.score,\n\t\t\ttotal: overview.total,\n\t\t\tcomplete_signal_ids: overview.completeSignalIds,\n\t\t\tincomplete_signal_ids: overview.incompleteSignalIds,\n\t\t\tstate: overview.state,\n\t\t} );\n\t\tdismissDisputeReadinessCard();\n\t};\n\n\tconst handleCtaClick = ( signal: DisputeReadinessSignal ) => {\n\t\trecordEvent( 'wcpay_dispute_readiness_signal_cta_clicked', {\n\t\t\tsignal_id: signal.id,\n\t\t\tsurface: 'overview',\n\t\t\tscore: overview.score,\n\t\t\ttotal: overview.total,\n\t\t} );\n\t};\n\n\tconst handleSignalActionClick = (\n\t\tevent: React.MouseEvent | React.KeyboardEvent | undefined,\n\t\tsignal: DisputeReadinessSignal\n\t) => {\n\t\thandleCtaClick( signal );\n\n\t\tif ( signal.reviewPrompt ) {\n\t\t\tevent?.preventDefault();\n\t\t\tsetStatementDescriptorSignal( signal );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( signal.actionUrl ) {\n\t\t\twindow.location.href = signal.actionUrl;\n\t\t}\n\t};\n\n\tconst handleStatementDescriptorConfirm = () => {\n\t\trecordEvent( 'wcpay_dispute_readiness_statement_descriptor_confirmed', {\n\t\t\tsurface: 'overview',\n\t\t\tscore: overview.score,\n\t\t\ttotal: overview.total,\n\t\t} );\n\t\tconfirmStatementDescriptor();\n\t\tsetStatementDescriptorSignal( null );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Card className=\"wcpay-dispute-readiness-card\">\n\t\t\t\t<CardHeader className=\"wcpay-dispute-readiness-card__header\">\n\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__header-text\">\n\t\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__title\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Dispute readiness',\n\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p className=\"wcpay-dispute-readiness-card__description\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %d: total number of dispute readiness steps. */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\t\t\t\t\t'These %d steps help customers recognize charges, understand your policies, and contact you before opening a dispute.',\n\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\toverview.total\n\t\t\t\t\t\t\t) }{ ' ' }\n\t\t\t\t\t\t\t<ExternalLink href={ learnMoreUrl }>\n\t\t\t\t\t\t\t\t{ __( 'Learn more', 'woocommerce-payments' ) }\n\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t'Dispute readiness actions',\n\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName=\"wcpay-dispute-readiness-card__actions\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\thandleDismiss();\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Dismiss', 'woocommerce-payments' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CollapsibleList\n\t\t\t\t\tclassName=\"wcpay-dispute-readiness-card__task-list\"\n\t\t\t\t\tcollapsed={ false }\n\t\t\t\t\tshow={ overview.signals.length }\n\t\t\t\t\tcollapseLabel={ __( 'Hide tasks', 'woocommerce-payments' ) }\n\t\t\t\t\texpandLabel={ __( 'Show tasks', 'woocommerce-payments' ) }\n\t\t\t\t>\n\t\t\t\t\t{ overview.signals.map(\n\t\t\t\t\t\t( signal: DisputeReadinessSignal ) => {\n\t\t\t\t\t\t\tconst isComplete = signal.status === 'complete';\n\t\t\t\t\t\t\tconst hasAction =\n\t\t\t\t\t\t\t\t! isComplete && !! signal.actionUrl;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<TaskItem\n\t\t\t\t\t\t\t\t\tkey={ signal.id }\n\t\t\t\t\t\t\t\t\tdata-key={ `dispute-readiness-${ signal.id }` }\n\t\t\t\t\t\t\t\t\tdata-status={ signal.status }\n\t\t\t\t\t\t\t\t\ttitle={ signal.label }\n\t\t\t\t\t\t\t\t\tcompleted={ isComplete }\n\t\t\t\t\t\t\t\t\tcontent={ signal.description || '' }\n\t\t\t\t\t\t\t\t\texpanded\n\t\t\t\t\t\t\t\t\tshowActionButton={ hasAction }\n\t\t\t\t\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\t\t\t\t\taction={ ( event ) =>\n\t\t\t\t\t\t\t\t\t\thandleSignalActionClick( event, signal )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tactionLabel={\n\t\t\t\t\t\t\t\t\t\tsignal.actionLabel ||\n\t\t\t\t\t\t\t\t\t\t__( 'Fix it', 'woocommerce-payments' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</CollapsibleList>\n\t\t\t</Card>\n\t\t\t{ statementDescriptorSignal?.reviewPrompt && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t'Review statement descriptor',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t\tclassName=\"wcpay-dispute-readiness-card__statement-descriptor-modal\"\n\t\t\t\t\tonRequestClose={ () =>\n\t\t\t\t\t\tsetStatementDescriptorSignal( null )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__statement-descriptor-content\">\n\t\t\t\t\t\t<p>{ statementDescriptorSignal.reviewPrompt.text }</p>\n\t\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__statement-descriptor-current\">\n\t\t\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__statement-descriptor-current-label\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Current statement descriptor',\n\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__statement-descriptor-current-value\">\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstatementDescriptorSignal.reviewPrompt\n\t\t\t\t\t\t\t\t\t\t.currentDescriptor\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<HorizontalRule className=\"wcpay-dispute-readiness-card__statement-descriptor-separator\" />\n\t\t\t\t\t<div className=\"wcpay-dispute-readiness-card__statement-descriptor-actions\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={ handleStatementDescriptorConfirm }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstatementDescriptorSignal.reviewPrompt\n\t\t\t\t\t\t\t\t\t.confirmLabel\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ statementDescriptorSignal.actionUrl }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstatementDescriptorSignal.reviewPrompt\n\t\t\t\t\t\t\t\t\t.updateLabel\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default DisputeReadinessCard;\n","/** @format **/\n\n/**\n * External dependencies\n */\nimport React, { useEffect, useState } from 'react';\nimport { getQuery } from '@woocommerce/navigation';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { dispatch } from '@wordpress/data';\nimport interpolateComponents from '@automattic/interpolate-components';\nimport { Card, Notice, ExternalLink } from '@wordpress/components';\n\n/**\n * Internal dependencies.\n */\nimport AccountBalances from 'components/account-balances';\nimport AccountDetails from 'components/account-details';\nimport ActiveLoanSummary from 'components/active-loan-summary';\nimport ConnectionSuccessModal from './modal/connection-success';\nimport DepositsOverview from 'components/deposits-overview';\nimport ErrorBoundary from 'components/error-boundary';\nimport JetpackIdcNotice from 'components/jetpack-idc-notice';\nimport Page from 'components/page';\nimport Welcome from 'components/welcome';\nimport { TestModeNotice } from 'components/test-mode-notice';\nimport InboxNotifications from './inbox-notifications';\nimport TaskList from './task-list';\nimport { getTasks, taskSort } from './task-list/tasks';\nimport DisputeReadinessCard from './dispute-readiness';\nimport { useDisputes } from 'wcpay/data/disputes';\nimport { useGetSettings, useSettings } from 'wcpay/data/settings';\nimport SandboxModeSwitchToLiveNotice from 'wcpay/components/sandbox-mode-switch-to-live-notice';\nimport './style.scss';\nimport BannerNotice from 'wcpay/components/banner-notice';\nimport { recordEvent } from 'wcpay/tracks';\nimport StripeSpinner from 'wcpay/components/stripe-spinner';\nimport { getAdminUrl, isInTestModeOnboarding } from 'wcpay/utils';\nimport { EmbeddedConnectNotificationBanner } from 'wcpay/embedded-components';\nimport SpotlightPromotion from 'promotions/spotlight';\n\nconst OverviewPageError = () => {\n\tconst queryParams = getQuery();\n\tconst showLoginError = queryParams[ 'wcpay-login-error' ] === '1';\n\tif ( ! wcpaySettings.errorMessage && ! showLoginError ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<BannerNotice\n\t\t\tclassName={ showLoginError ? 'wcpay-login-error' : '' }\n\t\t\tstatus=\"error\"\n\t\t\ticon={ true }\n\t\t\tisDismissible={ false }\n\t\t>\n\t\t\t{ wcpaySettings.errorMessage ||\n\t\t\t\t__(\n\t\t\t\t\t'There was a problem redirecting you to the account dashboard. Please try again.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t) }\n\t\t</BannerNotice>\n\t);\n};\n\nconst OverviewPage = () => {\n\tconst {\n\t\taccountStatus,\n\t\taccountLoans: { has_active_loan: hasActiveLoan },\n\t\toverviewTasksVisibility,\n\t\twpcomReconnectUrl,\n\t\taccountDetails,\n\t} = wcpaySettings;\n\n\t// Don't show the update details and verify business tasks by default due to embedded component.\n\tconst [ showUpdateDetailsTask, setShowUpdateDetailsTask ] =\n\t\tuseState( false );\n\n\tconst [\n\t\tstripeNotificationsBannerErrorMessage,\n\t\tsetStripeNotificationsBannerErrorMessage,\n\t] = useState( '' );\n\tconst [\n\t\tstripeNotificationsBannerErrorType,\n\t\tsetStripeNotificationsBannerErrorType,\n\t] = useState( '' );\n\tconst [ notificationsBannerMessage, setNotificationsBannerMessage ] =\n\t\tReact.useState( '' );\n\tconst [ stripeComponentLoading, setStripeComponentLoading ] =\n\t\tuseState( true );\n\t// Variable to memoize the count of Stripe notifications.\n\tconst [\n\t\tstripeNotificationsCountToAddressMemo,\n\t\tsetStripeNotificationsCountToAddressMemo,\n\t] = useState( 0 );\n\n\tconst isTestModeOnboarding = isInTestModeOnboarding();\n\tconst { isLoading: settingsIsLoading } = useSettings();\n\tconst [ isTestDriveSuccessDisplayed, setTestDriveSuccessDisplayed ] =\n\t\tuseState( false );\n\tconst settings = useGetSettings();\n\n\tconst { disputes: activeDisputes } = useDisputes( {\n\t\tfilter: 'awaiting_response',\n\t\tper_page: 50,\n\t} );\n\n\tconst tasksUnsorted = getTasks( {\n\t\tshowUpdateDetailsTask,\n\t\twpcomReconnectUrl,\n\t\tactiveDisputes,\n\t} );\n\tconst tasks =\n\t\tArray.isArray( tasksUnsorted ) && tasksUnsorted.sort( taskSort );\n\n\tconst queryParams = getQuery();\n\tconst accountRejected =\n\t\taccountStatus.status && accountStatus.status.startsWith( 'rejected' );\n\tconst accountUnderReview = accountStatus.status === 'under_review';\n\tconst paymentsEnabled = accountStatus.paymentsEnabled;\n\tconst depositsEnabled = accountStatus.deposits?.status === 'enabled';\n\n\tconst showConnectionSuccess =\n\t\tqueryParams[ 'wcpay-connection-success' ] === '1';\n\n\t// We want to show the sandbox success notice only if the account is enabled or complete.\n\tconst isSandboxOnboardedSuccessful =\n\t\tqueryParams[ 'wcpay-sandbox-success' ] === 'true' &&\n\t\t( ( accountStatus.status && accountStatus.status === 'complete' ) ||\n\t\t\taccountStatus.status === 'enabled' );\n\n\tconst showLoanOfferError = queryParams[ 'wcpay-loan-offer-error' ] === '1';\n\tconst showServerLinkError =\n\t\tqueryParams[ 'wcpay-server-link-error' ] === '1';\n\tconst showResetAccountError =\n\t\tqueryParams[ 'wcpay-reset-account-error' ] === '1';\n\tconst showTaskList =\n\t\t! accountRejected && ! accountUnderReview && tasks.length > 0;\n\tconst showDisputeReadinessCard =\n\t\twcpaySettings.featureFlags?.isDisputeReadinessOverviewEnabled &&\n\t\t! accountRejected &&\n\t\t! accountUnderReview;\n\tconst showConnectionSuccessModal =\n\t\tshowConnectionSuccess &&\n\t\t! isTestModeOnboarding &&\n\t\tpaymentsEnabled &&\n\t\tdepositsEnabled;\n\n\tconst activeAccountFees = Object.entries( wcpaySettings.accountFees )\n\t\t.map( ( [ key, value ] ) => {\n\t\t\tconst isPaymentMethodEnabled =\n\t\t\t\t! settingsIsLoading &&\n\t\t\t\tsettings.enabled_payment_method_ids.filter(\n\t\t\t\t\t( enabledMethod ) => {\n\t\t\t\t\t\treturn enabledMethod === key;\n\t\t\t\t\t}\n\t\t\t\t).length > 0;\n\t\t\tif (\n\t\t\t\tsettingsIsLoading ||\n\t\t\t\t! isPaymentMethodEnabled ||\n\t\t\t\tvalue.discount.length === 0\n\t\t\t) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn { payment_method: key, fee: value };\n\t\t} )\n\t\t.filter( ( e ) => e && e.fee !== undefined );\n\n\tif ( ! isTestDriveSuccessDisplayed && isSandboxOnboardedSuccessful ) {\n\t\tdispatch( 'core/notices' ).createSuccessNotice(\n\t\t\t__(\n\t\t\t\t'Success! You can start using WooPayments in test mode.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t)\n\t\t);\n\n\t\t// Ensure the success message is displayed only once.\n\t\tsetTestDriveSuccessDisplayed( true );\n\t}\n\n\t// Show old tasks if the embedded component fails to load.\n\tuseEffect( () => {\n\t\tif ( stripeNotificationsBannerErrorMessage ) {\n\t\t\tsetShowUpdateDetailsTask( true );\n\t\t\tsetStripeComponentLoading( false );\n\t\t}\n\t}, [ stripeNotificationsBannerErrorMessage ] );\n\n\t// eslint-disable-next-line valid-jsdoc\n\t/**\n\t * Configure custom banner behaviour so the banner isn't shown when there are no action items.\n\t * We'll use notificationBannerMessage for that.\n\t * See https://docs.stripe.com/connect/supported-embedded-components/notification-banner#configure-custom-banner-behavior\n\t */\n\tconst handleNotificationsChange = ( response ) => {\n\t\tif ( response.actionRequired > 0 ) {\n\t\t\t// eslint-disable-next-line max-len\n\t\t\t// Do something related to required actions, such as adding margins to the banner container or tracking the current number of notifications.\n\t\t\tsetNotificationsBannerMessage(\n\t\t\t\t'You must resolve the notifications on this page before proceeding.'\n\t\t\t);\n\t\t} else if ( response.total > 0 ) {\n\t\t\t// Do something related to notifications that don't require action.\n\t\t\tsetNotificationsBannerMessage( 'The items below are in review.' );\n\t\t} else {\n\t\t\t// This is the case where we addressed everything and previously had some notifications to address.\n\t\t\t// We recommend the merchant to reload the page in this case.\n\t\t\tif ( stripeNotificationsCountToAddressMemo > 0 ) {\n\t\t\t\tdispatch( 'core/notices' ).createSuccessNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Updates take a moment to appear. Please refresh the page in a minute.',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Refresh', 'woocommerce-payments' ),\n\t\t\t\t\t\t\t\turl: getAdminUrl( {\n\t\t\t\t\t\t\t\t\tpage: 'wc-admin',\n\t\t\t\t\t\t\t\t\tpath: '/payments/overview',\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\texplicitDismiss: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t// No need to add extra params, we are interested in the total amount of actions here.\n\t\t\t\trecordEvent(\n\t\t\t\t\t'wcpay_overview_stripe_notifications_banner_action_completed'\n\t\t\t\t);\n\t\t\t}\n\t\t\tsetNotificationsBannerMessage( '' );\n\t\t}\n\t\tif ( response.actionRequired > 0 || response.total > 0 ) {\n\t\t\t// Record the event indicating user got the notifications banner with some actionRequired or total items.\n\t\t\trecordEvent( 'wcpay_overview_stripe_notifications_banner_update', {\n\t\t\t\taction_required_count: response.actionRequired,\n\t\t\t\ttotal_count: response.total,\n\t\t\t} );\n\t\t\t// Memoize the notifications count to be able to compare it with the fresh count when this function is called one more time.\n\t\t\tsetStripeNotificationsCountToAddressMemo( response.total );\n\t\t}\n\t\t// If the component inits successfully, this function is always called.\n\t\t// It's safe to set the loading false here rather than onLoaderStart, because it happens too early and the UX is not smooth.\n\t\tsetStripeComponentLoading( false );\n\t};\n\n\treturn (\n\t\t<Page isNarrow className=\"wcpay-overview\">\n\t\t\t<OverviewPageError />\n\t\t\t<JetpackIdcNotice />\n\t\t\t{ showLoanOfferError && (\n\t\t\t\t<Notice status=\"error\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'There was a problem redirecting you to the loan offer. Please check that it is not expired and try again.',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ showServerLinkError && (\n\t\t\t\t<Notice status=\"error\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'There was a problem redirecting you to the requested link. Please check that it is valid and try again.',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ showResetAccountError && (\n\t\t\t\t<Notice status=\"error\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'There was a problem resetting your account. Please wait a few seconds and try again.',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ isTestModeOnboarding ? (\n\t\t\t\t<SandboxModeSwitchToLiveNotice\n\t\t\t\t\tfrom=\"WCPAY_OVERVIEW\"\n\t\t\t\t\tsource=\"wcpay-overview-page\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<TestModeNotice\n\t\t\t\t\tcurrentPage=\"overview\"\n\t\t\t\t\tisTestModeOnboarding={ isTestModeOnboarding }\n\t\t\t\t\tactions={ [] }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ stripeNotificationsBannerErrorMessage &&\n\t\t\t\tstripeNotificationsBannerErrorType ===\n\t\t\t\t\t'invalid_request_error' && (\n\t\t\t\t\t<BannerNotice\n\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\ticon={ true }\n\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ interpolateComponents( {\n\t\t\t\t\t\t\tmixedString: sprintf(\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\t\t\t\t\t'Some account related notifications require HTTPS and cannot be displayed. View them on our financial partner’s website. {{seeDetailsLink}}See details{{/seeDetailsLink}}',\n\t\t\t\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcomponents: {\n\t\t\t\t\t\t\t\tseeDetailsLink: (\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t'https://woocommerce.com/document/woopayments/startup-guide/#requirements'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</BannerNotice>\n\t\t\t\t) }\n\t\t\t{ ! accountRejected && ! accountUnderReview && (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<Welcome />\n\n\t\t\t\t\t{ stripeComponentLoading &&\n\t\t\t\t\t\taccountStatus.status !== 'complete' && (\n\t\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t\t<div className=\"stripe-notifications-banner-loader\">\n\t\t\t\t\t\t\t\t\t<StripeSpinner />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"stripe-notifications-banner-wrapper\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tdisplay: notificationsBannerMessage\n\t\t\t\t\t\t\t\t? 'block'\n\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t<EmbeddedConnectNotificationBanner\n\t\t\t\t\t\t\t\tonLoadError={ ( loadError ) => {\n\t\t\t\t\t\t\t\t\tsetStripeNotificationsBannerErrorMessage(\n\t\t\t\t\t\t\t\t\t\tloadError.error.message ||\n\t\t\t\t\t\t\t\t\t\t\t'Unknown error'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetStripeNotificationsBannerErrorType(\n\t\t\t\t\t\t\t\t\t\tloadError.error.type\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetStripeComponentLoading( false );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonNotificationsChange={\n\t\t\t\t\t\t\t\t\thandleNotificationsChange\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{ showTaskList && (\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t\t<TaskList\n\t\t\t\t\t\t\t\t\ttasks={ tasks }\n\t\t\t\t\t\t\t\t\toverviewTasksVisibility={\n\t\t\t\t\t\t\t\t\t\toverviewTasksVisibility\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t<AccountBalances />\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t</Card>\n\n\t\t\t\t\t<DepositsOverview />\n\t\t\t\t</ErrorBoundary>\n\t\t\t) }\n\t\t\t<ErrorBoundary>\n\t\t\t\t<AccountDetails\n\t\t\t\t\taccountDetails={ accountDetails }\n\t\t\t\t\taccountFees={ activeAccountFees }\n\t\t\t\t\taccountLink={ accountStatus.accountLink }\n\t\t\t\t/>\n\t\t\t</ErrorBoundary>\n\t\t\t{ showDisputeReadinessCard && (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<DisputeReadinessCard />\n\t\t\t\t</ErrorBoundary>\n\t\t\t) }\n\t\t\t{ hasActiveLoan && (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<ActiveLoanSummary />\n\t\t\t\t</ErrorBoundary>\n\t\t\t) }\n\t\t\t{ ! accountRejected && ! accountUnderReview && (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<InboxNotifications />\n\t\t\t\t</ErrorBoundary>\n\t\t\t) }\n\t\t\t{ showConnectionSuccessModal && (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<ConnectionSuccessModal />\n\t\t\t\t</ErrorBoundary>\n\t\t\t) }\n\t\t\t<ErrorBoundary>\n\t\t\t\t<SpotlightPromotion />\n\t\t\t</ErrorBoundary>\n\t\t</Page>\n\t);\n};\n\nexport default OverviewPage;\n","/** @format */\n\nexport const getResourceId = ( identifier ) => {\n\treturn JSON.stringify( identifier, Object.keys( identifier ).sort() );\n};\n"],"names":["getDetailsURL","id","parentSegment","getAdminUrl","page","path","DetailsLink","_jsx","Link","href","children","InfoOutlineIcon","size","StripeSpinner","className","width","height","viewBox","fill","xmlns","d","displayType","deposit","__","withdrawal","depositStatusLabels","paid","deducted","pending","in_transit","canceled","failed","payoutFailureMessages","insufficient_funds","bank_account_restricted","debit_not_authorized","invalid_card","declined","invalid_transaction","refer_to_card_issuer","unsupported_card","lost_or_stolen_card","invalid_issuer","expired_card","could_not_process","invalid_account_number","incorrect_account_holder_name","account_closed","no_account","exceeds_amount_limit","account_frozen","issuer_unavailable","invalid_currency","incorrect_account_type","incorrect_account_holder_details","bank_ownership_changed","exceeds_count_limit","incorrect_account_holder_address","incorrect_account_holder_tax_id","invalid_account_number_length","variables","colorPrimary","colorBackground","buttonPrimaryColorBackground","buttonPrimaryColorBorder","buttonPrimaryColorText","buttonSecondaryColorBackground","buttonSecondaryColorBorder","buttonSecondaryColorText","colorText","colorSecondaryText","actionPrimaryColorText","actionSecondaryColorText","colorBorder","formHighlightColorBorder","formAccentColor","colorDanger","offsetBackgroundColor","formBackgroundColor","badgeNeutralColorText","badgeNeutralColorBackground","badgeNeutralColorBorder","badgeSuccessColorText","badgeSuccessColorBackground","badgeSuccessColorBorder","badgeWarningColorText","badgeWarningColorBackground","badgeWarningColorBorder","badgeDangerColorText","badgeDangerColorBackground","badgeDangerColorBorder","borderRadius","buttonBorderRadius","formBorderRadius","badgeBorderRadius","overlayBorderRadius","spacingUnit","fontFamily","fontSizeBase","headingXlFontSize","headingXlFontWeight","headingLgFontSize","headingLgFontWeight","headingMdFontSize","headingMdFontWeight","headingSmFontSize","headingSmFontWeight","headingXsFontSize","headingXsFontWeight","bodyMdFontWeight","bodyMdFontSize","bodySmFontSize","bodySmFontWeight","labelSmFontSize","labelSmFontWeight","labelMdFontSize","useInitializeStripe","isOnboarding","onboardingData","stripeConnectInstance","setStripeConnectInstance","useState","initializationError","setInitializationError","loading","setLoading","useEffect","async","session","urlParams","URLSearchParams","window","location","search","isTestDrive","get","apiFetch","NAMESPACE","method","data","self_assessment","fromDotNotation","capabilities","mode","createKycAccountSession","trackRedirected","addQueryArgs","createAccountSession","clientSecret","publishableKey","Error","instance","loadConnectAndInitialize","fetchClientSecret","appearance","overlays","locale","replace","err","message","initializeStripe","EmbeddedAccountOnboarding","onExit","onLoaderStart","onLoadError","onStepChange","collectPayoutRequirements","_jsxs","_Fragment","BannerNotice","status","ConnectComponentsProvider","connectInstance","ConnectAccountOnboarding","stepChange","step","collectionOptions","fields","futureRequirements","EmbeddedConnectNotificationBanner","onNotificationsChange","ConnectNotificationBanner","useContextValue","initialState","setData","errors","setErrors","touched","setTouched","value","prev","omitBy","isNil","OnboardingContext","createContext","OnboardingContextProvider","initialData","Provider","useOnboardingContext","context","useContext","trackedSteps","Set","startTime","stepStartTime","elapsed","time","Math","round","Date","now","stepElapsed","result","trackStarted","recordEvent","source","trackStepCompleted","has","add","isEmbedded","is_embedded_onboarding","trackEmbeddedStepChange","trackKycExit","useTrackAbandoned","currentStep","useStepperContext","trackEvent","event","errored","Object","keys","filter","field","listener","document","visibilityState","addEventListener","removeEventListener","trackAbandoned","removeTrackListener","generic","individual","company","non_profit","government_entity","US","record","toPairs","reduce","key","set","getAvailableCountries","entries","wcpaySettings","connect","availableCountries","map","name","types","sort","a","b","localeCompare","getBusinessTypes","onboardingFieldsData","business_types","country","type","description","businessTypeDescriptionStrings","finalizeOnboarding","urlSource","from","getMccFromIndustry","industry","wcSettings","admin","onboarding","profile","industry_to_mcc","getMccsFlatList","mccs_display_tree","group","items","item","length","acc","groupItems","title","keywords","join","BalanceBlock","currencyCode","tooltip","amount","isLoading","Loadable","display","placeholder","formatCurrency","InstantPayoutModal","instantBalance","fee","net","fee_percentage","percentage","onClose","onSubmit","inProgress","feePercentage","createInterpolateElement","sprintf","target","rel","Modal","onRequestClose","formatExplicitCurrency","Button","variant","onClick","__next40pxDefaultSize","isBusy","disabled","InstantPayoutButton","isModalOpen","setModalOpen","buttonDisabled","isButtonDisabled","submit","useInstantDeposit","currency","fundLabelStrings","available","total","documentationUrls","TotalBalanceTooltip","balance","isBalanceNegative","ClickTooltip","buttonIcon","HelpOutlineIcon","buttonLabel","maxWidth","content","interpolateComponents","mixedString","components","bold","learnMoreLink","InlineNotice","isDismissible","discoverWhyLink","AvailableBalanceTooltip","undefined","ExternalLink","useSelectedCurrency","setSelectedCurrency","updateQueryString","selected_currency","selectedCurrency","getQuery","BalancesLoadingState","accountDefaultCurrency","CardBody","AccountBalances","overviews","useAllDepositsOverviews","isInstantDepositNoticeDismissed","handleDismissInstantDepositNotice","useInstantDepositNoticeState","isDismissed","setIsDismissed","setInstantDepositNoticeDismissed","saveOption","currencies","OverviewCard","LoadingState","account","depositCurrencyOverviews","overview","availableFunds","pendingFunds","delayDays","deposits_schedule","delay_days","instant","selectedOverview","find","totalBalance","Flex","gap","direction","align","icon","src","SendMoneyIcon","alt","onRemove","justify","strong","instantDepositsPreviouslyEligible","isInTestModeOnboarding","reset","handleReset","connectUrl","AccountTools","modalVisible","setModalVisible","CardDivider","strings","ResetAccountModal","isVisible","onDismiss","ProgressBar","progressLabel","totalLabel","progress","useInnerLabel","style","ExpirationBar","feeData","volume_allowance","volumeAllowance","current_volume","currentVolume","rest","volume_currency","ExpirationDescription","end_time","endTime","formatDateTimeFromString","getCurrentBaseFee","accountFees","discount","base","getTransactionsPaymentMethodName","paymentMethod","methodConfig","wooPaymentsPaymentMethodsConfig","AccountFee","props","accountFee","baseFee","getCurrency","currencyName","formatCurrencyName","getCurrencyConfig","code","feeDescription","formatAccountFeesDescription","customFormats","currentBaseFee","formats","displayBaseFeeIfDifferent","formatFee","percentage_rate","fixed_rate","discountFee","fixed","currentBaseFeeDescription","conversionMap","s","haveDiscounts","activeDiscounts","payment_method","getChipTypeFromColor","color","getNoticeStatusFromColor","Banner","banner","background_color","iconName","published","caution","error","info","check","text","cta_text","cta_link","PayoutStatus","payoutStatus","chipType","Chip","popover","buttonSize","PayoutStatusWrapper","FlexItem","FlexBlock","HeaderTitle","accountStatus","accountLink","AccountDetailsCard","Card","CardHeader","AccountDetailsError","cardTitle","AccountDetailsContent","accountDetails","processedAccountLink","account_status","payout_status","AccountFees","AccountDetails","button","heading","ConnectionSuccessModal","React","isConnectionSuccessModalDismissed","RecentDepositsList","deposits","tableClass","depositRows","Icon","calendar","getDepositDate","DepositStatusChip","SuspendedDepositNotice","suspendLink","NewAccountWaitingPeriodNotice","NegativeBalanceDepositsPausedNotice","whyLink","DepositMinimumBalanceNotice","minimumDepositAmountFormatted","NoFundsAvailableForDepositNotice","DepositFailureNotice","updateAccountLink","accountLinkWithSource","updateLink","DepositsLoadingState","LoadableBlock","numLines","CardFooter","DepositsOverview","isLoadingOverview","useSelectedCurrencyOverview","isAccountOverviewsLoading","some","isDepositsUnrestricted","restrictions","isLoadingDeposits","query","store_currency_is","orderby","order","per_page","useDeposits","useRecentDeposits","totalFunds","minimumDepositAmount","minimum_scheduled_deposit_amounts","isAboveMinimumDepositAmount","isNegativeBalanceDepositsPaused","isDepositAwaitingPendingFunds","hasCompletedWaitingPeriod","completed_waiting_period","canChangeDepositSchedule","deposits_blocked","hasRecentDeposits","hasScheduledDeposits","hasAutomaticScheduledDeposits","interval","hasErroredExternalAccount","default_external_accounts","externalAccount","DepositSchedule","depositsSchedule","navigateToDepositsHistory","getHistory","push","tab","section","JetpackIdcNotice","hasOwnProperty","isJetpackIdcActive","Notice","getPaymentSettingsUrl","itemToString","stateReducer","selectedItem","changes","useSelect","stateChangeTypes","ToggleButtonKeyDownArrowDown","min","indexOf","ToggleButtonKeyDownArrowUp","max","label","describedBy","options","onChange","onSelectedItemChange","getLabelProps","getToggleButtonProps","getMenuProps","getItemProps","isOpen","highlightedIndex","initialSelectedItem","itemString","menuProps","onKeyDownHandler","useCallback","e","stopPropagation","onKeyDown","startsWith","clsx","chevronDown","index","visibility","hint","getCurrencyOption","symbol","currencySymbolDecoded","decodeEntities","toUpperCase","CurrencySelect","depositCurrencies","currencyOptions","toLowerCase","useSelectedCurrencyWithDefault","InlineLabelSelect","option","greetingStrings","withName","morning","afternoon","evening","withoutName","Welcome","user","useCurrentWpUser","select","getCurrentUser","isResolving","greeting","getGreeting","date","timeOfDay","getTimeOfDayString","hour","getHours","first_name","currencyObj","renderCurrencySelect","INBOX_QUERY","QUERY_DEFAULTS","pageSize","noteTypes","_fields","onBodyLinkClick","note","innerLink","note_name","note_title","note_content_inner_link","renderNotes","hasNotes","batchUpdating","lastRead","notes","onNoteActionClick","onNoteVisible","note_content","note_type","notesArray","TransitionGroup","role","noteId","is_deleted","isDeleted","CSSTransition","timeout","classNames","InboxNoteCard","InboxPanel","createNotice","useDispatch","batchUpdateNotes","removeNote","updateNote","triggerNoteAction","NOTES_STORE_NAME","isError","resolving","overviewInboxLastRead","getNotes","getNotesError","isNotesRequesting","currentUser","woocommerceMeta","woocommerce_meta","Boolean","wc_payments_overview_inbox_last_read","JSON","parse","dismiss","setDismiss","useRef","current","newMetaData","metaData","val","newValue","stringify","updatedUser","dispatch","saveUser","getLastEntitySaveError","updateWoocommerceUserMeta","actionLabel","actionCallback","reload","EmptyContent","actionURL","closeDismissModal","confirmed","noteNameDismissAll","note_name_dismiss_all","note_name_dismiss_confirmation","removeAll","notesRemoved","noteRemoved","actions","numberOfNotes","_n","hasValidNotes","Section","InboxNotePlaceholder","action","InboxDismissConfirmationModal","TIME","TaskList","overviewTasksVisibility","tasks","visibleTasks","setVisibleTasks","deletedTodoTasks","dismissedTodoTasks","remindMeLaterTodoTasks","getVisibleTasks","nowTimestamp","task","includes","dismissTask","dismissedTasks","noticeMessage","optionName","updatedDismissedTasks","splice","undoDismissTask","dismissSelectedTask","CollapsibleList","collapsed","show","collapseLabel","expandLabel","TaskItem","dataAttrs","completed","additionalInfo","showActionButton","expandable","expanded","enter","level","onDelete","isDeletable","isDismissable","onSnooze","allowSnooze","dismissTime","DAY_IN_MS","oldValue","updatedRemindMeLaterTasks","undoRemindTaskLater","remindTaskLater","ACTION_TYPES","defaultState","disputeReadiness","disputeReadinessError","updateDisputeReadiness","SET_DISPUTE_READINESS","updateErrorForDisputeReadiness","SET_ERROR_FOR_DISPUTE_READINESS","dismissDisputeReadinessCard","controls","STORE_NAME","confirmStatementDescriptor","getDisputeReadiness","state","getDisputeReadinessError","DISPUTE_READINESS_STORE_NAME","store","createReduxStore","reducer","combineReducers","selectors","resolvers","register","Spinner","DisputeReadinessCard","refreshDisputeReadiness","useDisputeReadinessActions","invalidateResolutionForStoreSelector","viewedRef","statementDescriptorSignal","setStatementDescriptorSignal","score","complete_signal_ids","completeSignalIds","incomplete_signal_ids","incompleteSignalIds","is_dismissed","enabled","DropdownMenu","moreVertical","popoverProps","position","MenuGroup","MenuItem","signals","signal","isComplete","hasAction","actionUrl","handleSignalActionClick","signal_id","surface","handleCtaClick","reviewPrompt","preventDefault","currentDescriptor","HorizontalRule","handleStatementDescriptorConfirm","confirmLabel","updateLabel","OverviewPageError","showLoginError","errorMessage","OverviewPage","accountLoans","has_active_loan","hasActiveLoan","wpcomReconnectUrl","showUpdateDetailsTask","setShowUpdateDetailsTask","stripeNotificationsBannerErrorMessage","setStripeNotificationsBannerErrorMessage","stripeNotificationsBannerErrorType","setStripeNotificationsBannerErrorType","notificationsBannerMessage","setNotificationsBannerMessage","stripeComponentLoading","setStripeComponentLoading","stripeNotificationsCountToAddressMemo","setStripeNotificationsCountToAddressMemo","isTestModeOnboarding","settingsIsLoading","useSettings","isTestDriveSuccessDisplayed","setTestDriveSuccessDisplayed","settings","useGetSettings","disputes","activeDisputes","useDisputes","tasksUnsorted","getTasks","Array","isArray","taskSort","queryParams","accountRejected","accountUnderReview","paymentsEnabled","depositsEnabled","showConnectionSuccess","isSandboxOnboardedSuccessful","showLoanOfferError","showServerLinkError","showResetAccountError","showTaskList","showDisputeReadinessCard","featureFlags","isDisputeReadinessOverviewEnabled","showConnectionSuccessModal","activeAccountFees","isPaymentMethodEnabled","enabled_payment_method_ids","enabledMethod","createSuccessNotice","Page","isNarrow","SandboxModeSwitchToLiveNotice","TestModeNotice","currentPage","seeDetailsLink","ErrorBoundary","loadError","response","actionRequired","url","explicitDismiss","action_required_count","total_count","ActiveLoanSummary","InboxNotifications","SpotlightPromotion","getResourceId","identifier"],"sourceRoot":""}