Current File : /home/kelaby89/muzza.fit/wp-content/plugins/woocommerce-payments/dist/order.js |
/*! For license information please see order.js.LICENSE.txt */
(()=>{var e={5955:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),u=["gridicon","gridicons-checkmark",s,!1,!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:u,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},4275:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),u=["gridicon","gridicons-info-outline",s,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:u,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},9031:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),u=["gridicon","gridicons-notice-outline",s,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:u,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},4146:(e,t,r)=>{"use strict";var n=r(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?i:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=i;var u=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(y){var o=p(r);o&&o!==y&&e(t,o,n)}var i=l(r);d&&(i=i.concat(d(r)));for(var s=c(t),h=c(r),_=0;_<i.length;++_){var f=i[_];if(!(a[f]||n&&n[f]||h&&h[f]||s&&s[f])){var g=m(r,f);try{u(t,f,g)}catch(e){}}}}return t}},3072:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,_=r?Symbol.for("react.lazy"):60116,f=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,v=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case d:case a:case s:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case m:case _:case h:case c:return e;default:return t}}case o:return t}}}function S(e){return E(e)===d}t.AsyncMode=l,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=n,t.ForwardRef=m,t.Fragment=a,t.Lazy=_,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||E(e)===l},t.isConcurrentMode=S,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===_},t.isMemo=function(e){return E(e)===h},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===m||e.$$typeof===g||e.$$typeof===w||e.$$typeof===v||e.$$typeof===f)},t.typeOf=E},3404:(e,t,r)=>{"use strict";e.exports=r(3072)},8616:e=>{e.exports=function(e,t){var r,n,o=0;function a(){var a,i,s=r,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<c;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(c),i=0;i<c;i++)a[i]=arguments[i];return s={args:a,val:e.apply(null,a)},r?(r.prev=s,s.next=r):n=s,o===t.maxSize?(n=n.prev).next=null:o++,r=s,s.val}return t=t||{},a.clear=function(){r=null,n=null,o=0},a}},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))r.call(a,u)&&(s[u]=a[u]);if(t){i=t(a);for(var l=0;l<i.length;l++)n.call(a,i[l])&&(s[i[l]]=a[i[l]])}}return s}},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&m())}function m(){if(!u){var e=i(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||u||i(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},1020:(e,t,r)=>{"use strict";r(5228);var n=r(1609),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),t.Fragment=a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,a={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:u,ref:l,props:a,_owner:i.current}}t.jsx=u,t.jsxs=u},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.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 n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:()=>io,getAllDepositsOverviewsError:()=>so,getDeposit:()=>ao,getDepositQueryError:()=>mo,getDeposits:()=>uo,getDepositsCount:()=>lo,getDepositsSummary:()=>yo,getDepositsSummaryError:()=>ho,getInstantDeposit:()=>_o});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Oo,updateAllDepositsOverviews:()=>go,updateDeposit:()=>fo,updateDeposits:()=>vo,updateDepositsCount:()=>Eo,updateDepositsSummary:()=>bo,updateErrorForAllDepositsOverviews:()=>wo,updateErrorForDepositQuery:()=>So,updateErrorForDepositsSummary:()=>Ro,updateInstantDeposit:()=>To});var n={};r.r(n),r.d(n,{getAllDepositsOverviews:()=>Io,getDeposit:()=>Ao,getDeposits:()=>xo,getDepositsSummary:()=>Po,getPayoutsCSVRequestURL:()=>Do,payoutsDownloadEndpoint:()=>No});var o={};r.r(o),r.d(o,{getFraudOutcomeTransactions:()=>Yo,getFraudOutcomeTransactionsError:()=>Ho,getFraudOutcomeTransactionsSummary:()=>Vo,getFraudOutcomeTransactionsSummaryError:()=>Go,getTransactions:()=>Lo,getTransactionsError:()=>jo,getTransactionsSummary:()=>zo,getTransactionsSummaryError:()=>qo});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>ea,updateErrorForFraudOutcomeTransactionsSummary:()=>ra,updateErrorForTransactions:()=>Zo,updateErrorForTransactionsSummary:()=>Xo,updateFraudOutcomeTransactions:()=>Jo,updateFraudOutcomeTransactionsSummary:()=>ta,updateTransactions:()=>Qo,updateTransactionsSummary:()=>Ko});var i={};r.r(i),r.d(i,{formatQueryFilters:()=>na,getFraudOutcomeTransactions:()=>ca,getFraudOutcomeTransactionsExport:()=>la,getFraudOutcomeTransactionsSummary:()=>ua,getTransactions:()=>oa,getTransactionsCSVRequestURL:()=>ia,getTransactionsSummary:()=>sa,transactionsDownloadEndpoint:()=>aa});var s={};r.r(s),r.d(s,{getCharge:()=>ma,getChargeError:()=>pa,getChargeFromOrder:()=>ya,getChargeFromOrderError:()=>ha});var c={};r.r(c),r.d(c,{updateCharge:()=>_a,updateErrorForCharge:()=>fa});var u={};r.r(u),r.d(u,{getCharge:()=>ga,getChargeFromOrder:()=>wa});var l={};r.r(l),r.d(l,{getTimeline:()=>Ea,getTimelineError:()=>Sa});var d={};r.r(d),r.d(d,{updateErrorForTimeline:()=>Ra,updateTimeline:()=>ba});var m={};r.r(m),r.d(m,{getTimeline:()=>Ta});var p={};r.r(p),r.d(p,{getCachedDispute:()=>Da,getDispute:()=>Ca,getDisputeError:()=>Na,getDisputes:()=>xa,getDisputesSummary:()=>Pa});var y={};r.r(y),r.d(y,{refundCharge:()=>La,updateErrorForPaymentIntent:()=>Ua,updatePaymentIntent:()=>ka});var h={};r.r(h),r.d(h,{getPaymentIntent:()=>ja});var _={};r.r(_),r.d(_,{acceptDispute:()=>Ya,updateDispute:()=>$a,updateDisputes:()=>qa,updateDisputesSummary:()=>Ba,updateErrorForDispute:()=>za});var f={};r.r(f),r.d(f,{disputesDownloadEndpoint:()=>Wa,getDispute:()=>Ga,getDisputes:()=>Qa,getDisputesCSVRequestURL:()=>Va,getDisputesSummary:()=>Za});var g={};r.r(g),r.d(g,{getAccountBusinessSupportEmail:()=>pi,getAccountBusinessSupportPhone:()=>yi,getAccountDomesticCurrency:()=>hi,getAccountStatementDescriptor:()=>li,getAccountStatementDescriptorKana:()=>mi,getAccountStatementDescriptorKanji:()=>di,getAdvancedFraudProtectionSettings:()=>Vi,getAvailablePaymentMethodIds:()=>ii,getCompletedWaitingPeriod:()=>vi,getCurrentProtectionLevel:()=>Wi,getDepositDelayDays:()=>wi,getDepositRestrictions:()=>Si,getDepositScheduleInterval:()=>_i,getDepositScheduleMonthlyAnchor:()=>gi,getDepositScheduleWeeklyAnchor:()=>fi,getDepositStatus:()=>Ei,getDuplicatedPaymentMethodIds:()=>ni,getEnabledPaymentMethodIds:()=>ai,getIsCardPresentEligible:()=>Ui,getIsDebugLogEnabled:()=>Ii,getIsDevModeEnabled:()=>Oi,getIsManualCaptureEnabled:()=>bi,getIsMultiCurrencyEnabled:()=>Ci,getIsPaymentRequestEnabled:()=>Ai,getIsSavedCardsEnabled:()=>Mi,getIsStripeBillingEnabled:()=>Qi,getIsStripeBillingMigrationInProgress:()=>Zi,getIsSubscriptionsPluginActive:()=>$i,getIsTestModeEnabled:()=>Ri,getIsTestModeOnboarding:()=>Ti,getIsWCPayEnabled:()=>oi,getIsWCPaySubscriptionsEligible:()=>ji,getIsWCPaySubscriptionsEnabled:()=>Li,getIsWooPayEnabled:()=>zi,getIsWooPayGlobalThemeSupportEnabled:()=>qi,getPaymentMethodStatuses:()=>si,getPaymentRequestButtonBorderRadius:()=>Fi,getPaymentRequestButtonSize:()=>xi,getPaymentRequestButtonTheme:()=>Pi,getPaymentRequestButtonType:()=>Di,getPaymentRequestLocations:()=>Ni,getSavingError:()=>ki,getSettings:()=>ri,getShowWooPayIncompatibilityNotice:()=>Gi,getStripeBillingMigratedCount:()=>Xi,getStripeBillingSubscriptionCount:()=>Ki,getWooPayCustomMessage:()=>Bi,getWooPayLocations:()=>Hi,getWooPayStoreLogo:()=>Yi,isDirty:()=>ui,isSavingSettings:()=>ci});var w={};r.r(w),r.d(w,{saveOption:()=>js,saveSettings:()=>Is,submitStripeBillingSubscriptionMigration:()=>Ls,updateAccountBusinessSupportEmail:()=>bs,updateAccountBusinessSupportPhone:()=>Rs,updateAccountStatementDescriptor:()=>vs,updateAccountStatementDescriptorKana:()=>Ss,updateAccountStatementDescriptorKanji:()=>Es,updateAdvancedFraudProtectionSettings:()=>ks,updateDepositScheduleInterval:()=>Ts,updateDepositScheduleMonthlyAnchor:()=>As,updateDepositScheduleWeeklyAnchor:()=>Os,updateEnabledPaymentMethodIds:()=>ds,updateIsCardPresentEligible:()=>ns,updateIsDebugLogEnabled:()=>fs,updateIsManualCaptureEnabled:()=>hs,updateIsMultiCurrencyEnabled:()=>gs,updateIsPaymentRequestEnabled:()=>ls,updateIsSavedCardsEnabled:()=>rs,updateIsSavingSettings:()=>ms,updateIsStripeBillingEnabled:()=>Us,updateIsTestModeEnabled:()=>_s,updateIsWCPayEnabled:()=>us,updateIsWCPaySubscriptionsEnabled:()=>ws,updateIsWooPayEnabled:()=>Ns,updateIsWooPayGlobalThemeSupportEnabled:()=>Ds,updatePaymentRequestButtonBorderRadius:()=>ss,updatePaymentRequestButtonSize:()=>as,updatePaymentRequestButtonTheme:()=>is,updatePaymentRequestButtonType:()=>os,updatePaymentRequestLocations:()=>Cs,updateProtectionLevel:()=>Ms,updateSelectedPaymentMethod:()=>ps,updateSettings:()=>cs,updateUnselectedPaymentMethod:()=>ys,updateWooPayCustomMessage:()=>xs,updateWooPayLocations:()=>Fs,updateWooPayStoreLogo:()=>Ps});var v={};r.r(v),r.d(v,{getSettings:()=>$s});var E={};r.r(E),r.d(E,{getCardReaderStats:()=>qs,getCardReaderStatsError:()=>Bs,getCardReaders:()=>Ys});var S={};r.r(S),r.d(S,{updateCardReaderStats:()=>Hs,updateCardReaders:()=>Ws,updateErrorForCardReaderStats:()=>Vs,updateErrorForCardReaders:()=>Gs});var b={};r.r(b),r.d(b,{getCardReaderStats:()=>Qs,getCardReaders:()=>Zs});var R={};r.r(R),r.d(R,{getActiveLoanSummary:()=>tc,getActiveLoanSummaryError:()=>rc,getLoans:()=>nc,getLoansError:()=>oc});var T={};r.r(T),r.d(T,{updateActiveLoanSummary:()=>ac,updateErrorForActiveLoanSummary:()=>ic,updateErrorForLoans:()=>cc,updateLoans:()=>sc});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>uc,getLoans:()=>lc});var A={};r.r(A),r.d(A,{getDocuments:()=>hc,getDocumentsError:()=>_c,getDocumentsSummary:()=>gc,getDocumentsSummaryError:()=>vc});var I={};r.r(I),r.d(I,{updateDocuments:()=>Ec,updateDocumentsSummary:()=>bc,updateErrorForDocuments:()=>Sc,updateErrorForDocumentsSummary:()=>Rc});var C={};r.r(C),r.d(C,{formatQueryFilters:()=>Tc,getDocuments:()=>Oc,getDocumentsSummary:()=>Ac});var N={};r.r(N),r.d(N,{getPaymentIntent:()=>Cc,getPaymentIntentError:()=>Nc});var D={};r.r(D),r.d(D,{getAuthorization:()=>kc,getAuthorizations:()=>Mc,getAuthorizationsError:()=>Uc,getAuthorizationsSummary:()=>jc,getAuthorizationsSummaryError:()=>$c,getIsRequesting:()=>zc});var x={};r.r(x),r.d(x,{setIsRequestingAuthorization:()=>Vc,submitCancelAuthorization:()=>Qc,submitCaptureAuthorization:()=>Gc,updateAuthorization:()=>Hc,updateAuthorizations:()=>Bc,updateAuthorizationsSummary:()=>Wc,updateErrorForAuthorizations:()=>Yc,updateErrorForAuthorizationsSummary:()=>Zc});var P={};r.r(P),r.d(P,{getAuthorization:()=>Xc,getAuthorizations:()=>Kc,getAuthorizationsSummary:()=>Jc});var F={};r.r(F),r.d(F,{getFile:()=>nu,getFileError:()=>ou});var M={};r.r(M),r.d(M,{updateErrorForFiles:()=>iu,updateFiles:()=>au});var k={};r.r(k),r.d(k,{getFile:()=>su});const U=window.ReactDOM;var L=r.n(U),j=r(1609),$=r.n(j);const z=window.wp.i18n,q=e=>{var t;const r=null!==(t=wcpay_order_config)&&void 0!==t?t:wc.wcSettings.getSetting("woocommerce_payments_data");return r?.[e]},B=window.moment;var Y=r.n(B);const H=window.wc.wcSettings,W={bank_cannot_process:{display:(0,z.__)("Bank cannot process","woocommerce-payments")},check_returned:{display:(0,z.__)("Check returned","woocommerce-payments")},credit_not_processed:{display:(0,z.__)("Credit not processed","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("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")],required:[(0,z.__)("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")],respond:[(0,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims a credit was not processed.","woocommerce-payments")},customer_initiated:{display:(0,z.__)("Customer initiated","woocommerce-payments")},debit_not_authorized:{display:(0,z.__)("Debit not authorized","woocommerce-payments")},duplicate:{display:(0,z.__)("Duplicate","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[(0,z.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[(0,z.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,z.__)("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,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments")},fraudulent:{display:(0,z.__)("Transaction unauthorized","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("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")],required:[(0,z.__)("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")],respond:[(0,z.__)("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,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments")},general:{display:(0,z.__)("General","woocommerce-payments"),overview:[(0,z.__)("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")],summary:[(0,z.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments")]},incorrect_account_details:{display:(0,z.__)("Incorrect account details","woocommerce-payments")},insufficient_funds:{display:(0,z.__)("Insufficient funds","woocommerce-payments")},product_not_received:{display:(0,z.__)("Product not received","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[(0,z.__)("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")],respond:[(0,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims the product was not received.","woocommerce-payments")},product_unacceptable:{display:(0,z.__)("Product unacceptable","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[(0,z.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[(0,z.__)("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,z.__)("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,z.__)("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,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims the product was unacceptable.","woocommerce-payments")},subscription_canceled:{display:(0,z.__)("Subscription canceled","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[(0,z.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")],respond:[(0,z.__)("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,z.__)("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,z.__)("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")],claim:(0,z.__)("The cardholder claims a subscription was canceled.","woocommerce-payments")},unrecognized:{display:(0,z.__)("Unrecognized","woocommerce-payments"),overview:[(0,z.__)("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,z.__)("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")],summary:[(0,z.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[(0,z.__)("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")],respond:[(0,z.__)("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,z.__)("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")]}},V={warning_needs_response:(0,z.__)("Inquiry: Needs response","woocommerce-payments"),warning_under_review:(0,z.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,z.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,z.__)("Needs response","woocommerce-payments"),under_review:(0,z.__)("Under review","woocommerce-payments"),charge_refunded:(0,z.__)("Charge refunded","woocommerce-payments"),won:(0,z.__)("Won","woocommerce-payments"),lost:(0,z.__)("Lost","woocommerce-payments")},G=(Object.entries(V).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),["needs_response","warning_needs_response"]),Q=["under_review","warning_under_review"],Z=((0,z.__)("Dispute currency","woocommerce-payments"),(0,z.__)("All currencies","woocommerce-payments"),(0,z.__)("Show","woocommerce-payments"),(0,z.__)("Needs response","woocommerce-payments"),(0,z.__)("All disputes","woocommerce-payments"),(0,z.__)("Advanced filters","woocommerce-payments"),(0,H.getSetting)("wcVersion")),K=parseFloat(Z),X=(K<7.8?(0,z.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,z.__)("Disputes match <select /> filters","woocommerce-payments"),(0,z.__)("Disputed on date","woocommerce-payments"),(0,z.__)("Remove dispute date filter","woocommerce-payments"),(0,z.__)("Select a dispute date filter match","woocommerce-payments"),K<7.8?(0,z.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,z.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,z.__)("Select a dispute date","woocommerce-payments"),(0,z.__)("Before","woocommerce-payments"),(0,z.__)("After","woocommerce-payments"),(0,z.__)("Between","woocommerce-payments"),(0,z.__)("Status","woocommerce-payments"),(0,z.__)("Remove dispute status filter","woocommerce-payments"),(0,z.__)("Select a dispute status filter match","woocommerce-payments"),K<7.8?(0,z.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,z.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,z.__)("Select a dispute status","woocommerce-payments"),(0,z._x)("Is","dispute status","woocommerce-payments"),(0,z._x)("Is not","dispute status","woocommerce-payments"),window.wp.domReady);var J=r.n(X);const ee=(e,t={})=>{var r;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:null===(r=wcpaySettings.trackingInfo)||void 0===r?void 0:r.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}J()((()=>{var r,n;(null!==(n=null===(r=null===wc||void 0===wc?void 0:wc.tracks)||void 0===r?void 0:r.recordEvent)&&void 0!==n?n:wcTracks.recordEvent)(e,t)}))},te=((0,j.createContext)(window.wcpaySettings),(0,j.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""}),window.wc.currency);var re=r.n(te);const ne=window.lodash,oe=((0,z.__)("Australian dollar","woocommerce-payments"),(0,z.__)("Canadian dollar","woocommerce-payments"),(0,z.__)("Swiss franc","woocommerce-payments"),(0,z.__)("Danish krone","woocommerce-payments"),(0,z.__)("Euro","woocommerce-payments"),(0,z.__)("Pound sterling","woocommerce-payments"),(0,z.__)("Norwegian krone","woocommerce-payments"),(0,z.__)("New Zealand dollar","woocommerce-payments"),(0,z.__)("Swedish krona","woocommerce-payments"),(0,z.__)("United States (US) dollar","woocommerce-payments"),e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase())),ae=(e,t="USD",r=null,n=!1)=>{const o=oe(t);o||(e/=100);const a=e<0,i=a?-1*e:e,s=a?"-":"",c=n?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:n="US"}}=wcpaySettings;if(r[n]?.code===t)return re()(r[n]);const o=(0,ne.find)(r,{code:t});if(o){const{defaultLocale:e={}}=o;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition),re()(o)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:n="US"}}=wcpaySettings,o=(0,ne.find)(r,{code:e.toUpperCase()});if(o){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[n]){const e=t?(0,ne.find)(r,{code:t.toUpperCase()}):r[n];e&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition)}return re()(o)}return null})(t,r);if(null===c)return s+se(i,t,o);try{return s+("function"==typeof c.formatAmount?ce(c.formatAmount(i)):ce(c.formatCurrency(i)))}catch(e){return s+ce(se(i,t,o))}},ie=(e,t="USD",r=!1,n=null)=>{let o=ae(e,t,n);return wcpaySettings.shouldUseExplicitPrice?(r&&(o=function(e){return e.replace(/[^0-9,.' ]/g,"").trim()}(o)),((e,t)=>(-1===e.toString().indexOf(t)&&(e=e+" "+t),e))(o,t.toUpperCase())):o};function se(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(n){return(0,z.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function ce(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const ue=e=>G.includes(e),le=e=>Q.includes(e),de=e=>e.startsWith("warning");function me(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function pe(e,t){let r,n,o=[];for(let a=0;a<e.length;a++){const i=e[a];if("string"!==i.type){if(void 0===t[i.value])throw new Error(`Invalid interpolation, missing component node: \`${i.value}\``);if("object"!=typeof t[i.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${i.value}\``);if("componentClose"===i.type)throw new Error(`Missing opening component token: \`${i.value}\``);if("componentOpen"===i.type){r=t[i.value],n=a;break}o.push(t[i.value])}else o.push(i.value)}if(r){const a=function(e,t){const r=t[e];let n=0;for(let o=e+1;o<t.length;o++){const e=t[o];if(e.value===r.value){if("componentOpen"===e.type){n++;continue}if("componentClose"===e.type){if(0===n)return o;n--}}}throw new Error("Missing closing component token `"+r.value+"`")}(n,e),i=pe(e.slice(n+1,a),t),s=(0,j.cloneElement)(r,{},i);if(o.push(s),a<e.length-1){const r=pe(e.slice(a+1),t);o=o.concat(r)}}return o=o.filter(Boolean),0===o.length?null:1===o.length?o[0]:(0,j.createElement)(j.Fragment,null,...o)}function ye(e){const{mixedString:t,components:r,throwErrors:n}=e;if(!r)return t;if("object"!=typeof r){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const o=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(me)}(t);try{return pe(o,r)}catch(e){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},he.apply(null,arguments)}const _e=window.wp.element;var fe=r(6942),ge=r.n(fe);const we=window.wp.deprecated;var ve=r.n(we);const Ee=window.wp.compose,Se=window.wp.dom,be=window.wp.primitives,Re=(0,_e.createElement)(be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_e.createElement)(be.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function Te(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const a=o.getBoundingClientRect();return new n.DOMRect(e.left+a.left,e.top+a.top,e.width,e.height)}let Oe=0;function Ae(e){const t=document.scrollingElement||document.body;e&&(Oe=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=Oe)}let Ie=0;function Ce(){return(0,_e.useEffect)((()=>(0===Ie&&Ae(!0),++Ie,()=>{1===Ie&&Ae(!1),--Ie})),[]),null}window.wp.warning;var Ne=r(5606);const De=(0,_e.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==Ne&&Ne.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function xe(e){const t=(0,_e.useContext)(De),r=t.slots[e]||{},n=t.fills[e],o=(0,_e.useMemo)((()=>n||[]),[n]);return{...r,updateSlot:(0,_e.useCallback)((r=>{t.updateSlot(e,r)}),[e,t.updateSlot]),unregisterSlot:(0,_e.useCallback)((r=>{t.unregisterSlot(e,r)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,_e.useCallback)((r=>{t.registerFill(e,r)}),[e,t.registerFill]),unregisterFill:(0,_e.useCallback)((r=>{t.unregisterFill(e,r)}),[e,t.unregisterFill])}}const Pe=(0,_e.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function Fe(e){let{name:t,children:r,registerFill:n,unregisterFill:o}=e;const a=(e=>{const{getSlot:t,subscribe:r}=(0,_e.useContext)(Pe),[n,o]=(0,_e.useState)(t(e));return(0,_e.useEffect)((()=>(o(t(e)),r((()=>{o(t(e))})))),[e]),n})(t),i=(0,_e.useRef)({name:t,children:r});return(0,_e.useLayoutEffect)((()=>(n(t,i.current),()=>o(t,i.current))),[]),(0,_e.useLayoutEffect)((()=>{i.current.children=r,a&&a.forceUpdate()}),[r]),(0,_e.useLayoutEffect)((()=>{t!==i.current.name&&(o(i.current.name,i.current),i.current.name=t,n(t,i.current))}),[t]),a&&a.node?((0,ne.isFunction)(r)&&(r=r(a.props.fillProps)),(0,_e.createPortal)(r,a.node)):null}const Me=e=>(0,_e.createElement)(Pe.Consumer,null,(t=>{let{registerFill:r,unregisterFill:n}=t;return(0,_e.createElement)(Fe,he({},e,{registerFill:r,unregisterFill:n}))}));class ke extends _e.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,o=(0,ne.map)(n(t,this),(e=>{const t=(0,ne.isFunction)(e.children)?e.children(r):e.children;return _e.Children.map(t,((e,t)=>{if(!e||(0,ne.isString)(e))return e;const r=e.key||t;return(0,_e.cloneElement)(e,{key:r})}))})).filter((0,ne.negate)(_e.isEmptyElement));return(0,_e.createElement)(_e.Fragment,null,(0,ne.isFunction)(e)?e(o):o)}}const Ue=e=>(0,_e.createElement)(Pe.Consumer,null,(t=>{let{registerSlot:r,unregisterSlot:n,getFills:o}=t;return(0,_e.createElement)(ke,he({},e,{registerSlot:r,unregisterSlot:n,getFills:o}))}));var Le=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),je=Math.abs,$e=String.fromCharCode,ze=Object.assign;function qe(e){return e.trim()}function Be(e,t,r){return e.replace(t,r)}function Ye(e,t){return e.indexOf(t)}function He(e,t){return 0|e.charCodeAt(t)}function We(e,t,r){return e.slice(t,r)}function Ve(e){return e.length}function Ge(e){return e.length}function Qe(e,t){return t.push(e),e}var Ze=1,Ke=1,Xe=0,Je=0,et=0,tt="";function rt(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Ze,column:Ke,length:i,return:""}}function nt(e,t){return ze(rt("",null,null,"",null,null,0),e,{length:-e.length},t)}function ot(){return et=Je>0?He(tt,--Je):0,Ke--,10===et&&(Ke=1,Ze--),et}function at(){return et=Je<Xe?He(tt,Je++):0,Ke++,10===et&&(Ke=1,Ze++),et}function it(){return He(tt,Je)}function st(){return Je}function ct(e,t){return We(tt,e,t)}function ut(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function lt(e){return Ze=Ke=1,Xe=Ve(tt=e),Je=0,[]}function dt(e){return tt="",e}function mt(e){return qe(ct(Je-1,ht(91===e?e+2:40===e?e+1:e)))}function pt(e){for(;(et=it())&&et<33;)at();return ut(e)>2||ut(et)>3?"":" "}function yt(e,t){for(;--t&&at()&&!(et<48||et>102||et>57&&et<65||et>70&&et<97););return ct(e,st()+(t<6&&32==it()&&32==at()))}function ht(e){for(;at();)switch(et){case e:return Je;case 34:case 39:34!==e&&39!==e&&ht(et);break;case 40:41===e&&ht(e);break;case 92:at()}return Je}function _t(e,t){for(;at()&&e+et!==57&&(e+et!==84||47!==it()););return"/*"+ct(t,Je-1)+"*"+$e(47===e?e:at())}function ft(e){for(;!ut(it());)at();return ct(e,Je)}var gt="-ms-",wt="-moz-",vt="-webkit-",Et="comm",St="rule",bt="decl",Rt="@keyframes";function Tt(e,t){for(var r="",n=Ge(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Ot(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case bt:return e.return=e.return||e.value;case Et:return"";case Rt:return e.return=e.value+"{"+Tt(e.children,n)+"}";case St:e.value=e.props.join(",")}return Ve(r=Tt(e.children,n))?e.return=e.value+"{"+r+"}":""}function At(e){return dt(It("",null,null,null,[""],e=lt(e),0,[0],e))}function It(e,t,r,n,o,a,i,s,c){for(var u=0,l=0,d=i,m=0,p=0,y=0,h=1,_=1,f=1,g=0,w="",v=o,E=a,S=n,b=w;_;)switch(y=g,g=at()){case 40:if(108!=y&&58==He(b,d-1)){-1!=Ye(b+=Be(mt(g),"&","&\f"),"&\f")&&(f=-1);break}case 34:case 39:case 91:b+=mt(g);break;case 9:case 10:case 13:case 32:b+=pt(y);break;case 92:b+=yt(st()-1,7);continue;case 47:switch(it()){case 42:case 47:Qe(Nt(_t(at(),st()),t,r),c);break;default:b+="/"}break;case 123*h:s[u++]=Ve(b)*f;case 125*h:case 59:case 0:switch(g){case 0:case 125:_=0;case 59+l:-1==f&&(b=Be(b,/\f/g,"")),p>0&&Ve(b)-d&&Qe(p>32?Dt(b+";",n,r,d-1):Dt(Be(b," ","")+";",n,r,d-2),c);break;case 59:b+=";";default:if(Qe(S=Ct(b,t,r,u,l,o,s,w,v=[],E=[],d),a),123===g)if(0===l)It(b,t,S,S,v,a,d,s,E);else switch(99===m&&110===He(b,3)?100:m){case 100:case 108:case 109:case 115:It(e,S,S,n&&Qe(Ct(e,S,S,0,0,o,s,w,o,v=[],d),E),o,E,d,s,n?v:E);break;default:It(b,S,S,S,[""],E,0,s,E)}}u=l=p=0,h=f=1,w=b="",d=i;break;case 58:d=1+Ve(b),p=y;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==ot())continue;switch(b+=$e(g),g*h){case 38:f=l>0?1:(b+="\f",-1);break;case 44:s[u++]=(Ve(b)-1)*f,f=1;break;case 64:45===it()&&(b+=mt(at())),m=it(),l=d=Ve(w=b+=ft(st())),g++;break;case 45:45===y&&2==Ve(b)&&(h=0)}}return a}function Ct(e,t,r,n,o,a,i,s,c,u,l){for(var d=o-1,m=0===o?a:[""],p=Ge(m),y=0,h=0,_=0;y<n;++y)for(var f=0,g=We(e,d+1,d=je(h=i[y])),w=e;f<p;++f)(w=qe(h>0?m[f]+" "+g:Be(g,/&\f/g,m[f])))&&(c[_++]=w);return rt(e,t,r,0===o?St:s,c,u,l)}function Nt(e,t,r){return rt(e,t,r,Et,$e(et),We(e,2,-2),0)}function Dt(e,t,r,n){return rt(e,t,r,bt,We(e,0,n),We(e,n+1,-1),n)}var xt=function(e,t,r){for(var n=0,o=0;n=o,o=it(),38===n&&12===o&&(t[r]=1),!ut(o);)at();return ct(e,Je)},Pt=new WeakMap,Ft=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Pt.get(r))&&!n){Pt.set(e,!0);for(var o=[],a=function(e,t){return dt(function(e,t){var r=-1,n=44;do{switch(ut(n)){case 0:38===n&&12===it()&&(t[r]=1),e[r]+=xt(Je-1,t,r);break;case 2:e[r]+=mt(n);break;case 4:if(44===n){e[++r]=58===it()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=$e(n)}}while(n=at());return e}(lt(e),t))}(t,o),i=r.props,s=0,c=0;s<a.length;s++)for(var u=0;u<i.length;u++,c++)e.props[c]=o[s]?a[s].replace(/&\f/g,i[u]):i[u]+" "+a[s]}}},Mt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function kt(e,t){switch(function(e,t){return 45^He(e,0)?(((t<<2^He(e,0))<<2^He(e,1))<<2^He(e,2))<<2^He(e,3):0}(e,t)){case 5103:return vt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return vt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return vt+e+wt+e+gt+e+e;case 6828:case 4268:return vt+e+gt+e+e;case 6165:return vt+e+gt+"flex-"+e+e;case 5187:return vt+e+Be(e,/(\w+).+(:[^]+)/,vt+"box-$1$2"+gt+"flex-$1$2")+e;case 5443:return vt+e+gt+"flex-item-"+Be(e,/flex-|-self/,"")+e;case 4675:return vt+e+gt+"flex-line-pack"+Be(e,/align-content|flex-|-self/,"")+e;case 5548:return vt+e+gt+Be(e,"shrink","negative")+e;case 5292:return vt+e+gt+Be(e,"basis","preferred-size")+e;case 6060:return vt+"box-"+Be(e,"-grow","")+vt+e+gt+Be(e,"grow","positive")+e;case 4554:return vt+Be(e,/([^-])(transform)/g,"$1"+vt+"$2")+e;case 6187:return Be(Be(Be(e,/(zoom-|grab)/,vt+"$1"),/(image-set)/,vt+"$1"),e,"")+e;case 5495:case 3959:return Be(e,/(image-set\([^]*)/,vt+"$1$`$1");case 4968:return Be(Be(e,/(.+:)(flex-)?(.*)/,vt+"box-pack:$3"+gt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+vt+e+e;case 4095:case 3583:case 4068:case 2532:return Be(e,/(.+)-inline(.+)/,vt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ve(e)-1-t>6)switch(He(e,t+1)){case 109:if(45!==He(e,t+4))break;case 102:return Be(e,/(.+:)(.+)-([^]+)/,"$1"+vt+"$2-$3$1"+wt+(108==He(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ye(e,"stretch")?kt(Be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==He(e,t+1))break;case 6444:switch(He(e,Ve(e)-3-(~Ye(e,"!important")&&10))){case 107:return Be(e,":",":"+vt)+e;case 101:return Be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+vt+(45===He(e,14)?"inline-":"")+"box$3$1"+vt+"$2$3$1"+gt+"$2box$3")+e}break;case 5936:switch(He(e,t+11)){case 114:return vt+e+gt+Be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vt+e+gt+Be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vt+e+gt+Be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return vt+e+gt+e+e}return e}var Ut=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case bt:e.return=kt(e.value,e.length);break;case Rt:return Tt([nt(e,{value:Be(e.value,"@","@"+vt)})],n);case St:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Tt([nt(e,{props:[Be(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Tt([nt(e,{props:[Be(t,/:(plac\w+)/,":"+vt+"input-$1")]}),nt(e,{props:[Be(t,/:(plac\w+)/,":-moz-$1")]}),nt(e,{props:[Be(t,/:(plac\w+)/,gt+"input-$1")]})],n)}return""}))}}],Lt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,a=e.stylisPlugins||Ut,i={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)i[t[r]]=!0;s.push(e)}));var c,u,l,d,m=[Ot,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[Ft,Mt].concat(a,m),l=Ge(u),function(e,t,r,n){for(var o="",a=0;a<l;a++)o+=u[a](e,t,r,n)||"";return o});o=function(e,t,r,n){c=r,Tt(At(e?e+"{"+t.styles+"}":t.styles),p),n&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new Le({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return y.sheet.hydrate(s),y},jt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function $t(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var zt=/[A-Z]|^ms/g,qt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bt=function(e){return 45===e.charCodeAt(1)},Yt=function(e){return null!=e&&"boolean"!=typeof e},Ht=$t((function(e){return Bt(e)?e:e.replace(zt,"-$&").toLowerCase()})),Wt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(qt,(function(e,t,r){return Gt={name:t,styles:r,next:Gt},t}))}return 1===jt[e]||Bt(e)||"number"!=typeof t||0===t?t:t+"px"};function Vt(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Gt={name:r.name,styles:r.styles,next:Gt},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Gt={name:n.name,styles:n.styles,next:Gt},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Vt(e,t,r[o])+";";else for(var a in r){var i=r[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?n+=a+"{"+t[i]+"}":Yt(i)&&(n+=Ht(a)+":"+Wt(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Vt(e,t,i);switch(a){case"animation":case"animationName":n+=Ht(a)+":"+s+";";break;default:n+=a+"{"+s+"}"}}else for(var c=0;c<i.length;c++)Yt(i[c])&&(n+=Ht(a)+":"+Wt(a,i[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=Gt,a=r(e);return Gt=o,Vt(e,t,a)}}if(null==t)return r;var i=t[r];return void 0!==i?i:r}var Gt,Qt,Zt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Kt=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";Gt=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=Vt(r,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Vt(r,t,e[i]),n&&(o+=a[i]);Zt.lastIndex=0;for(var s,c="";null!==(s=Zt.exec(o));)c+="-"+s[1];var u=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:u,styles:o,next:Gt}},Xt=!!j.useInsertionEffect&&j.useInsertionEffect,Jt=Xt||function(e){return e()},er=(Xt||j.useLayoutEffect,j.createContext("undefined"!=typeof HTMLElement?Lt({key:"css"}):null)),tr=er.Provider,rr=j.createContext({}),nr=r(8616),or=r.n(nr),ar=new Uint8Array(16);function ir(){if(!Qt&&!(Qt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qt(ar)}const sr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var cr=[],ur=0;ur<256;++ur)cr.push((ur+256).toString(16).substr(1));const lr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(cr[e[t+0]]+cr[e[t+1]]+cr[e[t+2]]+cr[e[t+3]]+"-"+cr[e[t+4]]+cr[e[t+5]]+"-"+cr[e[t+6]]+cr[e[t+7]]+"-"+cr[e[t+8]]+cr[e[t+9]]+"-"+cr[e[t+10]]+cr[e[t+11]]+cr[e[t+12]]+cr[e[t+13]]+cr[e[t+14]]+cr[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&sr.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},dr=function(e,t,r){var n=(e=e||{}).random||(e.rng||ir)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return lr(n)},mr=new Set,pr=or()((e=>{let t=dr().replace(/[0-9]/g,"");for(;mr.has(t);)t=dr().replace(/[0-9]/g,"");return mr.add(t),Lt({container:e,key:t})}));function yr(e){let{children:t,document:r}=e;if(!r)return null;const n=pr(r.head);return(0,_e.createElement)(tr,{value:n},t)}function hr(){const[,e]=(0,_e.useState)({}),t=(0,_e.useRef)(!0);return(0,_e.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function _r(e){let{name:t,children:r}=e;const n=xe(t),o=(0,_e.useRef)({rerender:hr()});if((0,_e.useEffect)((()=>(n.registerFill(o),()=>{n.unregisterFill(o)})),[n.registerFill,n.unregisterFill]),!n.ref||!n.ref.current)return null;"function"==typeof r&&(r=r(n.fillProps));const a=(0,_e.createElement)(yr,{document:n.ref.current.ownerDocument},r);return(0,_e.createPortal)(a,n.ref.current)}const fr=(0,_e.forwardRef)((function(e,t){let{name:r,fillProps:n={},as:o="div",...a}=e;const i=(0,_e.useContext)(De),s=(0,_e.useRef)();return(0,_e.useLayoutEffect)((()=>(i.registerSlot(r,s,n),()=>{i.unregisterSlot(r,s)})),[i.registerSlot,i.unregisterSlot,r]),(0,_e.useLayoutEffect)((()=>{i.updateSlot(r,n)})),(0,_e.createElement)(o,he({ref:(0,Ee.useMergeRefs)([t,s])},a))}));function gr(e){return(0,_e.createElement)(_e.Fragment,null,(0,_e.createElement)(Me,e),(0,_e.createElement)(_r,e))}const wr=(0,_e.forwardRef)(((e,t)=>{let{bubblesVirtually:r,...n}=e;return r?(0,_e.createElement)(fr,he({},n,{ref:t})):(0,_e.createElement)(Ue,n)}));function vr(e){return"appear"===e?"top":"left"}const Er="Popover",Sr=(0,_e.createContext)();function br(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:a}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),i=r?parseInt(r,10):0,s=n?parseInt(n,10):0,c=o?parseInt(o,10):0,u=a?parseInt(a,10):0;return{x:e.left+c,y:e.top+i,width:e.width-c-u,height:e.height-i-s,left:e.left+c,right:e.right-u,top:e.top+i,bottom:e.bottom-s}}function Rr(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function Tr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function Or(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Ar=(0,_e.forwardRef)(((e,t)=>{let{headerTitle:r,onClose:n,children:o,className:a,noArrow:i=!0,isAlternate:s,position:c="bottom right",range:u,focusOnMount:l="firstElement",anchorRef:d,shouldAnchorIncludePadding:m,anchorRect:p,getAnchorRect:y,expandOnMobile:h,animate:_=!0,onFocusOutside:f,__unstableStickyBoundaryElement:g,__unstableSlotName:w=Er,__unstableObserveElement:v,__unstableBoundaryParent:E,__unstableForcePosition:S,__unstableForceXAlignment:b,__unstableEditorCanvasWrapper:R,...T}=e;const O=(0,_e.useRef)(null),A=(0,_e.useRef)(null),I=(0,_e.useRef)(),C=(0,Ee.useViewportMatch)("medium","<"),[N,D]=(0,_e.useState)(),x=(0,_e.useContext)(Sr)||w,P=xe(x),F=h&&C,[M,k]=(0,Ee.useResizeObserver)();i=F||i,(0,_e.useLayoutEffect)((()=>{if(F)return Or(I.current,"is-without-arrow",i),Or(I.current,"is-alternate",s),Rr(I.current,"data-x-axis"),Rr(I.current,"data-y-axis"),Tr(I.current,"top"),Tr(I.current,"left"),Tr(A.current,"maxHeight"),void Tr(A.current,"maxWidth");const e=()=>{if(!I.current||!A.current)return;let e=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return Te(t,t.ownerDocument||e.current.ownerDocument,a)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return Te((0,Se.getRectangleFromRange)(n),n.endContainer.ownerDocument,a);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=Te(n.getBoundingClientRect(),n.ownerDocument,a);return o?e:br(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=Te(new window.DOMRect(r.left,r.top,r.width,i.bottom-r.top),e.ownerDocument,a);return o?s:br(s,n)}if(!e.current)return;const{parentNode:i}=e.current,s=Te(i.getBoundingClientRect(),i.ownerDocument,a);return o?s:br(s,i)}(O,p,y,d,m,I.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=I.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}E&&(n=I.current.parentElement);const a=k.height?k:A.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:l,xAxis:h,yAxis:_,contentHeight:f,contentWidth:w}=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0;const[u,l="center",d]=r.split(" "),m=function(e,t,r,n,o,a,i,s,c){const{height:u}=t;if(o){const t=o.getBoundingClientRect(),n=t.top+u-i,a=t.bottom-u-i;if(e.top<=n)return!c||u+10<c.scrollTop+e.top?{yAxis:r,popoverTop:Math.min(e.bottom,n)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,a)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const d={popoverTop:l,contentHeight:(l-u/2>0?u/2:l)+(l+u/2>window.innerHeight?window.innerHeight-l:u/2)},m={popoverTop:e.top,contentHeight:e.top-10-u>0?u:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+u>window.innerHeight?window.innerHeight-10-e.bottom:u};let y,h=r,_=null;if(!o&&!s)if("middle"===r&&d.contentHeight===u)h="middle";else if("top"===r&&m.contentHeight===u)h="top";else if("bottom"===r&&p.contentHeight===u)h="bottom";else{h=m.contentHeight>p.contentHeight?"top":"bottom";const e="top"===h?m.contentHeight:p.contentHeight;_=e!==u?e:null}return y="middle"===h?d.popoverTop:"top"===h?m.popoverTop:p.popoverTop,{yAxis:h,popoverTop:y,contentHeight:_}}(e,t,u,d,n,0,o,i,c),p=function(e,t,r,n,o,a,i,s,c){const{width:u}=t;"left"===r&&(0,z.isRTL)()?r="right":"right"===r&&(0,z.isRTL)()&&(r="left"),"left"===n&&(0,z.isRTL)()?n="right":"right"===n&&(0,z.isRTL)()&&(n="left");const l=Math.round(e.left+e.width/2),d={popoverLeft:l,contentWidth:(l-u/2>0?u/2:l)+(l+u/2>window.innerWidth?window.innerWidth-l:u/2)};let m=e.left;"right"===n?m=e.right:"middle"===a||c||(m=l);let p=e.right;"left"===n?p=e.left:"middle"===a||c||(p=l);const y={popoverLeft:m,contentWidth:m-u>0?u:m},h={popoverLeft:p,contentWidth:p+u>window.innerWidth?window.innerWidth-p:u};let _,f=r,g=null;if(!o&&!s)if("center"===r&&d.contentWidth===u)f="center";else if("left"===r&&y.contentWidth===u)f="left";else if("right"===r&&h.contentWidth===u)f="right";else{f=y.contentWidth>h.contentWidth?"left":"right";const e="left"===f?y.contentWidth:h.contentWidth;u>window.innerWidth&&(g=window.innerWidth),e!==u&&(f="center",d.popoverLeft=window.innerWidth/2)}return _="center"===f?d.popoverLeft:"left"===f?y.popoverLeft:h.popoverLeft,i&&(_=Math.min(_,i.offsetLeft+i.offsetWidth-u),(0,z.isRTL)()||(_=Math.max(_,0))),{xAxis:f,popoverLeft:_,contentWidth:g}}(e,t,l,d,n,m.yAxis,a,i,s);return{...p,...m}}(e,a,c,g,I.current,o,n,S,b,R);"number"==typeof u&&"number"==typeof l&&(Tr(I.current,"top",u+"px"),Tr(I.current,"left",l+"px")),Or(I.current,"is-without-arrow",i||"center"===h&&"middle"===_),Or(I.current,"is-alternate",s),Rr(I.current,"data-x-axis",h),Rr(I.current,"data-y-axis",_),Tr(A.current,"maxHeight","number"==typeof f?f+"px":""),Tr(A.current,"maxWidth","number"==typeof w?w+"px":""),D(({left:"right",right:"left"}[h]||"center")+" "+({top:"bottom",bottom:"top"}[_]||"middle"))};e();const{ownerDocument:t}=I.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const a=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",a),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const u=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(d);let l;return u&&u!==t&&(u.defaultView.addEventListener("resize",e),u.defaultView.addEventListener("scroll",e,!0)),v&&(l=new r.MutationObserver(e),l.observe(v,{attributes:!0})),()=>{var i,s;r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",a),r.cancelAnimationFrame(o),u&&u!==t&&(null===(i=u.defaultView)||void 0===i||i.removeEventListener("resize",e),null===(s=u.defaultView)||void 0===s||s.removeEventListener("scroll",e,!0)),l&&l.disconnect()}}),[F,p,y,d,m,c,k,g,v,E]);const U=(e,t)=>{"focus-outside"===e&&f?f(t):n&&n()},[L,j]=(0,Ee.__experimentalUseDialog)({focusOnMount:l,__unstableOnClose:U,onClose:U}),$=(0,Ee.useMergeRefs)([I,L,t]),q=Boolean(_&&N)&&function(e){if("loading"===e.type)return ge()("components-animate__loading");const{type:t,origin:r=vr(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return ge()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?ge()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:N});let B=(0,_e.createElement)("div",he({className:ge()("components-popover",a,q,{"is-expanded":F,"is-without-arrow":i,"is-alternate":s})},T,{ref:$},j,{tabIndex:"-1"}),F&&(0,_e.createElement)(Ce,null),F&&(0,_e.createElement)("div",{className:"components-popover__header"},(0,_e.createElement)("span",{className:"components-popover__header-title"},r),(0,_e.createElement)(_n,{className:"components-popover__close",icon:Re,onClick:n})),(0,_e.createElement)("div",{ref:A,className:"components-popover__content"},(0,_e.createElement)("div",{style:{position:"relative"}},M,o)));return P.ref&&(B=(0,_e.createElement)(gr,{name:x},B)),d||p?B:(0,_e.createElement)("span",{ref:O},B)}));Ar.Slot=(0,_e.forwardRef)((function(e,t){let{name:r=Er}=e;return(0,_e.createElement)(wr,{bubblesVirtually:!0,name:r,className:"popover-slot",ref:t})})),Ar.__unstableSlotNameProvider=Sr.Provider;const Ir=Ar,Cr=function(e){let t,r,{shortcut:n,className:o}=e;return n?((0,ne.isString)(n)&&(t=n),(0,ne.isObject)(n)&&(t=n.display,r=n.ariaLabel),(0,_e.createElement)("span",{className:o,"aria-label":r},t)):null},Nr=700,Dr=(0,_e.createElement)("div",{className:"event-catcher"}),xr=e=>{let{eventHandlers:t,child:r,childrenWithPopover:n}=e;return(0,_e.cloneElement)((0,_e.createElement)("span",{className:"disabled-element-wrapper"},(0,_e.cloneElement)(Dr,t),(0,_e.cloneElement)(r,{children:n})),t)},Pr=e=>{let{child:t,eventHandlers:r,childrenWithPopover:n}=e;return(0,_e.cloneElement)(t,{...r,children:n})},Fr=(e,t,r)=>{if(1!==_e.Children.count(e))return;const n=_e.Children.only(e);n.props.disabled||"function"==typeof n.props[t]&&n.props[t](r)},Mr=function(e){const{children:t,position:r,text:n,shortcut:o,delay:a=Nr}=e,[i,s]=(0,_e.useState)(!1),[c,u]=(0,_e.useState)(!1),l=(0,Ee.useDebounce)(u,a),d=e=>{Fr(t,"onMouseDown",e),document.addEventListener("mouseup",y),s(!0)},m=e=>{Fr(t,"onMouseUp",e),document.removeEventListener("mouseup",y),s(!1)},p=e=>"mouseUp"===e?m:"mouseDown"===e?d:void 0,y=p("mouseUp"),h=(e,r)=>n=>{if(Fr(t,e,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;l.cancel();const o=(0,ne.includes)(["focus","mouseenter"],n.type);o!==c&&(r?l(o):u(o))},_=()=>{l.cancel(),document.removeEventListener("mouseup",y)};if((0,_e.useEffect)((()=>_),[]),1!==_e.Children.count(t))return t;const f={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:p("mouseDown")},g=_e.Children.only(t),{children:w,disabled:v}=g.props,E=v?xr:Pr,S=(e=>{let{grandchildren:t,isOver:r,position:n,text:o,shortcut:a}=e;return(0,_e.concatChildren)(t,r&&(0,_e.createElement)(Ir,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,_e.createElement)(Cr,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:w,isOver:c,position:r,text:n,shortcut:o});return E({child:g,eventHandlers:f,childrenWithPopover:S})},kr=function(e){let{icon:t,className:r,...n}=e;const o=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return(0,_e.createElement)("span",he({className:o},n))},Ur=function(e){let{icon:t=null,size:r=24,...n}=e;if("string"==typeof t)return(0,_e.createElement)(kr,he({icon:t},n));if((0,_e.isValidElement)(t)&&kr===t.type)return(0,_e.cloneElement)(t,{...n});if("function"==typeof t)return t.prototype instanceof _e.Component?(0,_e.createElement)(t,{size:r,...n}):t({size:r,...n});if(t&&("svg"===t.type||t.type===be.SVG)){const e={width:r,height:r,...t.props,...n};return(0,_e.createElement)(be.SVG,e)}return(0,_e.isValidElement)(t)?(0,_e.cloneElement)(t,{size:r,...n}):t};var Lr=r(5606);const jr=(0,_e.createContext)({}),$r=()=>(0,_e.useContext)(jr);function zr(e){let{value:t}=e;const r=$r(),n=(0,_e.useRef)(t);return function(e,r){const o=(0,_e.useRef)(!1);(0,_e.useEffect)((()=>{o.current?(0,ne.isEqual)(n.current,t)&&n.current!==t&&void 0!==Lr&&Lr.env:o.current=!0}),r)}(0,[t]),(0,_e.useMemo)((()=>(0,ne.merge)((0,ne.cloneDeep)(r),t)),[r,t])}(0,_e.memo)((e=>{let{children:t,value:r}=e;const n=zr({value:r});return(0,_e.createElement)(jr.Provider,{value:n},t)}));const qr="data-wp-component",Br="data-wp-c16t",Yr="__contextSystemKey__",Hr=or()((function(e){return`components-${(0,ne.kebabCase)(e)}`}));function Wr(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}function Vr(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Gr(e,t,r){var n=[],o=Wr(e,n,r);return n.length<2?r:o+t(n)}var Qr=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var i in a="",o)o[i]&&i&&(a&&(a+=" "),a+=i);break;default:a=o}a&&(r&&(r+=" "),r+=a)}}return r},Zr=function(){var e=Lt({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Kt(r,e.registered,void 0);return function(e,t){!function(e,t){var r=e.key+"-"+t.name;void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,o),e.key+"-"+o.name};return{css:t,cx:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Gr(e.registered,t,Qr(n))},injectGlobal:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Kt(r,e.registered);Vr(e,o)},keyframes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Kt(r,e.registered),a="animation-"+o.name;return Vr(e,{name:o.name,styles:"@keyframes "+a+"{"+o.styles+"}"}),a},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Wr.bind(null,e.registered),merge:Gr.bind(null,e.registered,t)}}(),Kr=(Zr.flush,Zr.hydrate,Zr.cx);Zr.merge,Zr.getRegisteredStyles,Zr.injectGlobal,Zr.keyframes,Zr.css,Zr.sheet,Zr.cache;const Xr=()=>{const e=(0,j.useContext)(er),t=(0,_e.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kr(...r.map((t=>{return null!=(r=t)&&["name","styles"].every((e=>void 0!==r[e]))?(function(e,t){var r=e.key+"-"+t.name;if(void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,t),`${e.key}-${t.name}`):t;var r})))}),[e]);return t};var Jr=r(5606);function en(e,t){const r=$r();void 0===t&&void 0!==Jr&&Jr.env;const n=(null==r?void 0:r[t])||{},o={[Br]:!0,...(a=t,{[qr]:a})};var a;const{_overrides:i,...s}=n,c=Object.entries(s).length?Object.assign({},s,e):e,u=Xr()(Hr(t),e.className),l="function"==typeof c.renderChildren?c.renderChildren(c):c.children;for(const e in c)o[e]=c[e];for(const e in i)o[e]=i[e];return o.children=l,o.className=u,o}var tn=r(5606);function rn(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:n=!1}=r;let o=(0,_e.forwardRef)(e);n&&(o=(0,_e.memo)(o)),void 0===t&&void 0!==tn&&tn.env;let a=o[Yr]||[t];return Array.isArray(t)&&(a=[...a,...t]),"string"==typeof t&&(a=[...a,t]),o.displayName=t,o[Yr]=(0,ne.uniq)(a),o.selector=`.${Hr(t)}`,o}const nn={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var on=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,an=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},sn=$t((function(e){return on.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),cn=function(e){return"theme"!==e},un=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?sn:cn},ln=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},dn=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return an(t,r,n),Jt((function(){return function(e,t,r){an(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,r,n)})),null};const mn=function e(t,r){var n,o,a=t.__emotion_real===t,i=a&&t.__emotion_base||t;void 0!==r&&(n=r.label,o=r.target);var s=ln(t,r,a),c=s||un(i),u=!c("as");return function(){var l=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)d.push.apply(d,l);else{d.push(l[0][0]);for(var m=l.length,p=1;p<m;p++)d.push(l[p],l[0][p])}var y,h=(y=function(e,t,r){var n,a,l,m,p=u&&e.as||i,y="",h=[],_=e;if(null==e.theme){for(var f in _={},e)_[f]=e[f];_.theme=j.useContext(rr)}"string"==typeof e.className?(n=t.registered,a=h,l=e.className,m="",l.split(" ").forEach((function(e){void 0!==n[e]?a.push(n[e]+";"):m+=e+" "})),y=m):null!=e.className&&(y=e.className+" ");var g=Kt(d.concat(h),t.registered,_);y+=t.key+"-"+g.name,void 0!==o&&(y+=" "+o);var w=u&&void 0===s?un(p):c,v={};for(var E in e)u&&"as"===E||w(E)&&(v[E]=e[E]);return v.className=y,v.ref=r,j.createElement(j.Fragment,null,j.createElement(dn,{cache:t,serialized:g,isStringTag:"string"==typeof p}),j.createElement(p,v))},(0,j.forwardRef)((function(e,t){var r=(0,j.useContext)(er);return y(e,r,t)})));return h.displayName=void 0!==n?n:"Styled("+("string"==typeof i?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,n){return e(t,he({},r,n,{shouldForwardProp:ln(h,n,!0)})).apply(void 0,d)},h}}("div",{target:"em57xhy0"})("");mn.selector=".components-view",mn.displayName="View";const pn=mn,yn=rn((function(e,t){const{style:r,...n}=en(e,"VisuallyHidden");return(0,_e.createElement)(pn,he({ref:t},n,{style:{...nn,...r||{}}}))}),"VisuallyHidden"),hn=["onMouseDown","onClick"],_n=(0,_e.forwardRef)((function e(t,r){const{href:n,target:o,isSmall:a,isPressed:i,isBusy:s,isDestructive:c,className:u,disabled:l,icon:d,iconPosition:m="left",iconSize:p,showTooltip:y,tooltipPosition:h,shortcut:_,label:f,children:g,text:w,variant:v,__experimentalIsFocusable:E,describedBy:S,...b}=function(e){let{isDefault:t,isPrimary:r,isSecondary:n,isTertiary:o,isLink:a,variant:i,...s}=e,c=i;var u,l,d,m,p;return r&&(null!==(u=c)&&void 0!==u||(c="primary")),o&&(null!==(l=c)&&void 0!==l||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),t&&(ve()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(m=c)&&void 0!==m||(c="secondary")),a&&(null!==(p=c)&&void 0!==p||(c="link")),{...s,variant:c}}(t),R=(0,Ee.useInstanceId)(e,"components-button__description"),T=ge()("components-button",u,{"is-secondary":"secondary"===v,"is-primary":"primary"===v,"is-small":a,"is-tertiary":"tertiary"===v,"is-pressed":i,"is-busy":s,"is-link":"link"===v,"is-destructive":c,"has-text":!!d&&!!g,"has-icon":!!d}),O=l&&!E,A=void 0===n||O?"button":"a",I="a"===A?{href:n,target:o}:{type:"button",disabled:O,"aria-pressed":i};if(l&&E){I["aria-disabled"]=!0;for(const e of hn)b[e]=e=>{e.stopPropagation(),e.preventDefault()}}const C=!O&&(y&&f||_||!!f&&(!g||(0,ne.isArray)(g)&&!g.length)&&!1!==y),N=S?R:null,D=b["aria-describedby"]||N,x=(0,_e.createElement)(A,he({},I,b,{className:T,"aria-label":b["aria-label"]||f,"aria-describedby":D,ref:r}),d&&"left"===m&&(0,_e.createElement)(Ur,{icon:d,size:p}),w&&(0,_e.createElement)(_e.Fragment,null,w),d&&"right"===m&&(0,_e.createElement)(Ur,{icon:d,size:p}),g);return C?(0,_e.createElement)(_e.Fragment,null,(0,_e.createElement)(Mr,{text:S||f,shortcut:_,position:h},x),S&&(0,_e.createElement)(yn,null,(0,_e.createElement)("span",{id:N},S))):(0,_e.createElement)(_e.Fragment,null,x,S&&(0,_e.createElement)(yn,null,(0,_e.createElement)("span",{id:N},S)))})),fn=window.wp.a11y;function gn(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const wn=function(e){let{className:t,status:r="info",children:n,spokenMessage:o=n,onRemove:a=ne.noop,isDismissible:i=!0,actions:s=[],politeness:c=gn(r),__unstableHTML:u,onDismiss:l=ne.noop}=e;!function(e,t){const r="string"==typeof e?e:(0,_e.renderToString)(e);(0,_e.useEffect)((()=>{r&&(0,fn.speak)(r,t)}),[r,t])}(o,c);const d=ge()(t,"components-notice","is-"+r,{"is-dismissible":i});return u&&(n=(0,_e.createElement)(_e.RawHTML,null,n)),(0,_e.createElement)("div",{className:d},(0,_e.createElement)("div",{className:"components-notice__content"},n,(0,_e.createElement)("div",{className:"components-notice__actions"},s.map(((e,t)=>{let{className:r,label:n,isPrimary:o,variant:a,noDefaultClasses:i=!1,onClick:s,url:c}=e,u=a;return"primary"===a||i||(u=c?"link":"secondary"),void 0===u&&o&&(u="primary"),(0,_e.createElement)(_n,{key:t,href:c,variant:u,onClick:c?void 0:s,className:ge()("components-notice__action",r)},n)})))),i&&(0,_e.createElement)(_n,{className:"components-notice__dismiss",icon:Re,label:(0,z.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),l(),a()},showTooltip:!1}))};function vn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Kt(t)}r(4146);const En=["40em","52em","64em"],Sn="4px";function bn(e){var t,r;if(void 0===e)return;if(!e)return"0";const n="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(r=t.supports)&&void 0!==r&&r.call(t,"margin",e.toString())||Number.isNaN(n)?e.toString():`calc(${Sn} * ${e})`}const Rn={name:"zjik7",styles:"display:flex"},Tn={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},On={name:"82a6rk",styles:"flex:1"},An={name:"13nosa1",styles:">*{min-height:0;}"},In={name:"1pwxzk4",styles:">*{min-width:0;}"},Cn=new RegExp(/-left/g),Nn=new RegExp(/-right/g),Dn=new RegExp(/Left/g),xn=new RegExp(/Right/g),Pn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,ne.mapKeys)(e,((e,t)=>function(e){return"left"===e?"right":"right"===e?"left":Cn.test(e)?e.replace(Cn,"-right"):Nn.test(e)?e.replace(Nn,"-left"):Dn.test(e)?e.replace(Dn,"Right"):xn.test(e)?e.replace(xn,"Left"):e}(t)))};function Fn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,z.isRTL)()?vn(t,""):vn(e,""):(0,z.isRTL)()?vn(Pn(e),""):vn(e,"")}function Mn(e){const{align:t="center",className:r,direction:n="row",expanded:o=!0,gap:a=2,justify:i="space-between",wrap:s=!1,...c}=en(function(e){let{isReversed:t,...r}=e;return void 0!==t?(ve()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...r,direction:t?"row-reverse":"row"}):r}(e),"Flex"),u=function(e){const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>En.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${En.length} breakpoints, got index ${t}`);const[r,n]=(0,_e.useState)(t);return(0,_e.useEffect)((()=>{const e=()=>{const e=En.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;r!==e&&n(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[r]),r}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[t>=r.length?r.length-1:t]}(Array.isArray(n)?n:[n]),l="string"==typeof u&&!!u.includes("column"),d="string"==typeof u&&u.includes("reverse"),m=Xr();return{...c,className:(0,_e.useMemo)((()=>{const e={};return e.Base=vn({alignItems:l?"normal":t,flexDirection:u,flexWrap:s?"wrap":void 0,justifyContent:i,height:l&&o?"100%":void 0,width:!l&&o?"100%":void 0,marginBottom:s?`calc(${bn(a)} * -1)`:void 0},"",""),e.Items=vn(">*+*:not( marquee ){margin-top:",l?bn(a):void 0,";",Fn({marginLeft:l||d?void 0:bn(a),marginRight:!l&&d?bn(a):void 0})(),";}",""),e.WrapItems=vn(">*:not( marquee ){margin-bottom:",bn(a),";",Fn({marginLeft:!l&&d?bn(a):void 0,marginRight:l||d?void 0:bn(a)})(),";}>*:last-child:not( marquee ){",Fn({marginLeft:!l&&d?0:void 0,marginRight:l||d?void 0:0})(),";}",""),m(Rn,e.Base,s?e.WrapItems:e.Items,l?An:In,r)}),[t,r,m,u,o,a,l,d,i,s,Fn.watch()]),isColumn:l}}Fn.watch=()=>(0,z.isRTL)();const kn=(0,_e.createContext)({flexItemDisplay:void 0}),Un=rn((function(e,t){const{children:r,isColumn:n,...o}=Mn(e);return(0,_e.createElement)(kn.Provider,{value:{flexItemDisplay:n?"block":void 0}},(0,_e.createElement)(pn,he({},o,{ref:t}),r))}),"Flex"),Ln=rn((function(e,t){const r=function(e){const{className:t,display:r,isBlock:n=!1,...o}=en(e,"FlexItem"),a={},i=(0,_e.useContext)(kn).flexItemDisplay;return a.Base=vn({display:r||i},"",""),{...o,className:Xr()(Tn,a.Base,n&&On,t)}}(e);return(0,_e.createElement)(pn,he({},r,{ref:t}))}),"FlexItem");function jn(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=jn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const $n=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=jn(e))&&(n&&(n+=" "),n+=t);return n};var zn=r(5955),qn=r(9031),Bn=r(4275);const Yn=(0,j.createContext)(void 0);const Hn=function(e){const{icon:t,actions:r,children:n,buttonVariant:o}=e,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["icon","actions","children","buttonVariant"]),i=$().useContext(Yn);a.className=$n("wcpay-inline-notice",`wcpay-inline-${a.status}-notice`,a.className);let s=t;if(!0===s)switch(a.status){case"success":s=$().createElement(zn.A,null);break;case"error":case"warning":s=$().createElement(qn.A,null);break;default:s=$().createElement(Bn.A,null)}const c="wcpay-inline-notice__action",u=null==r?void 0:r.map(((e,t)=>{var r,n,a,s;if("url"in e)return $().createElement("a",{key:t,className:c,href:e.url},e.label);if(!i)return $().createElement(_n,{key:t,className:c,onClick:e.onClick,isBusy:null!==(r=e.isBusy)&&void 0!==r&&r,disabled:null!==(n=e.disabled)&&void 0!==n&&n,variant:o},e.label);const{Button:u}=i;return $().createElement(u,{key:t,className:c,onClick:e.onClick,isBusy:null!==(a=e.isBusy)&&void 0!==a&&a,disabled:null!==(s=e.disabled)&&void 0!==s&&s,variant:o},e.label)}));if(!i)return $().createElement(wn,Object.assign({},a),$().createElement(Un,{align:"center",justify:"flex-start"},s&&$().createElement(Ln,{className:`wcpay-inline-notice__icon wcpay-inline-${a.status}-notice__icon`},$().createElement(Ur,{icon:s,size:24})),$().createElement(Ln,{className:`wcpay-inline-notice__content wcpay-inline-${a.status}-notice__content`},n,u&&$().createElement(Un,{className:"wcpay-inline-notice__content__actions",align:"baseline",justify:"flex-start",gap:4},u))));const{Notice:l,Flex:d,FlexItem:m,Icon:p}=i;return $().createElement(l,Object.assign({},a),$().createElement(d,{align:"center",justify:"flex-start"},s&&$().createElement(m,{className:`wcpay-inline-notice__icon wcpay-inline-${a.status}-notice__icon`},$().createElement(p,{icon:s,size:24})),$().createElement(m,{className:`wcpay-inline-notice__content wcpay-inline-${a.status}-notice__content`},n,u&&$().createElement(d,{className:"wcpay-inline-notice__content__actions",align:"baseline",justify:"flex-start",gap:4},u))))},Wn=()=>$().createElement(Hn,{icon:!0,status:"warning",isDismissible:!1},ye({mixedString:(0,z.__)("WooPayments was in test mode when this order was placed. {{learnMoreLink/}}","woocommerce-payments"),components:{learnMoreLink:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/testing-and-troubleshooting/testing/",rel:"noopener noreferrer"},(0,z.__)("Learn more about test mode","woocommerce-payments"))}})),Vn=(window.wc.components,window.wp.url),Gn=window.wp.date,Qn=(window.wc.number,e=>(0,Vn.addQueryArgs)("admin.php",e)),Zn=(e,t=!1)=>{const r=t?Y()(e).endOf("day").utc().toISOString():Y()(e).startOf("day").utc().toISOString();return e&&(0,Gn.dateI18n)("Y-m-d H:i:s",r,!0)},Kn=window.wp.data,Xn=window.wp.dataControls,Jn="/wc/v3/payments",eo="wc/payments",to={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"},ro=e=>JSON.stringify(e,Object.keys(e).sort()),no={byId:{},queries:{},count:0,instant:{}},oo=e=>e&&e.deposits||{},ao=(e,t)=>(oo(e).byId||{})[t],io=e=>{const t=oo(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:n,account:o}=t.data,a={lastPaid:r.last_paid,pending:n.pending,available:n.available,instant:n.instant},i={};for(const[e,t]of Object.entries(a))t?.forEach((t=>{const{currency:r}=t;i[r]||(i[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),i[r][e]=t}));const s=Object.values(i);return{account:o,currencies:[...s.filter((e=>o.default_currency===e.currency)),...s.filter((e=>o.default_currency!==e.currency))]}},so=e=>(oo(e).overviews||{}).error,co=(e,t)=>{const r=ro(t);return(oo(e).queries||{})[r]||{}},uo=(e,t)=>(co(e,t).data||[]).map(ao.bind(void 0,e)),lo=e=>oo(e).count,mo=(e,t)=>co(e,t).error||{},po=(e,t)=>{const r=ro(t);return(oo(e).summary||{})[r]||{}},yo=(e,t)=>po(e,t).data||{},ho=(e,t)=>po(e,t).error||{},_o=e=>(oo(e).instant||{}).data;function fo(e){return{type:to.SET_DEPOSIT,data:e}}function go(e){return{type:to.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function wo(e,t){return{type:to.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function vo(e,t){return{type:to.SET_DEPOSITS,query:e,data:t}}function Eo(e){return{type:to.SET_DEPOSITS_COUNT,data:e}}function So(e,t,r){return{type:to.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function bo(e,t){return{type:to.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Ro(e,t,r){return{type:to.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function To(e){return{type:to.SET_INSTANT_DEPOSIT,data:e}}function*Oo(e){try{yield(0,Kn.dispatch)(eo).startResolution("getInstantDeposit",[e]);const t=yield(0,Xn.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield To(t),yield(0,Kn.dispatch)(eo).invalidateResolutionForStoreSelector("getDeposits"),yield(0,Kn.dispatch)(eo).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,Kn.dispatch)("core/notices").createSuccessNotice((0,z.sprintf)((0,z.__)("Instant payout for %s in transit.","woocommerce-payments"),ae(t.amount)),{actions:[{label:(0,z.__)("View details","woocommerce-payments"),url:Qn({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,Kn.dispatch)(eo).finishResolution("getInstantDeposit",[e])}}function*Ao(e){if(/\W/.test(e))return;const t=(0,Vn.addQueryArgs)(`${Jn}/deposits/${e}`);try{const e=yield(0,Xn.apiFetch)({path:t});yield fo(e)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving payout.","woocommerce-payments"))}}function*Io(){const e=(0,Vn.addQueryArgs)(`${Jn}/deposits/overview-all`);try{const t=yield(0,Xn.apiFetch)({path:e});yield go(t)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield wo()}}const Co=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Zn(e.dateBefore,!0),date_after:Zn(e.dateAfter),date_between:e.dateBetween&&[Zn(e.dateBetween[0]),Zn(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale}),No=`${Jn}/deposits/download`;function Do(e){return(0,Vn.addQueryArgs)(No,Co(e))}function*xo(e){const t=(0,Vn.addQueryArgs)(`${Jn}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Co(e)});try{const r=yield(0,Xn.apiFetch)({path:t})||{};yield vo(e,r.data),yield Eo(r.total_count);for(const e in r.data)yield Kn.controls.dispatch(eo,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving payouts.","woocommerce-payments")),yield So(e,null,t)}}function*Po(e){const t=(0,Vn.addQueryArgs)(`${Jn}/deposits/summary`,Co(e));try{const r=yield(0,Xn.apiFetch)({path:t});yield bo(e,r)}catch(t){yield Ro(e,null,t)}}const Fo={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"},Mo={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},ko=e=>e&&e.transactions||{},Uo=(e,t)=>{const r=ro(t);return ko(e)[r]||{}},Lo=(e,t)=>Uo(e,t).data||[],jo=(e,t)=>Uo(e,t).error||{},$o=(e,t)=>{const r=ro(t);return ko(e).summary[r]||{}},zo=(e,t)=>$o(e,t).data||{},qo=(e,t)=>$o(e,t).error||{},Bo=(e,t,r)=>{const n=ro(r);return ko(e).fraudProtection?.[t]?.[n]||{}},Yo=(e,t,r)=>Bo(e,t,r).data||[],Ho=(e,t,r)=>Bo(e,t,r).error||{},Wo=(e,t,r)=>{const n=ro(r);return ko(e).fraudProtection?.[t]?.summary[n]||{}},Vo=(e,t,r)=>Wo(e,t,r).data||{},Go=(e,t,r)=>Wo(e,t,r).error||{};function Qo(e,t){return{type:Fo.SET_TRANSACTIONS,query:e,data:t}}function Zo(e,t,r){return{type:Fo.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function Ko(e,t){return{type:Fo.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Xo(e,t,r){return{type:Fo.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function Jo(e,t,r){return{type:Fo.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function ea(e,t,r){return{type:Fo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function ta(e,t,r){return{type:Fo.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function ra(e,t,r){return{type:Fo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const na=e=>({user_email:e.userEmail,match:e.match,date_before:Zn(e.dateBefore,!0),date_after:Zn(e.dateAfter),date_between:e.dateBetween&&[Zn(e.dateBetween[0]),Zn(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:Y()(new Date).format("Z"),locale:e.userLocale});function*oa(e){const t=(0,Vn.addQueryArgs)(`${Jn}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...na(e)});try{const r=yield(0,Xn.apiFetch)({path:t});yield Qo(e,r.data||[])}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving transactions.","woocommerce-payments")),yield Zo(e,null,t)}}const aa=`${Jn}/transactions/download`;function ia(e){return(0,Vn.addQueryArgs)(aa,na(e))}function*sa(e){const t=(0,Vn.addQueryArgs)(`${Jn}/transactions/summary`,na(e));try{const r=yield(0,Xn.apiFetch)({path:t});yield Ko(e,r)}catch(t){yield Xo(e,null,t)}}function*ca(e,t){const r=(0,Vn.addQueryArgs)(`${Jn}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...na(t)});try{const n=yield(0,Xn.apiFetch)({path:r});yield Jo(e,t,n.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Jo(e,t,[]));yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving transactions.","woocommerce-payments")),yield ea(e,t,r)}}function*ua(e,t){const r=(0,Vn.addQueryArgs)(`${Jn}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),n={count:0,total:0};try{const o=yield(0,Xn.apiFetch)({path:r});yield ta(e,t,o||n)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield ta(e,t,n));yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving on review transactions.","woocommerce-payments")),yield ra(e,t,r)}}function la(e,t){return(0,Vn.addQueryArgs)(`${Jn}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...na(t)})}const da={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},ma=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},pa=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},ya=(e,t)=>ma(e,t),ha=(e,t)=>pa(e,t);function _a(e,t){return{type:da.SET_CHARGE,id:e,data:t}}function fa(e,t,r){return{type:da.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*ga(e){try{const t=yield(0,Xn.apiFetch)({path:`${Jn}/charges/${e}`});yield _a(e,t)}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving transaction.","woocommerce-payments")),yield fa(e,null,t)}}function*wa(e){try{const t=yield(0,Xn.apiFetch)({path:`${Jn}/charges/order/${e}`});yield _a(e,t)}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving transaction.","woocommerce-payments")),yield fa(e,null,t)}}const va={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Ea=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Sa=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function ba(e,t){return{id:e,type:va.SET_TIMELINE,data:t}}function Ra(e,t){return{id:e,type:va.SET_ERROR_FOR_TIMELINE,error:t}}function*Ta(e){try{const t=yield(0,Xn.apiFetch)({path:`${Jn}/timeline/${e}`});yield ba(e,t.data)}catch(t){yield Ra(e,t)}}const Oa={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},Aa={byId:{},queries:{},summary:{},cached:{}},Ia=e=>e&&e.disputes||{},Ca=(e,t)=>(Ia(e).byId||{})[t],Na=(e,t)=>{const r=Ia(e).byId||{};return r[t]?.error},Da=(e,t)=>(Ia(e).cached||{})[t],xa=(e,t)=>{const r=((e,t)=>{const r=ro(t);return(Ia(e).queries||{})[r]||{}})(e,t).data||[];return r.map(Da.bind(void 0,e))},Pa=(e,t)=>((e,t)=>{const r=ro(t);return(Ia(e).summary||{})[r]||{}})(e,t).data||{};var Fa;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(Fa||(Fa={}));const Ma=Fa;function ka(e,t){return{type:Ma.SET_PAYMENT_INTENT,id:e,data:t}}function Ua(e,t){return{type:Ma.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*La(e,t){var r;const n=e.payment_intent;try{yield(0,Xn.apiFetch)({path:"/wc/v3/payments/refund/",method:"post",data:{charge_id:e.id,amount:e.amount,reason:t,order_id:null===(r=null==e?void 0:e.order)||void 0===r?void 0:r.id}}),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getTimeline"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Kn.controls.dispatch("core/notices","createSuccessNotice",(0,z.sprintf)((0,z.__)("Refunded payment #%s.","woocommerce-payments"),n))}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.sprintf)((0,z.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),n))}}function*ja(e){try{const t=yield(0,Xn.apiFetch)({path:`${Jn}/payment_intents/${e}`});yield ka(e,t)}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving transaction.","woocommerce-payments")),yield Ua(e,t)}}function $a(e){return{type:Oa.SET_DISPUTE,data:e}}function za(e,t,r){return{type:Oa.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function qa(e,t){return{type:Oa.SET_DISPUTES,query:e,data:t}}function Ba(e,t){return{type:Oa.SET_DISPUTES_SUMMARY,query:e,data:t}}function*Ya(e){const{id:t,payment_intent:r}=e;try{yield Kn.controls.dispatch(eo,"startResolution","getDispute",[t]);const e=yield(0,Xn.apiFetch)({path:`${Jn}/disputes/${t}/close`,method:"post"});yield $a(e),yield ja(r),yield Kn.controls.dispatch(eo,"finishResolution","getDispute",[t]);const n=e.order?(0,z.sprintf)((0,z.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,z.__)("You have accepted the dispute.","woocommerce-payments");yield Kn.controls.dispatch("core/notices","createSuccessNotice",n)}catch(e){const r=(0,z.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield Kn.controls.dispatch("core/notices","createErrorNotice",r),yield Kn.controls.dispatch(eo,"finishResolution","getDispute",[t])}}const Ha=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Zn(e.dateBefore,!0),date_after:Zn(e.dateAfter),date_between:e.dateBetween&&[Zn(e.dateBetween[0]),Zn(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?G:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale}),Wa=`${Jn}/disputes/download`;function Va(e){return(0,Vn.addQueryArgs)(Wa,Ha(e))}function*Ga(e){const t=(0,Vn.addQueryArgs)(`${Jn}/disputes/${e}`);try{const e=yield(0,Xn.apiFetch)({path:t});yield $a(e)}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving dispute.","woocommerce-payments")),yield za(e,void 0,t)}}function*Qa(e){const t=(0,Vn.addQueryArgs)(`${Jn}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,ne.snakeCase)(e.orderBy),direction:e.order,...Ha(e)});try{const r=yield(0,Xn.apiFetch)({path:t})||{};yield qa(e,r.data)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving disputes.","woocommerce-payments"))}}function*Za(e){const t=(0,Vn.addQueryArgs)(`${Jn}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...Ha(e)});try{const r=yield(0,Xn.apiFetch)({path:t});yield Ba(e,r)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const Ka={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"},Xa={isDirty:!1,isSaving:!1,savingError:null,data:{}},Ja={},ei=[],ti=e=>e&&e.settings||Ja,ri=e=>ti(e).data||Ja,ni=e=>ri(e).duplicated_payment_method_ids||Ja,oi=e=>ri(e).is_wcpay_enabled||!1,ai=e=>ri(e).enabled_payment_method_ids||ei,ii=e=>ri(e).available_payment_method_ids||ei,si=e=>ri(e).payment_method_statuses||Ja,ci=e=>ti(e).isSaving||!1,ui=e=>ti(e).isDirty||!1,li=e=>ri(e).account_statement_descriptor||"",di=e=>ri(e).account_statement_descriptor_kanji||"",mi=e=>ri(e).account_statement_descriptor_kana||"",pi=e=>ri(e).account_business_support_email||"",yi=e=>ri(e).account_business_support_phone||"",hi=e=>ri(e).account_domestic_currency||"",_i=e=>ri(e).deposit_schedule_interval||"",fi=e=>ri(e).deposit_schedule_weekly_anchor||"",gi=e=>ri(e).deposit_schedule_monthly_anchor||"",wi=e=>ri(e).deposit_delay_days||"7",vi=e=>ri(e).deposit_completed_waiting_period||!1,Ei=e=>ri(e).deposit_status||"",Si=e=>ri(e).deposit_restrictions||"",bi=e=>ri(e).is_manual_capture_enabled||!1,Ri=e=>ri(e).is_test_mode_enabled||!1,Ti=e=>ri(e).is_test_mode_onboarding||!1,Oi=e=>ri(e).is_dev_mode_enabled||!1,Ai=e=>ri(e).is_payment_request_enabled||!1,Ii=e=>ri(e).is_debug_log_enabled||!1,Ci=e=>ri(e).is_multi_currency_enabled||!1,Ni=e=>ri(e).payment_request_enabled_locations||ei,Di=e=>ri(e).payment_request_button_type||"",xi=e=>ri(e).payment_request_button_size||"",Pi=e=>ri(e).payment_request_button_theme||"",Fi=e=>{const t=ri(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},Mi=e=>ri(e).is_saved_cards_enabled||!1,ki=e=>ti(e).savingError,Ui=e=>ri(e).is_card_present_eligible||!1,Li=e=>ri(e).is_wcpay_subscriptions_enabled||!1,ji=e=>ri(e).is_wcpay_subscriptions_eligible||!1,$i=e=>ri(e).is_subscriptions_plugin_active||!1,zi=e=>ri(e).is_woopay_enabled||!1,qi=e=>ri(e).is_woopay_global_theme_support_enabled||!1,Bi=e=>ri(e).woopay_custom_message||"",Yi=e=>ri(e).woopay_store_logo||"",Hi=e=>ri(e).woopay_enabled_locations||ei,Wi=e=>ri(e).current_protection_level||"basic",Vi=e=>ri(e).advanced_fraud_protection_settings||ei,Gi=e=>ri(e).show_woopay_incompatibility_notice||!1,Qi=e=>ri(e).is_stripe_billing_enabled||!1,Zi=e=>ri(e).is_migrating_stripe_billing||!1,Ki=e=>ri(e).stripe_billing_subscription_count||0,Xi=e=>ri(e).stripe_billing_migrated_count||0,Ji=window.wp.apiFetch;var es=r.n(Ji);function ts(e){return{type:Ka.SET_SETTINGS_VALUES,payload:e}}function rs(e){return ts({is_saved_cards_enabled:e})}function ns(e){return ts({is_card_present_eligible:e})}function os(e){return ts({payment_request_button_type:e})}function as(e){return ts({payment_request_button_size:e})}function is(e){return ts({payment_request_button_theme:e})}function ss(e){return ts({payment_request_button_border_radius:e})}function cs(e){return{type:Ka.SET_SETTINGS,data:e}}function us(e){return ts({is_wcpay_enabled:e})}function ls(e){return ts({is_payment_request_enabled:e})}function ds(e){return ts({enabled_payment_method_ids:[...e]})}function ms(e,t){return{type:Ka.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function ps(e){return{type:Ka.SET_SELECTED_PAYMENT_METHOD,id:e}}function ys(e){return{type:Ka.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function hs(e){return ts({is_manual_capture_enabled:e})}function _s(e){return ts({is_test_mode_enabled:e})}function fs(e){return ts({is_debug_log_enabled:e})}function gs(e){return ts({is_multi_currency_enabled:e})}function ws(e){return ts({is_wcpay_subscriptions_enabled:e})}function vs(e){return ts({account_statement_descriptor:e})}function Es(e){return ts({account_statement_descriptor_kanji:e})}function Ss(e){return ts({account_statement_descriptor_kana:e})}function bs(e){return ts({account_business_support_email:e})}function Rs(e){return ts({account_business_support_phone:e})}function Ts(e){return ts({deposit_schedule_interval:e})}function Os(e){return ts({deposit_schedule_weekly_anchor:e})}function As(e){return ts({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*Is(){let e=null;try{const e=(0,Kn.select)(eo).getSettings();yield ms(!0,null);const t=yield(0,Xn.apiFetch)({path:`${Jn}/settings`,method:"post",data:e});yield ts({payment_method_statuses:t.data.payment_method_statuses}),yield(0,Kn.dispatch)("core/notices").createSuccessNotice((0,z.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,Kn.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield ms(!1,e)}return null===e}function Cs(e){return ts({payment_request_enabled_locations:[...e]})}function Ns(e){return ts({is_woopay_enabled:e})}function Ds(e){return ts({is_woopay_global_theme_support_enabled:e})}function xs(e){return ts({woopay_custom_message:e})}function Ps(e){return ts({woopay_store_logo:e})}function Fs(e){return ts({woopay_enabled_locations:[...e]})}function Ms(e){return ts({current_protection_level:e})}function ks(e){return ts({advanced_fraud_protection_settings:e})}function Us(e){return ts({is_stripe_billing_enabled:e})}function*Ls(){try{yield(0,Kn.dispatch)(eo).startResolution("scheduleStripeBillingMigration"),yield(0,Xn.apiFetch)({path:`${Jn}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,Kn.dispatch)(eo).finishResolution("scheduleStripeBillingMigration")}function js(e,t){es()({path:`${Jn}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Error saving option","woocommerce-payments"))}))}function*$s(){const e=`${Jn}/settings`;try{const t=yield(0,Xn.apiFetch)({path:e});yield cs(t)}catch(e){yield(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Error retrieving settings.","woocommerce-payments"))}}const zs={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"},qs=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},Bs=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},Ys=e=>e.readers&&e.readers.list?e.readers.list:{};function Hs(e,t){return{type:zs.SET_CARD_READER_STATS,id:e,data:t}}function Ws(e,t){return{type:zs.SET_READERS,query:e,data:t}}function Vs(e,t,r){return{type:zs.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function Gs(e,t){return{type:zs.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*Qs(e,t){try{const r=yield(0,Xn.apiFetch)({path:`${Jn}/readers/charges/${t}`});yield Hs(e,r)}catch(t){yield Vs(e,null,t)}}function*Zs(e){const t=(0,Vn.addQueryArgs)(`${Jn}/readers`,{limit:e.limit});try{const r=yield(0,Xn.apiFetch)({path:t})||{};yield Ws(e,r)}catch(e){yield Gs(null,e)}}var Ks;!function(e){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"}(Ks||(Ks={}));const Xs=Ks,Js={},ec=e=>e&&e.capital||{},tc=e=>ec(e).summary,rc=e=>ec(e).summaryError,nc=e=>ec(e).loans||[],oc=e=>ec(e).loansError;function ac(e){return{type:Xs.SET_ACTIVE_LOAN_SUMMARY,data:e}}function ic(e){return{type:Xs.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function sc(e){return{type:Xs.SET_LOANS,data:e.data}}function cc(e){return{type:Xs.SET_ERROR_FOR_LOANS,error:e}}function*uc(){const e=`${Jn}/capital/active_loan_summary`;try{const t=yield(0,Xn.apiFetch)({path:e});yield ac(t)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield ic(e)}}function*lc(){const e=`${Jn}/capital/loans`;try{const t=yield(0,Xn.apiFetch)({path:e});yield sc(t)}catch(e){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield cc(e)}}const dc={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"},mc={summary:{}},pc=e=>e&&e.documents||{},yc=(e,t)=>{const r=ro(t);return pc(e)[r]||{}},hc=(e,t)=>yc(e,t).data||[],_c=(e,t)=>yc(e,t).error||{},fc=(e,t)=>{const r=ro(t);return pc(e).summary[r]||{}},gc=(e,t)=>fc(e,t).data||{},vc=(e,t)=>fc(e,t).error||{};function Ec(e,t){return{type:dc.SET_DOCUMENTS,query:e,data:t}}function Sc(e,t,r){return{type:dc.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function bc(e,t){return{type:dc.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Rc(e,t,r){return{type:dc.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const Tc=e=>({user_email:e.userEmail,match:e.match,date_before:Zn(e.dateBefore,!0),date_after:Zn(e.dateAfter),date_between:e.dateBetween&&[Zn(e.dateBetween[0]),Zn(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*Oc(e){const t=(0,Vn.addQueryArgs)(`${Jn}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Tc(e)});try{const r=yield(0,Xn.apiFetch)({path:t});yield Ec(e,r.data||[])}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving documents.","woocommerce-payments")),yield Sc(e,null,t)}}function*Ac(e){const t=(0,Vn.addQueryArgs)(`${Jn}/documents/summary`,Tc(e));try{const r=yield(0,Xn.apiFetch)({path:t});yield bc(e,r)}catch(t){yield Rc(e,null,t)}}const Ic={},Cc=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},Nc=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},Dc={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"},xc={summary:{},byId:{},isRequesting:!1},Pc=e=>e&&e.authorizations||{},Fc=(e,t)=>{const r=ro(t);return Pc(e)[r]||{}},Mc=(e,t)=>Fc(e,t).data||[],kc=(e,t)=>(Pc(e).byId||{})[t],Uc=(e,t)=>Fc(e,t).error||{},Lc=(e,t)=>{const r=ro(t);return Pc(e).summary[r]||{}},jc=(e,t)=>Lc(e,t).data||{},$c=(e,t)=>Lc(e,t).error||{},zc=e=>Pc(e).isRequesting,qc=e=>{var t;const r={wcpay_missing_order:(0,z.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,z.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,z.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,z.__)("This payment cannot be processed in its current state.","woocommerce-payments"),wcpay_capture_error:e=>{var t;return"amount_too_small"===(null===(t=e.data)||void 0===t?void 0:t.error_type)?(e=>{var t,r,n,o;if(!(null===(r=null===(t=e.data)||void 0===t?void 0:t.extra_details)||void 0===r?void 0:r.minimum_amount)||!(null===(o=null===(n=e.data)||void 0===n?void 0:n.extra_details)||void 0===o?void 0:o.minimum_amount_currency))return(0,z.__)("The payment amount is too small to be processed.","woocommerce-payments");const a=e.data.extra_details.minimum_amount_currency,i=ae(e.data.extra_details.minimum_amount,a);return(0,z.sprintf)((0,z.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),i,a.toUpperCase())})(e):(0,z.__)("The payment capture failed to complete.","woocommerce-payments")},wcpay_cancel_error:(0,z.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,z.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")},n=r[null!==(t=e.code)&&void 0!==t?t:""];return"function"==typeof n?n(e):null!=n?n:(0,z.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function Bc(e,t){return{type:Dc.SET_AUTHORIZATIONS,data:t,query:e}}function Yc(e,t){return{type:Dc.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function Hc(e){return{type:Dc.SET_AUTHORIZATION,data:e}}function Wc(e,t){return{type:Dc.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function Vc(e){return{type:Dc.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*Gc(e,t){try{yield Kn.controls.dispatch(eo,"startResolution","getAuthorization",[e]),yield Kn.controls.dispatch(eo,"setIsRequestingAuthorization",!0);const r=yield(0,Xn.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield Hc(n),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getTimeline"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getTransactions"),yield Kn.controls.dispatch("core/notices","createSuccessNotice",(0,z.sprintf)((0,z.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,z.sprintf)((0,z.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),n=qc(e);yield Kn.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Kn.controls.dispatch(eo,"finishResolution","getAuthorization",[e]),yield Kn.controls.dispatch(eo,"setIsRequestingAuthorization",!1)}}function*Qc(e,t){try{yield Kn.controls.dispatch(eo,"startResolution","getAuthorization",[e]),yield Kn.controls.dispatch(eo,"setIsRequestingAuthorization",!0);const r=yield(0,Xn.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield Hc(n),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getTimeline"),yield Kn.controls.dispatch(eo,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Kn.controls.dispatch("core/notices","createSuccessNotice",(0,z.sprintf)((0,z.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,z.sprintf)((0,z.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),n=qc(e);yield Kn.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Kn.controls.dispatch(eo,"finishResolution","getAuthorization",[e]),yield Kn.controls.dispatch(eo,"setIsRequestingAuthorization",!1)}}function Zc(e,t){return{type:Dc.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*Kc(e){var t;let{paged:r=1,per_page:n=25,orderby:o="created",order:a="asc"}=e;"capture_by"===o&&(o="created");const i=(0,Vn.addQueryArgs)(`${Jn}/authorizations`,{page:r,pagesize:n,sort:o,direction:a});try{const r=yield(0,Xn.apiFetch)({path:i});yield Bc(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Yc(e,t)}}function*Xc(e){try{if(e){const t=yield(0,Xn.apiFetch)({path:`${Jn}/authorizations/${e}`}),{is_captured:r,payment_intent_id:n,created:o}=t;yield Hc({payment_intent_id:n,captured:r,created:o})}}catch(e){"authorization_missing"!==e.code&&(yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving authorization.","woocommerce-payments")))}}function*Jc(e){const t=(0,Vn.addQueryArgs)(`${Jn}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,Xn.apiFetch)({path:t});yield Wc(e,null!=r?r:[])}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Zc(e,t)}}var eu;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(eu||(eu={}));const tu=eu,ru={},nu=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},ou=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function au(e,t){return{type:tu.SET_FILE,id:e,data:t}}function iu(e,t){return{type:tu.SET_ERROR_FOR_FILES,id:e,error:t}}function*su(e){try{const t=yield(0,Xn.apiFetch)({path:`${Jn}/file/${e}/details`});yield au(e,t)}catch(t){yield Kn.controls.dispatch("core/notices","createErrorNotice",(0,z.__)("Error retrieving file.","woocommerce-payments")),yield iu(e,t)}}function cu(e,t={}){const{customFormat:r=null,includeTime:n=!1,separator:o=" / ",timezone:a}=t,i=Y().utc(e).toISOString(),s=r||`${window.wcpaySettings.dateFormat}${n?`${o}${window.wcpaySettings.timeFormat}`:""}`;return(0,Gn.dateI18n)(s,i,a)}(0,Kn.registerStore)(eo,{reducer:(0,Kn.combineReducers)({deposits:(e=no,{type:t,query:r={},data:n=[],error:o})=>{const a=ro(r);switch(t){case to.SET_DEPOSIT:return{...e,byId:{...e.byId,[n.id]:n}};case to.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:n}};case to.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:o}};case to.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,ne.keyBy)(n,"id")},queries:{...e.queries,[a]:{data:(0,ne.map)(n,"id")}}};case to.SET_DEPOSITS_COUNT:return{...e,count:n};case to.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:o}}};case to.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case to.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}};case to.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:n}}}return e},transactions:(e=Mo,{type:t,query:r={},data:n=[],error:o,status:a})=>{const i=ro(r);switch(t){case Fo.SET_TRANSACTIONS:return{...e,[i]:{data:n}};case Fo.SET_ERROR_FOR_TRANSACTIONS:return{...e,[i]:{error:o}};case Fo.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}};case Fo.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{error:o}}};case Fo.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{data:n}}}};case Fo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{error:o}}}};case Fo.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{data:n}}}}};case Fo.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{error:o}}}}}}return e},charges:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case da.SET_CHARGE:e={...e,[r]:{...e[r],data:n}};break;case da.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:o}}}return e},timeline:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case va.SET_TIMELINE:e={...e,[r]:{data:n}};break;case va.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:o}}}return e},disputes:(e=Aa,{type:t,query:r={},data:n=[],id:o,error:a})=>{const i=ro(r);switch(t){case Oa.SET_DISPUTE:return{...e,byId:{...e.byId,[n.id]:n}};case Oa.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[o]:{error:a}}};break;case Oa.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,ne.keyBy)(n,"dispute_id")},queries:{...e.queries,[i]:{data:(0,ne.map)(n,"dispute_id")}}};case Oa.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}}}return e},settings:(e=Xa,{type:t,...r})=>{switch(t){case Ka.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case Ka.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case Ka.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case Ka.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 Ka.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:n,error:o})=>{switch(t){case zs.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:n}};break;case zs.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:o}};break;case zs.SET_READERS:e={...e,list:n}}return e},capital:(e=Js,t)=>{switch(t.type){case Xs.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case Xs.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case Xs.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case Xs.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=mc,{type:t,query:r={},data:n=[],error:o})=>{const a=ro(r);switch(t){case dc.SET_DOCUMENTS:return{...e,[a]:{data:n}};case dc.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:o}};case dc.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case dc.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}}}return e},paymentIntents:(e=Ic,t)=>{const{type:r,id:n}=t;switch(r){case Ma.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case Ma.SET_ERROR_FOR_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}},authorizations:(e=xc,t)=>{switch(t.type){case Dc.SET_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[r.payment_intent_id]:Object.assign(Object.assign({},e.byId[r.payment_intent_id]),r)})})}case Dc.SET_AUTHORIZATIONS:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{[ro(n)]:{data:r}})}case Dc.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:n}=t;return Object.assign(Object.assign({},e),{[ro(n)]:{error:r}})}case Dc.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[ro(n)]:{data:r||{}}})})}case Dc.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[ro(r)]:{error:n||""}})})}case Dc.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=ru,t)=>{const{type:r,id:n}=t;switch(r){case tu.SET_FILE:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case tu.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}}}),actions:{...t,...a,...c,...d,..._,...w,...S,...T,...I,...y,...x,...M},controls:Xn.controls,selectors:{...e,...o,...s,...l,...p,...g,...E,...R,...A,...N,...D,...F},resolvers:{...n,...i,...u,...m,...f,...v,...b,...O,...C,...h,...P,...k}});var uu=r(4848);const lu=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:r,dueBy:n,countdownDays:o})=>{const a=e?(0,z.__)("Please resolve the inquiry on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"):(0,z.__)("Please resolve the dispute on this order of %1$s labeled '%2$s' by %3$s.","woocommerce-payments"),i=(0,z.sprintf)(a,r,W[t].display,cu(n.toISOString()));let s=(0,z.sprintf)((0,z._n)("(%s day left)","(%s days left)",o,"woocommerce-payments"),o);return o<1&&(s=(0,z.__)("(Last day today)","woocommerce-payments")),(0,uu.jsxs)(uu.Fragment,{children:[(0,uu.jsx)("strong",{children:i})," ",s]})},du=({isPreDisputeInquiry:e,disputeReason:t,formattedAmount:r,dueBy:n})=>{const o=e?(0,z.__)("Please resolve the inquiry on this order of %1$s with reason '%2$s'.","woocommerce-payments"):(0,z.__)("This order has a payment dispute for %1$s for the reason '%2$s'. ","woocommerce-payments"),a=(0,z.sprintf)(o,r,W[t].display),i=(0,z.sprintf)((0,z.__)("Please respond before %1$s.","woocommerce-payments"),cu(n.toISOString()));return(0,uu.jsxs)(uu.Fragment,{children:[(0,uu.jsx)("strong",{children:a})," ",i]})},mu=({disputeReason:e,formattedAmount:t,isPreDisputeInquiry:r,dueBy:n,countdownDays:o,disputeDetailsUrl:a})=>{(0,j.useEffect)((()=>{ee("wcpay_order_dispute_notice_view",{is_inquiry:r,dispute_reason:e,due_by_days:o})}),[r,e,o]);const i=o<7,s=o<1?(0,z.__)("Respond today","woocommerce-payments"):(0,z.__)("Respond now","woocommerce-payments"),c=i?(0,uu.jsx)(lu,{isPreDisputeInquiry:r,disputeReason:e,formattedAmount:t,dueBy:n,countdownDays:o}):(0,uu.jsx)(du,{isPreDisputeInquiry:r,disputeReason:e,formattedAmount:t,dueBy:n});return(0,uu.jsx)(Hn,{status:o<3?"error":"warning",isDismissible:!1,actions:[{label:s,variant:"secondary",onClick:()=>{ee("wcpay_order_dispute_notice_action_click",{due_by_days:o}),window.location=a}}],children:c})},pu=({message:e,disputeDetailsUrl:t})=>(0,uu.jsxs)(Hn,{status:"warning",isDismissible:!1,children:[e,(0,_e.createInterpolateElement)((0,z.__)(" <a>View details</a>","woocommerce-payments"),{a:(0,uu.jsx)("a",{href:t})})]}),yu=({chargeId:e,onDisableOrderRefund:t})=>{const{data:r}=(e=>(0,Kn.useSelect)((t=>{const r=t(eo);return((e,t)=>{const{getCharge:r,isResolving:n,getChargeError:o,hasFinishedResolution:a}=t;return{data:r(e),error:o(e),isLoading:n("getCharge",[e])||!a("getCharge",[e])}})(e,r)}),[e]))(e),n=Qn({page:"wc-admin",path:`/payments/${"transactions"}/details`,id:e});(0,j.useEffect)((()=>{const{dispute:e}=r;var n;r?.dispute&&(n=e.status,de(n)||"won"===n||t(e.status))}),[r,t]);const{dispute:o}=r;if(!r?.dispute)return null;if(le(o.status)&&!de(o.status))return(0,uu.jsx)(pu,{message:(0,z.__)("This order has an active payment dispute. Refunds and order editing are disabled.","woocommerce-payments"),disputeDetailsUrl:n});if("lost"===o.status)return(0,uu.jsx)(pu,{message:(0,z.__)("Refunds and order editing have been disabled as a result of a lost dispute.","woocommerce-payments"),disputeDetailsUrl:n});if(!ue(o.status))return null;if(!o.evidence_details?.due_by)return null;const a=Y()().utc(),i=Y().unix(o.evidence_details?.due_by).utc();return a.isBefore(i)?(0,uu.jsx)(mu,{chargeId:e,disputeReason:o.reason,formattedAmount:ie(o.amount,o.currency),isPreDisputeInquiry:de(o.status),dueBy:i,countdownDays:Math.floor(i.diff(a,"days",!0)),disputeDetailsUrl:n}):null},hu=window.wp.keycodes,_u=(0,_e.createElement)(be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_e.createElement)(be.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),fu=new Set(["alert","status","log","marquee","timer"]);let gu=[],wu=!1;let vu=0;const Eu=(0,_e.forwardRef)((function e(t,r){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:a=null,focusOnMount:i=!0,shouldCloseOnEsc:s=!0,shouldCloseOnClickOutside:c=!0,isDismissible:u=!0,aria:l={labelledby:null,describedby:null},onRequestClose:d,icon:m,closeButtonLabel:p,children:y,style:h,overlayClassName:_,className:f,contentLabel:g,onKeyDown:w,isFullScreen:v=!1,__experimentalHideHeader:E=!1}=t,S=(0,_e.useRef)(),b=(0,Ee.useInstanceId)(e),R=a?`components-modal-header-${b}`:l.labelledby,T=(0,Ee.useFocusOnMount)(i),O=(0,Ee.useConstrainedTabbing)(),A=(0,Ee.useFocusReturn)(),I=(0,Ee.__experimentalUseFocusOutside)(d);return(0,_e.useEffect)((()=>(vu++,1===vu&&(function(e){if(wu)return;const t=document.body.children;(0,ne.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||fu.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),gu.push(t))})),wu=!0}(S.current),document.body.classList.add(n)),()=>{vu--,0===vu&&(document.body.classList.remove(n),wu&&((0,ne.forEach)(gu,(e=>{e.removeAttribute("aria-hidden")})),gu=[],wu=!1))})),[]),(0,_e.createPortal)((0,_e.createElement)("div",{ref:(0,Ee.useMergeRefs)([S,r]),className:ge()("components-modal__screen-overlay",_),onKeyDown:function(e){s&&e.keyCode===hu.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),d&&d(e))}},(0,_e.createElement)(yr,{document},(0,_e.createElement)("div",he({className:ge()("components-modal__frame",f,{"is-full-screen":v}),style:h,ref:(0,Ee.useMergeRefs)([O,A,T]),role:o,"aria-label":g,"aria-labelledby":g?null:R,"aria-describedby":l.describedby,tabIndex:"-1"},c?I:{},{onKeyDown:w}),(0,_e.createElement)("div",{className:ge()("components-modal__content",{"hide-header":E}),role:"document"},!E&&(0,_e.createElement)("div",{className:"components-modal__header"},(0,_e.createElement)("div",{className:"components-modal__header-heading-container"},m&&(0,_e.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},m),a&&(0,_e.createElement)("h1",{id:R,className:"components-modal__header-heading"},a)),u&&(0,_e.createElement)(_n,{onClick:d,icon:_u,label:p||(0,z.__)("Close dialog")})),y)))),document.body)}));const Su=e=>{var{children:t,actions:r,className:n}=e,o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","actions","className"]);return $().createElement(Eu,Object.assign({className:$n("wcpay-confirmation-modal",n)},o),t,$().createElement(be.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),$().createElement("div",{className:"wcpay-confirmation-modal__footer"},r))},bu=({orderStatus:e,refundAmount:t,formattedRefundAmount:r,refundedAmount:n})=>{const[o,a]=(0,_e.useState)(!0),i=()=>{a(!1)},s=()=>{const t=document.querySelector("#order_status");t.value=e,t.dispatchEvent(new Event("change"))};return(0,uu.jsx)(uu.Fragment,{children:o&&(0,uu.jsx)(Su,{title:(0,z.__)("Refund order in full","woocommerce-payments"),isDismissible:!1,className:"refund-confirmation-modal",actions:(0,uu.jsxs)(uu.Fragment,{children:[(0,uu.jsx)(_n,{isSecondary:!0,onClick:()=>{s(),i()},children:(0,z.__)("Cancel","woocommerce-payments")}),(0,uu.jsx)(_n,{isPrimary:!0,onClick:()=>{jQuery.ajax({type:"post",url:woocommerce_admin_meta_boxes.ajax_url,data:{action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce,refund_amount:t,refunded_amount:n,api_refund:!0},beforeSend:function(){jQuery(".refund-confirmation-modal").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},success:function(e){!0===e.success?window.location.reload():(s(),(0,Kn.dispatch)("core/notices").createErrorNotice(e.data.error))},complete:function(){jQuery(".refund-confirmation-modal").unblock(),i()}})},children:(0,z.sprintf)((0,z.__)("Refund %s","woocommerce-payments"),r)})]}),children:(0,uu.jsx)("p",{children:(0,z.sprintf)((0,z.__)('Issue a full refund back to your customer\'s payment method using %s. This action can not be undone. To issue a partial refund, click "Cancel", and use the "Refund" button in the order details below.',"woocommerce-payments"),"WooPayments")})})})},Ru=({title:e,confirmButtonText:t,cancelButtonText:r,confirmationMessage:n,onConfirm:o,onCancel:a})=>{const[i,s]=(0,_e.useState)(!0),c=()=>{s(!1)},u=$().createElement($().Fragment,null,$().createElement(_n,{variant:"secondary",onClick:()=>{a(),c()}},r),$().createElement(_n,{variant:"primary",onClick:()=>{o(),c()}},t));return $().createElement($().Fragment,null,i&&$().createElement(Su,{title:e,isDismissible:!1,className:"generic-confirmation-modal",actions:u,onRequestClose:()=>!1},$().createElement("p",null,n)))},Tu={CANCELLED:(0,z.__)("cancelled","woocommerce-payments"),COMPLETED:(0,z.__)("completed","woocommerce-payments"),FAILED:(0,z.__)("failed","woocommerce-payments"),ON_HOLD:(0,z.__)("on-hold","woocommerce-payments"),PENDING:(0,z.__)("pending","woocommerce-payments"),PROCESSING:(0,z.__)("processing","woocommerce-payments"),REFUNDED:(0,z.__)("refunded","woocommerce-payments"),TRASH:(0,z.__)("trash","woocommerce-payments")},Ou="wc-cancelled",Au="wc-completed",Iu="wc-failed",Cu="wc-on-hold",Nu="wc-pending",Du="wc-processing",xu="wc-refunded",Pu="wc-trash",Fu={[Ou]:Tu.CANCELLED,[Au]:Tu.COMPLETED,[Iu]:Tu.FAILED,[Cu]:Tu.ON_HOLD,[Nu]:Tu.PENDING,[Du]:Tu.PROCESSING,[xu]:Tu.REFUNDED,[Pu]:Tu.TRASH};function Mu(e){const t=document.createElement("div");t.id="wcpay-orderstatus-confirm-container",document.body.appendChild(t),L().render(e,t)}function ku(){console.log("No specific action defined for this status change.")}const Uu={[Ou]:function(e,t){if(e===Ou)return;const r=q("hasOpenAuthorization"),n=q("canRefund"),o=q("refundAmount");if(r&&function(e,t){const r=ye({mixedString:(0,z.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{cancelAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer"},(0,z.__)("authorized but payment has not been captured","woocommerce-payments")),cancelAuthorization:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#cancelling-authorizations",rel:"noopener noreferrer"},(0,z.__)("cancel the payment","woocommerce-payments")),newOrderStatus:$().createElement("b",null,Fu[t])}});Mu($().createElement(Ru,{title:(0,z.__)("Cancel payment","woocommerce-payments"),confirmButtonText:(0,z.__)("Cancel order and payment","woocommerce-payments"),cancelButtonText:(0,z.__)("Cancel","woocommerce-payments"),confirmationMessage:r,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t),!r&&n&&o>0){const t=ye({mixedString:(0,z.__)("Are you trying to issue a refund for this order? If so, please click {{doNothingBold/}} and see our documentation on {{howtoIssueRefunds/}}. If you want to mark this order as Cancelled without issuing a refund, click {{cancelOrderBold/}}.","woocommerce-payments"),components:{doNothingBold:$().createElement("b",null,(0,z.__)("Do Nothing","woocommerce-payments")),cancelOrderBold:$().createElement("b",null,(0,z.__)("Cancel order","woocommerce-payments")),howtoIssueRefunds:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/managing-money/#refunds",rel:"noopener noreferrer"},(0,z.__)("how to issue refunds","woocommerce-payments"))}});Mu($().createElement(Ru,{title:(0,z.__)("Cancel order","woocommerce-payments"),confirmButtonText:(0,z.__)("Cancel order","woocommerce-payments"),cancelButtonText:(0,z.__)("Do Nothing","woocommerce-payments"),confirmationMessage:t,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}},[Au]:function(e,t){e!==Au&&q("hasOpenAuthorization")&&function(e,t){const r=ye({mixedString:(0,z.__)("This order has been {{authorizedNotCaptured/}} yet. Changing the status to {{newOrderStatus/}} will also {{captureAuthorization/}}. Do you want to continue?","woocommerce-payments"),components:{authorizedNotCaptured:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#authorize-vs-capture",rel:"noopener noreferrer"},(0,z.__)("authorized but payment has not been captured","woocommerce-payments")),captureAuthorization:$().createElement("a",{target:"_blank",href:"https://woocommerce.com/document/woopayments/settings-guide/authorize-and-capture/#capturing-authorized-payments",rel:"noopener noreferrer"},(0,z.__)("capture the payment","woocommerce-payments")),newOrderStatus:$().createElement("b",null,Fu[t])}});Mu($().createElement(Ru,{title:(0,z.__)("Capture payment","woocommerce-payments"),confirmButtonText:(0,z.__)("Complete order and capture payment","woocommerce-payments"),cancelButtonText:(0,z.__)("Cancel","woocommerce-payments"),confirmationMessage:r,onConfirm:()=>{var e;const t=(null===(e=document.querySelector("#order_status"))||void 0===e?void 0:e.closest("form"))||null;null!==t&&t.submit()},onCancel:()=>{const t=document.querySelector("#order_status");null!==t&&(t.value=e,t.dispatchEvent(new Event("change")))}}))}(e,t)},[xu]:function(e){e!==xu&&function(e,t,r){t?r<=0?(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Invalid Refund Amount","woocommerce-payments")):Mu($().createElement(bu,{orderStatus:e,refundAmount:r,formattedRefundAmount:q("formattedRefundAmount"),refundedAmount:q("refundedAmount")})):(0,Kn.dispatch)("core/notices").createErrorNotice((0,z.__)("Order cannot be refunded","woocommerce-payments"))}(e,q("canRefund"),q("refundAmount"))}};function Lu(e){const t=document.querySelector("button.refund-items");if(!t)return;t.disabled=!0;let r="";ue(e)?r=(0,z.__)("Refunds and order editing are disabled during disputes.","woocommerce-payments"):le(e)?r=(0,z.__)("Refunds and order editing are disabled during an active dispute.","woocommerce-payments"):"lost"===e&&(r=(0,z.__)("Refunds and order editing have been disabled as a result of a lost dispute.","woocommerce-payments")),jQuery(t).parent().find(".woocommerce-help-tip").attr({title:r,"aria-label":r}).tipTip()}jQuery((function(e){var t,r;const n=null!==(t=q("disableManualRefunds"))&&void 0!==t&&t,o=null!==(r=q("manualRefundsTip"))&&void 0!==r?r:"",a=q("chargeId"),i=q("testMode"),s=""!==q("orderTestModeMatch");!function(){const e=document.querySelector("#wcpay-order-payment-details-container");e&&L().render((0,uu.jsxs)(uu.Fragment,{children:[i&&(0,uu.jsx)(Wn,{}),a&&s&&(0,uu.jsx)(yu,{chargeId:a,onDisableOrderRefund:Lu})]}),e)}(),e("#woocommerce-order-items").on("click","button.refund-items",(function(){const t=e(".do-manual-refund");n?t.hide():t.attr({title:o}).tipTip()})),e("select#order_status").on("change",(function(){let t=e("input#original_post_status").val()||e("input#original_order_status").val();var r;t&&!t.startsWith("wc-")&&(t="wc-"+t),(r=this.value,Uu[r]||ku)(t,this.value)}))}))})()})();