Uname: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

403WebShell
403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/woocommerce-payments/dist/chunks/wcpay-overview.js
"use strict";(globalThis.webpackChunkwoocommerce_payments=globalThis.webpackChunkwoocommerce_payments||[]).push([[9031],{5725(e,t,s){s.d(t,{A:()=>i,g:()=>c}),s(1609);var n=s(4275),a=s(8846),o=s(612),r=s(4848);const c=(e,t)=>(0,o.hT)({page:"wc-admin",path:`/payments/${t}/details`,id:e}),i=({id:e,parentSegment:t})=>e?(0,r.jsx)(a.Link,{href:c(e,t),children:(0,r.jsx)(n.A,{size:18})}):null},7145(e,t,s){s.d(t,{A:()=>a}),s(1609);var n=s(4848);const a=()=>(0,n.jsx)("svg",{className:"stripe-spinner",width:"29",height:"29",viewBox:"0 0 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"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",fill:"#4F575D"})})},1104(e,t,s){s.d(t,{Zf:()=>r,wf:()=>o,x:()=>a});var n=s(7723);const a={deposit:(0,n.__)("Payout","woocommerce-payments"),withdrawal:(0,n.__)("Withdrawal","woocommerce-payments")},o={paid:(0,n.__)("Completed (paid)","woocommerce-payments"),deducted:(0,n.__)("Completed (deducted)","woocommerce-payments"),pending:(0,n.__)("Pending","woocommerce-payments"),in_transit:(0,n.__)("In transit","woocommerce-payments"),canceled:(0,n.__)("Canceled","woocommerce-payments"),failed:(0,n.__)("Failed","woocommerce-payments")},r={insufficient_funds:(0,n.__)("Your account has insufficient funds to cover your negative balance.","woocommerce-payments"),bank_account_restricted:(0,n.__)("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.","woocommerce-payments"),debit_not_authorized:(0,n.__)("Debit transactions are not approved on your bank account. Bank accounts need to be set up for both credit and debit transfers.","woocommerce-payments"),invalid_card:(0,n.__)("The card used was invalid. This usually means the card number is invalid or the account has been closed.","woocommerce-payments"),declined:(0,n.__)("The bank has declined this transfer. Please contact the bank for more information.","woocommerce-payments"),invalid_transaction:(0,n.__)("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.","woocommerce-payments"),refer_to_card_issuer:(0,n.__)("The transfer was refused by the card issuer. Please contact the issuing bank for clarification.","woocommerce-payments"),unsupported_card:(0,n.__)("The bank no longer supports transfers to this card.","woocommerce-payments"),lost_or_stolen_card:(0,n.__)("The card used has been reported lost or stolen. Please contact the issuing bank for clarification.","woocommerce-payments"),invalid_issuer:(0,n.__)("The issuer specified by the card number does not exist. Please verify card details.","woocommerce-payments"),expired_card:(0,n.__)("The card used has expired. Please switch to a different card or payment method. Contact the issuing bank for clarification.","woocommerce-payments"),could_not_process:(0,n.__)("The bank or the payment processor could not process this transfer.","woocommerce-payments"),invalid_account_number:(0,n.__)("The bank account details on file are probably incorrect. While the routing number appears correct, the account number is invalid.","woocommerce-payments"),incorrect_account_holder_name:(0,n.__)("The bank account holder name on file appears to be incorrect.","woocommerce-payments"),account_closed:(0,n.__)("The bank account has been closed.","woocommerce-payments"),no_account:(0,n.__)("The bank account details on file are probably incorrect. No bank account could be located with those details.","woocommerce-payments"),exceeds_amount_limit:(0,n.__)("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.","woocommerce-payments"),account_frozen:(0,n.__)("The bank account has been frozen.","woocommerce-payments"),issuer_unavailable:(0,n.__)("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.","woocommerce-payments"),invalid_currency:(0,n.__)("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.","woocommerce-payments"),incorrect_account_type:(0,n.__)("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.","woocommerce-payments"),incorrect_account_holder_details:(0,n.__)("The bank could not process this transfer. Please check that the entered bank account details match the corresponding account bank statement exactly.","woocommerce-payments"),bank_ownership_changed:(0,n.__)("The destination bank account is no longer valid because its branch has changed ownership.","woocommerce-payments"),exceeds_count_limit:(0,n.__)("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.","woocommerce-payments"),incorrect_account_holder_address:(0,n.__)("Your bank notified us that the bank account holder address on file is incorrect.","woocommerce-payments"),incorrect_account_holder_tax_id:(0,n.__)("Your bank notified us that the bank account holder tax ID on file is incorrect.","woocommerce-payments"),invalid_account_number_length:(0,n.__)("Your bank notified us that the bank account number is too long.","woocommerce-payments")}},9808(e,t,s){s.d(t,{J:()=>g,k:()=>x});var n=s(1609),a=s(6449),o=s(3925),r=s(7723),c=s(3832),i=s(1455),l=s.n(i),d=s(3138),m=s(6387);const u={variables:{colorPrimary:"#873EFF",colorBackground:"#FFFFFF",buttonPrimaryColorBackground:"#3858E9",buttonPrimaryColorBorder:"#3858E9",buttonPrimaryColorText:"#FFFFFF",buttonSecondaryColorBackground:"#FFFFFF",buttonSecondaryColorBorder:"#3858E9",buttonSecondaryColorText:"#3858E9",colorText:"#101517",colorSecondaryText:"#50575E",actionPrimaryColorText:"#3858E9",actionSecondaryColorText:"#101517",colorBorder:"#DDDDDD",formHighlightColorBorder:"#3858E9",formAccentColor:"#3858E9",colorDanger:"#CC1818",offsetBackgroundColor:"#F0F0F0",formBackgroundColor:"#FFFFFF",badgeNeutralColorText:"#2C3338",badgeNeutralColorBackground:"#F6F7F7",badgeNeutralColorBorder:"#F6F7F7",badgeSuccessColorText:"#005C12",badgeSuccessColorBackground:"#EDFAEF",badgeSuccessColorBorder:"#EDFAEF",badgeWarningColorText:"#614200",badgeWarningColorBackground:"#FCF9E8",badgeWarningColorBorder:"#FCF9E8",badgeDangerColorText:"#8A2424",badgeDangerColorBackground:"#FCF0F1",badgeDangerColorBorder:"#FCF0F1",borderRadius:"2px",buttonBorderRadius:"2px",formBorderRadius:"2px",badgeBorderRadius:"2px",overlayBorderRadius:"8px",spacingUnit:"10px",fontFamily:"-apple-system, BlinkMacSystemFont, 'system-ui', 'Segoe UI', 'Helvetica Neue', 'Helvetica', 'Roboto', 'Arial', sans-serif",fontSizeBase:"16px",headingXlFontSize:"32px",headingXlFontWeight:"400",headingLgFontSize:"24px",headingLgFontWeight:"400",headingMdFontSize:"20px",headingMdFontWeight:"400",headingSmFontSize:"13px",headingSmFontWeight:"600",headingXsFontSize:"12px",headingXsFontWeight:"600",bodyMdFontWeight:"400",bodyMdFontSize:"16px",bodySmFontSize:"13px",bodySmFontWeight:"400",labelSmFontSize:"12px",labelSmFontWeight:"200",labelMdFontSize:"13px"}};var p=s(7145),_=s(5837),y=s(8151),h=s(4848);const w=(e,t)=>{const[s,o]=(0,n.useState)(null),[i,p]=(0,n.useState)(null),[_,h]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{(async()=>{try{let s;e&&t?(s=await(async e=>{const t=new URLSearchParams(window.location.search),s="true"===t.get("test_drive");return await l()({path:`${d.C}/onboarding/kyc/session`,method:"POST",data:{self_assessment:(0,m.EO)(e),capabilities:t.get("capabilities")||"",mode:s?"test":"live"}})})(t),(0,y.TB)(!0)):s=await(async()=>await l()({path:(0,c.addQueryArgs)(`${d.C}/accounts/session`,{}),method:"GET"}))();const{clientSecret:n,publishableKey:i}=s;if(!i)throw new Error((0,r.__)("Unable to start onboarding. If this problem persists, please contact support.","woocommerce-payments"));const p=(0,a.eS)({publishableKey:i,fetchClientSecret:async()=>n,appearance:{overlays:"drawer",...u},locale:s.locale.replace("_","-")});o(p)}catch(e){p(e instanceof Error?e.message:(0,r.__)("Unable to start onboarding. If this problem persists, please contact support.","woocommerce-payments"))}finally{h(!1)}})()},[e,t]),{stripeConnectInstance:s,initializationError:i,loading:_}},g=({onboardingData:e,onExit:t,onLoaderStart:s,onLoadError:n,onStepChange:a,collectPayoutRequirements:r=!1})=>{const{stripeConnectInstance:c,initializationError:i}=w(!0,e);return(0,h.jsxs)(h.Fragment,{children:[i&&(0,h.jsx)(_.A,{status:"error",children:i}),c&&(0,h.jsx)(o.MT,{connectInstance:c,children:(0,h.jsx)(o.hw,{onLoaderStart:s,onLoadError:n,onExit:t,onStepChange:e=>a?.(e.step),collectionOptions:{fields:r?"eventually_due":"currently_due",futureRequirements:"omit"}})})]})},x=({onLoaderStart:e,onLoadError:t,onNotificationsChange:s})=>{const{stripeConnectInstance:n,initializationError:a,loading:r}=w(!1,null);return(0,h.jsxs)(h.Fragment,{children:[(r||!n)&&(0,h.jsx)(p.A,{}),a&&(0,h.jsx)(_.A,{status:"error",children:a}),n&&(0,h.jsx)(o.MT,{connectInstance:n,children:(0,h.jsx)(o.Ex,{onLoaderStart:e,onLoadError:t,onNotificationsChange:s,collectionOptions:{fields:"eventually_due",futureRequirements:"omit"}})})]})}},7841(e,t,s){s.d(t,{o:()=>i,w:()=>l});var n=s(1609),a=s(8468),o=s(4848);const r=(e={})=>{const[t,s]=(0,n.useState)(e),[o,r]=(0,n.useState)({}),[c,i]=(0,n.useState)({});return{data:t,setData:e=>s(t=>({...t,...e})),errors:o,setErrors:e=>r(t=>(0,a.omitBy)({...t,...e},a.isNil)),touched:c,setTouched:e=>i(t=>({...t,...e}))}},c=(0,n.createContext)(null),i=({children:e,initialData:t})=>(0,o.jsx)(c.Provider,{value:r(t),children:e}),l=()=>{const e=(0,n.useContext)(c);if(!e)throw new Error("useOnboardingContext() must be used within <OnboardingContextProvider>");return e}},8151(e,t,s){s.d(t,{Qx:()=>y,TB:()=>_,d4:()=>u,nb:()=>w,tb:()=>p,vx:()=>h});var n=s(1609),a=s(9448),o=s(7841),r=s(2461);const c=new Set;let i,l;const d=e=>Math.round((Date.now()-e)/1e3),m=()=>{const e=d(l);return l=Date.now(),e},u=()=>{i=l=Date.now();const e=new URLSearchParams(window.location.search);(0,r.yM)("wcpay_onboarding_flow_started",{source:e.get("source")?.replace(/[^\w-]+/g,"")||"unknown"})},p=e=>{c.has(e)||((0,r.yM)("wcpay_onboarding_flow_step_completed",{step:e,elapsed:m()}),c.add(e))},_=(e=!1)=>{const t=new URLSearchParams(window.location.search);(0,r.yM)("wcpay_onboarding_flow_redirected",{is_embedded_onboarding:e,elapsed:d(i),source:t.get("source")?.replace(/[^\w-]+/g,"")||"unknown"})},y=e=>{const t=new URLSearchParams(window.location.search);(0,r.yM)("wcpay_onboarding_flow_embedded_step_change",{step:e,elapsed:d(i),source:t.get("source")?.replace(/[^\w-]+/g,"")||"unknown"})},h=()=>{const e=new URLSearchParams(window.location.search);(0,r.yM)("wcpay_onboarding_kyc_exit",{source:e.get("source")?.replace(/[^\w-]+/g,"")||"unknown"})},w=()=>{const{errors:e,touched:t}=(0,o.w)(),{currentStep:s}=(0,a.sd)(),c=(n="hide")=>{const a="hide"===n?"wcpay_onboarding_flow_hidden":"wcpay_onboarding_flow_exited",o=Object.keys(e).filter(e=>t[e]),c=new URLSearchParams(window.location.search);(0,r.yM)(a,{step:s,errored:o,elapsed:d(i),source:c.get("source")?.replace(/[^\w-]+/g,"")||"unknown"})},l=()=>{"hidden"===document.visibilityState&&c("hide")};return(0,n.useEffect)(()=>(document.addEventListener("visibilitychange",l),()=>{document.removeEventListener("visibilitychange",l)}),[s,e,t]),{trackAbandoned:e=>{c(e),document.removeEventListener("visibilitychange",l)},removeTrackListener:()=>document.removeEventListener("visibilitychange",l)}}},6387(e,t,s){s.d(t,{Ox:()=>u,EO:()=>l,a4:()=>d,sC:()=>m,_V:()=>p,K5:()=>_});var n=s(8468),a=s(1455),o=s.n(a),r=s(3138),c=s(7723);const i={generic:{individual:(0,c.__)("Select if you run your own business as an individual and are self-employed","woocommerce-payments"),company:(0,c.__)("Select if you filed documentation to register your business with a government agency","woocommerce-payments"),non_profit:(0,c.__)("Select if you run a non-business entity","woocommerce-payments"),government_entity:(0,c.__)("Select if your business is classed as a government entity","woocommerce-payments")},US:{individual:(0,c.__)("Select if you run your own business as an individual and are self-employed","woocommerce-payments"),company:(0,c.__)("Select if you filed documentation to register your business with a government agency","woocommerce-payments"),non_profit:(0,c.__)("Select if you have been granted tax-exempt status by the Internal Revenue Service (IRS)","woocommerce-payments"),government_entity:(0,c.__)("Select if your business is classed as a government entity","woocommerce-payments")}},l=e=>(0,n.toPairs)(e).reduce((e,[t,s])=>null!=s?(0,n.set)(e,t,s):e,{}),d=()=>Object.entries(wcpaySettings?.connect.availableCountries||[]).map(([e,t])=>({key:e,name:t,types:[]})).sort((e,t)=>e.name.localeCompare(t.name)),m=()=>{const e=wcpaySettings?.onboardingFieldsData?.business_types;return(e||[]).map(e=>({...e,types:e.types.map(t=>({...t,description:i[e.key]?i[e.key][t.key]:i.generic[t.key]}))})).sort((e,t)=>e.name.localeCompare(t.name))||[]},u=async e=>await o()({path:`${r.C}/onboarding/kyc/finalize`,method:"POST",data:{source:e,from:"WCPAY_ONBOARDING_WIZARD"}}),p=()=>{const e=wcSettings.admin?.onboarding?.profile?.industry?.[0];if(e)return(wcpaySettings?.onboardingFieldsData?.industry_to_mcc||{})[e]},_=()=>{const e=wcpaySettings?.onboardingFieldsData?.mccs_display_tree;return(e||[]).filter(e=>!!e?.items&&(e.items?.filter(e=>!e?.items)||[]).length).reduce((e,t)=>{const s=t.items?.map(e=>({key:e.id,name:e.title,group:t.id,context:e?.keywords?e.keywords.join(" "):""}))||[];return[...e,{key:t.id,name:t.title,items:s.map(e=>e.key)},...s]},[])}},6137(e,t,s){s.r(t),s.d(t,{default:()=>Ft});var n={};s.r(n),s.d(n,{confirmStatementDescriptor:()=>_t,dismissDisputeReadinessCard:()=>pt,updateDisputeReadiness:()=>mt,updateErrorForDisputeReadiness:()=>ut});var a={};s.r(a),s.d(a,{getDisputeReadiness:()=>yt});var o={};s.r(o),s.d(o,{getDisputeReadiness:()=>ht,getDisputeReadinessError:()=>wt});var r=s(1609),c=s.n(r),i=s(6476),l=s(7723),d=s(7143),m=s(8358),u=s(6427),p=s(4937),_=s(7014),y=s(4848);const h=({id:e,title:t,currencyCode:s,tooltip:n,amount:a=0,isLoading:o=!1})=>(0,y.jsxs)("div",{className:"wcpay-account-balances__balances__item",children:[(0,y.jsxs)("p",{id:e,className:"wcpay-account-balances__balances__item__title",children:[(0,y.jsx)("span",{children:t}),!o&&n]}),(0,y.jsx)("p",{className:"wcpay-account-balances__balances__item__amount","aria-labelledby":e,children:(0,y.jsx)(_.A,{isLoading:o,display:"inline",placeholder:"loading amount",value:(0,p.vv)(a,s)})})]});var w=s(4236),g=s(5798),x=s(6087);const b=({instantBalance:{amount:e,fee:t,net:s,fee_percentage:n},onClose:a,onSubmit:o,inProgress:r})=>{const c=`${n}%`,i=(0,x.createInterpolateElement)((0,l.sprintf)((0,l.__)("Need cash in a hurry? Instant payouts are available within 30 minutes for a nominal %s service fee. <a>Learn more</a>","woocommerce-payments"),c),{a:(0,y.jsx)("a",{href:"https://woocommerce.com/document/woopayments/payouts/instant-payouts/",target:"_blank",rel:"noopener noreferrer"})});return(0,y.jsxs)(u.Modal,{title:(0,l.__)("Instant payout","woocommerce-payments"),onRequestClose:a,className:"wcpay-instant-payout-modal",children:[(0,y.jsx)("p",{children:i}),(0,y.jsxs)("ul",{children:[(0,y.jsxs)("li",{className:"wcpay-instant-payout-modal__balance",children:[(0,l.__)("Balance available for instant payout: ","woocommerce-payments"),(0,y.jsx)("span",{children:(0,p.vv)(e)})]}),(0,y.jsxs)("li",{className:"wcpay-instant-payout-modal__fee",children:[(0,l.sprintf)((0,l.__)("%s service fee: ","woocommerce-payments"),c),(0,y.jsxs)("span",{children:["-",(0,p.vv)(t)]})]}),(0,y.jsxs)("li",{className:"wcpay-instant-payout-modal__net",children:[(0,l.__)("Net payout amount: ","woocommerce-payments"),(0,y.jsx)("span",{children:(0,p.$9)(s)})]})]}),(0,y.jsxs)("div",{className:"wcpay-instant-payout-modal__footer",children:[(0,y.jsx)(u.Button,{variant:"secondary",onClick:a,__next40pxDefaultSize:!0,children:(0,l.__)("Cancel","woocommerce-payments")}),(0,y.jsx)(u.Button,{variant:"primary",onClick:o,isBusy:r,disabled:r,__next40pxDefaultSize:!0,children:(0,l.sprintf)((0,l.__)("Pay out %s now","woocommerce-payments"),(0,p.$9)(s))})]})]})};var f=s(6687);const v=({instantBalance:e})=>{const[t,s]=(0,x.useState)(!1),n=(e=>{let t=!1;return 0===e.amount&&(t=!0),t})(e),{inProgress:a,submit:o}=(0,f.JA)(e.currency);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(u.Button,{variant:"primary",disabled:n,onClick:()=>s(!0),__next40pxDefaultSize:!0,children:(0,l.sprintf)((0,l.__)("Get %s now","woocommerce-payments"),(0,p.vv)(e.amount,e.currency))}),(t||a)&&(0,y.jsx)(b,{instantBalance:e,inProgress:a,onSubmit:()=>{s(!1),o()},onClose:()=>{s(!1)}})]})};var j=s(7274);const k=s.p+"../assets/images/icons/send-money.svg?ver=62733158594b203e44de";var S=s(2159);const C={available:(0,l.__)("Available funds","woocommerce-payments"),total:(0,l.__)("Total balance","woocommerce-payments")},D="https://woocommerce.com/document/woopayments/payouts/payout-schedule/",N="https://woocommerce.com/document/woopayments/fees/account-showing-negative-balance/",L=({balance:e})=>{const t=e<0;return(0,y.jsx)(S.C,{className:"wcpay-account-balances__balances__item__tooltip",buttonIcon:(0,y.jsx)(w.A,{}),buttonLabel:`${C.total} tooltip`,maxWidth:"315px",content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(y.Fragment,{children:(0,m.A)({mixedString:(0,l.__)("{{bold}}Total balance{{/bold}} combines both pending funds (transactions under processing) and available funds (ready for payout). {{learnMoreLink}}Learn more{{/learnMoreLink}}","woocommerce-payments"),components:{bold:(0,y.jsx)("b",{}),learnMoreLink:(0,y.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:D})}})}),(0,y.jsx)(g.A,{className:"wcpay-account-balances__balances-total-balance-tooltip-notice",isDismissible:!1,children:(0,l.__)("Total balance = Available funds + Pending funds","woocommerce-payments")}),(0,y.jsx)(y.Fragment,{children:t&&(0,m.A)({mixedString:(0,l.__)("Negative account balance? {{discoverWhyLink}}Discover why.{{/discoverWhyLink}}","woocommerce-payments"),components:{discoverWhyLink:(0,y.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:N})}})})]})})},F=({balance:e})=>{const t=e<0;return(0,y.jsx)(S.C,{className:"wcpay-account-balances__balances__item__tooltip",buttonIcon:(0,y.jsx)(w.A,{}),buttonLabel:`${C.available} tooltip`,maxWidth:t?"280px":void 0,content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("p",{children:(0,m.A)({mixedString:(0,l.__)("{{bold}}Available funds{{/bold}} have completed processing and are ready to be dispatched to your bank account. {{learnMoreLink}}Learn more{{/learnMoreLink}}","woocommerce-payments"),components:{bold:(0,y.jsx)("b",{}),learnMoreLink:(0,y.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:D})}})}),(0,y.jsx)("p",{children:t&&(0,m.A)({mixedString:(0,l.__)("Negative account balance? {{discoverWhyLink}}Discover why.{{/discoverWhyLink}}","woocommerce-payments"),components:{discoverWhyLink:(0,y.jsx)(u.ExternalLink,{href:N})}})})]})})},A=()=>({setSelectedCurrency:e=>{(0,i.updateQueryString)({selected_currency:e})},selectedCurrency:(0,i.getQuery)().selected_currency});var E=s(810);const T=()=>{const e=wcpaySettings.accountDefaultCurrency;return(0,y.jsxs)(u.CardBody,{className:"wcpay-account-balances__balances",children:[(0,y.jsx)(h,{id:`wcpay-account-balances-${e}-total`,title:C.total,amount:0,currencyCode:e,isLoading:!0}),(0,y.jsx)(h,{id:`wcpay-account-balances-${e}-available`,title:C.available,amount:0,currencyCode:e,isLoading:!0})]})},R=()=>{const{overviews:e,isLoading:t}=(0,f.GC)(),{selectedCurrency:s}=A(),{isInstantDepositNoticeDismissed:n,handleDismissInstantDepositNotice:a}=(()=>{const[e,t]=(0,r.useState)(wcpaySettings.isInstantDepositNoticeDismissed);return{isInstantDepositNoticeDismissed:e,handleDismissInstantDepositNotice:()=>{t(!0),wcpaySettings.isInstantDepositNoticeDismissed=!0,(0,E.saveOption)("wcpay_instant_deposit_notice_dismissed",!0)}}})();if(!t&&0===e.currencies.length)return null;if(t)return(0,y.jsx)(j.A,{title:(0,l.__)("Balance","woocommerce-payments"),className:"wcpay-account-balances",isLoading:!0,LoadingState:T});const{currencies:o,account:c}=e,i=o.map(e=>({name:e.currency,currencyCode:e.currency,availableFunds:e.available?.amount??0,pendingFunds:e.pending?.amount??0,delayDays:c?.deposits_schedule.delay_days??0,instantBalance:e.instant})),d=i.find(e=>e.name===s)||i[0],_=d.availableFunds+d.pendingFunds;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(j.A,{title:(0,l.__)("Balance","woocommerce-payments"),className:"wcpay-account-balances",isLoading:!1,LoadingState:T,children:(0,y.jsxs)(u.CardBody,{className:"wcpay-account-balances__balances",children:[(0,y.jsx)(h,{id:`wcpay-account-balances-${d.currencyCode}-total`,title:C.total,amount:_,currencyCode:d.currencyCode,tooltip:(0,y.jsx)(L,{balance:_})}),(0,y.jsx)(h,{id:`wcpay-account-balances-${d.currencyCode}-available`,title:C.available,amount:d.availableFunds,currencyCode:d.currencyCode,tooltip:(0,y.jsx)(F,{balance:d.availableFunds})})]})}),d.instantBalance&&d.instantBalance.amount>0&&(0,y.jsxs)(u.Flex,{gap:0,className:"wcpay-account-balances__instant-deposit",direction:"column",align:"start",children:[!n&&(0,y.jsx)(g.A,{className:"wcpay-account-balances__instant-deposit-notice",icon:(0,y.jsx)("img",{src:k,alt:""}),isDismissible:!0,onRemove:()=>a(),children:(0,l.sprintf)((0,l.__)("Get %1$s via instant payout. Funds are typically in your bank account within 30 mins. Fee: %2$s%%.","woocommerce-payments"),(0,p.vv)(d.instantBalance.amount,d.instantBalance.currency),d.instantBalance.fee_percentage)}),(0,y.jsxs)(u.Flex,{justify:"flex-start",children:[(0,y.jsx)(v,{instantBalance:d.instantBalance}),n&&(0,y.jsx)(S.C,{buttonIcon:(0,y.jsx)(w.A,{}),buttonLabel:(0,l.__)("Learn more about instant payouts","woocommerce-payments"),content:(0,m.A)({mixedString:(0,l.sprintf)((0,l.__)("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}}","woocommerce-payments"),d.instantBalance.fee_percentage),components:{strong:(0,y.jsx)("strong",{}),learnMoreLink:(0,y.jsx)(u.ExternalLink,{href:"https://woocommerce.com/document/woopayments/payouts/instant-payouts/"})}})})]})]}),wcpaySettings.instantDepositsPreviouslyEligible&&(!d.instantBalance||0===d.instantBalance.amount)&&(0,y.jsx)(g.A,{className:"wcpay-account-balances__instant-deposit-unavailable",status:"warning",isDismissible:!1,children:(0,m.A)({mixedString:(0,l.__)("Instant payouts are currently unavailable for your account. {{learnMoreLink}}Learn about eligibility requirements{{/learnMoreLink}}","woocommerce-payments"),components:{learnMoreLink:(0,y.jsx)(u.ExternalLink,{href:"https://woocommerce.com/document/woopayments/payouts/instant-payouts/"})}})})]})};var I=s(3832),P=s(612);const B={title:(0,l.__)("Account Tools","woocommerce-payments"),description:(0,P.wx)()?(0,l.__)("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.","woocommerce-payments"):(0,l.__)("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.","woocommerce-payments"),reset:(0,l.__)("Reset account","woocommerce-payments")};var M=s(3448);const U=()=>{window.location.href=(0,I.addQueryArgs)(wcpaySettings.connectUrl,{"wcpay-reset-account":"true",source:"wcpay-reset-account"})},O=()=>{const[e,t]=(0,r.useState)(!1);return(0,P.wx)()?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"account-tools",children:[(0,y.jsx)(u.CardDivider,{}),(0,y.jsx)("h4",{children:B.title}),(0,y.jsx)("p",{children:B.description}),(0,y.jsx)("div",{className:"account-tools__actions",children:(0,y.jsx)(u.Button,{variant:"secondary",onClick:()=>t(!0),__next40pxDefaultSize:!0,children:B.reset})})]}),(0,y.jsx)(M.A,{isVisible:e,onDismiss:()=>t(!1),onSubmit:U})]}):null},$=({progressLabel:e,totalLabel:t,progress:s})=>{const n=s>.5;return(0,y.jsxs)("div",{className:"progressbar",children:[(0,y.jsxs)("div",{className:"progressbar__container",children:[(0,y.jsx)("div",{className:"progressbar__inner",style:{width:100*s+"%"},children:n&&(0,y.jsx)("span",{className:"progressbar__inner-progress-label",children:e})}),!n&&(0,y.jsx)("span",{className:"progressbar__outer-progress-label",children:e})]}),(0,y.jsx)("span",{className:"progressbar__total-label",children:t})]})},W=({feeData:{volume_allowance:e,current_volume:t,...s}})=>{if(!e)return null;const n=s.volume_currency??s.currency;return(0,y.jsx)($,{progressLabel:(0,p.vv)(t,n),totalLabel:(0,p.vv)(e,n),progress:t/e})};var z=s(7564);const Y=({feeData:{volume_allowance:e,end_time:t,...s}})=>{const n=s.volume_currency??s.currency;let a;if(e&&t)a=(0,l.sprintf)((0,l.__)("Discounted base fee expires after the first %1$s of total payment volume or on %2$s.","woocommerce-payments"),(0,p.vv)(e,n),(0,z._)(t));else if(e)a=(0,l.sprintf)((0,l.__)("Discounted base fee expires after the first %1$s of total payment volume.","woocommerce-payments"),(0,p.vv)(e,n));else{if(!t)return null;a=(0,l.sprintf)((0,l.__)("Discounted base fee expires on %1$s.","woocommerce-payments"),(0,z._)(t))}return(0,y.jsx)("p",{className:"description",children:a})};var q=s(5794);const G=e=>e.discount.length?e.discount[0]:e.base,H=e=>{switch(e){case"card":return(0,l.__)("Card transactions","woocommerce-payments");case"card_present":return(0,l.__)("In-person transactions","woocommerce-payments")}const t=wooPaymentsPaymentMethodsConfig[e];return t?.title?(0,l.sprintf)((0,l.__)("%s transactions","woocommerce-payments"),t.title):(0,l.__)("Unknown transactions","woocommerce-payments")},Q=e=>{const{accountFee:t,paymentMethod:s}=e,n=t.base,a=(0,p.OY)(n.currency),o=(0,p.Or)(n.currency),r=a?.getCurrencyConfig()?.code,c=((e,t={})=>{const s=e.base,n=G(e),a={fee:(0,l.__)("%1$f%% + %2$s per transaction","woocommerce-payments"),discount:(0,l.__)("(%f%% discount)","woocommerce-payments"),displayBaseFeeIfDifferent:!0,...t},o=(0,l.sprintf)(a.fee,(0,q.w)(s.percentage_rate),(0,p.vv)(s.fixed_rate,s.currency));if(n.percentage_rate!==s.percentage_rate||n.fixed_rate!==s.fixed_rate||n.currency!==s.currency){const e=n;let t,r;e.discount?(t=s.percentage_rate*(1-e.discount),r=s.fixed_rate*(1-e.discount)):(t=n.percentage_rate,r=n.fixed_rate);let c=(0,l.sprintf)(a.fee,(0,q.w)(t),(0,p.vv)(r,s.currency));a.displayBaseFeeIfDifferent&&(c=(0,l.sprintf)((0,l.__)("<s>%1$s</s> %2$s","woocommerce-payments"),o,c)),e.discount&&a.discount.length>0&&(c+=" "+(0,l.sprintf)(a.discount,(0,q.w)(e.discount)));const i={s:(0,y.jsx)("s",{})};return(0,x.createInterpolateElement)(c,i)}return o})(t),i=G(t);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("p",{children:[H(s),":"]}),o?`${o} `:null,r?`(${r}) `:null,c,(0,y.jsx)(W,{feeData:i}),(0,y.jsx)(Y,{feeData:i})]})},V=e=>{const{accountFees:t}=e;let s=!1;const n=Object.entries(t).map(([e,t])=>0===t.fee.discount.length?null:(s=!0,(0,y.jsx)(Q,{paymentMethod:t.payment_method,accountFee:t.fee},e)));return(0,y.jsxs)(y.Fragment,{children:[s&&(0,y.jsxs)("div",{className:"account-fees",children:[(0,y.jsx)(u.CardDivider,{}),(0,y.jsx)("h4",{children:(0,l.__)("Active discounts","woocommerce-payments")})]}),n]})};var J=s(845),K=s(2578),X=s(3889),Z=s(8851),ee=s(8351);const te=e=>{switch(e){case"green":return"success";case"yellow":return"warning";case"red":return"alert";case"blue":default:return"primary";case"gray":return"light"}},se=e=>{switch(e){case"green":return"success";case"blue":default:return"info";case"yellow":return"warning";case"red":return"error"}},ne=({banner:e})=>{return e?(0,y.jsx)(g.A,{status:se(e.background_color),icon:(t=e.icon,{published:J.A,caution:K.A,error:X.A,info:Z.A,check:ee.A}[t??"info"]??Z.A),className:"woopayments-account-details__banner",isDismissible:!1,children:(0,y.jsxs)(y.Fragment,{children:[e.text,e.cta_text&&e.cta_link&&(0,y.jsxs)(y.Fragment,{children:[" ",(0,y.jsx)(u.ExternalLink,{href:e.cta_link,children:e.cta_text})]})]})}):null;var t};var ae=s(1272);const oe=({payoutStatus:e})=>{const t=te(e.background_color);return(0,y.jsxs)(u.Flex,{align:"center",gap:0,justify:"flex-start",children:[(0,y.jsx)(ae.A,{type:t,message:e.text}),e.popover&&(0,y.jsx)(S.C,{className:"payout-click-tooltip",buttonIcon:(0,y.jsx)(w.A,{}),buttonLabel:(0,l.__)("More information about payout status","woocommerce-payments"),buttonSize:24,maxWidth:"300px",content:(0,y.jsxs)("div",{children:[e.popover.text,e.popover.cta_text&&e.popover.cta_link&&(0,y.jsxs)(y.Fragment,{children:[" ",(0,y.jsx)(u.ExternalLink,{className:"payout-tooltip-external-link",href:e.popover.cta_link,children:e.popover.cta_text})]})]})})]})},re=({payoutStatus:e})=>(0,y.jsxs)(u.Flex,{direction:"row",align:"center",justify:"left",gap:3,className:"woopayments-account-details__payout-status-item",children:[(0,y.jsx)(u.FlexItem,{className:"item-label",children:(0,l.__)("Payouts:","woocommerce-payments")}),(0,y.jsx)(u.FlexBlock,{className:"item-value",children:(0,y.jsx)(oe,{payoutStatus:e})})]});var ce=s(2461);const ie=({accountStatus:e,accountLink:t})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(u.FlexItem,{className:"account-details",children:(0,l.__)("Account details","woocommerce-payments")}),(0,y.jsx)(u.FlexBlock,{className:"account-status",children:(0,y.jsx)(ae.A,{message:e.text,type:te(e.background_color)})}),t&&(0,y.jsx)(u.FlexItem,{className:"edit-details",children:(0,y.jsx)(u.Button,{variant:"link",onClick:()=>(0,ce.yM)("wcpay_account_details_link_clicked",{from:"WCPAY_ACCOUNT_DETAILS",source:"wcpay-account-details"}),href:t,target:"_blank",__next40pxDefaultSize:!0,children:(0,l.__)("Edit details","woocommerce-payments")})})]}),le=({title:e,children:t})=>(0,y.jsxs)(u.Card,{size:"medium",children:[(0,y.jsx)(u.CardHeader,{className:"woopayments-account-details__header",children:e}),(0,y.jsx)(u.CardBody,{children:t})]}),de=()=>{const e=(0,l.__)("Account details","woocommerce-payments");return(0,y.jsx)(le,{title:e,children:(0,l.__)("Error loading account details.","woocommerce-payments")})},me=({accountDetails:e,accountFees:t,accountLink:s})=>{const n=s?(0,I.addQueryArgs)(s,{from:"WCPAY_ACCOUNT_DETAILS",source:"wcpay-account-details"}):null,a=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(ie,{accountStatus:e.account_status,accountLink:n}),(0,y.jsx)(ne,{banner:e.banner})]});return(0,y.jsxs)(le,{title:a,children:[(0,y.jsx)(re,{payoutStatus:e.payout_status}),(0,y.jsx)(O,{}),t&&t.length>0&&(0,y.jsx)(V,{accountFees:t})]})},ue=({accountDetails:e,accountFees:t=[],accountLink:s})=>null===e?(0,y.jsx)(de,{}):(0,y.jsx)(me,{accountDetails:e,accountFees:t,accountLink:s});var pe=s(596);const _e={button:(0,l.__)("Dismiss","woocommerce-payments"),heading:(0,l.__)("You're ready to accept payments!","woocommerce-payments"),description:(0,l.sprintf)((0,l.__)("Great news — your %s account has been activated. You can now start accepting payments on your store.","woocommerce-payments"),"WooPayments")},ye=()=>{const[e,t]=c().useState(wcpaySettings.isConnectionSuccessModalDismissed),s=async()=>{t(!0),(0,E.saveOption)("wcpay_connection_success_modal_dismissed",!0)};return(0,y.jsx)(y.Fragment,{children:!e&&(0,y.jsxs)(u.Modal,{title:_e.heading,className:"woopayments-connection-success-modal",isDismissible:!0,onRequestClose:s,children:[(0,y.jsx)("div",{className:"woopayments-connection-success-modal__content",children:_e.description}),(0,y.jsx)("div",{className:"woopayments-connection-success-modal__actions",children:(0,y.jsx)(u.Button,{variant:"primary",isBusy:!1,disabled:!1,onClick:s,__next40pxDefaultSize:!0,children:_e.button})})]})})};var he=s(1417),we=s(8846),ge=s(9378),xe=s(2760),be=s(5725);const fe=({deposits:e})=>{if(0===e.length)return null;const t="wcpay-deposits-overview__table",s=e.map(e=>(0,y.jsxs)(u.Flex,{className:`${t}__row`,children:[(0,y.jsxs)(u.FlexItem,{className:`${t}__cell`,children:[(0,y.jsx)(u.Icon,{icon:he.A,size:17}),(0,y.jsx)(we.Link,{href:(0,be.g)(e.id,"payouts"),children:(0,xe.f)(e)})]}),(0,y.jsx)(u.FlexItem,{className:`${t}__cell`,children:(0,y.jsx)(ge.A,{deposit:e})}),(0,y.jsx)(u.FlexItem,{className:`${t}__cell`,children:(0,p.vv)(e.amount,e.currency)})]},e.id));return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(u.CardBody,{className:`${t}__container`,children:(0,y.jsxs)(u.Flex,{className:`${t}__row__header`,children:[(0,y.jsx)(u.FlexItem,{className:`${t}__cell`,children:(0,l.__)("Dispatch date","woocommerce-payments")}),(0,y.jsx)(u.FlexItem,{className:`${t}__cell`,children:(0,l.__)("Status","woocommerce-payments")}),(0,y.jsx)(u.FlexItem,{className:`${t}__cell`,children:(0,l.__)("Amount","woocommerce-payments")})]})}),(0,y.jsx)(u.CardDivider,{}),(0,y.jsx)(u.CardBody,{className:`${t}__container`,children:s})]})};var ve=s(8449);const je=()=>(0,y.jsx)(g.A,{className:"wcpay-deposits-overview__suspended-notice",icon:!0,isDismissible:!1,status:"warning",children:(0,m.A)({mixedString:(0,l.__)("Your payouts are {{strong}}temporarily suspended{{/strong}}. {{suspendLink}}Learn more{{/suspendLink}}","woocommerce-payments"),components:{strong:(0,y.jsx)("strong",{}),suspendLink:(0,y.jsx)(we.Link,{href:"https://woocommerce.com/document/woopayments/payouts/why-payouts-suspended/"})}})}),ke=()=>(0,y.jsx)(g.A,{status:"warning",icon:!0,className:"new-account-waiting-period-notice",isDismissible:!1,children:(0,m.A)({mixedString:(0,l.__)("Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete. {{learnMoreLink}}Learn more{{/learnMoreLink}}","woocommerce-payments"),components:{learnMoreLink:(0,y.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#new-accounts"})}})}),Se=()=>(0,y.jsx)(g.A,{status:"warning",icon:!0,className:"negative-balance-deposits-paused-notice",isDismissible:!1,children:(0,m.A)({mixedString:(0,l.sprintf)((0,l.__)("Payouts may be interrupted while your %s balance remains negative. {{whyLink}}Why?{{/whyLink}}","woocommerce-payments"),"WooPayments"),components:{whyLink:(0,y.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://woocommerce.com/document/woopayments/fees/account-showing-negative-balance/"})}})}),Ce=({minimumDepositAmountFormatted:e})=>(0,y.jsx)(g.A,{status:"warning",icon:!0,isDismissible:!1,children:(0,m.A)({mixedString:(0,l.sprintf)((0,l.__)("Payouts are paused while your available funds balance remains below %s. {{learnMoreLink}}Learn more{{/learnMoreLink}}","woocommerce-payments"),e),components:{learnMoreLink:(0,y.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#minimum-payout-amounts"})}})}),De=()=>(0,y.jsx)(g.A,{status:"warning",icon:!0,isDismissible:!1,children:(0,m.A)({mixedString:(0,l.__)("You have no funds available. {{whyLink}}Why?{{/whyLink}}","woocommerce-payments"),components:{whyLink:(0,y.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://woocommerce.com/document/woopayments/payouts/payout-schedule/#pending-funds"})}})}),Ne=({updateAccountLink:e})=>{const t=e?(0,I.addQueryArgs)(e,{from:"WCPAY_PAYOUTS",source:"wcpay-payout-failure-notice"}):"";return""!==e?(0,y.jsx)(g.A,{status:"warning",icon:!0,className:"deposit-failure-notice",isDismissible:!1,children:(0,m.A)({mixedString:(0,l.__)("Payouts are currently paused because a recent payout failed. Please {{updateLink}}update your bank account details{{/updateLink}}.","woocommerce-payments"),components:{updateLink:(0,y.jsx)(u.ExternalLink,{onClick:()=>(0,ce.yM)("wcpay_account_details_link_clicked",{from:"WCPAY_PAYOUTS",source:"wcpay-payout-failure-notice"}),href:t})}})}):null},Le=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(u.CardBody,{className:"wcpay-deposits-overview__schedule__container",children:(0,y.jsx)(_.A,{isLoading:!0,"aria-hidden":!0,placeholder:(0,l.__)("Available funds are automatically dispatched every day.","woocommerce-payments")})}),(0,y.jsx)(u.CardBody,{className:"wcpay-deposits-overview__heading",children:(0,y.jsx)("span",{className:"wcpay-deposits-overview__heading__title",children:(0,l.__)("Payout history","woocommerce-payments")})}),(0,y.jsx)(u.CardBody,{children:(0,y.jsx)(_.a,{isLoading:!0,numLines:4})}),(0,y.jsxs)(u.CardFooter,{className:"wcpay-deposits-overview__footer",children:[(0,y.jsx)(_.A,{isLoading:!0,"aria-hidden":!0,placeholder:(0,l.__)("View full payout history","woocommerce-payments")}),(0,y.jsx)(_.A,{isLoading:!0,"aria-hidden":!0,placeholder:(0,l.__)("Change payout schedule","woocommerce-payments")})]})]}),Fe=()=>{const{account:e,overview:t,isLoading:s}=(()=>{const{overviews:e,isLoading:t}=(0,f.GC)(),{currencies:s,account:n}=e,{selectedCurrency:a}=A();return{account:n,overview:s.some(e=>e.currency===a)?s.find(e=>e.currency===a):s[0],isLoading:t}})(),n="deposits_unrestricted"===wcpaySettings.accountStatus.deposits?.restrictions,a=t?.currency||wcpaySettings.accountDefaultCurrency,{isLoading:o,deposits:r}=(e=>{const t={store_currency_is:e,orderby:"date",order:"desc",per_page:"3"},s=(0,f.z)(t);return{deposits:s.deposits,isLoading:s.isLoading}})(a),c=s||o,d=t?.available?.amount??0,m=t?.pending?.amount??0,_=d+m,h=wcpaySettings.accountStatus.deposits?.minimum_scheduled_deposit_amounts?.[a]??0,w=d>=h,g=_<0,x=0===d&&m>0,b=wcpaySettings.accountStatus.deposits?.completed_waiting_period,v=!e?.deposits_blocked&&b,k=!c&&r?.length>0&&!!e,S=(0,xe.St)(e?.deposits_schedule?.interval),C=e?.default_external_accounts?.some(e=>e.currency===a&&"errored"===e.status)??!1;return c||b||0!==d||0!==m?(0,y.jsxs)(j.A,{title:(0,l.__)("Payouts","woocommerce-payments"),className:"wcpay-deposits-overview",isLoading:c,LoadingState:Le,children:[n&&!!e&&S&&(0,y.jsx)(u.CardBody,{className:"wcpay-deposits-overview__schedule__container",children:(0,y.jsx)(ve.A,{depositsSchedule:e.deposits_schedule})}),(0,y.jsx)(u.CardBody,{className:"wcpay-deposits-overview__notices__container",children:e?.deposits_blocked?(0,y.jsx)(je,{}):(0,y.jsxs)(y.Fragment,{children:[!b&&(0,y.jsx)(ke,{}),b&&x&&(0,y.jsx)(De,{}),g&&(0,y.jsx)(Se,{}),C&&(0,y.jsx)(Ne,{updateAccountLink:wcpaySettings.accountStatus.accountLink}),d>0&&!w&&(0,y.jsx)(Ce,{minimumDepositAmountFormatted:(0,p.$9)(h,a)})]})}),k&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(u.CardBody,{className:"wcpay-deposits-overview__heading",children:(0,y.jsx)("span",{className:"wcpay-deposits-overview__heading__title",children:(0,l.__)("Payout history","woocommerce-payments")})}),(0,y.jsx)(fe,{deposits:r})]}),(k||v)&&(0,y.jsxs)(u.CardFooter,{className:"wcpay-deposits-overview__footer",children:[k&&(0,y.jsx)(u.Button,{variant:"secondary",onClick:()=>{(0,ce.yM)("wcpay_overview_deposits_view_history_click"),(0,i.getHistory)().push((0,P.hT)({page:"wc-admin",path:"/payments/payouts"}))},__next40pxDefaultSize:!0,children:(0,l.__)("View full payout history","woocommerce-payments")}),v&&(0,y.jsx)(u.Button,{variant:"tertiary",href:(0,P.hT)({page:"wc-settings",tab:"checkout",section:"woocommerce_payments"})+"#payout-schedule",onClick:()=>(0,ce.yM)("wcpay_overview_deposits_change_schedule_click"),__next40pxDefaultSize:!0,children:(0,l.__)("Change payout schedule","woocommerce-payments")})]})]}):null};var Ae=s(9199);const Ee=()=>wcpaySettings.hasOwnProperty("isJetpackIdcActive")&&wcpaySettings.isJetpackIdcActive&&(0,y.jsxs)(u.Notice,{status:"error",isDismissible:!1,className:"wcpay-jetpack-idc-notice",children:[(0,l.__)("Your site is currently in Safe Mode.","woocommerce-payments"),(0,y.jsx)("span",{children:" "}),(0,y.jsx)("a",{href:(0,P.xb)(),children:(0,l.__)("Please take action","woocommerce-payments")})]});var Te=s(7583),Re=s(8537),Ie=s(7677),Pe=s(2485),Be=s(4164),Me=s(7648);const Ue=e=>e?.name||"",Oe=({selectedItem:e},{type:t,changes:s,props:{items:n}})=>{switch(t){case Me.WM.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:n[e?Math.min(n.indexOf(e)+1,n.length-1):0]};case Me.WM.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:n[e?Math.max(n.indexOf(e)-1,0):n.length-1]};default:return s}},$e=function({name:e,className:t,label:s,describedBy:n,options:a,onChange:o,value:r,placeholder:c,children:i}){const{getLabelProps:d,getToggleButtonProps:m,getMenuProps:p,getItemProps:_,isOpen:h,highlightedIndex:w,selectedItem:g}=(0,Me.WM)({initialSelectedItem:a[0],items:a,itemToString:Ue,onSelectedItemChange:o,selectedItem:r||{},stateReducer:Oe}),b=Ue(g),f=p({className:"wcpay-filter components-custom-select-control__menu","aria-hidden":!h}),v=(0,x.useCallback)(e=>{e.stopPropagation(),f?.onKeyDown?.(e)},[f]);return f["aria-activedescendant"]?.startsWith("downshift-null")&&delete f["aria-activedescendant"],(0,y.jsxs)("div",{className:(0,Be.A)("wcpay-filter components-custom-select-control",t),children:[(0,y.jsxs)(u.Button,{...m({"aria-label":s,"aria-labelledby":void 0,"aria-describedby":n||(b?(0,l.sprintf)((0,l.__)("Currently selected: %s","woocommerce-payments"),b):(0,l.__)("No selection","woocommerce-payments")),className:(0,Be.A)("wcpay-filter components-custom-select-control__button",{placeholder:!b}),name:e}),children:[(0,y.jsx)("label",{...d({className:"wcpay-filter components-custom-select-control__label"}),children:s}),(0,y.jsx)("span",{className:"wcpay-filter components-custom-select-control__button-value",children:b||c}),(0,y.jsx)(Ie.A,{icon:Pe.A,className:"wcpay-filter components-custom-select-control__button-icon"})]}),(0,y.jsx)("ul",{...f,onKeyDown:v,children:h&&a.map((e,t)=>(0,y.jsxs)("li",{..._({item:e,index:t,key:e.key,className:(0,Be.A)(e.className,"wcpay-filter components-custom-select-control__item",{"is-highlighted":t===w}),style:e.style}),children:[(0,y.jsx)(Ie.A,{icon:ee.A,className:"wcpay-filter components-custom-select-control__item-icon",visibility:e===g?"visible":"hidden"}),i?i(e):e.name,e.hint&&(0,y.jsx)("span",{className:"wcpay-filter components-custom-select-control__item-hint",children:e.hint})]}))})]})},We=e=>{const{code:t,symbol:s}=(0,p.OY)(e)?.getCurrencyConfig()||{},n=(0,Re.decodeEntities)(s||"");return t&&s&&n!==t?{name:`${t} ${n}`,key:e}:{name:e.toUpperCase(),key:e}},ze=({depositCurrencies:e})=>{const t=e.map(We),{selectedCurrency:s,setSelectedCurrency:n}=(e=>{const{selectedCurrency:t,setSelectedCurrency:s}=A();return(0,r.useEffect)(()=>{(!t||!e.find(e=>e.toLowerCase()===t.toLowerCase()))&&e.length>0&&s(e[0].toLowerCase())},[e,t,s]),{selectedCurrency:t,setSelectedCurrency:s}})(e);return(0,y.jsx)($e,{label:(0,l.__)("Currency","woocommerce-payments"),value:t.find(e=>e.key===s),options:t,onChange:({selectedItem:e})=>{if(!e)return;const t=e.key.toLowerCase();n(t),(0,ce.yM)("wcpay_overview_currency_select_change",{selected_currency:t})}})},Ye={withName:{morning:(0,l.__)("Good morning, %s","woocommerce-payments"),afternoon:(0,l.__)("Good afternoon, %s","woocommerce-payments"),evening:(0,l.__)("Good evening, %s","woocommerce-payments")},withoutName:{morning:(0,l.__)("Good morning","woocommerce-payments"),afternoon:(0,l.__)("Good afternoon","woocommerce-payments"),evening:(0,l.__)("Good evening","woocommerce-payments")}},qe=()=>{const{user:e}=(()=>{const{user:e,isLoading:t}=(0,d.useSelect)(e=>{const{getCurrentUser:t,isResolving:s}=e("core");return{user:t(),isLoading:!!s("getCurrentUser")}});return{user:e,isLoading:t}})(),t=((e,t=new Date)=>{const s=((e=new Date)=>{const t=e.getHours();return t>=5&&t<12?"morning":t>=12&&t<17?"afternoon":"evening"})(t);let n=Ye.withoutName[s];return e&&(n=(0,l.sprintf)(Ye.withName[s],e)),n+=" 👋",n})(e?.first_name),{overviews:s}=(0,f.GC)(),n=s?.currencies.map(e=>e.currency)||[],a=n.length>1;return(0,y.jsx)(u.CardHeader,{className:"wcpay-welcome",children:(0,y.jsxs)(u.Flex,{align:"center",justify:"space-between",className:"wcpay-welcome__flex",children:[(0,y.jsx)(u.FlexItem,{className:"wcpay-welcome__flex__greeting",children:t}),a&&(0,y.jsx)(u.FlexItem,{children:(0,y.jsx)(ze,{depositCurrencies:n})})]})})};var Ge=s(2335),He=s(314),Qe=s(4038),Ve=s(6488),Je=s(4908);const Ke={page:1,per_page:He.QUERY_DEFAULTS.pageSize,status:"unactioned",type:He.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc",source:"woocommerce-payments",_fields:["id","name","title","content","type","status","actions","date_created","date_created_gmt","layout","image","is_deleted","source"]},Xe=(e,t)=>{(0,ce.yM)("wcpay_inbox_action_click",{note_name:e.name,note_title:e.title,note_content_inner_link:t})},Ze=({hasNotes:e,batchUpdating:t,lastRead:s,notes:n,onDismiss:a,onNoteActionClick:o})=>{if(t)return;if(!e)return(0,y.jsx)("section",{className:"woocommerce-empty-activity-card",children:(0,l.__)("As things begin to happen in your store your inbox will start to fill up. You'll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce-payments")});const r=e=>{(0,ce.yM)("wcpay_inbox_note_view",{note_content:e.content,note_name:e.name,note_title:e.title,note_type:e.type})},c=Object.keys(n).map(e=>n[e]);return(0,y.jsx)(Qe.A,{role:"menu",children:c.map(e=>{const{id:t,is_deleted:n}=e;return n?null:(0,y.jsx)(Ve.A,{timeout:500,classNames:"wcpay-inbox-message",children:(0,y.jsx)(Je.InboxNoteCard,{note:e,lastRead:s,onDismiss:a,onNoteActionClick:o,onBodyLinkClick:Xe,onNoteVisible:r},t)},t)})})},et=()=>{const{createNotice:e}=(0,d.useDispatch)("core/notices"),{batchUpdateNotes:t,removeNote:s,updateNote:n,triggerNoteAction:a}=(0,d.useDispatch)(He.NOTES_STORE_NAME),{isError:o,resolving:r,batchUpdating:c,notes:i,overviewInboxLastRead:m}=(0,d.useSelect)(e=>{const{getNotes:t,getNotesError:s,isResolving:n,isNotesRequesting:a}=e(He.NOTES_STORE_NAME),{getCurrentUser:o}=e("core"),r=o(),c=r?r.woocommerce_meta:{};return{notes:t(Ke),isError:Boolean(s("getNotes",[Ke])),resolving:n("getNotes",[Ke]),batchUpdating:a("batchUpdateNotes"),overviewInboxLastRead:c.wc_payments_overview_inbox_last_read?JSON.parse(c.wc_payments_overview_inbox_last_read):void 0}}),[u,p]=(0,x.useState)(),_=(0,x.useRef)(m);if(!_.current&&m&&(_.current=m),(0,x.useEffect)(()=>{!async function(e){if(!e||0===Object.keys(e).length)return;const t=await(0,d.select)("core").getCurrentUser(),s=Object.keys(e).reduce((t,s)=>{let n=e[s];return"string"!=typeof n&&(n=JSON.stringify(n)),{...t,[s]:n}},{}),n=await(0,d.dispatch)("core").saveUser({id:t.id,woocommerce_meta:{...t.woocommerce_meta,...s}});if(void 0===n)return{error:await(0,d.select)("core").getLastEntitySaveError("root","user",t.id),updatedUser:n};n.woocommerce_meta}({wc_payments_overview_inbox_last_read:Date.now()})},[]),o){const e=(0,l.__)("There was an error getting your inbox. Please try again.","woocommerce-payments"),t=(0,l.__)("Reload","woocommerce-payments"),s=()=>{window.location.reload()};return(0,y.jsx)(we.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:s})}const h=async(a=!1)=>{const o="all"===u.type;if((0,ce.yM)("wcpay_inbox_action_dismissed",{note_name:u.note.name,note_title:u.note.title,note_name_dismiss_all:o,note_name_dismiss_confirmation:a}),a){const a=u.note.id,r=!a||o;try{let o=[];if(r)await t(i.map(e=>e.id),{is_deleted:1}),o=[...i];else{const e=await s(a);o=[e]}p(void 0),e("success",o.length>1?(0,l.__)("All messages dismissed","woocommerce-payments"):(0,l.__)("Message dismissed","woocommerce-payments"),{actions:[{label:(0,l.__)("Undo","woocommerce-payments"),onClick:()=>{o.length>1?t(o.map(e=>e.id),{is_deleted:0}):n(a,{is_deleted:0})}}]})}catch(t){const s=r?i.length:1;e("error",(0,l._n)("Message could not be dismissed","Messages could not be dismissed",s,"woocommerce-payments")),p(void 0)}}else p(void 0)},w=function(e){return 0!==e.filter(({is_deleted:e})=>!e).length}(i);return(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)("div",{className:"wcpay-overview-screen-notes-wrapper",children:[(r||c)&&(0,y.jsx)(we.Section,{children:(0,y.jsx)(Je.InboxNotePlaceholder,{className:"banner message-is-unread"})}),(0,y.jsx)(we.Section,{children:!r&&!c&&Ze({hasNotes:w,batchUpdating:c,lastRead:_.current,notes:i,onDismiss:(e,t)=>{p({note:e,type:t})},onNoteActionClick:(e,t)=>{a(e.id,t.id)}})}),u&&(0,y.jsx)(Je.InboxDismissConfirmationModal,{onClose:h,onDismiss:()=>h(!0)})]})})};let tt=function(e){return e[e.DAY_IN_MS=864e5]="DAY_IN_MS",e}({});const st=({overviewTasksVisibility:e,tasks:t})=>{const{createNotice:s}=(0,d.useDispatch)("core/notices"),[n,a]=(0,x.useState)(t),{deletedTodoTasks:o,dismissedTodoTasks:r,remindMeLaterTodoTasks:c}=e,i=(0,x.useCallback)(()=>{const e=Date.now();return t.filter(t=>!o.includes(t.key)&&!r.includes(t.key)&&(!c[t.key]||c[t.key]<e))},[o,r,c,t]);(0,x.useEffect)(()=>{a(i())},[t,i]);const m=(e,t)=>{(async({task:e,dismissedTasks:t,noticeMessage:n,optionName:o})=>{const{key:c,onDismiss:d}=e;t.push(c),a(i()),(0,E.saveOption)(o,[...t]),s("success",n,{actions:[{label:(0,l.__)("Undo","woocommerce-payments"),onClick:()=>(async(e,t,s)=>{const n=t.filter(t=>t!==e);t.splice(r.indexOf(e),1),a(i()),(0,E.saveOption)(s,n)})(c,t,o)}]}),d&&d()})("dismiss"===t?{task:e,dismissedTasks:r,noticeMessage:(0,l.__)("Task dismissed","woocommerce-payments"),optionName:"woocommerce_dismissed_todo_tasks"}:{task:e,dismissedTasks:o,noticeMessage:(0,l.__)("Task deleted","woocommerce-payments"),optionName:"woocommerce_deleted_todo_tasks"})};return n.length?(0,y.jsx)(Je.CollapsibleList,{className:"wcpay-task-list",collapsed:!1,show:5,collapseLabel:(0,l.__)("Hide tasks","woocommerce-payments"),expandLabel:(0,l.__)("Show tasks","woocommerce-payments"),children:n.map(e=>(0,y.jsx)(Je.TaskItem,{"data-key":e.key,...e.dataAttrs||{},title:e.title,actionLabel:e.actionLabel,completed:e.completed,content:e.content,additionalInfo:e.additionalInfo,showActionButton:e.showActionButton,expandable:e.expandable,expanded:e.expanded,enter:void 0!==e.enter&&e.enter,action:void 0!==e.action?e.action:e.onClick,onClick:e.onClick,time:e.time,level:e.level,onDelete:e.isDeletable&&e.completed?()=>m(e,"delete"):void 0,onDismiss:e.isDismissable?()=>m(e,"dismiss"):void 0,onSnooze:e.allowSnooze?()=>(async({key:e,onDismiss:t})=>{const n=Date.now()+tt.DAY_IN_MS;c[e]=n,a(i()),(0,E.saveOption)("woocommerce_remind_me_later_todo_tasks",{...c,[e]:n}),s("success",(0,l.__)("Task postponed until tomorrow","woocommerce-payments"),{actions:[{label:(0,l.__)("Undo","woocommerce-payments"),onClick:()=>(async e=>{const{[e]:t,...s}=c;delete c[e],a(i()),(0,E.saveOption)("woocommerce_remind_me_later_todo_tasks",s)})(e)}]}),t&&t()})(e):void 0},e.key))}):(0,y.jsx)("div",{})};var nt=s(1686),at=s(5573),ot=s(8169);let rt=function(e){return e.SET_DISPUTE_READINESS="SET_DISPUTE_READINESS",e.SET_ERROR_FOR_DISPUTE_READINESS="SET_ERROR_FOR_DISPUTE_READINESS",e}({});const ct={disputeReadiness:void 0,disputeReadinessError:void 0};var it=s(6161),lt=s(3138),dt=s(2455);const mt=e=>({type:rt.SET_DISPUTE_READINESS,data:e}),ut=e=>({type:rt.SET_ERROR_FOR_DISPUTE_READINESS,error:e});function*pt(){try{const e=yield(0,it.apiFetch)({path:`${lt.C}/dispute-readiness/dismiss`,method:"POST"});yield d.controls.dispatch(dt.U9,"updateDisputeReadiness",e)}catch(e){yield d.controls.dispatch(dt.U9,"updateErrorForDisputeReadiness",e)}}function*_t(){try{const e=yield(0,it.apiFetch)({path:`${lt.C}/dispute-readiness/statement-descriptor/confirm`,method:"POST"});yield d.controls.dispatch(dt.U9,"updateDisputeReadiness",e)}catch(e){yield d.controls.dispatch(dt.U9,"updateErrorForDisputeReadiness",e)}}function*yt(){try{const e=yield(0,it.apiFetch)({path:`${lt.C}/dispute-readiness`});yield d.controls.dispatch(dt.U9,"updateDisputeReadiness",e)}catch(e){yield d.controls.dispatch(dt.U9,"updateErrorForDisputeReadiness",e)}}const ht=e=>e.disputeReadiness?.disputeReadiness,wt=e=>e.disputeReadiness?.disputeReadinessError,gt=dt.U9,xt=(0,d.createReduxStore)(gt,{reducer:(0,d.combineReducers)({disputeReadiness:function(e=ct,t){switch(t.type){case rt.SET_DISPUTE_READINESS:return{...e,disputeReadiness:t.data,disputeReadinessError:void 0};case rt.SET_ERROR_FOR_DISPUTE_READINESS:return{...e,disputeReadinessError:t.error}}return e}}),actions:n,selectors:o,resolvers:a,controls:it.controls});(0,d.register)(xt);const bt=()=>(0,y.jsxs)(u.Card,{className:"wcpay-dispute-readiness-card",children:[(0,y.jsx)(u.CardHeader,{className:"wcpay-dispute-readiness-card__header",children:(0,l.__)("Dispute readiness","woocommerce-payments")}),(0,y.jsx)(u.CardBody,{className:"wcpay-dispute-readiness-card__body is-loading",children:(0,y.jsx)(u.Spinner,{})})]}),ft=()=>{const{disputeReadiness:e,isLoading:t}=(0,d.useSelect)(e=>{const{getDisputeReadiness:t,getDisputeReadinessError:s,isResolving:n}=e(gt);return{disputeReadiness:t(),disputeReadinessError:s(),isLoading:n("getDisputeReadiness")}}),{dismissDisputeReadinessCard:s,confirmStatementDescriptor:n,refreshDisputeReadiness:a}=(()=>{const{dismissDisputeReadinessCard:e,confirmStatementDescriptor:t,invalidateResolutionForStoreSelector:s}=(0,d.useDispatch)(gt);return{dismissDisputeReadinessCard:e,confirmStatementDescriptor:t,refreshDisputeReadiness:(0,r.useCallback)(()=>{s("getDisputeReadiness")},[s])}})(),o=(0,r.useRef)(!1),[c,i]=(0,r.useState)(null),m=e?.overview;if((0,r.useEffect)(()=>{a()},[a]),(0,r.useEffect)(()=>{!m||m.isDismissed||o.current||((0,ce.yM)("wcpay_dispute_readiness_overview_viewed",{score:m.score,total:m.total,complete_signal_ids:m.completeSignalIds,incomplete_signal_ids:m.incompleteSignalIds,is_dismissed:m.isDismissed}),o.current=!0)},[m]),t&&!m)return(0,y.jsx)(bt,{});if(!m||!m.enabled||m.isDismissed)return null;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(u.Card,{className:"wcpay-dispute-readiness-card",children:[(0,y.jsxs)(u.CardHeader,{className:"wcpay-dispute-readiness-card__header",children:[(0,y.jsxs)("div",{className:"wcpay-dispute-readiness-card__header-text",children:[(0,y.jsx)("div",{className:"wcpay-dispute-readiness-card__title",children:(0,l.__)("Dispute readiness","woocommerce-payments")}),(0,y.jsxs)("p",{className:"wcpay-dispute-readiness-card__description",children:[(0,l.sprintf)((0,l.__)("These %d steps help customers recognize charges, understand your policies, and contact you before opening a dispute.","woocommerce-payments"),m.total)," ",(0,y.jsx)(u.ExternalLink,{href:"https://woocommerce.com/document/woopayments/fraud-and-disputes/preventing-disputes/",children:(0,l.__)("Learn more","woocommerce-payments")})]})]}),(0,y.jsx)(u.DropdownMenu,{icon:ot.A,label:(0,l.__)("Dispute readiness actions","woocommerce-payments"),popoverProps:{position:"bottom left"},className:"wcpay-dispute-readiness-card__actions",children:({onClose:e})=>(0,y.jsx)(u.MenuGroup,{children:(0,y.jsx)(u.MenuItem,{onClick:()=>{(0,ce.yM)("wcpay_dispute_readiness_card_dismissed",{score:m.score,total:m.total,complete_signal_ids:m.completeSignalIds,incomplete_signal_ids:m.incompleteSignalIds,state:m.state}),s(),e()},children:(0,l.__)("Dismiss","woocommerce-payments")})})})]}),(0,y.jsx)(Je.CollapsibleList,{className:"wcpay-dispute-readiness-card__task-list",collapsed:!1,show:m.signals.length,collapseLabel:(0,l.__)("Hide tasks","woocommerce-payments"),expandLabel:(0,l.__)("Show tasks","woocommerce-payments"),children:m.signals.map(e=>{const t="complete"===e.status,s=!t&&!!e.actionUrl;return(0,y.jsx)(Je.TaskItem,{"data-key":`dispute-readiness-${e.id}`,"data-status":e.status,title:e.label,completed:t,content:e.description||"",expanded:!0,showActionButton:s,level:3,action:t=>((e,t)=>{if((e=>{(0,ce.yM)("wcpay_dispute_readiness_signal_cta_clicked",{signal_id:e.id,surface:"overview",score:m.score,total:m.total})})(t),t.reviewPrompt)return e?.preventDefault(),void i(t);t.actionUrl&&(window.location.href=t.actionUrl)})(t,e),actionLabel:e.actionLabel||(0,l.__)("Fix it","woocommerce-payments")},e.id)})})]}),c?.reviewPrompt&&(0,y.jsxs)(u.Modal,{title:(0,l.__)("Review statement descriptor","woocommerce-payments"),className:"wcpay-dispute-readiness-card__statement-descriptor-modal",onRequestClose:()=>i(null),children:[(0,y.jsxs)("div",{className:"wcpay-dispute-readiness-card__statement-descriptor-content",children:[(0,y.jsx)("p",{children:c.reviewPrompt.text}),(0,y.jsxs)("div",{className:"wcpay-dispute-readiness-card__statement-descriptor-current",children:[(0,y.jsx)("div",{className:"wcpay-dispute-readiness-card__statement-descriptor-current-label",children:(0,l.__)("Current statement descriptor","woocommerce-payments")}),(0,y.jsx)("div",{className:"wcpay-dispute-readiness-card__statement-descriptor-current-value",children:c.reviewPrompt.currentDescriptor})]})]}),(0,y.jsx)(at.HorizontalRule,{className:"wcpay-dispute-readiness-card__statement-descriptor-separator"}),(0,y.jsxs)("div",{className:"wcpay-dispute-readiness-card__statement-descriptor-actions",children:[(0,y.jsx)(u.Button,{variant:"secondary",onClick:()=>{(0,ce.yM)("wcpay_dispute_readiness_statement_descriptor_confirmed",{surface:"overview",score:m.score,total:m.total}),n(),i(null)},__next40pxDefaultSize:!0,children:c.reviewPrompt.confirmLabel}),(0,y.jsx)(u.Button,{variant:"primary",href:c.actionUrl,__next40pxDefaultSize:!0,children:c.reviewPrompt.updateLabel})]})]})]})};var vt=s(6626),jt=s(9481),kt=s(2872),St=s(5837),Ct=s(7145),Dt=s(9808),Nt=s(252);const Lt=()=>{const e="1"===(0,i.getQuery)()["wcpay-login-error"];return wcpaySettings.errorMessage||e?(0,y.jsx)(St.A,{className:e?"wcpay-login-error":"",status:"error",icon:!0,isDismissible:!1,children:wcpaySettings.errorMessage||(0,l.__)("There was a problem redirecting you to the account dashboard. Please try again.","woocommerce-payments")}):null},Ft=()=>{const{accountStatus:e,accountLoans:{has_active_loan:t},overviewTasksVisibility:s,wpcomReconnectUrl:n,accountDetails:a}=wcpaySettings,[o,p]=(0,r.useState)(!1),[_,h]=(0,r.useState)(""),[w,g]=(0,r.useState)(""),[x,b]=c().useState(""),[f,v]=(0,r.useState)(!0),[j,k]=(0,r.useState)(0),S=(0,P.wx)(),{isLoading:C}=(0,jt.t0)(),[D,N]=(0,r.useState)(!1),L=(0,jt.Zw)(),{disputes:F}=(0,vt.$x)({filter:"awaiting_response",per_page:50}),A=(0,nt.x)({showUpdateDetailsTask:o,wpcomReconnectUrl:n,activeDisputes:F}),E=Array.isArray(A)&&A.sort(nt.M),T=(0,i.getQuery)(),I=e.status&&e.status.startsWith("rejected"),B="under_review"===e.status,M=e.paymentsEnabled,U="enabled"===e.deposits?.status,O="1"===T["wcpay-connection-success"],$="true"===T["wcpay-sandbox-success"]&&(e.status&&"complete"===e.status||"enabled"===e.status),W="1"===T["wcpay-loan-offer-error"],z="1"===T["wcpay-server-link-error"],Y="1"===T["wcpay-reset-account-error"],q=!I&&!B&&E.length>0,G=wcpaySettings.featureFlags?.isDisputeReadinessOverviewEnabled&&!I&&!B,H=O&&!S&&M&&U,Q=Object.entries(wcpaySettings.accountFees).map(([e,t])=>{const s=!C&&L.enabled_payment_method_ids.filter(t=>t===e).length>0;return C||!s||0===t.discount.length?null:{payment_method:e,fee:t}}).filter(e=>e&&void 0!==e.fee);return!D&&$&&((0,d.dispatch)("core/notices").createSuccessNotice((0,l.__)("Success! You can start using WooPayments in test mode.","woocommerce-payments")),N(!0)),(0,r.useEffect)(()=>{_&&(p(!0),v(!1))},[_]),(0,y.jsxs)(Te.A,{isNarrow:!0,className:"wcpay-overview",children:[(0,y.jsx)(Lt,{}),(0,y.jsx)(Ee,{}),W&&(0,y.jsx)(u.Notice,{status:"error",isDismissible:!1,children:(0,l.__)("There was a problem redirecting you to the loan offer. Please check that it is not expired and try again.","woocommerce-payments")}),z&&(0,y.jsx)(u.Notice,{status:"error",isDismissible:!1,children:(0,l.__)("There was a problem redirecting you to the requested link. Please check that it is valid and try again.","woocommerce-payments")}),Y&&(0,y.jsx)(u.Notice,{status:"error",isDismissible:!1,children:(0,l.__)("There was a problem resetting your account. Please wait a few seconds and try again.","woocommerce-payments")}),S?(0,y.jsx)(kt.A,{from:"WCPAY_OVERVIEW",source:"wcpay-overview-page"}):(0,y.jsx)(Ge.Y,{currentPage:"overview",isTestModeOnboarding:S,actions:[]}),_&&"invalid_request_error"===w&&(0,y.jsx)(St.A,{status:"warning",icon:!0,isDismissible:!1,children:(0,m.A)({mixedString:(0,l.sprintf)((0,l.__)("Some account related notifications require HTTPS and cannot be displayed. View them on our financial partner’s website. {{seeDetailsLink}}See details{{/seeDetailsLink}}","woocommerce-payments")),components:{seeDetailsLink:(0,y.jsx)(u.ExternalLink,{href:"https://woocommerce.com/document/woopayments/startup-guide/#requirements"})}})}),!I&&!B&&(0,y.jsxs)(Ae.A,{children:[(0,y.jsx)(qe,{}),f&&"complete"!==e.status&&(0,y.jsx)(u.Card,{children:(0,y.jsx)("div",{className:"stripe-notifications-banner-loader",children:(0,y.jsx)(Ct.A,{})})}),(0,y.jsx)("div",{className:"stripe-notifications-banner-wrapper",style:{display:x?"block":"none"},children:(0,y.jsx)(Ae.A,{children:(0,y.jsx)(Dt.k,{onLoadError:e=>{h(e.error.message||"Unknown error"),g(e.error.type),v(!1)},onNotificationsChange:e=>{e.actionRequired>0?b("You must resolve the notifications on this page before proceeding."):e.total>0?b("The items below are in review."):(j>0&&((0,d.dispatch)("core/notices").createSuccessNotice((0,l.__)("Updates take a moment to appear. Please refresh the page in a minute.","woocommerce-payments"),{actions:[{label:(0,l.__)("Refresh","woocommerce-payments"),url:(0,P.hT)({page:"wc-admin",path:"/payments/overview"})}],explicitDismiss:!0}),(0,ce.yM)("wcpay_overview_stripe_notifications_banner_action_completed")),b("")),(e.actionRequired>0||e.total>0)&&((0,ce.yM)("wcpay_overview_stripe_notifications_banner_update",{action_required_count:e.actionRequired,total_count:e.total}),k(e.total)),v(!1)}})})}),q&&(0,y.jsx)(u.Card,{children:(0,y.jsx)(Ae.A,{children:(0,y.jsx)(st,{tasks:E,overviewTasksVisibility:s})})}),(0,y.jsx)(u.Card,{children:(0,y.jsx)(Ae.A,{children:(0,y.jsx)(R,{})})}),(0,y.jsx)(Fe,{})]}),(0,y.jsx)(Ae.A,{children:(0,y.jsx)(ue,{accountDetails:a,accountFees:Q,accountLink:e.accountLink})}),G&&(0,y.jsx)(Ae.A,{children:(0,y.jsx)(ft,{})}),t&&(0,y.jsx)(Ae.A,{children:(0,y.jsx)(pe.A,{})}),!I&&!B&&(0,y.jsx)(Ae.A,{children:(0,y.jsx)(et,{})}),H&&(0,y.jsx)(Ae.A,{children:(0,y.jsx)(ye,{})}),(0,y.jsx)(Ae.A,{children:(0,y.jsx)(Nt.A,{})})]})}},6858(e,t,s){s.d(t,{m:()=>n});const n=e=>JSON.stringify(e,Object.keys(e).sort())}}]);

Youez - 2016 - github.com/yon3zu
LinuXploit