/*! For license information please see multi-currency-switcher-block.js.LICENSE.txt */
(()=>{var e={1020(e,t,r){"use strict";var o=r(1609),a=Symbol.for("react.element"),n=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},d=null,u=null;for(o in void 0!==r&&(d=""+r),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(u=t.ref),t)n.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:a,type:e,key:d,ref:u,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},4848(e,t,r){"use strict";e.exports=r(1020)},1609(e){"use strict";e.exports=window.React}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var a=o.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=o[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:()=>X,getAllDepositsOverviewsError:()=>ee,getDeposit:()=>J,getDepositQueryError:()=>ae,getDeposits:()=>re,getDepositsCount:()=>oe,getDepositsSummary:()=>se,getDepositsSummaryError:()=>ie,getInstantDeposit:()=>ce});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Fe,updateAllDepositsOverviews:()=>Ie,updateDeposit:()=>ve,updateDeposits:()=>Ae,updateDepositsCount:()=>Ne,updateDepositsSummary:()=>De,updateErrorForAllDepositsOverviews:()=>be,updateErrorForDepositQuery:()=>Ce,updateErrorForDepositsSummary:()=>Pe,updateInstantDeposit:()=>Me});var o={};r.r(o),r.d(o,{getAllDepositsOverviews:()=>Le,getDeposit:()=>Ue,getDeposits:()=>ze,getDepositsSummary:()=>qe,getPayoutsCSVRequestURL:()=>Ye,payoutsDownloadEndpoint:()=>xe});var a={};r.r(a),r.d(a,{getFraudOutcomeTransactions:()=>Je,getFraudOutcomeTransactionsError:()=>Xe,getFraudOutcomeTransactionsSummary:()=>tt,getFraudOutcomeTransactionsSummaryError:()=>rt,getTransactions:()=>Ge,getTransactionsError:()=>je,getTransactionsSummary:()=>We,getTransactionsSummaryError:()=>Ze});var n={};r.r(n),r.d(n,{updateErrorForFraudOutcomeTransactions:()=>ct,updateErrorForFraudOutcomeTransactionsSummary:()=>ut,updateErrorForTransactions:()=>at,updateErrorForTransactionsSummary:()=>st,updateFraudOutcomeTransactions:()=>it,updateFraudOutcomeTransactionsSummary:()=>dt,updateTransactions:()=>ot,updateTransactionsSummary:()=>nt});var s={};r.r(s),r.d(s,{formatQueryFilters:()=>_t,getFraudOutcomeTransactions:()=>ht,getFraudOutcomeTransactionsExport:()=>Et,getFraudOutcomeTransactionsSummary:()=>St,getTransactions:()=>pt,getTransactionsCSVRequestURL:()=>lt,getTransactionsSummary:()=>yt,transactionsDownloadEndpoint:()=>mt});var i={};r.r(i),r.d(i,{getCharge:()=>gt,getChargeError:()=>Rt,getChargeFromOrder:()=>wt,getChargeFromOrderError:()=>ft});var c={};r.r(c),r.d(c,{updateCharge:()=>Ot,updateErrorForCharge:()=>vt});var d={};r.r(d),r.d(d,{getCharge:()=>It,getChargeFromOrder:()=>bt});var u={};r.r(u),r.d(u,{getTimeline:()=>Nt,getTimelineError:()=>Ct});var _={};r.r(_),r.d(_,{updateErrorForTimeline:()=>Pt,updateTimeline:()=>Dt});var p={};r.r(p),r.d(p,{getTimeline:()=>Mt});var m={};r.r(m),r.d(m,{getCachedDispute:()=>Yt,getDispute:()=>kt,getDisputeError:()=>xt,getDisputes:()=>zt,getDisputesSummary:()=>qt});var l={};r.r(l),r.d(l,{refundCharge:()=>Gt,updateErrorForPaymentIntent:()=>Vt,updatePaymentIntent:()=>Ht});var y={};r.r(y),r.d(y,{getPaymentIntent:()=>jt});var h={};r.r(h),r.d(h,{acceptDispute:()=>Jt,updateDispute:()=>Qt,updateDisputes:()=>Zt,updateDisputesSummary:()=>Kt,updateErrorForDispute:()=>Wt});var S={};r.r(S),r.d(S,{disputesDownloadEndpoint:()=>ar,getDispute:()=>sr,getDisputes:()=>ir,getDisputesCSVRequestURL:()=>nr,getDisputesSummary:()=>cr});var E={};r.r(E),r.d(E,{getAccountBusinessSupportEmail:()=>vr,getAccountBusinessSupportPhone:()=>Ir,getAccountCommunicationsEmail:()=>_o,getAccountDomesticCurrency:()=>br,getAccountStatementDescriptor:()=>wr,getAccountStatementDescriptorKana:()=>Or,getAccountStatementDescriptorKanji:()=>fr,getAdvancedFraudProtectionSettings:()=>ao,getAvailablePaymentMethodIds:()=>Er,getCompletedWaitingPeriod:()=>Pr,getCurrentProtectionLevel:()=>oo,getDepositDelayDays:()=>Dr,getDepositRestrictions:()=>Fr,getDepositScheduleInterval:()=>Ar,getDepositScheduleMonthlyAnchor:()=>Cr,getDepositScheduleWeeklyAnchor:()=>Nr,getDepositStatus:()=>Mr,getDuplicatedPaymentMethodIds:()=>yr,getEnabledPaymentMethodIds:()=>Sr,getExpressCheckoutCartMethods:()=>mo,getExpressCheckoutCheckoutMethods:()=>lo,getExpressCheckoutProductMethods:()=>po,getIsCardPresentEligible:()=>Wr,getIsDebugLogEnabled:()=>qr,getIsDevModeEnabled:()=>xr,getIsExpressCheckoutInPaymentMethodsEnabled:()=>zr,getIsManualCaptureEnabled:()=>Ur,getIsMultiCurrencyEnabled:()=>Br,getIsPaymentRequestEnabled:()=>Yr,getIsSavedCardsEnabled:()=>jr,getIsStripeBillingEnabled:()=>so,getIsStripeBillingMigrationInProgress:()=>io,getIsSubscriptionsPluginActive:()=>Jr,getIsTestModeEnabled:()=>Lr,getIsTestModeOnboarding:()=>kr,getIsWCPayEnabled:()=>hr,getIsWCPaySubscriptionsEligible:()=>Kr,getIsWCPaySubscriptionsEnabled:()=>Zr,getIsWooPayEnabled:()=>Xr,getIsWooPayGlobalThemeSupportEnabled:()=>eo,getPaymentMethodStatuses:()=>Tr,getPaymentRequestButtonBorderRadius:()=>Gr,getPaymentRequestButtonSize:()=>Hr,getPaymentRequestButtonTheme:()=>Vr,getPaymentRequestButtonType:()=>$r,getSavingError:()=>Qr,getSettings:()=>lr,getShowWooPayIncompatibilityNotice:()=>no,getStripeBillingMigratedCount:()=>uo,getStripeBillingSubscriptionCount:()=>co,getWooPayCustomMessage:()=>to,getWooPayStoreLogo:()=>ro,isDirty:()=>Rr,isSavingSettings:()=>gr});var T={};r.r(T),r.d(T,{saveOption:()=>aa,saveSettings:()=>Vo,submitStripeBillingSubscriptionMigration:()=>oa,updateAccountBusinessSupportEmail:()=>zo,updateAccountBusinessSupportPhone:()=>qo,updateAccountCommunicationsEmail:()=>Xo,updateAccountStatementDescriptor:()=>ko,updateAccountStatementDescriptorKana:()=>Yo,updateAccountStatementDescriptorKanji:()=>xo,updateAdvancedFraudProtectionSettings:()=>Ko,updateDepositScheduleInterval:()=>Bo,updateDepositScheduleMonthlyAnchor:()=>Ho,updateDepositScheduleWeeklyAnchor:()=>$o,updateEnabledPaymentMethodIds:()=>Ao,updateExpressCheckoutCartMethods:()=>ta,updateExpressCheckoutCheckoutMethods:()=>ra,updateExpressCheckoutProductMethods:()=>ea,updateIsCardPresentEligible:()=>To,updateIsDebugLogEnabled:()=>Fo,updateIsExpressCheckoutInPaymentMethodsEnabled:()=>bo,updateIsManualCaptureEnabled:()=>Po,updateIsMultiCurrencyEnabled:()=>Uo,updateIsPaymentRequestEnabled:()=>Io,updateIsSavedCardsEnabled:()=>Eo,updateIsSavingSettings:()=>No,updateIsStripeBillingEnabled:()=>Jo,updateIsTestModeEnabled:()=>Mo,updateIsWCPayEnabled:()=>vo,updateIsWCPaySubscriptionsEnabled:()=>Lo,updateIsWooPayEnabled:()=>Go,updateIsWooPayGlobalThemeSupportEnabled:()=>jo,updatePaymentRequestButtonBorderRadius:()=>fo,updatePaymentRequestButtonSize:()=>Ro,updatePaymentRequestButtonTheme:()=>wo,updatePaymentRequestButtonType:()=>go,updateProtectionLevel:()=>Zo,updateSelectedPaymentMethod:()=>Co,updateSettings:()=>Oo,updateUnselectedPaymentMethod:()=>Do,updateWooPayCustomMessage:()=>Qo,updateWooPayStoreLogo:()=>Wo});var g={};r.r(g),r.d(g,{getSettings:()=>na});var R={};r.r(R),r.d(R,{getCardReaderStats:()=>ca,getCardReaderStatsError:()=>da,getCardReaders:()=>ua});var w={};r.r(w),r.d(w,{updateCardReaderStats:()=>_a,updateCardReaders:()=>pa,updateErrorForCardReaderStats:()=>ma,updateErrorForCardReaders:()=>la});var f={};r.r(f),r.d(f,{getCardReaderStats:()=>ya,getCardReaders:()=>ha});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>wa,getActiveLoanSummaryError:()=>fa,getLoans:()=>Oa,getLoansError:()=>va});var v={};r.r(v),r.d(v,{updateActiveLoanSummary:()=>Ia,updateErrorForActiveLoanSummary:()=>ba,updateErrorForLoans:()=>Na,updateLoans:()=>Aa});var I={};r.r(I),r.d(I,{getActiveLoanSummary:()=>Ca,getLoans:()=>Da});var b={};r.r(b),r.d(b,{getDocuments:()=>La,getDocumentsError:()=>ka,getDocumentsSummary:()=>Ya,getDocumentsSummaryError:()=>za});var A={};r.r(A),r.d(A,{updateDocuments:()=>qa,updateDocumentsSummary:()=>$a,updateErrorForDocuments:()=>Ba,updateErrorForDocumentsSummary:()=>Ha});var N={};r.r(N),r.d(N,{formatQueryFilters:()=>Va,getDocuments:()=>Ga,getDocumentsSummary:()=>ja});var C={};r.r(C),r.d(C,{getPaymentIntent:()=>Wa,getPaymentIntentError:()=>Za});var D={};r.r(D),r.d(D,{getAuthorization:()=>rn,getAuthorizations:()=>tn,getAuthorizationsError:()=>on,getAuthorizationsSummary:()=>nn,getAuthorizationsSummaryError:()=>sn,getIsRequesting:()=>cn});var P={};r.r(P),r.d(P,{setIsRequestingAuthorization:()=>ln,submitCancelAuthorization:()=>hn,submitCaptureAuthorization:()=>yn,updateAuthorization:()=>pn,updateAuthorizations:()=>un,updateAuthorizationsSummary:()=>mn,updateErrorForAuthorizations:()=>_n,updateErrorForAuthorizationsSummary:()=>Sn});var M={};r.r(M),r.d(M,{getAuthorization:()=>Tn,getAuthorizations:()=>En,getAuthorizationsSummary:()=>gn});var F={};r.r(F),r.d(F,{getFile:()=>On,getFileError:()=>vn});var U={};r.r(U),r.d(U,{updateErrorForFiles:()=>bn,updateFiles:()=>In});var L={};r.r(L),r.d(L,{getFile:()=>An});var k={};r.r(k),r.d(k,{getPmPromotions:()=>Dn,getPmPromotionsError:()=>Pn});var x={};r.r(x),r.d(x,{activatePmPromotion:()=>Ln,dismissPmPromotion:()=>kn,updateErrorForPmPromotions:()=>Un,updatePmPromotions:()=>Fn});var Y={};r.r(Y),r.d(Y,{getPmPromotions:()=>Yn});var z={};r.r(z),r.d(z,{getAvailableCurrencies:()=>Gn,getCurrencies:()=>Vn,getCurrencySettings:()=>Wn,getDefaultCurrency:()=>Qn,getEnabledCurrencies:()=>jn,getStoreSettings:()=>Zn,isSavingStoreSettings:()=>Jn,isStoreSettingsDirty:()=>Kn});var q={};r.r(q),r.d(q,{saveOption:()=>us,saveStoreSettings:()=>ds,submitCurrencySettings:()=>cs,submitEnabledCurrenciesUpdate:()=>is,updateAvailableCurrencies:()=>es,updateCurrencies:()=>Xn,updateCurrencySettings:()=>os,updateDefaultCurrency:()=>rs,updateEnabledCurrencies:()=>ts,updateIsSavingStoreSettings:()=>ss,updateStoreSettingValues:()=>ns,updateStoreSettings:()=>as});var B={};r.r(B),r.d(B,{getCurrencies:()=>_s,getCurrencySettings:()=>ps,getStoreSettings:()=>ms});const $=window.wp.data,H=window.wp.dataControls,V="/wc/v3/payments",G="wc/payments",j=window.lodash,Q={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS:"SET_DEPOSITS",SET_DEPOSITS_COUNT:"SET_DEPOSITS_COUNT",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY",SET_DEPOSITS_SUMMARY:"SET_DEPOSITS_SUMMARY",SET_ERROR_FOR_DEPOSITS_SUMMARY:"SET_ERROR_FOR_DEPOSITS_SUMMARY",SET_INSTANT_DEPOSIT:"SET_INSTANT_DEPOSIT",SET_ALL_DEPOSITS_OVERVIEWS:"SET_ALL_DEPOSITS_OVERVIEWS",SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:"SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS"},W=e=>JSON.stringify(e,Object.keys(e).sort()),Z={byId:{},queries:{},count:0,instant:{}},K=e=>e&&e.deposits||{},J=(e,t)=>(K(e).byId||{})[t],X=e=>{const t=K(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:o,account:a}=t.data,n={lastPaid:r.last_paid,pending:o.pending,available:o.available,instant:o.instant},s={};for(const[e,t]of Object.entries(n))t?.forEach(t=>{const{currency:r}=t;s[r]||(s[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),s[r][e]=t});const i=Object.values(s);return{account:a,currencies:[...i.filter(e=>a.default_currency===e.currency),...i.filter(e=>a.default_currency!==e.currency)]}},ee=e=>(K(e).overviews||{}).error,te=(e,t)=>{const r=W(t);return(K(e).queries||{})[r]||{}},re=(e,t)=>(te(e,t).data||[]).map(J.bind(void 0,e)),oe=e=>K(e).count,ae=(e,t)=>te(e,t).error||{},ne=(e,t)=>{const r=W(t);return(K(e).summary||{})[r]||{}},se=(e,t)=>ne(e,t).data||{},ie=(e,t)=>ne(e,t).error||{},ce=e=>(K(e).instant||{}).data,de=window.wp.i18n,ue=window.wp.domReady;var _e=r.n(ue);const pe=(e,t={})=>{if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:wcpaySettings.trackingInfo?.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}_e()(()=>{(wc?.tracks?.recordEvent??wcTracks.recordEvent)(e,t)})};var me=r(1609);(0,me.createContext)(window.wcpaySettings),(0,me.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""});const le=window.wc.currency;var ye=r.n(le);(0,de.__)("Australian dollar","woocommerce-payments"),(0,de.__)("Canadian dollar","woocommerce-payments"),(0,de.__)("Swiss franc","woocommerce-payments"),(0,de.__)("Danish krone","woocommerce-payments"),(0,de.__)("Euro","woocommerce-payments"),(0,de.__)("Pound sterling","woocommerce-payments"),(0,de.__)("Norwegian krone","woocommerce-payments"),(0,de.__)("New Zealand dollar","woocommerce-payments"),(0,de.__)("Swedish krona","woocommerce-payments"),(0,de.__)("United States (US) dollar","woocommerce-payments");const he=(e,t="USD",r=null,o=!1)=>{const a=(e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()))(t);a||(e/=100);const n=e<0,s=n?-1*e:e,i=n?"-":"",c=o?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:o="US"}}=wcpaySettings;if(r[o]?.code===t)return ye()(r[o]);const a=(0,j.find)(r,{code:t});if(a){const{defaultLocale:e={}}=a;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(a.decimalSeparator=e.decimalSeparator,a.thousandSeparator=e.thousandSeparator,a.symbolPosition=e.symbolPosition),ye()(a)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:o="US"}}=wcpaySettings,a=(0,j.find)(r,{code:e.toUpperCase()});if(a){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[o]){const e=t?(0,j.find)(r,{code:t.toUpperCase()}):r[o];e&&(a.decimalSeparator=e.decimalSeparator,a.thousandSeparator=e.thousandSeparator,a.symbolPosition=e.symbolPosition)}return ye()(a)}return null})(t,r);if(null===c)return i+Se(s,t,a);try{return i+("function"==typeof c.formatAmount?Ee(c.formatAmount(s)):Ee(c.formatCurrency(s)))}catch(e){return i+Ee(Se(s,t,a))}};function Se(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(o){return(0,de.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function Ee(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const Te=window.wp.url,ge=window.moment;var Re=r.n(ge);const we=window.wp.date;window.wc.number;const fe=e=>(0,Te.addQueryArgs)("admin.php",e),Oe=(e,t=!1)=>{const r=t?Re()(e).endOf("day").utc().toISOString():Re()(e).startOf("day").utc().toISOString();return e&&(0,we.dateI18n)("Y-m-d H:i:s",r,!0)};function ve(e){return{type:Q.SET_DEPOSIT,data:e}}function Ie(e){return{type:Q.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function be(e,t){return{type:Q.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Ae(e,t){return{type:Q.SET_DEPOSITS,query:e,data:t}}function Ne(e){return{type:Q.SET_DEPOSITS_COUNT,data:e}}function Ce(e,t,r){return{type:Q.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function De(e,t){return{type:Q.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Pe(e,t,r){return{type:Q.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function Me(e){return{type:Q.SET_INSTANT_DEPOSIT,data:e}}function*Fe(e){try{yield(0,$.dispatch)(G).startResolution("getInstantDeposit",[e]);const t=yield(0,H.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield Me(t),yield(0,$.dispatch)(G).invalidateResolutionForStoreSelector("getDeposits"),yield(0,$.dispatch)(G).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,$.dispatch)("core/notices").createSuccessNotice((0,de.sprintf)((0,de.__)("Instant payout for %s in transit.","woocommerce-payments"),he(t.amount)),{actions:[{label:(0,de.__)("View details","woocommerce-payments"),url:fe({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,$.dispatch)(G).finishResolution("getInstantDeposit",[e])}}function*Ue(e){if(/\W/.test(e))return;const t=(0,Te.addQueryArgs)(`${V}/deposits/${e}`);try{const e=yield(0,H.apiFetch)({path:t});yield ve(e)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving payout.","woocommerce-payments"))}}function*Le(){const e=(0,Te.addQueryArgs)(`${V}/deposits/overview-all`);try{const t=yield(0,H.apiFetch)({path:e});yield Ie(t)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield be()}}const ke=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale}),xe=`${V}/deposits/download`;function Ye(e){return(0,Te.addQueryArgs)(xe,ke(e))}function*ze(e){const t=(0,Te.addQueryArgs)(`${V}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ke(e)});try{const r=yield(0,H.apiFetch)({path:t})||{};yield Ae(e,r.data),yield Ne(r.total_count);for(const e in r.data)yield $.controls.dispatch(G,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving payouts.","woocommerce-payments")),yield Ce(e,null,t)}}function*qe(e){const t=(0,Te.addQueryArgs)(`${V}/deposits/summary`,ke(e));try{const r=yield(0,H.apiFetch)({path:t});yield De(e,r)}catch(t){yield Pe(e,null,t)}}const Be={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY",SET_FRAUD_OUTCOME_TRANSACTIONS:"SET_FRAUD_OUTCOME_TRANSACTIONS",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS",SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY"},$e={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},He=e=>e&&e.transactions||{},Ve=(e,t)=>{const r=W(t);return He(e)[r]||{}},Ge=(e,t)=>Ve(e,t).data||[],je=(e,t)=>Ve(e,t).error||{},Qe=(e,t)=>{const r=W(t);return He(e).summary[r]||{}},We=(e,t)=>Qe(e,t).data||{},Ze=(e,t)=>Qe(e,t).error||{},Ke=(e,t,r)=>{const o=W(r);return He(e).fraudProtection?.[t]?.[o]||{}},Je=(e,t,r)=>Ke(e,t,r).data||[],Xe=(e,t,r)=>Ke(e,t,r).error||{},et=(e,t,r)=>{const o=W(r);return He(e).fraudProtection?.[t]?.summary[o]||{}},tt=(e,t,r)=>et(e,t,r).data||{},rt=(e,t,r)=>et(e,t,r).error||{};function ot(e,t){return{type:Be.SET_TRANSACTIONS,query:e,data:t}}function at(e,t,r){return{type:Be.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function nt(e,t){return{type:Be.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function st(e,t,r){return{type:Be.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function it(e,t,r){return{type:Be.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function ct(e,t,r){return{type:Be.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function dt(e,t,r){return{type:Be.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function ut(e,t,r){return{type:Be.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const _t=e=>({user_email:e.userEmail,match:e.match,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,type_is_in:e.typeIsIn,source_device_is:e.sourceDeviceIs,source_device_is_not:e.sourceDeviceIsNot,channel_is:e.channelIs,channel_is_not:e.channelIsNot,customer_country_is:e.customerCountryIs,customer_country_is_not:e.customerCountryIsNot,risk_level_is:e.riskLevelIs,risk_level_is_not:e.riskLevelIsNot,store_currency_is:e.storeCurrencyIs,loan_id_is:e.loanIdIs,deposit_id:e.depositId,customer_currency_is:e.customerCurrencyIs,customer_currency_is_not:e.customerCurrencyIsNot,source_is:e.sourceIs,source_is_not:e.sourceIsNot,search:e.search,user_timezone:Re()(new Date).format("Z"),locale:e.locale});function*pt(e){const t=(0,Te.addQueryArgs)(`${V}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,..._t(e)});try{const r=yield(0,H.apiFetch)({path:t});yield ot(e,r.data||[])}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transactions.","woocommerce-payments")),yield at(e,null,t)}}const mt=`${V}/transactions/download`;function lt(e){return(0,Te.addQueryArgs)(mt,_t(e))}function*yt(e){const t=(0,Te.addQueryArgs)(`${V}/transactions/summary`,_t(e));try{const r=yield(0,H.apiFetch)({path:t});yield nt(e,r)}catch(t){yield st(e,null,t)}}function*ht(e,t){const r=(0,Te.addQueryArgs)(`${V}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,..._t(t)});try{const o=yield(0,H.apiFetch)({path:r});yield it(e,t,o.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield it(e,t,[]));yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transactions.","woocommerce-payments")),yield ct(e,t,r)}}function*St(e,t){const r=(0,Te.addQueryArgs)(`${V}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),o={count:0,total:0};try{const a=yield(0,H.apiFetch)({path:r});yield dt(e,t,a||o)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield dt(e,t,o));yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving on review transactions.","woocommerce-payments")),yield ut(e,t,r)}}function Et(e,t){return(0,Te.addQueryArgs)(`${V}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,..._t(t)})}const Tt={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},gt=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},Rt=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},wt=(e,t)=>gt(e,t),ft=(e,t)=>Rt(e,t);function Ot(e,t){return{type:Tt.SET_CHARGE,id:e,data:t}}function vt(e,t,r){return{type:Tt.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*It(e){try{const t=yield(0,H.apiFetch)({path:`${V}/charges/${e}`});yield Ot(e,t)}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield vt(e,null,t)}}function*bt(e){try{const t=yield(0,H.apiFetch)({path:`${V}/charges/order/${e}`});yield Ot(e,t)}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield vt(e,null,t)}}const At={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Nt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Ct=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Dt(e,t){return{id:e,type:At.SET_TIMELINE,data:t}}function Pt(e,t){return{id:e,type:At.SET_ERROR_FOR_TIMELINE,error:t}}function*Mt(e){try{const t=yield(0,H.apiFetch)({path:`${V}/timeline/${e}`});yield Dt(e,t.data)}catch(t){yield Pt(e,t)}}const Ft={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},Ut={byId:{},queries:{},summary:{},cached:{}},Lt=e=>e&&e.disputes||{},kt=(e,t)=>(Lt(e).byId||{})[t],xt=(e,t)=>{const r=Lt(e).byId||{};return r[t]?.error},Yt=(e,t)=>(Lt(e).cached||{})[t],zt=(e,t)=>{const r=((e,t)=>{const r=W(t);return(Lt(e).queries||{})[r]||{}})(e,t).data||[];return r.map(Yt.bind(void 0,e))},qt=(e,t)=>((e,t)=>{const r=W(t);return(Lt(e).summary||{})[r]||{}})(e,t).data||{};var Bt=function(e){return e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT",e}(Bt||{});const $t=Bt;function Ht(e,t){return{type:$t.SET_PAYMENT_INTENT,id:e,data:t}}function Vt(e,t){return{type:$t.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*Gt(e,t){const r=e.payment_intent;try{yield(0,H.apiFetch)({path:"/wc/v3/payments/refund/",method:"post",data:{charge_id:e.id,amount:e.amount,reason:t,order_id:e?.order?.id}}),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getTimeline"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield $.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Refunded payment #%s.","woocommerce-payments"),r))}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.sprintf)((0,de.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),r))}}function*jt(e){try{const t=yield(0,H.apiFetch)({path:`${V}/payment_intents/${e}`});yield Ht(e,t)}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving transaction.","woocommerce-payments")),yield Vt(e,t)}}function Qt(e){return{type:Ft.SET_DISPUTE,data:e}}function Wt(e,t,r){return{type:Ft.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Zt(e,t){return{type:Ft.SET_DISPUTES,query:e,data:t}}function Kt(e,t){return{type:Ft.SET_DISPUTES_SUMMARY,query:e,data:t}}function*Jt(e){const{id:t,payment_intent:r}=e;try{yield $.controls.dispatch(G,"startResolution","getDispute",[t]);const e=yield(0,H.apiFetch)({path:`${V}/disputes/${t}/close`,method:"post"});yield Qt(e),yield jt(r),yield $.controls.dispatch(G,"finishResolution","getDispute",[t]);const o=e.order?(0,de.sprintf)((0,de.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,de.__)("You have accepted the dispute.","woocommerce-payments");yield $.controls.dispatch("core/notices","createSuccessNotice",o)}catch(e){const r=(0,de.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield $.controls.dispatch("core/notices","createErrorNotice",r),yield $.controls.dispatch(G,"finishResolution","getDispute",[t])}}(0,de.__)("Bank cannot process","woocommerce-payments"),(0,de.__)("Check returned","woocommerce-payments"),(0,de.__)("Credit not processed","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments"),(0,de.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments"),(0,de.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If youâre able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,de.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments"),(0,de.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,de.__)("Customer initiated","woocommerce-payments"),(0,de.__)("Debit not authorized","woocommerce-payments"),(0,de.__)("Duplicate","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,de.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,de.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,de.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts donât include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If youâve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),(0,de.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If youâre able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,de.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,de.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,de.__)("Transaction unauthorized","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting unauthorized transactions with you, the business.","woocommerce-payments"),(0,de.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didnât authorize the payment. This can happen if the card was lost or stolen and used to make an unauthorized transaction. It can also happen if the cardholder doesnât recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments"),(0,de.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments"),(0,de.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or donât recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),(0,de.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,de.__)("It may be more efficientâand provide a better customer experienceâto accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesnât matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,de.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,de.__)("General","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments"),(0,de.__)("Incorrect account details","woocommerce-payments"),(0,de.__)("Insufficient funds","woocommerce-payments"),(0,de.__)("Product not received","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,de.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments"),(0,de.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),(0,de.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,de.__)("The cardholder claims they did not receive the product.","woocommerce-payments"),(0,de.__)("Product unacceptable","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,de.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,de.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholderâs claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholderâs claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),(0,de.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),(0,de.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),(0,de.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),(0,de.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments"),(0,de.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,de.__)("Subscription canceled","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If you can not prove the customerâs subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,de.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,de.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),(0,de.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,de.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,de.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,de.__)("Unrecognized","woocommerce-payments"),(0,de.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,de.__)("If you can not prove the customerâs subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,de.__)("The customer doesnât recognize the payment appearing on their card statement.","woocommerce-payments"),(0,de.__)("Get your customer to withdraw the dispute by helping them identify the payment. Otherwise, challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments"),(0,de.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or donât recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,de.__)("It may be more efficientâand provide a better customer experienceâto accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesnât matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,de.__)("Non-compliant","woocommerce-payments"),(0,de.__)("Your customerâs bank claims this payment violates Visaâs rules.","woocommerce-payments"),(0,de.__)("This transaction is being reviewed under Visaâs network compliance rules.","woocommerce-payments");const Xt={warning_needs_response:(0,de.__)("Inquiry: Response needed","woocommerce-payments"),warning_under_review:(0,de.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,de.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,de.__)("Response needed","woocommerce-payments"),under_review:(0,de.__)("Under review","woocommerce-payments"),charge_refunded:(0,de.__)("Charge refunded","woocommerce-payments"),won:(0,de.__)("Won","woocommerce-payments"),lost:(0,de.__)("Lost","woocommerce-payments")},er=(Object.entries(Xt).map(([e,t])=>({label:t,value:e})).filter(function(e){return null!=e}),["needs_response","warning_needs_response"]),tr=((0,de.__)("Dispute currency","woocommerce-payments"),(0,de.__)("All currencies","woocommerce-payments"),(0,de.__)("Show","woocommerce-payments"),(0,de.__)("Needs response","woocommerce-payments"),(0,de.__)("All disputes","woocommerce-payments"),(0,de.__)("Advanced filters","woocommerce-payments"),(()=>{const e=window.wc?.wcSettings,t=e?.getSetting?.("wcVersion");return null==t?"":String(t)})()),rr=parseFloat(tr),or=(rr<7.8?(0,de.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,de.__)("Disputes match <select /> filters","woocommerce-payments"),(0,de.__)("Disputed on date","woocommerce-payments"),(0,de.__)("Remove dispute date filter","woocommerce-payments"),(0,de.__)("Select a dispute date filter match","woocommerce-payments"),rr<7.8?(0,de.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,de.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,de.__)("Select a dispute date","woocommerce-payments"),(0,de.__)("Before","woocommerce-payments"),(0,de.__)("After","woocommerce-payments"),(0,de.__)("Between","woocommerce-payments"),(0,de.__)("Status","woocommerce-payments"),(0,de.__)("Remove dispute status filter","woocommerce-payments"),(0,de.__)("Select a dispute status filter match","woocommerce-payments"),rr<7.8?(0,de.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,de.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,de.__)("Select a dispute status","woocommerce-payments"),(0,de._x)("Is","dispute status","woocommerce-payments"),(0,de._x)("Is not","dispute status","woocommerce-payments"),e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?er:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale})),ar=`${V}/disputes/download`;function nr(e){return(0,Te.addQueryArgs)(ar,or(e))}function*sr(e){const t=(0,Te.addQueryArgs)(`${V}/disputes/${e}`);try{const e=yield(0,H.apiFetch)({path:t});yield Qt(e)}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving dispute.","woocommerce-payments")),yield Wt(e,void 0,t)}}function*ir(e){const t=(0,Te.addQueryArgs)(`${V}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,j.snakeCase)(e.orderBy),direction:e.order,...or(e)});try{const r=yield(0,H.apiFetch)({path:t})||{};yield Zt(e,r.data)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving disputes.","woocommerce-payments"))}}function*cr(e){const t=(0,Te.addQueryArgs)(`${V}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...or(e)});try{const r=yield(0,H.apiFetch)({path:t});yield Kt(e,r)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const dr={SET_SETTINGS:"SET_SETTINGS",SET_SETTINGS_VALUES:"SET_SETTINGS_VALUES",SET_IS_SAVING_SETTINGS:"SET_IS_SAVING_SETTINGS",SET_SELECTED_PAYMENT_METHOD:"SET_SELECTED_PAYMENT_METHOD",SET_UNSELECTED_PAYMENT_METHOD:"SET_UNSELECTED_PAYMENT_METHOD"},ur={isDirty:!1,isSaving:!1,savingError:null,data:{}},_r={},pr=[],mr=e=>e&&e.settings||_r,lr=e=>mr(e).data||_r,yr=e=>lr(e).duplicated_payment_method_ids||_r,hr=e=>lr(e).is_wcpay_enabled||!1,Sr=e=>lr(e).enabled_payment_method_ids||pr,Er=e=>lr(e).available_payment_method_ids||pr,Tr=e=>lr(e).payment_method_statuses||_r,gr=e=>mr(e).isSaving||!1,Rr=e=>mr(e).isDirty||!1,wr=e=>lr(e).account_statement_descriptor||"",fr=e=>lr(e).account_statement_descriptor_kanji||"",Or=e=>lr(e).account_statement_descriptor_kana||"",vr=e=>lr(e).account_business_support_email||"",Ir=e=>lr(e).account_business_support_phone||"",br=e=>lr(e).account_domestic_currency||"",Ar=e=>lr(e).deposit_schedule_interval||"",Nr=e=>lr(e).deposit_schedule_weekly_anchor||"",Cr=e=>lr(e).deposit_schedule_monthly_anchor||"",Dr=e=>lr(e).deposit_delay_days||"7",Pr=e=>lr(e).deposit_completed_waiting_period||!1,Mr=e=>lr(e).deposit_status||"",Fr=e=>lr(e).deposit_restrictions||"",Ur=e=>lr(e).is_manual_capture_enabled||!1,Lr=e=>lr(e).is_test_mode_enabled||!1,kr=e=>lr(e).is_test_mode_onboarding||!1,xr=e=>lr(e).is_dev_mode_enabled||!1,Yr=e=>lr(e).is_payment_request_enabled||!1,zr=e=>lr(e).is_express_checkout_in_payment_methods_enabled||!1,qr=e=>lr(e).is_debug_log_enabled||!1,Br=e=>lr(e).is_multi_currency_enabled||!1,$r=e=>lr(e).payment_request_button_type||"",Hr=e=>lr(e).payment_request_button_size||"",Vr=e=>lr(e).payment_request_button_theme||"",Gr=e=>{const t=lr(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},jr=e=>lr(e).is_saved_cards_enabled||!1,Qr=e=>mr(e).savingError,Wr=e=>lr(e).is_card_present_eligible||!1,Zr=e=>lr(e).is_wcpay_subscriptions_enabled||!1,Kr=e=>lr(e).is_wcpay_subscriptions_eligible||!1,Jr=e=>lr(e).is_subscriptions_plugin_active||!1,Xr=e=>lr(e).is_woopay_enabled||!1,eo=e=>lr(e).is_woopay_global_theme_support_enabled||!1,to=e=>lr(e).woopay_custom_message||"",ro=e=>lr(e).woopay_store_logo||"",oo=e=>lr(e).current_protection_level||"basic",ao=e=>lr(e).advanced_fraud_protection_settings||pr,no=e=>lr(e).show_woopay_incompatibility_notice||!1,so=e=>lr(e).is_stripe_billing_enabled||!1,io=e=>lr(e).is_migrating_stripe_billing||!1,co=e=>lr(e).stripe_billing_subscription_count||0,uo=e=>lr(e).stripe_billing_migrated_count||0,_o=e=>lr(e).account_communications_email||"",po=e=>lr(e).express_checkout_product_methods||pr,mo=e=>lr(e).express_checkout_cart_methods||pr,lo=e=>lr(e).express_checkout_checkout_methods||pr,yo=window.wp.apiFetch;var ho=r.n(yo);function So(e){return{type:dr.SET_SETTINGS_VALUES,payload:e}}function Eo(e){return So({is_saved_cards_enabled:e})}function To(e){return So({is_card_present_eligible:e})}function go(e){return So({payment_request_button_type:e})}function Ro(e){return So({payment_request_button_size:e})}function wo(e){return So({payment_request_button_theme:e})}function fo(e){return So({payment_request_button_border_radius:e})}function Oo(e){return{type:dr.SET_SETTINGS,data:e}}function vo(e){return So({is_wcpay_enabled:e})}function Io(e){return So({is_payment_request_enabled:e})}function bo(e){return So({is_express_checkout_in_payment_methods_enabled:e})}function Ao(e){return So({enabled_payment_method_ids:[...e]})}function No(e,t){return{type:dr.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function Co(e){return{type:dr.SET_SELECTED_PAYMENT_METHOD,id:e}}function Do(e){return{type:dr.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Po(e){return So({is_manual_capture_enabled:e})}function Mo(e){return So({is_test_mode_enabled:e})}function Fo(e){return So({is_debug_log_enabled:e})}function Uo(e){return So({is_multi_currency_enabled:e})}function Lo(e){return So({is_wcpay_subscriptions_enabled:e})}function ko(e){return So({account_statement_descriptor:e})}function xo(e){return So({account_statement_descriptor_kanji:e})}function Yo(e){return So({account_statement_descriptor_kana:e})}function zo(e){return So({account_business_support_email:e})}function qo(e){return So({account_business_support_phone:e})}function Bo(e){return So({deposit_schedule_interval:e})}function $o(e){return So({deposit_schedule_weekly_anchor:e})}function Ho(e){return So({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*Vo(){let e=null;try{const e=(0,$.select)(G).getSettings();yield No(!0,null);const t=yield(0,H.apiFetch)({path:`${V}/settings`,method:"post",data:e});yield So({payment_method_statuses:t.data.payment_method_statuses}),yield(0,$.dispatch)("core/notices").createSuccessNotice((0,de.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,$.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield No(!1,e)}return null===e}function Go(e){return So({is_woopay_enabled:e})}function jo(e){return So({is_woopay_global_theme_support_enabled:e})}function Qo(e){return So({woopay_custom_message:e})}function Wo(e){return So({woopay_store_logo:e})}function Zo(e){return So({current_protection_level:e})}function Ko(e){return So({advanced_fraud_protection_settings:e})}function Jo(e){return So({is_stripe_billing_enabled:e})}function Xo(e){return So({account_communications_email:e})}function ea(e){return So({express_checkout_product_methods:[...e]})}function ta(e){return So({express_checkout_cart_methods:[...e]})}function ra(e){return So({express_checkout_checkout_methods:[...e]})}function*oa(){try{yield(0,$.dispatch)(G).startResolution("scheduleStripeBillingMigration"),yield(0,H.apiFetch)({path:`${V}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,$.dispatch)(G).finishResolution("scheduleStripeBillingMigration")}function aa(e,t){return ho()({path:`${V}/settings/${e}`,method:"post",data:{value:t}}).catch(()=>{(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))})}function*na(){const e=`${V}/settings`;try{const t=yield(0,H.apiFetch)({path:e});yield Oo(t)}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving settings.","woocommerce-payments"))}}const sa=e=>()=>{const{updateExpressCheckoutProductMethods:t,updateExpressCheckoutCartMethods:r,updateExpressCheckoutCheckoutMethods:o}=(0,$.useDispatch)(G),a=(0,$.useSelect)(e=>e(G).getExpressCheckoutProductMethods()),n=(0,$.useSelect)(e=>e(G).getExpressCheckoutCartMethods()),s=(0,$.useSelect)(e=>e(G).getExpressCheckoutCheckoutMethods()),i={product:a,cart:n,checkout:s},c={product:t,cart:r,checkout:o};return[[a.includes(e)&&"product",n.includes(e)&&"cart",s.includes(e)&&"checkout"].filter(Boolean),(t,r)=>{c[t](r?[...i[t],e]:i[t].filter(t=>t!==e))}]},ia=(sa("payment_request"),sa("woopay"),sa("amazon_pay"),{SET_CARD_READER_STATS:"SET_CARD_READER_STATS",SET_ERROR_FOR_CARD_READER_STATS:"SET_ERROR_FOR_CARD_READER_STATS",SET_READERS:"SET_READERS",SET_ERROR_FOR_CARD_READERS:"SET_ERROR_FOR_CARD_READERS"}),ca=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},da=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},ua=e=>e.readers&&e.readers.list?e.readers.list:{};function _a(e,t){return{type:ia.SET_CARD_READER_STATS,id:e,data:t}}function pa(e,t){return{type:ia.SET_READERS,query:e,data:t}}function ma(e,t,r){return{type:ia.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function la(e,t){return{type:ia.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*ya(e,t){try{const r=yield(0,H.apiFetch)({path:`${V}/readers/charges/${t}`});yield _a(e,r)}catch(t){yield ma(e,null,t)}}function*ha(e){const t=(0,Te.addQueryArgs)(`${V}/readers`,{limit:e.limit});try{const r=yield(0,H.apiFetch)({path:t})||{};yield pa(e,r)}catch(e){yield la(null,e)}}var Sa=function(e){return e.SET_ACTIVE_LOAN_SUMMARY="SET_ACTIVE_LOAN_SUMMARY",e.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY="SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY",e.SET_LOANS="SET_LOANS",e.SET_ERROR_FOR_LOANS="SET_ERROR_FOR_LOANS",e}(Sa||{});const Ea=Sa,Ta={},ga=(e=Ta,t)=>{switch(t.type){case Ea.SET_ACTIVE_LOAN_SUMMARY:return{...e,summary:t.data,summaryError:void 0};case Ea.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return{...e,summary:void 0,summaryError:t.error};case Ea.SET_LOANS:return{...e,loans:t.data,loansError:void 0};case Ea.SET_ERROR_FOR_LOANS:return{...e,loans:void 0,loansError:t.error}}return e};(Object.getOwnPropertyDescriptor(ga,"name")||{}).writable||Object.defineProperty(ga,"name",{value:"default",configurable:!0});const Ra=e=>e&&e.capital||{},wa=e=>Ra(e).summary,fa=e=>Ra(e).summaryError,Oa=e=>Ra(e).loans||[],va=e=>Ra(e).loansError;function Ia(e){return{type:Ea.SET_ACTIVE_LOAN_SUMMARY,data:e}}function ba(e){return{type:Ea.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function Aa(e){return{type:Ea.SET_LOANS,data:e.data}}function Na(e){return{type:Ea.SET_ERROR_FOR_LOANS,error:e}}function*Ca(){const e=`${V}/capital/active_loan_summary`;try{const t=yield(0,H.apiFetch)({path:e});yield Ia(t)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield ba(e)}}function*Da(){const e=`${V}/capital/loans`;try{const t=yield(0,H.apiFetch)({path:e});yield Aa(t)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Na(e)}}const Pa={SET_DOCUMENTS:"SET_DOCUMENTS",SET_ERROR_FOR_DOCUMENTS:"SET_ERROR_FOR_DOCUMENTS",SET_DOCUMENTS_SUMMARY:"SET_DOCUMENTS_SUMMARY",SET_ERROR_FOR_DOCUMENTS_SUMMARY:"SET_ERROR_FOR_DOCUMENTS_SUMMARY"},Ma={summary:{}},Fa=e=>e&&e.documents||{},Ua=(e,t)=>{const r=W(t);return Fa(e)[r]||{}},La=(e,t)=>Ua(e,t).data||[],ka=(e,t)=>Ua(e,t).error||{},xa=(e,t)=>{const r=W(t);return Fa(e).summary[r]||{}},Ya=(e,t)=>xa(e,t).data||{},za=(e,t)=>xa(e,t).error||{};function qa(e,t){return{type:Pa.SET_DOCUMENTS,query:e,data:t}}function Ba(e,t,r){return{type:Pa.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function $a(e,t){return{type:Pa.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Ha(e,t,r){return{type:Pa.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const Va=e=>({user_email:e.userEmail,match:e.match,date_before:Oe(e.dateBefore,!0),date_after:Oe(e.dateAfter),date_between:e.dateBetween&&[Oe(e.dateBetween[0]),Oe(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*Ga(e){const t=(0,Te.addQueryArgs)(`${V}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Va(e)});try{const r=yield(0,H.apiFetch)({path:t});yield qa(e,r.data||[])}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving documents.","woocommerce-payments")),yield Ba(e,null,t)}}function*ja(e){const t=(0,Te.addQueryArgs)(`${V}/documents/summary`,Va(e));try{const r=yield(0,H.apiFetch)({path:t});yield $a(e,r)}catch(t){yield Ha(e,null,t)}}const Qa={},Wa=({paymentIntents:e},t)=>{const r=e?.[t];return r?.data||{}},Za=({paymentIntents:e},t)=>{const r=e?.[t];return r?.error||{}},Ka={SET_AUTHORIZATIONS:"SET_AUTHORIZATIONS",SET_AUTHORIZATION:"SET_AUTHORIZATION",SET_ERROR_FOR_AUTHORIZATIONS:"SET_ERROR_FOR_AUTHORIZATIONS",SET_AUTHORIZATIONS_SUMMARY:"SET_AUTHORIZATIONS_SUMMARY",SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:"SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY",SET_IS_REQUESTING_AUTHORIZATION:"SET_IS_REQUESTING_AUTHORIZATION"},Ja={summary:{},byId:{},isRequesting:!1},Xa=e=>e&&e.authorizations||{},en=(e,t)=>{const r=W(t);return Xa(e)[r]||{}},tn=(e,t)=>en(e,t).data||[],rn=(e,t)=>(Xa(e).byId||{})[t],on=(e,t)=>en(e,t).error||{},an=(e,t)=>{const r=W(t);return Xa(e).summary[r]||{}},nn=(e,t)=>an(e,t).data||{},sn=(e,t)=>an(e,t).error||{},cn=e=>Xa(e).isRequesting,dn=e=>{const t={wcpay_missing_order:(0,de.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,de.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,de.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,de.__)("This payment cannot be processed in its current state.","woocommerce-payments"),wcpay_capture_error:e=>"amount_too_small"===e.data?.error_type?(e=>{if(!e.data?.extra_details?.minimum_amount||!e.data?.extra_details?.minimum_amount_currency)return(0,de.__)("The payment amount is too small to be processed.","woocommerce-payments");const t=e.data.extra_details.minimum_amount_currency,r=he(e.data.extra_details.minimum_amount,t);return(0,de.sprintf)((0,de.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),r,t.toUpperCase())})(e):(0,de.__)("The payment capture failed to complete.","woocommerce-payments"),wcpay_cancel_error:(0,de.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,de.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")}[e.code??""];return"function"==typeof t?t(e):t??(0,de.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function un(e,t){return{type:Ka.SET_AUTHORIZATIONS,data:t,query:e}}function _n(e,t){return{type:Ka.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function pn(e){return{type:Ka.SET_AUTHORIZATION,data:e}}function mn(e,t){return{type:Ka.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function ln(e){return{type:Ka.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*yn(e,t){try{yield $.controls.dispatch(G,"startResolution","getAuthorization",[e]),yield $.controls.dispatch(G,"setIsRequestingAuthorization",!0);const r=yield(0,H.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield pn(o),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getAuthorizations"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getTimeline"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getTransactions"),yield $.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,de.sprintf)((0,de.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),o=dn(e);yield $.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield $.controls.dispatch(G,"finishResolution","getAuthorization",[e]),yield $.controls.dispatch(G,"setIsRequestingAuthorization",!1)}}function*hn(e,t){try{yield $.controls.dispatch(G,"startResolution","getAuthorization",[e]),yield $.controls.dispatch(G,"setIsRequestingAuthorization",!0);const r=yield(0,H.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield pn(o),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getAuthorizations"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getTimeline"),yield $.controls.dispatch(G,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield $.controls.dispatch("core/notices","createSuccessNotice",(0,de.sprintf)((0,de.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,de.sprintf)((0,de.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),o=dn(e);yield $.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield $.controls.dispatch(G,"finishResolution","getAuthorization",[e]),yield $.controls.dispatch(G,"setIsRequestingAuthorization",!1)}}function Sn(e,t){return{type:Ka.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*En(e){let{paged:t=1,per_page:r=25,orderby:o="created",order:a="asc"}=e;"capture_by"===o&&(o="created");const n=(0,Te.addQueryArgs)(`${V}/authorizations`,{page:t,pagesize:r,sort:o,direction:a});try{const t=yield(0,H.apiFetch)({path:n});yield un(e,t.data??[])}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield _n(e,t)}}function*Tn(e){try{if(e){const t=yield(0,H.apiFetch)({path:`${V}/authorizations/${e}`}),{is_captured:r,payment_intent_id:o,created:a}=t;yield pn({payment_intent_id:o,captured:r,created:a})}}catch(e){"authorization_missing"!==e.code&&(yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving authorization.","woocommerce-payments")))}}function*gn(e){const t=(0,Te.addQueryArgs)(`${V}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,H.apiFetch)({path:t});yield mn(e,r??[])}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Sn(e,t)}}var Rn=function(e){return e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES",e}(Rn||{});const wn=Rn,fn={},On=({files:e},t)=>{const r=e?.[t];return r?.data||{}},vn=({files:e},t)=>{const r=e?.[t];return r?.error||{}};function In(e,t){return{type:wn.SET_FILE,id:e,data:t}}function bn(e,t){return{type:wn.SET_ERROR_FOR_FILES,id:e,error:t}}function*An(e){try{const t=yield(0,H.apiFetch)({path:`${V}/file/${e}/details`});yield In(e,t)}catch(t){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving file.","woocommerce-payments")),yield bn(e,t)}}let Nn=function(e){return e.SET_PM_PROMOTIONS="SET_PM_PROMOTIONS",e.SET_ERROR_FOR_PM_PROMOTIONS="SET_ERROR_FOR_PM_PROMOTIONS",e}({});const Cn={pmPromotions:void 0,pmPromotionsError:void 0},Dn=e=>e.pmPromotions?.pmPromotions??[],Pn=e=>e.pmPromotions?.pmPromotionsError;function Mn(e){return function(e){return"object"==typeof e&&null!==e&&"code"in e&&"string"==typeof e.code}(e)?e:{code:"unknown_error"}}function Fn(e){return{type:Nn.SET_PM_PROMOTIONS,data:e}}function Un(e){return{type:Nn.SET_ERROR_FOR_PM_PROMOTIONS,error:e}}function*Ln(e){const t=`${V}/pm-promotions/${e}/activate`;try{yield(0,H.apiFetch)({path:t,method:"POST"}),yield $.controls.dispatch("core/notices","createSuccessNotice",(0,de.__)("Promotion activated successfully!","woocommerce-payments")),yield $.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error activating promotion. Please try again.","woocommerce-payments")),yield $.controls.dispatch("wc/payments","updateErrorForPmPromotions",Mn(e))}}function*kn(e){const t=`${V}/pm-promotions/${e}/dismiss`;try{yield(0,H.apiFetch)({path:t,method:"POST"}),yield $.controls.dispatch("core/notices","createSuccessNotice",(0,de.__)("Promotion dismissed.","woocommerce-payments")),yield $.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error dismissing promotion. Please try again.","woocommerce-payments")),yield $.controls.dispatch("wc/payments","updateErrorForPmPromotions",Mn(e))}}function xn(e){if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.id&&"string"==typeof t.promo_id&&"string"==typeof t.payment_method&&"string"==typeof t.payment_method_title&&"string"==typeof t.type&&("spotlight"===t.type||"badge"===t.type)&&"string"==typeof t.title&&"string"==typeof t.description&&"string"==typeof t.cta_label&&"string"==typeof t.tc_url&&"string"==typeof t.tc_label}function*Yn(){const e=`${V}/pm-promotions`;try{const t=yield(0,H.apiFetch)({path:e});if(r=t,!Array.isArray(r)||!r.every(xn))throw new Error("Invalid promotions data received from API");yield $.controls.dispatch("wc/payments","updatePmPromotions",t)}catch(e){yield $.controls.dispatch("core/notices","createErrorNotice",(0,de.__)("Error retrieving promotions. Please try again later.","woocommerce-payments")),yield $.controls.dispatch("wc/payments","updateErrorForPmPromotions",(t=e,function(e){return"object"==typeof e&&null!==e&&"code"in e}(t)?t:{code:"unknown_error"}))}var t,r}(0,$.registerStore)(G,{reducer:(0,$.combineReducers)({deposits:(e=Z,{type:t,query:r={},data:o=[],error:a})=>{const n=W(r);switch(t){case Q.SET_DEPOSIT:return{...e,byId:{...e.byId,[o.id]:o}};case Q.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:o}};case Q.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:a}};case Q.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,j.keyBy)(o,"id")},queries:{...e.queries,[n]:{data:(0,j.map)(o,"id")}}};case Q.SET_DEPOSITS_COUNT:return{...e,count:o};case Q.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[n]:{error:a}}};case Q.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[n]:{data:o}}};case Q.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[n]:{error:a}}};case Q.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:o}}}return e},transactions:(e=$e,{type:t,query:r={},data:o=[],error:a,status:n})=>{const s=W(r);switch(t){case Be.SET_TRANSACTIONS:return{...e,[s]:{data:o}};case Be.SET_ERROR_FOR_TRANSACTIONS:return{...e,[s]:{error:a}};case Be.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}};case Be.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{error:a}}};case Be.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{data:o}}}};case Be.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},[s]:{error:a}}}};case Be.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},summary:{...e.fraudProtection?.[n]?.summary||{},[s]:{data:o}}}}};case Be.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[n]:{...e.fraudProtection?.[n]||{},summary:{...e.fraudProtection?.[n]?.summary||{},[s]:{error:a}}}}}}return e},charges:(e={},{type:t,id:r,data:o,error:a})=>{switch(t){case Tt.SET_CHARGE:e={...e,[r]:{...e[r],data:o}};break;case Tt.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:a}}}return e},timeline:(e={},{type:t,id:r,data:o,error:a})=>{switch(t){case At.SET_TIMELINE:e={...e,[r]:{data:o}};break;case At.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:a}}}return e},disputes:(e=Ut,{type:t,query:r={},data:o=[],id:a,error:n})=>{const s=W(r);switch(t){case Ft.SET_DISPUTE:return{...e,byId:{...e.byId,[o.id]:o}};case Ft.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[a]:{error:n}}};break;case Ft.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,j.keyBy)(o,"dispute_id")},queries:{...e.queries,[s]:{data:(0,j.map)(o,"dispute_id")}}};case Ft.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:o}}}}return e},settings:(e=ur,{type:t,...r})=>{switch(t){case dr.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case dr.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case dr.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case dr.SET_SELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case dr.SET_UNSELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter(e=>e!==r.id)}}}return e},readers:(e={},{type:t,id:r,data:o,error:a})=>{switch(t){case ia.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:o}};break;case ia.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:a}};break;case ia.SET_READERS:e={...e,list:o}}return e},capital:ga,documents:(e=Ma,{type:t,query:r={},data:o=[],error:a})=>{const n=W(r);switch(t){case Pa.SET_DOCUMENTS:return{...e,[n]:{data:o}};case Pa.SET_ERROR_FOR_DOCUMENTS:return{...e,[n]:{error:a}};case Pa.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{data:o}}};case Pa.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[n]:{error:a}}}}return e},paymentIntents:(e=Qa,t)=>{const{type:r,id:o}=t;switch(r){case $t.SET_PAYMENT_INTENT:return{...e,[o]:{...e[o],data:t.data}};case $t.SET_ERROR_FOR_PAYMENT_INTENT:return{...e,[o]:{...e[o],error:t.error}};default:return e}},authorizations:(e=Ja,t)=>{switch(t.type){case Ka.SET_AUTHORIZATION:{const{data:r}=t;return{...e,byId:{...e.byId,[r.payment_intent_id]:{...e.byId[r.payment_intent_id],...r}}}}case Ka.SET_AUTHORIZATIONS:{const{data:r,query:o}=t;return{...e,[W(o)]:{data:r}}}case Ka.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:o}=t;return{...e,[W(o)]:{error:r}}}case Ka.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:o}=t;return{...e,summary:{...e.summary,[W(o)]:{data:r||{}}}}}case Ka.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:o}=t;return{...e,summary:{...e.summary,[W(r)]:{error:o||""}}}}case Ka.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return{...e,isRequesting:r}}}return e},files:(e=fn,t)=>{const{type:r,id:o}=t;switch(r){case wn.SET_FILE:return{...e,[o]:{...e[o],data:t.data}};case wn.SET_ERROR_FOR_FILES:return{...e,[o]:{...e[o],error:t.error}};default:return e}},pmPromotions:(e=Cn,t)=>{switch(t.type){case Nn.SET_PM_PROMOTIONS:return{...e,pmPromotions:t.data,pmPromotionsError:void 0};case Nn.SET_ERROR_FOR_PM_PROMOTIONS:return{...e,pmPromotions:void 0,pmPromotionsError:t.error}}return e}}),actions:{...t,...n,...c,..._,...h,...T,...w,...v,...A,...l,...P,...U,...x},controls:H.controls,selectors:{...e,...a,...i,...u,...m,...E,...R,...O,...b,...C,...D,...F,...k},resolvers:{...o,...s,...d,...p,...S,...g,...f,...I,...N,...y,...M,...L,...Y}});const zn="/wc/v3/payments",qn="wc/payments/multi-currency",Bn={SET_CURRENCIES:"SET_CURRENCIES",SET_AVAILABLE_CURRENCIES:"SET_AVAILABLE_CURRENCIES",SET_ENABLED_CURRENCIES:"SET_ENABLED_CURRENCIES",SET_DEFAULT_CURRENCY:"SET_DEFAULT_CURRENCY",SET_CURRENCY_SETTINGS:"SET_CURRENCY_SETTINGS",SET_STORE_SETTINGS:"SET_STORE_SETTINGS",SET_STORE_SETTINGS_VALUES:"SET_STORE_SETTINGS_VALUES",SET_IS_SAVING_STORE_SETTINGS:"SET_IS_SAVING_STORE_SETTINGS"},$n={},Hn=e=>e&&e||{},Vn=e=>Hn(e).currencies||{},Gn=e=>Vn(e).available||{},jn=e=>Vn(e).enabled||{},Qn=e=>Vn(e).default||{},Wn=e=>Hn(e).currency_settings||{},Zn=e=>Hn(e).settings?.data||{},Kn=e=>Hn(e).settings?.isDirty??!1,Jn=e=>Hn(e).settings?.isSaving??!1;function Xn(e){return{type:Bn.SET_CURRENCIES,data:e}}function es(e){return{type:Bn.SET_AVAILABLE_CURRENCIES,data:e}}function ts(e){return{type:Bn.SET_ENABLED_CURRENCIES,data:e}}function rs(e){return{type:Bn.SET_DEFAULT_CURRENCY,data:e}}function os(e,t){return{type:Bn.SET_CURRENCY_SETTINGS,data:{code:e,data:t}}}function as(e){return{type:Bn.SET_STORE_SETTINGS,data:e}}function ns(e){return{type:Bn.SET_STORE_SETTINGS_VALUES,data:e}}function ss(e,t){return{type:Bn.SET_IS_SAVING_STORE_SETTINGS,data:{isSaving:e,error:t}}}function*is(e){const t=Object.keys((0,$.select)(qn).getEnabledCurrencies()),r=e.filter(e=>!t.includes(e)),o=t.filter(t=>!e.includes(t));try{const t=yield(0,H.apiFetch)({path:`${zn}/multi-currency/update-enabled-currencies`,method:"POST",data:{enabled:e}});yield Xn(t),yield(0,$.dispatch)("core/notices").createSuccessNotice((0,de.__)("Enabled currencies updated.","woocommerce-payments")),pe("wcpay_multi_currency_enabled_currencies_updated",{added_currencies:r,removed_currencies:o})}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error updating enabled currencies.","woocommerce-payments"))}}function*cs(e,t){try{const r=yield(0,H.apiFetch)({path:`${zn}/multi-currency/currencies/${e}`,method:"POST",data:t});yield os(e,r),yield(0,$.dispatch)("core/notices").createSuccessNotice((0,de.__)("Currency settings updated.","woocommerce-payments"))}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error updating currency settings.","woocommerce-payments"))}}function*ds(e=!1){let t=null;try{const t=(0,$.select)(qn).getStoreSettings();yield ss(!0,null);const r=yield(0,H.apiFetch)({path:`${zn}/multi-currency/update-settings`,method:"POST",data:{wcpay_multi_currency_enable_auto_currency:t.enable_auto_currency?"yes":"no",wcpay_multi_currency_enable_storefront_switcher:t.enable_storefront_switcher?"yes":"no",wcpay_multi_currency_rendering_mode:t.rendering_mode||"speed"}});yield as(r),e||(yield(0,$.dispatch)("core/notices").createSuccessNotice((0,de.__)("Store settings saved.","woocommerce-payments")))}catch(e){t=e,yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving store settings.","woocommerce-payments"))}finally{yield ss(!1,t)}}function us(e,t){ho()({path:`${zn}/settings/${e}`,method:"post",data:{value:t}}).catch(()=>{(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error saving option","woocommerce-payments"))})}function*_s(){const e=`${zn}/multi-currency/currencies`;try{const t=yield(0,H.apiFetch)({path:e});yield Xn(t)}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving currencies.","woocommerce-payments"))}}function*ps(e){const t=`${zn}/multi-currency/currencies/${e}`;try{const r=yield(0,H.apiFetch)({path:t});yield os(e,r)}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*ms(){const e=`${zn}/multi-currency/get-settings`;try{const t=yield(0,H.apiFetch)({path:e});yield as(t)}catch(e){yield(0,$.dispatch)("core/notices").createErrorNotice((0,de.__)("Error retrieving store settings.","woocommerce-payments"))}}(0,$.registerStore)(qn,{reducer:(e=$n,{type:t,data:r=[]})=>{switch(t){case Bn.SET_CURRENCIES:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case Bn.SET_AVAILABLE_CURRENCIES:return{...e,currencies:{...e,available:r.available},available:r.available};case Bn.SET_ENABLED_CURRENCIES:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case Bn.SET_DEFAULT_CURRENCY:return{...e,currencies:{...e,default:r.default},default:r.default};case Bn.SET_CURRENCY_SETTINGS:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case Bn.SET_STORE_SETTINGS:return{...e,settings:{...e.settings,isDirty:!1,data:{enable_auto_currency:r.wcpay_multi_currency_enable_auto_currency,enable_storefront_switcher:r.wcpay_multi_currency_enable_storefront_switcher,rendering_mode:r.wcpay_multi_currency_rendering_mode,is_cache_optimized_feature_enabled:r.is_cache_optimized_feature_enabled,site_theme:r.site_theme,date_format:r.date_format,time_format:r.time_format,store_url:r.store_url}}};case Bn.SET_STORE_SETTINGS_VALUES:return{...e,settings:{...e.settings,savingError:null,isDirty:!0,data:{...e.settings?.data||{},...r}}};case Bn.SET_IS_SAVING_STORE_SETTINGS:return{...e,settings:{...e.settings,isDirty:!(!r.isSaving&&!r.error)&&(e.settings?.isDirty??!1),isSaving:r.isSaving,savingError:r.error}}}return e},actions:{...q},controls:H.controls,selectors:{...z},resolvers:{...B}});const ls=window.wp.components,ys=window.wp.blocks,hs=window.wp.blockEditor;var Ss=r(4848);(0,ys.registerBlockType)("woocommerce-payments/multi-currency-switcher",{apiVersion:3,title:(0,de.__)("Currency Switcher Block","woocommerce-payments"),description:(0,de.__)("Let your customers switch between your enabled currencies","woocommerce-payments"),icon:(0,Ss.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",baseProfile:"tiny-ps",viewBox:"0 0 24 24",children:[(0,Ss.jsx)("path",{d:"M13.5 8.1h.86c.34 1.81 1.54 2.9 3.2 2.9 1.58 0 2.64-.89 2.94-2.29h-1.11c-.23.72-.86 1.21-1.82 1.21-1 0-1.77-.67-2.06-1.82h2.78v-.65H15.4L15.38 7l.02-.46h2.89v-.65h-2.78c.3-1.13 1.06-1.81 2.05-1.81.94 0 1.63.59 1.84 1.38h1.1A2.86 2.86 0 0017.56 3c-1.65 0-2.85 1.09-3.19 2.89h-.87v.65h.78l-.02.46.02.45h-.78v.65zm-9 8.57v.78h1.8c.07.24.12.49.12.73 0 .87-.79 1.64-1.9 1.84V21h6.98v-1.01H6.57v-.07c.7-.33 1.25-.95 1.25-1.79 0-.23-.04-.45-.1-.68h2.72v-.78H7.43a3.6 3.6 0 01-.35-1.33c0-.83.77-1.33 2.12-1.33.74 0 1.51.13 1.85.29v-1.01A5.9 5.9 0 009.06 13c-2.15 0-3.44.87-3.44 2.28 0 .48.18.94.37 1.39H4.5z",className:"prefix__shp0"}),(0,Ss.jsx)("path",{fillRule:"evenodd",d:"M7.63 10.22c-1.72-.09-3.08-.75-3.13-1.85h1.41c.13.54.64.93 1.72 1.01V7.37l-.26-.05c-1.73-.27-2.66-.8-2.66-1.73 0-1.04 1.22-1.72 2.92-1.8V3h.8v.79c1.69.09 2.91.78 2.96 1.82H9.98c-.08-.57-.69-.91-1.55-.99v1.93l.31.05c1.79.28 2.76.78 2.76 1.77 0 1.13-1.35 1.77-3.07 1.85V11h-.8v-.78zm0-3.8v-1.8c-.98.08-1.48.47-1.48.89 0 .42.4.73 1.48.91zm.8 1.07v1.9c1.15-.07 1.64-.44 1.64-.93 0-.48-.39-.76-1.64-.97z",className:"prefix__shp0"}),(0,Ss.jsx)("path",{d:"M17.63 21v-1.61h1.97v-.67h-1.97v-.87h1.97v-.67h-1.63L20.5 13h-1.4l-2.07 3.63h-.05L14.92 13H13.5l2.53 4.18H14.4v.67h1.97v.87H14.4v.67h1.97V21h1.26z",opacity:.8})]}),category:"widgets",attributes:{symbol:{type:"boolean",default:!0},flag:{type:"boolean",default:!1},fontSize:{type:"integer",default:14},fontLineHeight:{type:"float",default:1.5},fontColor:{type:"string",default:"#000000"},border:{type:"boolean",default:!0},borderRadius:{type:"integer",default:3},borderColor:{type:"string",default:"#000000"},backgroundColor:{type:"string",default:"transparent"}},edit:e=>{const{attributes:{symbol:t,flag:r,fontSize:o,fontLineHeight:a,fontColor:n,border:s,borderRadius:i,borderColor:c,backgroundColor:d},setAttributes:u}=e,{isLoading:_}=(0,$.useSelect)(e=>{const{getCurrencies:t,isResolving:r}=e(qn);return{currencies:t(),isLoading:r("getCurrencies",[])}},[]),{enabledCurrencies:p}=(()=>{const e=(0,$.useSelect)(e=>{const{getEnabledCurrencies:t}=e(qn);return t()}),{submitEnabledCurrenciesUpdate:t}=(0,$.useDispatch)(qn);return{enabledCurrencies:e,submitEnabledCurrenciesUpdate:t}})(),m=p?Object.keys(p):[],l={div:{lineHeight:a},select:{fontSize:o,color:n,backgroundColor:d,borderWidth:s?"1px":"0px",borderColor:c,borderRadius:i}},y=(0,hs.useBlockProps)(),h=!window._wpemojiSettings||window._wpemojiSettings.supports?.flag;return(0,Ss.jsxs)("div",{...y,children:[(0,Ss.jsxs)(hs.InspectorControls,{children:[(0,Ss.jsx)(ls.PanelBody,{title:(0,de.__)("Multi-Currency settings","woocommerce-payments"),children:(0,Ss.jsx)(ls.ExternalLink,{href:"/wp-admin/admin.php?page=wc-settings&tab=wcpay_multi_currency",children:(0,de.__)("Adjust and edit your Multi-Currency settings","woocommerce-payments")})}),(0,Ss.jsxs)(ls.PanelBody,{title:(0,de.__)("Layout","woocommerce-payments"),children:[(0,Ss.jsx)(ls.CheckboxControl,{label:(0,de.__)("Display flags","woocommerce-payments"),checked:r,onChange:e=>{u({flag:e})},__nextHasNoMarginBottom:!0}),(0,Ss.jsx)(ls.CheckboxControl,{label:(0,de.__)("Display currency symbols","woocommerce-payments"),checked:t,onChange:e=>{u({symbol:e})},__nextHasNoMarginBottom:!0}),(0,Ss.jsx)(ls.CheckboxControl,{label:(0,de.__)("Border","woocommerce-payments"),checked:s,onChange:e=>{u({border:void 0!==e&&e})},__nextHasNoMarginBottom:!0}),(0,Ss.jsx)(ls.RangeControl,{label:(0,de.__)("Border radius","woocommerce-payments"),value:i,onChange:e=>{u({borderRadius:void 0===e?3:e})},min:1,max:20,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,Ss.jsxs)(ls.PanelBody,{title:(0,de.__)("Typography","woocommerce-payments"),children:[(0,Ss.jsx)(ls.RangeControl,{label:(0,de.__)("Size","woocommerce-payments"),value:o,onChange:e=>{u({fontSize:void 0===e?11:e})},min:6,max:48,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,Ss.jsx)(ls.RangeControl,{label:(0,de.__)("Line height","woocommerce-payments"),value:a,onChange:e=>{u({fontLineHeight:void 0===e?"normal":e})},min:1,max:3,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,Ss.jsxs)(ls.PanelBody,{title:(0,de.__)("Color settings","woocommerce-payments"),children:[(0,Ss.jsx)(hs.ColorPaletteControl,{onChange:e=>{u({fontColor:void 0===e?"#000000":e})},value:n,label:(0,de.__)("Text","woocommerce-payments")}),(0,Ss.jsx)(hs.ColorPaletteControl,{onChange:e=>{u({backgroundColor:void 0===e?"transparent":e})},value:d,label:(0,de.__)("Background","woocommerce-payments")}),(0,Ss.jsx)(hs.ColorPaletteControl,{onChange:e=>{u({borderColor:void 0===e?"#000000":e})},value:c,label:(0,de.__)("Border","woocommerce-payments")})]})]},"setting"),(0,Ss.jsx)("div",{className:"currency-switcher-holder",style:l.div,children:(0,Ss.jsxs)("select",{name:"currency",disabled:_,style:l.select,children:[_&&(0,Ss.jsx)("option",{children:(0,de.__)("LoadingâŠ","woocommerce-payments")}),!_&&p&&m.map(e=>(0,Ss.jsxs)("option",{value:p[e].code,children:[h&&r?p[e].flag+" ":"",t&&p[e].symbol!==p[e].code?p[e].symbol+" ":"",p[e].code]},p[e].id))]})})]})},save:()=>null})})()})();