@yuno-payments/dashboard-api-mfe 0.36.57-beta.2 → 0.36.57-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
package/build/esm/index.js
CHANGED
|
@@ -55,7 +55,7 @@ function ai(e){const t=ni.parse(e),n={};for(const e in t)void 0!==t[e]&&(n[e]=t[
|
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the MIT license found in the
|
|
57
57
|
* LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/"production"===process.env.NODE_ENV?vg.exports=function(){if(yg)return bg;yg=1;var e=k,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,a=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function r(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!t(e,a)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return o(function(){u.value=s,u.getSnapshot=t,r(u)&&l({inst:u})},[e,s,t]),a(function(){return r(u)&&l({inst:u}),e(function(){r(u)&&l({inst:u})})},[e]),i(s),s};return bg.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,bg}():vg.exports=(xg||(xg=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!n(e,a)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=t.useState,o=t.useEffect,i=t.useLayoutEffect,r=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,l){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=l();if(!c){var d=l();n(p,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var m=(d=a({inst:{value:p,getSnapshot:l}}))[0].inst,h=d[1];return i(function(){m.value=p,m.getSnapshot=l,e(m)&&h({inst:m})},[u,p,l]),o(function(){return e(m)&&h({inst:m}),u(function(){e(m)&&h({inst:m})})},[u]),r(p),p};kg.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),kg);var wg=vg.exports;const _g=wg.useSyncExternalStore,Eg=x.createContext(void 0),Cg=x.createContext(!1);function Sg(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Eg),window.ReactQueryClientContext):Eg)}const Rg=({context:e}={})=>{const t=x.useContext(Sg(e,x.useContext(Cg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tg=({client:e,children:t,context:n,contextSharing:a=!1})=>{x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),"production"!==process.env.NODE_ENV&&a&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=Sg(n,a);return x.createElement(Cg.Provider,{value:!n&&a},x.createElement(o.Provider,{value:e},t))},jg=x.createContext(!1);jg.Provider;const Ag=x.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Ig(e,t){return"function"==typeof e?e(...t):!!e}function Og(e,t){const n=Rg({context:e.context}),a=x.useContext(jg),o=x.useContext(Ag),i=n.defaultQueryOptions(e);i._optimisticResults=a?"isRestoring":"optimistic",i.onError&&(i.onError=ng.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ng.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ng.batchCalls(i.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,o),(e=>{x.useEffect(()=>{e.clearReset()},[e])})(o);const[r]=x.useState(()=>new t(n,i)),s=r.getOptimisticResult(i);if(_g(x.useCallback(e=>{const t=a?()=>{}:r.subscribe(ng.batchCalls(e));return r.updateResult(),t},[r,a]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),x.useEffect(()=>{r.setOptions(i,{listeners:!1})},[i,r]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,s,a))throw((e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}))(i,r,o);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:a})=>e.isError&&!t.isReset()&&!e.isFetching&&Ig(n,[e.error,a]))({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:r.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:r.trackResult(s)}function Pg(e,t,n){return Og(Af(e,t,n),pg)}function Lg(e,t,n){const a=function(e,t,n){return Hf(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),o=Rg({context:a.context}),[i]=x.useState(()=>new gg(o,a));x.useEffect(()=>{i.setOptions(a)},[i,a]);const r=_g(x.useCallback(e=>i.subscribe(ng.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=x.useCallback((e,t)=>{i.mutate(e,t).catch(zg)},[i]);if(r.error&&Ig(i.options.useErrorBoundary,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function zg(){}function Dg(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function qg(e){return Lg(function(e){var t=e.code,n=e.accountCode;return Ef.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Ng(e){return Lg(function(e){var t=e.code,n=e.payload,a=e.accountCode;return Ef.getInstance().updateWebhookV2(t,n,a)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Mg(){return Lg(function(e){var t=e.name,n=e.principal;return Ef.getInstance().postAccount(t,n)})}function Fg(){return Lg(function(e){var t=e.name,n=e.code,a=e.principal;return Ef.getInstance().patchAccountV2({name:t,code:n,principal:a})})}function Ug(){return Lg(function(e){var t=e.account_code;return Ef.getInstance().putAccountPrincipal({account_code:t})})}function Bg(){return Lg(function(e){var t=e.organizationCode,n=e.userCode,a=e.payload;return Ef.getInstance().putAccountsUserMassive(t,n,a)})}function Hg(){return Lg(function(e){var t=e.organizationCode,n=e.userCode,a=e.payload;return Ef.getInstance().deleteAccountsUserMassive(t,n,a)})}function Wg(){return Lg(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Gg(){return Lg(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Vg(){return Lg(function(e){return Ef.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function $g(){return Lg(["post-connection"],function(e){var t=e.payload;return Ef.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})}function Kg(){return Lg(["new-post-connection-validate"],function(){return Ef.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Qg(){return Lg(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return Ef.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})}function Jg(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Xg(){return Lg(function(e){return Ef.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Yg(){return Lg(["patch-organizations"],function(){return Ef.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})}function Zg(){return Lg(function(e){return Ef.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})}function ey(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().changePasswordV2(a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function ty(e){return Lg(function(e){return Ef.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function ny(){return Lg(function(e){return Ef.getInstance().inviteUsersMassive(e,e.organizationCode)})}function ay(){return Lg(function(e){var t=e.userCode,n=e.organizationCode;return Ef.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})}function oy(){return Lg(function(e){return Ef.getInstance().createUserAuth0(e)})}function iy(){return Lg(function(e){return Ef.getInstance().postCall(e)})}function ry(){return Lg(function(e){return Ef.getInstance().changeLoginMethods(e)})}function sy(e){return Lg(function(e){return Ef.getInstance().updateIsActiveCheckout(e)},e)}function cy(){return Lg(function(e){var t=e.accountCode,n=e.template;return Ef.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then(function(e){return null==e?void 0:e.data})})}function uy(){return Lg(function(e){var t=e.accountCode,n=e.theme;return Ef.getInstance().updateStylingTheme({accountCode:t,theme:n}).then(function(e){return null==e?void 0:e.data})})}function ly(){return Lg(function(e){var t=e.payload,n=e.transactionId,a=e.paymentId,o=e.action;return Ef.getInstance().createOperationTransaction(t,n,a,o)})}function py(){return Lg(function(e){var t=e.payload,n=e.paymentId,a=e.transactionId,o=e.handleSetProgress;return Ef.getInstance().uploadChargebacks(t,n,a,o)})}var dy=new ig({}),my=new class{constructor(e={}){this.queryCache=e.queryCache||new ig,this.mutationCache=e.mutationCache||new cg,this.logger=e.logger||tg,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=$f.subscribe(()=>{$f.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Qf.subscribe(()=>{Qf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=If(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const a=Af(e,t,n),o=this.getQueryData(a.queryKey);return o?Promise.resolve(o):this.fetchQuery(a)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const a=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==a?void 0:a.state.data);if(void 0===o)return;const i=Af(e),r=this.defaultQueryOptions(i);return this.queryCache.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ng.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=If(e,t),a=this.queryCache;ng.batch(()=>{a.findAll(n).forEach(e=>{a.remove(e)})})}resetQueries(e,t,n){const[a,o]=If(e,t,n),i=this.queryCache,r={type:"active",...a};return ng.batch(()=>(i.findAll(a).forEach(e=>{e.reset()}),this.refetchQueries(r,o)))}cancelQueries(e,t,n){const[a,o={}]=If(e,t,n);void 0===o.revert&&(o.revert=!0);const i=ng.batch(()=>this.queryCache.findAll(a).map(e=>e.cancel(o)));return Promise.all(i).then(Rf).catch(Rf)}invalidateQueries(e,t,n){const[a,o]=If(e,t,n);return ng.batch(()=>{var e,t;if(this.queryCache.findAll(a).forEach(e=>{e.invalidate()}),"none"===a.refetchType)return Promise.resolve();const n={...a,type:null!=(e=null!=(t=a.refetchType)?t:a.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[a,o]=If(e,t,n),i=ng.batch(()=>this.queryCache.findAll(a).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:a.refetchPage}})}));let r=Promise.all(i).then(Rf);return null!=o&&o.throwOnError||(r=r.catch(Rf)),r}fetchQuery(e,t,n){const a=Af(e,t,n),o=this.defaultQueryOptions(a);void 0===o.retry&&(o.retry=!1);const i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Rf).catch(Rf)}fetchInfiniteQuery(e,t,n){const a=Af(e,t,n);return a.behavior=ug(),this.fetchQuery(a)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Rf).catch(Rf)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(t=>zf(e)===zf(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Df(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Df(e,t.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(t=>zf(e)===zf(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Df(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Df(e,t.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=Lf(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:dy});function hy(){return Lg(function(e){return Ef.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function fy(){return Lg(function(e){return Ef.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})}function gy(){return Lg(function(e){return Ef.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function yy(){return Lg(function(e){return Ef.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})}function vy(a){var o=this;return Lg(function(){return t(o,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().createReportTemplate(a).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(a){return t(o,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,my.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=my.getQueryData(["GET/reports/templates"]),my.setQueryData(["GET/reports/templates"],function(t){return e(e([],t,!0),[a],!1)}),[2,{previousTemplates:t}]}})})},onError:function(e,t,n){my.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){my.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function by(e){return Lg(function(){return Ef.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function xy(e,a,o){var i=this;return void 0===o&&(o=null),Lg(function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().postSmartRoutingCreateWorkflow(e,a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,t.sent()]}})})},o)}function ky(e,a){var o=this,i=e.versionCode,r=e.accountCode,s=e.organizationCode;return void 0===a&&(a=null),Lg(function(){return t(o,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().postSmartRoutingPublishVersion(r,i,s).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},a)}function wy(e,t){var n=e.data,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingUpdateWorkflow(a,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)}function _y(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().deleteSmartRoutingVersion(a,n).then(function(e){return null==e?void 0:e.data})},t)}function Ey(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().postSmartRoutingDuplicateVersion(a,n).then(function(e){return null==e?void 0:e.data})},t)}function Cy(e,t){var n=e.paymentMethod,a=e.active,o=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingToggleMethod(o,n,a).then(function(e){return null==e?void 0:e.data})},t)}function Sy(e,t){var n=e.declinedId,a=e.accountCode;return void 0===t&&(t=null),Lg(function(e){return void 0===e&&(e=null),Ef.getInstance().updateSmartRoutingDeclinedGroup(a,n,e).then(function(e){return null==e?void 0:e.data})},t)}function Ry(e){var t=e.accountCode;return Lg(function(e){return void 0===e&&(e=null),Ef.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)}function Ty(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(e){return void 0===e&&(e=!1),Ef.getInstance().updateSmartRoutingFavorite(a,n,e).then(function(e){return null==e?void 0:e.data})},t)}function jy(e,t){var n=e.code,a=e.name,o=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:a}).then(function(e){return null==e?void 0:e.data})},t)}function Ay(e,t){var n=e.accountCode,a=e.workflowVersionCode;return void 0===t&&(t=null),Lg(function(e){return Ef.getInstance().simulateSmartRoutingTransaction(n,a,e).then(function(e){return null==e?void 0:e.data})},t)}function Iy(e,t){return void 0===t&&(t=null),Lg(function(t){return Ef.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)}function Oy(e,t){return void 0===t&&(t={}),Lg(function(t){var n=t.declinedGroupCode;return Ef.getInstance().removeDeclinedGroup(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},o(o({},t),{useErrorBoundary:!1}))}function Py(e,t){return void 0===t&&(t={}),Lg(function(t){var n=t.payload;return Ef.getInstance().multiAccountDeclinedGroupCreate(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},o(o({},t),{useErrorBoundary:!1}))}var Ly=function(e){return Lg(function(t){return Ef.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},zy=function(e){return Lg(function(t){return Ef.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})};function Dy(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})}function qy(){return Lg(function(e){var t=e.userCode,n=e.organizationCode;return Ef.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})}function Ny(){return Lg(function(){return Ef.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})}function My(){return Lg(function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Fy(){var e=this;return Lg(function(a){var o=a.payload,i=a.id,r=a.accountCode;return t(e,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().editRoles({payload:o,id:i},r)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function Uy(){return Lg(function(e){return Ef.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})}function By(){return Lg(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})}function Hy(){return Lg(["post-delete-payment-link"],function(e){var t=e.code;return Ef.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})}function Wy(){return Lg(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,a=e.paymentLinkCode;return Ef.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:a}).then(function(e){return null==e?void 0:e.data})})}function Gy(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function Vy(){return Lg(function(e){return Ef.getInstance().postUserThemeSettings(e)})}function $y(){return Lg(function(e){var t=e.payload,n=e.section;return Ef.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(e){var t=my.getQueryData(["fetch-profile"]);e.data&&my.setQueryData(["fetch-profile"],o(o({},t),{settings:e.data}))}})}function Ky(e){return Lg(["pinned-sections"],function(e){var t=e.payload;return Ef.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Qy(){return Lg(function(e){var t=e.password,n=e.otp;return Ef.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})}function Jy(){return Lg(function(){return Ef.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})}function Xy(){return Lg(function(e){return Ef.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})}function Yy(){return Lg(function(e){return Ef.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})}function Zy(){return Lg(function(){return Ef.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})}function ev(){return Lg(["post-get-allowlist-items"],function(e){var t=e.payload;return Ef.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function tv(){return Lg(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function nv(){return Lg(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function av(){return Lg(["patch-change-status-allowlist"],function(e){var t=e.payload;return Ef.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ov(){return Lg(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return Ef.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function iv(){return Lg(["post-add-allowlist-items"],function(e){var t=e.payload;return Ef.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function rv(){return Lg(["patch-allowlist"],function(e){var t=e.payload;return Ef.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function sv(){return Lg(["post-blacklist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function cv(){return Lg(["put-blacklist"],function(e){return Ef.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function uv(){return Lg(["change-blacklist"],function(e){return Ef.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function lv(){return Lg(["change-blacklist-item"],function(e){return Ef.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function pv(){return Lg(["post-blacklist-items"],function(e){var t=e.payload;return Ef.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function dv(){return Lg(["delete-blacklist"],function(e){var t=e.black_list_code;return Ef.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function mv(e){var t=e.handleSetProgress;return Lg(["post-blacklist-batch"],function(e){var n=e.blacklist_code,a=e.expiration_days,o=e.file;return Ef.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:a,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function hv(){return Lg(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return Ef.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function fv(){return Lg(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,a=e.account_code;return Ef.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:a}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function gv(){return Lg(["valiate-blacklist-items"],function(e){return Ef.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function yv(){return Lg(["delete-allowlist-item"],function(e){return Ef.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function vv(){return Lg(["validate-allowlist-items"],function(e){return Ef.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})}function bv(e){var t=e.fileName,n=e.onSuccess,a=e.onError,o=w(0),i=o[0],r=o[1],s=_({cancel:function(){return null}}),c=Lg(["upload-file-chargeback",t],function(e){var t=Ef.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:r}),o=t.promise,i=t.cancel;return s.current.cancel=i,o.then(function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==a||a(),e})},{useErrorBoundary:!1});return{mutation:c,cancelRequest:s.current.cancel,progress:i}}function xv(){return Lg(function(e){return Ef.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function kv(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().batchRefundByFile({payload:a}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function wv(){var e=this;return Lg(function(a){var o=a.batchRefundId,i=a.organizationCode,r=a.accountCode;return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getBatchRefundProcessedFileDownload(o,i,r).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function _v(){var e=this;return Lg(function(a){var o=a.batchRefundId,i=a.organizationCode,r=a.accountCode;return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getBatchRefundUserFileDownload(o,i,r).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function Ev(){var e=_({cancel:function(){return null}}),t=Lg(["upload-file"],function(t){var n=Ef.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),a=n.promise,o=n.cancel;return e.current.cancel=o,a.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:t,cancelRequest:e.current.cancel}}function Cv(){return Lg(function(e){var t=e.payload,n=e.organizationCode;return Ef.getInstance().updateMFAConfig(t,n)})}function Sv(){return Lg(function(e){var t=e.payload,n=e.organizationCode;return Ef.getInstance().mfaExcludeUsers(t,n)})}function Rv(e){return Pg(["GET/scheduled-reports",e],function(){return Ef.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Tv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})}function jv(){return Lg(function(e){var t=e.reportCode,n=e.payload;return Ef.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Av(){return Lg(function(e){return Ef.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Iv(){return Lg(function(e){return Ef.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ov(){return Lg(function(e){return Ef.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Pv(){return Lg(function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Lv(){return Lg(function(e){var t=e.payload,n=e.ruleId,a=e.accountCode;return Ef.getInstance().postEditRule(t,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function zv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Dv(){return Lg(function(e){var t=e.payload,n=e.code;return Ef.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function qv(){return Lg(function(e){var t=e.code,n=e.password;return Ef.getInstance().getCustomizedApiKeysToken(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Nv(){return Lg(function(e){var t=e.passwordOtp;return Ef.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Mv(){return Lg(function(e){var t=e.code;return Ef.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Fv(){return Lg(function(e){var t=e.payload,n=e.code;return Ef.getInstance().patchApiKeysEditNote(t,n).then(function(e){return e.data}).catch(function(e){return e})})}function Uv(){return Lg(function(e){var t=e.payload,n=e.code,a=e.password;return Ef.getInstance().postApiKeysRoll(t,n,a).then(function(e){return e.data}).catch(function(e){return e})})}function Bv(){return Lg(function(e){var t=e.password,n=e.accountCode;return Ef.getInstance().getDeveloperCredentials(t,n).then(function(e){return o(o({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})})}function Hv(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})}function Wv(a){var o=this;return Lg(function(){return Ef.getInstance().createReconciliationReportTemplate(a).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(a){return t(o,void 0,void 0,function(){var t,o;return n(this,function(n){switch(n.label){case 0:return[4,my.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(o=my.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,my.setQueryData(["GET/reconciliation/reports/templates"],function(t){return{templates:e(e([],t.templates,!0),[a],!1)}}),[2,{previousTemplates:t}]}})})},onError:function(e,t,n){my.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){my.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Gv(e){return Lg(function(){return Ef.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Vv(){return Lg(["POST/reconciliation/alerts"],function(e){return Ef.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function $v(){return Lg(["DELETE/reconciliation/alerts"],function(e){return Ef.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Kv(){return Lg(["UPDATE/reconciliation/alerts"],function(e){return Ef.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Qv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Jv(){return Lg(function(e){return Ef.getInstance().createSamlConfig(e)})}function Xv(){return Lg(function(e){return Ef.getInstance().updateSamlConfig(e)})}function Yv(){return Lg(function(){return Ef.getInstance().deleteSamlConfig()})}function Zv(e,t){return void 0===t&&(t={}),Lg(function(t){return Ef.getInstance().generateAIWorkflowRoutes(e,t).then(function(e){return null==e?void 0:e.data})},o(o({},t),{useErrorBoundary:!1}))}function eb(e){return void 0===e&&(e={}),Lg(function(e){return Ef.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},o(o({},e),{useErrorBoundary:!1}))}function tb(){return Lg(function(e){return Ef.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function nb(){return Lg(function(e){return Ef.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ab(){return Lg(function(e){var t=e.chart_id,n=e.type,a=e.name,o=e.user_prompt,i=void 0===o?"":o;return Ef.getInstance().patchChartGPTChart(t,{type:n,name:a,user_prompt:i}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ob(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){var e,o,i,r,s,c,u,l,p,d=this;return n(this,function(m){switch(m.label){case 0:return[4,(e=Ef.getInstance()).createChartGPTChart(a)];case 1:if(o=m.sent(),!(i=null!==(l=null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.chartgpt_id)&&void 0!==l?l:null===(p=null==o?void 0:o.data)||void 0===p?void 0:p.chart_id))throw new Error("Failed to create chart: No chart ID returned");return r=function(){return t(d,void 0,void 0,function(){var a=this;return n(this,function(o){return[2,new Promise(function(o,r){var s=setInterval(function(){return t(a,void 0,void 0,function(){var t,a,c;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.getChartById(i)];case 1:return t=n.sent(),"ERROR"===(null==(a=null==t?void 0:t.data)?void 0:a.status)&&(clearInterval(s),o(a)),"DRAFT"===(null==a?void 0:a.status)&&(clearInterval(s),o(a)),[3,3];case 2:return c=n.sent(),clearInterval(s),r(c),[3,3];case 3:return[2]}})})},1e4)})]})})},[4,r()];case 2:return s=m.sent(),[4,e.executeChartGPTChart(i)];case 3:return c=m.sent(),[2,{chart:s,chartgpt_id:i,execution:null==c?void 0:c.data}]}})})},{useErrorBoundary:!1})}var ib=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=w(t&&JSON.parse(t)),a=n[0],o=n[1];return E(function(){var t=function(t){if(t.key===e){var n=t.newValue;o(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}},[e]),a}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function rb(e){var a=this;return Pg(["fetch-payments-lazy",e],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postPaymentsLazy(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function sb(e){return Pg(["fetch-payments-evaluated",e],function(){return Ef.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function cb(e){var a=this,o=e.paymentCode,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-v2",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getPaymentV2(o).then(function(e){return e.data})]})})},{enabled:r,cacheTime:500,useErrorBoundary:!1})}function ub(e){var a=this,o=e.payment_code,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-transaction-details-v2",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getTransactionDetailsV2({payment_code:o}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!o&&r,cacheTime:0,useErrorBoundary:!1})}function lb(e){var a=this,o=e.transaction_code,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-transaction-raw-response",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getTransactionRawResponse({transaction_code:o})]})})},{enabled:!!o&&r,cacheTime:0,useErrorBoundary:!1})}function pb(e){var t=ib();return Pg(["payment-methods",e],function(){return Ef.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function db(){return Pg({queryKey:["/payment-methods/providers"],queryFn:function(){return Ef.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})}function mb(){return Pg(["GET/catalog/card-brands"],function(){return Ef.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function hb(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Lm.PAYMENTS),Pg(["payment-filters",e,t],function(){return Ef.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function fb(){return Pg(["payment-metrics-filters"],function(){return Ef.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function gb(e){var t=e.transaction_code,n=e.enabled;return Pg(["payment-transaction-details",t],function(){return Ef.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function yb(e){var t=e.payment_code,n=e.enabled;return Pg(["transaction-history",t],function(){return Ef.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function vb(e){var a=this;return Pg(["POST/transactions",JSON.stringify(e)],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function bb(e){var a=this;return Pg(["POST/fraud-transactions",JSON.stringify(e)],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postFraudTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function xb(e){return Pg(["GET/payout-detail",JSON.stringify(e)],function(){var t=Ef.getInstance();return e.organization_code?t.getPayoutDetails(e).then(function(e){return null==e?void 0:e.data}):{}},{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function kb(e){return Pg(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return Ef.getInstance().getPayoutTransactionDetails(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function wb(e){var t=ib();return Pg(["GET/payout-history-detail",JSON.stringify(e)],function(){return Ef.getInstance().getPayoutHistoryDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function _b(e,a){var o=this,i=ib();return Pg(["GET/useGetProofOfCancel",i,e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getProofOfCancel(e,i,a).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!i&&!!a,cacheTime:0,useErrorBoundary:!1})}function Eb(e,a){var o=this,i=ib();return Pg(["GET/useGetProofOfPayment",i,e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getProofOfPayment(e,i,a).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!i&&!!a,cacheTime:0,useErrorBoundary:!1})}function Cb(e,a,o){var i=this,r=Ef.getInstance();return Pg(["send-payment-notification",e,a],function(){return t(i,void 0,void 0,function(){var t,i;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.sendPaymentNotification(e,a)];case 1:return t=n.sent(),o.onSuccess(),[2,t.data];case 2:throw i=n.sent(),o.onError(),i;case 3:return[2]}})})},{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})}function Sb(e){return Pg(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=Ef.getInstance();if(e)return t.postPayouts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function Rb(e){var a=this;void 0===e&&(e=!0);var o=ib();return Pg(["getPayoutsFilters",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getPayoutsFilters(o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:e&&!!o})}function Tb(e){var t=e.password,n=e.accountCode;return Pg(["developers"],function(){return Ef.getInstance().getDeveloperCredentials(t,n).then(function(e){return o(o({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})},{enabled:!1,cacheTime:0})}function jb(){return Pg(["fetch-customized-api-keys-members"],function(){return Ef.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ab(){return Pg(["developers-get-allowed-ips"],function(){return Ef.getInstance().getAllowedIps().then(function(e){return(null==e?void 0:e.data)?o(o({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return o(o({},e),{isError:!0})})},{enabled:!1,cacheTime:0})}function Ib(){return Pg(["fetch-customized-api-keys-accounts"],function(){return Ef.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ob(e){return Pg(["fetch-customized-api-keys",e],function(){return Ef.getInstance().postCustomizedApiKeys(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function Pb(){return Pg(["fetch-customized-api-keys-products"],function(){return Ef.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})}function Lb(){return Lg(["developers-patch-allowed-ips"],function(e){return Ef.getInstance().patchAllowedIps(e).then(function(e){return(null==e?void 0:e.data)?o(o({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return o(o({},e),{isError:!0})})},{cacheTime:0})}function zb(){return Pg(["fetch-organizations"],function(){return Ef.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Db(){return Pg(["fetch-all-organizations",ib()],function(){return Ef.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function qb(e){var t=ib();return Pg(["organizations-provider-params",e],function(e){var n=e.queryKey;return Ef.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Nb(e){var t=e.integration_code,n=e.enabled,a=e.accountCode;return Pg(["integration-params",t,a],function(){return t.includes("undefined")?{}:Ef.getInstance().getIntegrationParams({accountCode:a,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})}function Mb(e){var t=e.accountCode,n=e.organizationCode,a=ib();return Pg(["organizations-account-integrations",t,n],function(){return Ef.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||a}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function Fb(e){var t=e.accountCode,n=e.paymentMethod;return Pg(["fetch-connections-by-payment-method",n,t],function(){return Ef.getInstance().getConnectionsByPaymentMethod(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Ub(){var e=this;return Pg(["fetch-hash-pylon"],function(){return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})}function Bb(){return Pg(["connections"],function(){return Ef.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Hb(){return Pg(["dialogs"],function(){return Ef.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function Wb(){return Pg(["params-catalog"],function(){return Ef.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})}function Gb(e){var t=e.accountCode,n=e.name;return Pg(["webhooks",t,n],function(){return Ef.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})}function Vb(e){var t=e.accountCode,n=e.enabled;return Pg(["webhooks-detail",t],function(){return Ef.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})}function $b(e){var t,n=ib(),a=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Pg({queryKey:["accounts",a],queryFn:function(){return Ef.getInstance().getAccounts(a).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!a})}function Kb(e){return Pg(["accountsV2",e],function(){return Ef.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Qb(e){return Pg(["accountsV2-by-user",e],function(){return e?Ef.getInstance().getAccountsByUser(e).then(function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}}).catch(function(e){return{accountsV2ByUser:[],error:e}}):{accountsV2ByUser:[]}},{enabled:!!e,staleTime:0})}function Jb(){return Pg(["menu"],function(){return Ef.getInstance().getMenu().then(function(e){return sf(e)?hf:null==e?void 0:e.data}).catch(function(){return hf})})}function Xb(){return Pg(["/payment/statuses/style"],function(){return Ef.getInstance().useGetPaymentStatusesStyles().then(function(e){return sf(e)?cf:null==e?void 0:e.data}).catch(function(){return cf})})}function Yb(){return Pg(["/transaction/statuses/style"],function(){return Ef.getInstance().useGetTransactionStatusesStyles().then(function(e){return sf(e)?uf:null==e?void 0:e.data}).catch(function(){return uf})},{cacheTime:36e5,useErrorBoundary:!1})}function Zb(){return Pg(["/reconciliation/transaction/statuses/style"],function(){return Ef.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return sf(e)?lf:null==e?void 0:e.data}).catch(function(){return lf})})}function ex(){return Pg(["timezone-catalog"],function(){return Ef.getInstance().useGetTimeZoneCatalog().then(function(e){return sf(e)?pf:null==e?void 0:e.data}).catch(function(){return pf})})}function tx(){return Pg(["/cms/audit-logs-filters"],function(){return Ef.getInstance().useGetAuditLogsFilters().then(function(e){return sf(e)?df:null==e?void 0:e.data}).catch(function(){return df})})}function nx(){return Pg(["/cms/static-contents"],function(){return Ef.getInstance().getDashboardStaticContents().then(function(e){var t,n;return sf(e)?mf:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}})},{cacheTime:6048e5,useErrorBoundary:!1})}function ax(){return Pg(["/cms/locales"],function(){return Ef.getInstance().getLocales().then(function(e){return sf(e)?ff:e.data}).catch(function(){return ff})})}var ox=function(){var e=w("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return E(function(){window.addEventListener("storage",function(e){"isTesting"===e.key&&n("ON"===e.newValue)})},[]),{isTesting:t}};function ix(e){return Pg(["smart-routing-methods",e],function(){return Ef.getInstance().getSmartRoutingMethods(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function rx(e,t){return Pg(["smart-routing-workflow",t,e],function(){return Ef.getInstance().getSmartRoutingWorkflow(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function sx(e,t){return Pg(["smart-routing-condition-types",e,t],function(){return Ef.getInstance().getSmartRoutingConditionTypes(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})}function cx(e,t){return Pg(["smart-routing-condition-payment-method",e,t],function(){return Ef.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})}function ux(e,t){return Pg(["smart-routing-condition-types-values",t,e],function(){return Ef.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})}function lx(e){var t=e.accountCode,n=e.workflowVersionId;return Pg(["smart-routing-workflow-version",n,t],function(){return Ef.getInstance().getSmartRoutingWorkflowVersion(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function px(e,t,n){return Pg(["smart-routing-next-route",e,n,t],function(){return Ef.getInstance().getSmartRoutingNextSteps(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function dx(e){return Pg(["smart-routing-decline-groups",e],function(){return Ef.getInstance().getSmartRoutingDeclinedGroup(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function mx(e,t){return Pg(["smart-routing-payment-route",e,t],function(){return Ef.getInstance().getSmartRoutingPaymentRoute(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!t,cacheTime:0})}function hx(e){return Pg(["smart-routing-simulate-condition-type-values",e],function(){return Ef.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function fx(e){var t=e.text,n=e.conditionType;return Pg(["smart-routing-search-condition-values",t,n],function(){return Ef.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function gx(){return Pg(["smart-routing-conversion-rates"],function(){return Ef.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})}function yx(){var e=this;return Pg({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function vx(){var e=this;return Pg({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function bx(e){return Pg(["fetch-routing-monitors-templates",e],function(){return Ef.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function xx(e,t){return Pg(["fetch-routing-monitors-template",e],function(){return Ef.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function kx(e){var t=e.accountCode;return Pg(["checkouts",t],function(){return Ef.getInstance().getCheckouts({accountCode:t}).then(function(e){return e.data})},{cacheTime:0,enabled:Boolean(t)})}function wx(e){var t=e.accountCode;return Pg(["checkouts-template"],function(){return Ef.getInstance().getCheckoutTemplate({accountCode:t}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(t)})}var _x=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Ex=function(e,t){var n=e.paymentMethodType,a=e.type;return Pg(_x({paymentMethodType:n,type:a}),function(){return Ef.getInstance().getNameAndIcon({paymentMethodType:n,type:a}).then(function(e){return null==e?void 0:e.data})},t)},Cx=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Sx=function(e,t){var n=e.paymentMethodType,a=e.type;return Pg(Cx({paymentMethodType:n,type:a}),function(){return Ef.getInstance().getRequiredFields({paymentMethodType:n,type:a}).then(function(e){return null==e?void 0:e.data})},t)};function Rx(e){var t=e.accountCode;return Pg(["styling-sdk-dynamic",t],function(){return Ef.getInstance().getStylingSdkDynamic({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Tx(e){var t=e.accountCode;return Pg(["styling-theme",t],function(){return Ef.getInstance().getStylingTheme({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function jx(e){var t=e.accountCode;return Pg(["styling-settings",t],function(){return Ef.getInstance().getStylingSettings({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ax(e){var t=e.accountCode,n=e.environment,a=void 0===n?"live":n;return Pg(["styling-settings-v2",t],function(){return Ef.getInstance().getStylingSettingsV2({accountCode:t,environment:a}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ix(){return Lg(function(e){var t=e.accountCode,n=e.environment,a=void 0===n?"live":n,o=e.payload;return Ef.getInstance().changeStylingSettings({accountCode:t,environment:a,payload:o}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Ox(){return Pg(["fetch-profile"],function(){return Ef.getInstance().getProfile().then(function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t}).catch(function(e){throw e})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Px(e,t){return Pg(["fetch-permissions",e,t],function(){var e,t,n,a=localStorage.getItem("account"),o=localStorage.getItem("user"),i=a&&JSON.parse(a),r=o&&JSON.parse(o);return((null==r?void 0:r.merlin)?null===(e=null==r?void 0:r.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})}function Lx(e){return Pg(["email-verification",e],function(){return Ef.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function zx(){return Pg({queryKey:["get-login-methods"],queryFn:function(){return Ef.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})}function Dx(){return Pg(["fetch-impersonation-users"],function(){return Ef.getInstance().getImpersonationUsers().then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function qx(){return Pg(["fetch-impersonation-enabled"],function(){return Ef.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Nx(e){var a=this;return Pg(["get-users-to-impersonate",e],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getUsersToImpersonate(e).then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.users)||[]})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Mx(e){var t;return Pg(["fetch-communications",e],function(){return Ef.getInstance().getCommunications(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Fx(){return Pg(["fetch-communications-filters"],function(){return Ef.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Ux(e,t){return Pg(["fetch-communication-details",e],function(){return Ef.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function Bx(e){return Pg(["notifications-customer",e],function(){return Ef.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})}function Hx(e){return Pg(["validate-opsgenie-key",e],function(){return Ef.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})}function Wx(){return Pg(["notifications-merged"],function(){return Ef.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})}function Gx(){return Lg(function(e){return Ef.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Vx(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().pathNotification(a)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})})}var $x={key:"metadata_fields",name:"metadata_fields"};function Kx(){return Pg(["reports"],function(){return Ef.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Qx(e){return void 0===e&&(e=!0),Pg(["reports-multi-env"],function(){return Ef.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})}function Jx(e,t,n){return void 0===t&&(t=!1),Pg(["reports/".concat(e)],function(){return Ef.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})}function Xx(e){return Pg(["GET/reports/templates"],function(){return Ef.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})}function Yx(a,o,i){var r=this;return Pg(["GET/reports/columns/".concat(o,"/").concat(i)],function(){return t(r,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getReportColumns(o,i).then(function(t){return o===Mm.ALL&&i===Nm.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[$x],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:a,useErrorBoundary:!1})}function Zx(e,a){var o=this,i=ib();return Pg(["getRefundPdf",e,i,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getRefundPdf(e,i,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!e&&!!i,useErrorBoundary:!1})}function ek(){var e=ib();return Pg(["teams-filters-members"],function(){return Ef.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function tk(e){var t=e.organizationCode,n=e.accountCodes,a=e.email,o=e.page,i=e.pageSize,r=ib();return Pg(["fetch-post-members-v2",t,n,a,o,i],function(){return Ef.getInstance().postMembersPaginatedV2({organizationCode:r,accountCodes:n,email:a,page:o,pageSize:i}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function nk(){return Pg(["fetch-roles"],function(){return Ef.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ak(){return Pg(["fetch-rolespermissions"],function(){return Ef.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function ok(){return Pg(["fetch-permissions-catalog"],function(){return Ef.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function ik(e){return Pg(["data-report",e],function(){return Ef.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})}function rk(e,t,n){return void 0===n&&(n=!0),Pg(["get-insights-conversion-rate-metrics-v2",e,t],function(){return Ef.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:3e5,cacheTime:3e5,useErrorBoundary:!1,retry:1})}function sk(e,t){return Pg(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function ck(e){return Pg(["get-insights-conversion-rate-fallback-metrics",e],function(){return Ef.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function uk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-volume-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function lk(e,t,n,a){return void 0===a&&(a=!0),delete t.account_code,Pg(["get-insights-volume-metrics-v2",t,e,n],function(){return Ef.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:a,cacheTime:200,useErrorBoundary:!1})}function pk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-total-payment-fraud-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function dk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-customer-payment-fraud-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function mk(e){return Pg(["get-insights-overview",e],function(){return Ef.getInstance().getInsightOverview(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function hk(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Pg(["get-insights-overview-v3",e,t],function(){return Ef.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})}function fk(e){return Pg(["get-insights-home-metrics",e],function(){return Ef.getInstance().getInsighstHomeMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function gk(e){return Pg(["get-insights-reports",e],function(){return Ef.getInstance().getInsightsReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function yk(e){return Pg(["get-insights-reports-again",e],function(){return Ef.getInstance().getInsightsReportAgain(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function vk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function bk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-fraud-screening-conversion-rate",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsFraudScreeningConversionRate(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function xk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-volume-and-count-tx",a,e],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function kk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsConversionRateAndEvolution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function wk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-decline-reasons",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsDeclineReasons(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function _k(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsFrictionlessVsChallenge(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ek(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ck(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Sk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-win-rate",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksWinRate(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Rk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-disputed",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksDisputed(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Tk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function jk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-reasons-distribution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksReasonsDistribution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ak(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-status-distribution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksStatusDistribution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ik(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-by-card-brand",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksByCardBrand(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ok(e,t){return Pg(["fetch-reconciliation-transaction",e],function(){return Ef.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function Pk(e,t){return Pg(["fetch-reconciliation-settlements",e],function(){return Ef.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function Lk(e,t){return Pg(["fetch-reconciliation-metrics",e],function(){return Ef.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})}function zk(){return Pg(["GET-reconciliation-filters"],function(){return Ef.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Dk(e){return Pg(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return Ef.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function qk(){return Pg(["GET/v1/reconciliation/active"],function(){return Ef.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Nk(e,t,n){return Pg(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return Ef.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function Mk(e){return Pg(["GET/reconciliation/reports/templates"],function(){return Ef.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function Fk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/alerts/list",t,n],function(){return Ef.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Uk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/agenda/list",t,n],function(){return Ef.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Bk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/agenda/insights",t,n],function(){return Ef.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Hk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/sales/list",t,n],function(){return Ef.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Wk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/advancements/list",t,n],function(){return Ef.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Gk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/fees/list",t,n],function(){return Ef.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Vk(e){var a=this,o=Object.values(e).filter(Boolean);return Pg(["feature-flags",o],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getFeatureFlagId(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o.length>1,useErrorBoundary:!1})}function $k(e){var a=this,o=Pg({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),i=Rg();return E(function(){i.setQueryData(["cached-feature-flags"],o)},[o,i]),o}function Kk(e){var t=Rg();return Pg({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=t.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}})}function Qk(e){return Pg(["events",e],function(){return Ef.getInstance().getAuditEvents(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function Jk(e){return Pg(["audit-monitor-event-detail",e],function(){return Ef.getInstance().getAuditMonitorDetail(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function Xk(e,t){return Pg(["fetch-payment-links",e,t],function(){return Ef.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})}function Yk(e){return Pg(["payment-link"],function(){return Ef.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function Zk(e){return void 0===e&&(e=!0),Pg(["countries",e],function(){return Ef.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})}function ew(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Pg(["countries-v2",n],function(){return Ef.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})}function tw(e){return Pg(["timezone"],function(){return Ef.getInstance().getTimezone(e).then(function(e){return sf(e)?pf:null==e?void 0:e.data}).catch(function(){return pf})},{enabled:!0,keepPreviousData:!0})}function nw(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function aw(e,t){return Pg(["get-cofig-allow-list",e],function(){return Ef.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})}function ow(e){return Pg(["get-black-list",e],function(){return Ef.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e})}function iw(e,t,n,a){var o;return Pg(["post-black-list",e],function(){return Ef.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=a?a:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})}function rw(e,t,n){return Pg(["get-block-list-summary",e,t,n],function(){var a=Ef.getInstance();return n?a.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})}function sw(e,t,n,a,o,i){return Pg(["black-list-detail",e,t,a,o,i],function(){return Ef.getInstance().getBlacklistDetail(e,t,n,a,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&i,cacheTime:0})}function cw(e,t,n){return Pg(["allow-list-detail",e],function(){return Ef.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})}function uw(e){return Pg(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return Ef.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function lw(e,a){var o=this;return void 0===e&&(e=26),void 0===a&&(a=0),Pg(["batch-refunds",e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getBatchRefunds(e,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})}function pw(e){return Pg(["velocity-rules",e],function(){var t=Ef.getInstance();return e?t.getVelocityRules(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e,keepPreviousData:!0})}function dw(){return Pg(["config-rules"],function(){return Ef.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})}function mw(e,t){var n=e.organizationCode;return Pg(["mfa-excluded-users",n],function(){return Ef.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function hw(e,t){var n=e.organizationCode;return Pg(["mfa-config",n],function(){return Ef.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function fw(e,t){return Pg(["mfa-enforcement-status",e.accountCode],function(){return Ef.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function gw(e){return Pg(["fetch-organization-saml-config",e],function(){return Ef.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function yw(e){return Pg(["chartgpt-chart-execute",e],function(){return Ef.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})}function vw(){return Pg(["chartgpt-user-charts"],function(){return Ef.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function bw(){var e=this;return Pg(["chartgpt-user-charts-with-results"],function(){return t(e,void 0,void 0,function(){var e,a,i,r=this;return n(this,function(s){switch(s.label){case 0:return[4,(e=Ef.getInstance()).getChartsByUser()];case 1:return a=s.sent(),i=(null==a?void 0:a.data)||[],[4,Promise.all(i.map(function(a){return t(r,void 0,void 0,function(){var t,i,r,s,c,u,l,p;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(a.code)];case 1:return t=n.sent(),[2,o(o({},a),{user_prompt:null!==(s=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.user_prompt)&&void 0!==s?s:a.user_prompt,unit_to_display:null!==(u=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:a.unit_to_display,results:null!==(p=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==p?p:[]})];case 2:return i=n.sent(),console.error("Failed to execute chart ".concat(a.chart_id,":"),i),[2,o(o({},a),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,s.sent()]}})})})}function xw(e,a,o){var i=this;return void 0===o&&(o=!0),Pg(["chartgpt-patch-and-execute",e,a],function(){return t(i,void 0,void 0,function(){var t,o,i,r,s;return n(this,function(n){switch(n.label){case 0:return[4,(t=Ef.getInstance()).patchChartGPTChart(e,a)];case 1:return o=n.sent(),i=null==o?void 0:o.data,[4,t.executeChartGPTChart(e)];case 2:return r=n.sent(),s=null==r?void 0:r.data,[2,{chart:i,execution:s}]}})})},{enabled:o&&!!e,retry:!1})}function kw(){return Pg(["languages"],function(){return Ef.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})}function ww(){var e=localStorage.getItem("lang")||"en";return Pg(["translations",e],function(){return Ef.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})}var _w=function(e){var t,n,a,o=e.plots||[],i=o.find(function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label}),r=o.find(function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label}),s=o.find(function(e){return"CONVERSION_RATE_LABEL"===e.label});return{communications:{distribution:(null===(t=null==i?void 0:i.rows)||void 0===t?void 0:t.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==i?void 0:i.value)||"0")},conversion_rate:{distribution:(null===(n=null==s?void 0:s.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),percentage:parseFloat(e.value)}}))||[],total:parseFloat((null==s?void 0:s.value)||"0")},completed_communications:{distribution:(null===(a=null==r?void 0:r.rows)||void 0===a?void 0:a.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==r?void 0:r.value)||"0")}}},Ew=function(e){var t,n;return{distribution:(null===(t=e.plots)||void 0===t?void 0:t.map(function(e){return{key:e.label,total:parseFloat(e.value),percentage:parseFloat(e.percentage||"0"),amount:parseFloat(e.value)}}))||[],total:(null===(n=e.plots)||void 0===n?void 0:n.reduce(function(e,t){return e+parseFloat(t.value)},0))||0}},Cw=function(e){var t,n={};return null===(t=e.plots)||void 0===t||t.forEach(function(e){var t;n[e.label]=(null===(t=e.rows)||void 0===t?void 0:t.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[]}),n},Sw=function(e){var t,n,a=null===(t=e.plots)||void 0===t?void 0:t[0];return{distribution:(null===(n=null==a?void 0:a.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},Rw=function(e){var t,n,a=null===(t=e.plots)||void 0===t?void 0:t[0];return{distribution:(null===(n=null==a?void 0:a.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},Tw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/api/nova-insights/communications-by-day",a)];case 1:return o=n.sent(),[2,_w(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},jw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/api/nova-insights/communications-by-substatus",a)];case 1:return o=n.sent(),[2,Ew(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Aw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/api/nova-insights/communications-substatus-by-day",a)];case 1:return o=n.sent(),[2,Cw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Iw=function(e,a){return Pg(o({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/api/nova-insights/recovered-tpv-by-day",a)];case 1:return o=n.sent(),[2,Sw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Ow=function(e,a){return Pg(o({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/api/nova-insights/recovered-payments-by-day",a)];case 1:return o=n.sent(),[2,Rw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))};function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pw.apply(this,arguments)}
|
|
58
|
+
*/"production"===process.env.NODE_ENV?vg.exports=function(){if(yg)return bg;yg=1;var e=k,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,a=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function r(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!t(e,a)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return o(function(){u.value=s,u.getSnapshot=t,r(u)&&l({inst:u})},[e,s,t]),a(function(){return r(u)&&l({inst:u}),e(function(){r(u)&&l({inst:u})})},[e]),i(s),s};return bg.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,bg}():vg.exports=(xg||(xg=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!n(e,a)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=t.useState,o=t.useEffect,i=t.useLayoutEffect,r=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,l){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=l();if(!c){var d=l();n(p,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var m=(d=a({inst:{value:p,getSnapshot:l}}))[0].inst,h=d[1];return i(function(){m.value=p,m.getSnapshot=l,e(m)&&h({inst:m})},[u,p,l]),o(function(){return e(m)&&h({inst:m}),u(function(){e(m)&&h({inst:m})})},[u]),r(p),p};kg.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),kg);var wg=vg.exports;const _g=wg.useSyncExternalStore,Eg=x.createContext(void 0),Cg=x.createContext(!1);function Sg(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Eg),window.ReactQueryClientContext):Eg)}const Rg=({context:e}={})=>{const t=x.useContext(Sg(e,x.useContext(Cg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tg=({client:e,children:t,context:n,contextSharing:a=!1})=>{x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),"production"!==process.env.NODE_ENV&&a&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=Sg(n,a);return x.createElement(Cg.Provider,{value:!n&&a},x.createElement(o.Provider,{value:e},t))},jg=x.createContext(!1);jg.Provider;const Ag=x.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Ig(e,t){return"function"==typeof e?e(...t):!!e}function Og(e,t){const n=Rg({context:e.context}),a=x.useContext(jg),o=x.useContext(Ag),i=n.defaultQueryOptions(e);i._optimisticResults=a?"isRestoring":"optimistic",i.onError&&(i.onError=ng.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ng.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ng.batchCalls(i.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,o),(e=>{x.useEffect(()=>{e.clearReset()},[e])})(o);const[r]=x.useState(()=>new t(n,i)),s=r.getOptimisticResult(i);if(_g(x.useCallback(e=>{const t=a?()=>{}:r.subscribe(ng.batchCalls(e));return r.updateResult(),t},[r,a]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),x.useEffect(()=>{r.setOptions(i,{listeners:!1})},[i,r]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,s,a))throw((e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}))(i,r,o);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:a})=>e.isError&&!t.isReset()&&!e.isFetching&&Ig(n,[e.error,a]))({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:r.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:r.trackResult(s)}function Pg(e,t,n){return Og(Af(e,t,n),pg)}function Lg(e,t,n){const a=function(e,t,n){return Hf(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),o=Rg({context:a.context}),[i]=x.useState(()=>new gg(o,a));x.useEffect(()=>{i.setOptions(a)},[i,a]);const r=_g(x.useCallback(e=>i.subscribe(ng.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=x.useCallback((e,t)=>{i.mutate(e,t).catch(zg)},[i]);if(r.error&&Ig(i.options.useErrorBoundary,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function zg(){}function Dg(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function qg(e){return Lg(function(e){var t=e.code,n=e.accountCode;return Ef.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Ng(e){return Lg(function(e){var t=e.code,n=e.payload,a=e.accountCode;return Ef.getInstance().updateWebhookV2(t,n,a)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Mg(){return Lg(function(e){var t=e.name,n=e.principal;return Ef.getInstance().postAccount(t,n)})}function Fg(){return Lg(function(e){var t=e.name,n=e.code,a=e.principal;return Ef.getInstance().patchAccountV2({name:t,code:n,principal:a})})}function Ug(){return Lg(function(e){var t=e.account_code;return Ef.getInstance().putAccountPrincipal({account_code:t})})}function Bg(){return Lg(function(e){var t=e.organizationCode,n=e.userCode,a=e.payload;return Ef.getInstance().putAccountsUserMassive(t,n,a)})}function Hg(){return Lg(function(e){var t=e.organizationCode,n=e.userCode,a=e.payload;return Ef.getInstance().deleteAccountsUserMassive(t,n,a)})}function Wg(){return Lg(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Gg(){return Lg(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Vg(){return Lg(function(e){return Ef.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function $g(){return Lg(["post-connection"],function(e){var t=e.payload;return Ef.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})}function Kg(){return Lg(["new-post-connection-validate"],function(){return Ef.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Qg(){return Lg(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return Ef.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})}function Jg(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Xg(){return Lg(function(e){return Ef.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Yg(){return Lg(["patch-organizations"],function(){return Ef.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})}function Zg(){return Lg(function(e){return Ef.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})}function ey(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().changePasswordV2(a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function ty(e){return Lg(function(e){return Ef.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function ny(){return Lg(function(e){return Ef.getInstance().inviteUsersMassive(e,e.organizationCode)})}function ay(){return Lg(function(e){var t=e.userCode,n=e.organizationCode;return Ef.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})}function oy(){return Lg(function(e){return Ef.getInstance().createUserAuth0(e)})}function iy(){return Lg(function(e){return Ef.getInstance().postCall(e)})}function ry(){return Lg(function(e){return Ef.getInstance().changeLoginMethods(e)})}function sy(e){return Lg(function(e){return Ef.getInstance().updateIsActiveCheckout(e)},e)}function cy(){return Lg(function(e){var t=e.accountCode,n=e.template;return Ef.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then(function(e){return null==e?void 0:e.data})})}function uy(){return Lg(function(e){var t=e.accountCode,n=e.theme;return Ef.getInstance().updateStylingTheme({accountCode:t,theme:n}).then(function(e){return null==e?void 0:e.data})})}function ly(){return Lg(function(e){var t=e.payload,n=e.transactionId,a=e.paymentId,o=e.action;return Ef.getInstance().createOperationTransaction(t,n,a,o)})}function py(){return Lg(function(e){var t=e.payload,n=e.paymentId,a=e.transactionId,o=e.handleSetProgress;return Ef.getInstance().uploadChargebacks(t,n,a,o)})}var dy=new ig({}),my=new class{constructor(e={}){this.queryCache=e.queryCache||new ig,this.mutationCache=e.mutationCache||new cg,this.logger=e.logger||tg,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=$f.subscribe(()=>{$f.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Qf.subscribe(()=>{Qf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=If(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const a=Af(e,t,n),o=this.getQueryData(a.queryKey);return o?Promise.resolve(o):this.fetchQuery(a)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const a=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==a?void 0:a.state.data);if(void 0===o)return;const i=Af(e),r=this.defaultQueryOptions(i);return this.queryCache.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ng.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=If(e,t),a=this.queryCache;ng.batch(()=>{a.findAll(n).forEach(e=>{a.remove(e)})})}resetQueries(e,t,n){const[a,o]=If(e,t,n),i=this.queryCache,r={type:"active",...a};return ng.batch(()=>(i.findAll(a).forEach(e=>{e.reset()}),this.refetchQueries(r,o)))}cancelQueries(e,t,n){const[a,o={}]=If(e,t,n);void 0===o.revert&&(o.revert=!0);const i=ng.batch(()=>this.queryCache.findAll(a).map(e=>e.cancel(o)));return Promise.all(i).then(Rf).catch(Rf)}invalidateQueries(e,t,n){const[a,o]=If(e,t,n);return ng.batch(()=>{var e,t;if(this.queryCache.findAll(a).forEach(e=>{e.invalidate()}),"none"===a.refetchType)return Promise.resolve();const n={...a,type:null!=(e=null!=(t=a.refetchType)?t:a.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[a,o]=If(e,t,n),i=ng.batch(()=>this.queryCache.findAll(a).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:a.refetchPage}})}));let r=Promise.all(i).then(Rf);return null!=o&&o.throwOnError||(r=r.catch(Rf)),r}fetchQuery(e,t,n){const a=Af(e,t,n),o=this.defaultQueryOptions(a);void 0===o.retry&&(o.retry=!1);const i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Rf).catch(Rf)}fetchInfiniteQuery(e,t,n){const a=Af(e,t,n);return a.behavior=ug(),this.fetchQuery(a)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Rf).catch(Rf)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(t=>zf(e)===zf(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Df(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Df(e,t.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(t=>zf(e)===zf(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Df(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Df(e,t.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=Lf(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:dy});function hy(){return Lg(function(e){return Ef.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function fy(){return Lg(function(e){return Ef.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})}function gy(){return Lg(function(e){return Ef.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function yy(){return Lg(function(e){return Ef.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})}function vy(a){var o=this;return Lg(function(){return t(o,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().createReportTemplate(a).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(a){return t(o,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,my.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=my.getQueryData(["GET/reports/templates"]),my.setQueryData(["GET/reports/templates"],function(t){return e(e([],t,!0),[a],!1)}),[2,{previousTemplates:t}]}})})},onError:function(e,t,n){my.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){my.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function by(e){return Lg(function(){return Ef.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function xy(e,a,o){var i=this;return void 0===o&&(o=null),Lg(function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().postSmartRoutingCreateWorkflow(e,a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,t.sent()]}})})},o)}function ky(e,a){var o=this,i=e.versionCode,r=e.accountCode,s=e.organizationCode;return void 0===a&&(a=null),Lg(function(){return t(o,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().postSmartRoutingPublishVersion(r,i,s).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},a)}function wy(e,t){var n=e.data,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingUpdateWorkflow(a,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)}function _y(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().deleteSmartRoutingVersion(a,n).then(function(e){return null==e?void 0:e.data})},t)}function Ey(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().postSmartRoutingDuplicateVersion(a,n).then(function(e){return null==e?void 0:e.data})},t)}function Cy(e,t){var n=e.paymentMethod,a=e.active,o=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingToggleMethod(o,n,a).then(function(e){return null==e?void 0:e.data})},t)}function Sy(e,t){var n=e.declinedId,a=e.accountCode;return void 0===t&&(t=null),Lg(function(e){return void 0===e&&(e=null),Ef.getInstance().updateSmartRoutingDeclinedGroup(a,n,e).then(function(e){return null==e?void 0:e.data})},t)}function Ry(e){var t=e.accountCode;return Lg(function(e){return void 0===e&&(e=null),Ef.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)}function Ty(e,t){var n=e.versionCode,a=e.accountCode;return void 0===t&&(t=null),Lg(function(e){return void 0===e&&(e=!1),Ef.getInstance().updateSmartRoutingFavorite(a,n,e).then(function(e){return null==e?void 0:e.data})},t)}function jy(e,t){var n=e.code,a=e.name,o=e.accountCode;return void 0===t&&(t=null),Lg(function(){return Ef.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:a}).then(function(e){return null==e?void 0:e.data})},t)}function Ay(e,t){var n=e.accountCode,a=e.workflowVersionCode;return void 0===t&&(t=null),Lg(function(e){return Ef.getInstance().simulateSmartRoutingTransaction(n,a,e).then(function(e){return null==e?void 0:e.data})},t)}function Iy(e,t){return void 0===t&&(t=null),Lg(function(t){return Ef.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)}function Oy(e,t){return void 0===t&&(t={}),Lg(function(t){var n=t.declinedGroupCode;return Ef.getInstance().removeDeclinedGroup(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},o(o({},t),{useErrorBoundary:!1}))}function Py(e,t){return void 0===t&&(t={}),Lg(function(t){var n=t.payload;return Ef.getInstance().multiAccountDeclinedGroupCreate(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},o(o({},t),{useErrorBoundary:!1}))}var Ly=function(e){return Lg(function(t){return Ef.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},zy=function(e){return Lg(function(t){return Ef.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})};function Dy(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})}function qy(){return Lg(function(e){var t=e.userCode,n=e.organizationCode;return Ef.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})}function Ny(){return Lg(function(){return Ef.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})}function My(){return Lg(function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Fy(){var e=this;return Lg(function(a){var o=a.payload,i=a.id,r=a.accountCode;return t(e,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().editRoles({payload:o,id:i},r)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function Uy(){return Lg(function(e){return Ef.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})}function By(){return Lg(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})}function Hy(){return Lg(["post-delete-payment-link"],function(e){var t=e.code;return Ef.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})}function Wy(){return Lg(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,a=e.paymentLinkCode;return Ef.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:a}).then(function(e){return null==e?void 0:e.data})})}function Gy(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function Vy(){return Lg(function(e){return Ef.getInstance().postUserThemeSettings(e)})}function $y(){return Lg(function(e){var t=e.payload,n=e.section;return Ef.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(e){var t=my.getQueryData(["fetch-profile"]);e.data&&my.setQueryData(["fetch-profile"],o(o({},t),{settings:e.data}))}})}function Ky(e){return Lg(["pinned-sections"],function(e){var t=e.payload;return Ef.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Qy(){return Lg(function(e){var t=e.password,n=e.otp;return Ef.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})}function Jy(){return Lg(function(){return Ef.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})}function Xy(){return Lg(function(e){return Ef.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})}function Yy(){return Lg(function(e){return Ef.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})}function Zy(){return Lg(function(){return Ef.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})}function ev(){return Lg(["post-get-allowlist-items"],function(e){var t=e.payload;return Ef.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function tv(){return Lg(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function nv(){return Lg(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function av(){return Lg(["patch-change-status-allowlist"],function(e){var t=e.payload;return Ef.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ov(){return Lg(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return Ef.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function iv(){return Lg(["post-add-allowlist-items"],function(e){var t=e.payload;return Ef.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function rv(){return Lg(["patch-allowlist"],function(e){var t=e.payload;return Ef.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function sv(){return Lg(["post-blacklist-multi-account"],function(e){var t=e.payload;return Ef.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function cv(){return Lg(["put-blacklist"],function(e){return Ef.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function uv(){return Lg(["change-blacklist"],function(e){return Ef.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function lv(){return Lg(["change-blacklist-item"],function(e){return Ef.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function pv(){return Lg(["post-blacklist-items"],function(e){var t=e.payload;return Ef.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function dv(){return Lg(["delete-blacklist"],function(e){var t=e.black_list_code;return Ef.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function mv(e){var t=e.handleSetProgress;return Lg(["post-blacklist-batch"],function(e){var n=e.blacklist_code,a=e.expiration_days,o=e.file;return Ef.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:a,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function hv(){return Lg(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return Ef.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function fv(){return Lg(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,a=e.account_code;return Ef.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:a}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function gv(){return Lg(["valiate-blacklist-items"],function(e){return Ef.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function yv(){return Lg(["delete-allowlist-item"],function(e){return Ef.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function vv(){return Lg(["validate-allowlist-items"],function(e){return Ef.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})}function bv(e){var t=e.fileName,n=e.onSuccess,a=e.onError,o=w(0),i=o[0],r=o[1],s=_({cancel:function(){return null}}),c=Lg(["upload-file-chargeback",t],function(e){var t=Ef.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:r}),o=t.promise,i=t.cancel;return s.current.cancel=i,o.then(function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==a||a(),e})},{useErrorBoundary:!1});return{mutation:c,cancelRequest:s.current.cancel,progress:i}}function xv(){return Lg(function(e){return Ef.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function kv(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().batchRefundByFile({payload:a}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function wv(){var e=this;return Lg(function(a){var o=a.batchRefundId,i=a.organizationCode,r=a.accountCode;return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getBatchRefundProcessedFileDownload(o,i,r).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function _v(){var e=this;return Lg(function(a){var o=a.batchRefundId,i=a.organizationCode,r=a.accountCode;return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getBatchRefundUserFileDownload(o,i,r).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function Ev(){var e=_({cancel:function(){return null}}),t=Lg(["upload-file"],function(t){var n=Ef.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),a=n.promise,o=n.cancel;return e.current.cancel=o,a.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:t,cancelRequest:e.current.cancel}}function Cv(){return Lg(function(e){var t=e.payload,n=e.organizationCode;return Ef.getInstance().updateMFAConfig(t,n)})}function Sv(){return Lg(function(e){var t=e.payload,n=e.organizationCode;return Ef.getInstance().mfaExcludeUsers(t,n)})}function Rv(e){return Pg(["GET/scheduled-reports",e],function(){return Ef.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Tv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})}function jv(){return Lg(function(e){var t=e.reportCode,n=e.payload;return Ef.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Av(){return Lg(function(e){return Ef.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Iv(){return Lg(function(e){return Ef.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ov(){return Lg(function(e){return Ef.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Pv(){return Lg(function(e){var t=e.payload,n=e.accountCode;return Ef.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Lv(){return Lg(function(e){var t=e.payload,n=e.ruleId,a=e.accountCode;return Ef.getInstance().postEditRule(t,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function zv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Dv(){return Lg(function(e){var t=e.payload,n=e.code;return Ef.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function qv(){return Lg(function(e){var t=e.code,n=e.password;return Ef.getInstance().getCustomizedApiKeysToken(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Nv(){return Lg(function(e){var t=e.passwordOtp;return Ef.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Mv(){return Lg(function(e){var t=e.code;return Ef.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Fv(){return Lg(function(e){var t=e.payload,n=e.code;return Ef.getInstance().patchApiKeysEditNote(t,n).then(function(e){return e.data}).catch(function(e){return e})})}function Uv(){return Lg(function(e){var t=e.payload,n=e.code,a=e.password;return Ef.getInstance().postApiKeysRoll(t,n,a).then(function(e){return e.data}).catch(function(e){return e})})}function Bv(){return Lg(function(e){var t=e.password,n=e.accountCode;return Ef.getInstance().getDeveloperCredentials(t,n).then(function(e){return o(o({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})})}function Hv(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})}function Wv(a){var o=this;return Lg(function(){return Ef.getInstance().createReconciliationReportTemplate(a).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(a){return t(o,void 0,void 0,function(){var t,o;return n(this,function(n){switch(n.label){case 0:return[4,my.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(o=my.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,my.setQueryData(["GET/reconciliation/reports/templates"],function(t){return{templates:e(e([],t.templates,!0),[a],!1)}}),[2,{previousTemplates:t}]}})})},onError:function(e,t,n){my.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){my.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Gv(e){return Lg(function(){return Ef.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Vv(){return Lg(["POST/reconciliation/alerts"],function(e){return Ef.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function $v(){return Lg(["DELETE/reconciliation/alerts"],function(e){return Ef.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Kv(){return Lg(["UPDATE/reconciliation/alerts"],function(e){return Ef.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){my.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Qv(){return Lg(function(e){var t=e.payload;return Ef.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Jv(){return Lg(function(e){return Ef.getInstance().createSamlConfig(e)})}function Xv(){return Lg(function(e){return Ef.getInstance().updateSamlConfig(e)})}function Yv(){return Lg(function(){return Ef.getInstance().deleteSamlConfig()})}function Zv(e,t){return void 0===t&&(t={}),Lg(function(t){return Ef.getInstance().generateAIWorkflowRoutes(e,t).then(function(e){return null==e?void 0:e.data})},o(o({},t),{useErrorBoundary:!1}))}function eb(e){return void 0===e&&(e={}),Lg(function(e){return Ef.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},o(o({},e),{useErrorBoundary:!1}))}function tb(){return Lg(function(e){return Ef.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function nb(){return Lg(function(e){return Ef.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ab(){return Lg(function(e){var t=e.chart_id,n=e.type,a=e.name,o=e.user_prompt,i=void 0===o?"":o;return Ef.getInstance().patchChartGPTChart(t,{type:n,name:a,user_prompt:i}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ob(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){var e,o,i,r,s,c,u,l,p,d=this;return n(this,function(m){switch(m.label){case 0:return[4,(e=Ef.getInstance()).createChartGPTChart(a)];case 1:if(o=m.sent(),!(i=null!==(l=null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.chartgpt_id)&&void 0!==l?l:null===(p=null==o?void 0:o.data)||void 0===p?void 0:p.chart_id))throw new Error("Failed to create chart: No chart ID returned");return r=function(){return t(d,void 0,void 0,function(){var a=this;return n(this,function(o){return[2,new Promise(function(o,r){var s=setInterval(function(){return t(a,void 0,void 0,function(){var t,a,c;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.getChartById(i)];case 1:return t=n.sent(),"ERROR"===(null==(a=null==t?void 0:t.data)?void 0:a.status)&&(clearInterval(s),o(a)),"DRAFT"===(null==a?void 0:a.status)&&(clearInterval(s),o(a)),[3,3];case 2:return c=n.sent(),clearInterval(s),r(c),[3,3];case 3:return[2]}})})},1e4)})]})})},[4,r()];case 2:return s=m.sent(),[4,e.executeChartGPTChart(i)];case 3:return c=m.sent(),[2,{chart:s,chartgpt_id:i,execution:null==c?void 0:c.data}]}})})},{useErrorBoundary:!1})}var ib=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=w(t&&JSON.parse(t)),a=n[0],o=n[1];return E(function(){var t=function(t){if(t.key===e){var n=t.newValue;o(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}},[e]),a}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function rb(e){var a=this;return Pg(["fetch-payments-lazy",e],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postPaymentsLazy(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function sb(e){return Pg(["fetch-payments-evaluated",e],function(){return Ef.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function cb(e){var a=this,o=e.paymentCode,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-v2",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getPaymentV2(o).then(function(e){return e.data})]})})},{enabled:r,cacheTime:500,useErrorBoundary:!1})}function ub(e){var a=this,o=e.payment_code,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-transaction-details-v2",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getTransactionDetailsV2({payment_code:o}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!o&&r,cacheTime:0,useErrorBoundary:!1})}function lb(e){var a=this,o=e.transaction_code,i=e.enabled,r=void 0===i||i,s=Ef.getInstance();return Pg(["get-payment-transaction-raw-response",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,s.getTransactionRawResponse({transaction_code:o})]})})},{enabled:!!o&&r,cacheTime:0,useErrorBoundary:!1})}function pb(e){var t=ib();return Pg(["payment-methods",e],function(){return Ef.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function db(){return Pg({queryKey:["/payment-methods/providers"],queryFn:function(){return Ef.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})}function mb(){return Pg(["GET/catalog/card-brands"],function(){return Ef.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function hb(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Lm.PAYMENTS),Pg(["payment-filters",e,t],function(){return Ef.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function fb(){return Pg(["payment-metrics-filters"],function(){return Ef.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function gb(e){var t=e.transaction_code,n=e.enabled;return Pg(["payment-transaction-details",t],function(){return Ef.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function yb(e){var t=e.payment_code,n=e.enabled;return Pg(["transaction-history",t],function(){return Ef.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function vb(e){var a=this;return Pg(["POST/transactions",JSON.stringify(e)],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function bb(e){var a=this;return Pg(["POST/fraud-transactions",JSON.stringify(e)],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().postFraudTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function xb(e){return Pg(["GET/payout-detail",JSON.stringify(e)],function(){var t=Ef.getInstance();return e.organization_code?t.getPayoutDetails(e).then(function(e){return null==e?void 0:e.data}):{}},{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function kb(e){return Pg(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return Ef.getInstance().getPayoutTransactionDetails(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function wb(e){var t=ib();return Pg(["GET/payout-history-detail",JSON.stringify(e)],function(){return Ef.getInstance().getPayoutHistoryDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function _b(e,a){var o=this,i=ib();return Pg(["GET/useGetProofOfCancel",i,e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getProofOfCancel(e,i,a).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!i&&!!a,cacheTime:0,useErrorBoundary:!1})}function Eb(e,a){var o=this,i=ib();return Pg(["GET/useGetProofOfPayment",i,e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getProofOfPayment(e,i,a).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!i&&!!a,cacheTime:0,useErrorBoundary:!1})}function Cb(e,a,o){var i=this,r=Ef.getInstance();return Pg(["send-payment-notification",e,a],function(){return t(i,void 0,void 0,function(){var t,i;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.sendPaymentNotification(e,a)];case 1:return t=n.sent(),o.onSuccess(),[2,t.data];case 2:throw i=n.sent(),o.onError(),i;case 3:return[2]}})})},{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})}function Sb(e){return Pg(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=Ef.getInstance();if(e)return t.postPayouts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function Rb(e){var a=this;void 0===e&&(e=!0);var o=ib();return Pg(["getPayoutsFilters",o],function(){return t(a,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getPayoutsFilters(o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:e&&!!o})}function Tb(e){var t=e.password,n=e.accountCode;return Pg(["developers"],function(){return Ef.getInstance().getDeveloperCredentials(t,n).then(function(e){return o(o({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})},{enabled:!1,cacheTime:0})}function jb(){return Pg(["fetch-customized-api-keys-members"],function(){return Ef.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ab(){return Pg(["developers-get-allowed-ips"],function(){return Ef.getInstance().getAllowedIps().then(function(e){return(null==e?void 0:e.data)?o(o({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return o(o({},e),{isError:!0})})},{enabled:!1,cacheTime:0})}function Ib(){return Pg(["fetch-customized-api-keys-accounts"],function(){return Ef.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ob(e){return Pg(["fetch-customized-api-keys",e],function(){return Ef.getInstance().postCustomizedApiKeys(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function Pb(){return Pg(["fetch-customized-api-keys-products"],function(){return Ef.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})}function Lb(){return Lg(["developers-patch-allowed-ips"],function(e){return Ef.getInstance().patchAllowedIps(e).then(function(e){return(null==e?void 0:e.data)?o(o({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return o(o({},e),{isError:!0})})},{cacheTime:0})}function zb(){return Pg(["fetch-organizations"],function(){return Ef.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Db(){return Pg(["fetch-all-organizations",ib()],function(){return Ef.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function qb(e){var t=ib();return Pg(["organizations-provider-params",e],function(e){var n=e.queryKey;return Ef.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Nb(e){var t=e.integration_code,n=e.enabled,a=e.accountCode;return Pg(["integration-params",t,a],function(){return t.includes("undefined")?{}:Ef.getInstance().getIntegrationParams({accountCode:a,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})}function Mb(e){var t=e.accountCode,n=e.organizationCode,a=ib();return Pg(["organizations-account-integrations",t,n],function(){return Ef.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||a}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function Fb(e){var t=e.accountCode,n=e.paymentMethod;return Pg(["fetch-connections-by-payment-method",n,t],function(){return Ef.getInstance().getConnectionsByPaymentMethod(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Ub(){var e=this;return Pg(["fetch-hash-pylon"],function(){return t(e,void 0,void 0,function(){return n(this,function(e){return[2,Ef.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})}function Bb(){return Pg(["connections"],function(){return Ef.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Hb(){return Pg(["dialogs"],function(){return Ef.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function Wb(){return Pg(["params-catalog"],function(){return Ef.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})}function Gb(e){var t=e.accountCode,n=e.name;return Pg(["webhooks",t,n],function(){return Ef.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})}function Vb(e){var t=e.accountCode,n=e.enabled;return Pg(["webhooks-detail",t],function(){return Ef.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})}function $b(e){var t,n=ib(),a=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Pg({queryKey:["accounts",a],queryFn:function(){return Ef.getInstance().getAccounts(a).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!a})}function Kb(e){return Pg(["accountsV2",e],function(){return Ef.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Qb(e){return Pg(["accountsV2-by-user",e],function(){return e?Ef.getInstance().getAccountsByUser(e).then(function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}}).catch(function(e){return{accountsV2ByUser:[],error:e}}):{accountsV2ByUser:[]}},{enabled:!!e,staleTime:0})}function Jb(){return Pg(["menu"],function(){return Ef.getInstance().getMenu().then(function(e){return sf(e)?hf:null==e?void 0:e.data}).catch(function(){return hf})})}function Xb(){return Pg(["/payment/statuses/style"],function(){return Ef.getInstance().useGetPaymentStatusesStyles().then(function(e){return sf(e)?cf:null==e?void 0:e.data}).catch(function(){return cf})})}function Yb(){return Pg(["/transaction/statuses/style"],function(){return Ef.getInstance().useGetTransactionStatusesStyles().then(function(e){return sf(e)?uf:null==e?void 0:e.data}).catch(function(){return uf})},{cacheTime:36e5,useErrorBoundary:!1})}function Zb(){return Pg(["/reconciliation/transaction/statuses/style"],function(){return Ef.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return sf(e)?lf:null==e?void 0:e.data}).catch(function(){return lf})})}function ex(){return Pg(["timezone-catalog"],function(){return Ef.getInstance().useGetTimeZoneCatalog().then(function(e){return sf(e)?pf:null==e?void 0:e.data}).catch(function(){return pf})})}function tx(){return Pg(["/cms/audit-logs-filters"],function(){return Ef.getInstance().useGetAuditLogsFilters().then(function(e){return sf(e)?df:null==e?void 0:e.data}).catch(function(){return df})})}function nx(){return Pg(["/cms/static-contents"],function(){return Ef.getInstance().getDashboardStaticContents().then(function(e){var t,n;return sf(e)?mf:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}})},{cacheTime:6048e5,useErrorBoundary:!1})}function ax(){return Pg(["/cms/locales"],function(){return Ef.getInstance().getLocales().then(function(e){return sf(e)?ff:e.data}).catch(function(){return ff})})}var ox=function(){var e=w("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return E(function(){window.addEventListener("storage",function(e){"isTesting"===e.key&&n("ON"===e.newValue)})},[]),{isTesting:t}};function ix(e){return Pg(["smart-routing-methods",e],function(){return Ef.getInstance().getSmartRoutingMethods(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function rx(e,t){return Pg(["smart-routing-workflow",t,e],function(){return Ef.getInstance().getSmartRoutingWorkflow(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function sx(e,t){return Pg(["smart-routing-condition-types",e,t],function(){return Ef.getInstance().getSmartRoutingConditionTypes(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})}function cx(e,t){return Pg(["smart-routing-condition-payment-method",e,t],function(){return Ef.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})}function ux(e,t){return Pg(["smart-routing-condition-types-values",t,e],function(){return Ef.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})}function lx(e){var t=e.accountCode,n=e.workflowVersionId;return Pg(["smart-routing-workflow-version",n,t],function(){return Ef.getInstance().getSmartRoutingWorkflowVersion(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function px(e,t,n){return Pg(["smart-routing-next-route",e,n,t],function(){return Ef.getInstance().getSmartRoutingNextSteps(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function dx(e){return Pg(["smart-routing-decline-groups",e],function(){return Ef.getInstance().getSmartRoutingDeclinedGroup(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function mx(e,t){return Pg(["smart-routing-payment-route",e,t],function(){return Ef.getInstance().getSmartRoutingPaymentRoute(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!t,cacheTime:0})}function hx(e){return Pg(["smart-routing-simulate-condition-type-values",e],function(){return Ef.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function fx(e){var t=e.text,n=e.conditionType;return Pg(["smart-routing-search-condition-values",t,n],function(){return Ef.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function gx(){return Pg(["smart-routing-conversion-rates"],function(){return Ef.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})}function yx(){var e=this;return Pg({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function vx(){var e=this;return Pg({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Ef.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function bx(e){return Pg(["fetch-routing-monitors-templates",e],function(){return Ef.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function xx(e,t){return Pg(["fetch-routing-monitors-template",e],function(){return Ef.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function kx(e){var t=e.accountCode;return Pg(["checkouts",t],function(){return Ef.getInstance().getCheckouts({accountCode:t}).then(function(e){return e.data})},{cacheTime:0,enabled:Boolean(t)})}function wx(e){var t=e.accountCode;return Pg(["checkouts-template"],function(){return Ef.getInstance().getCheckoutTemplate({accountCode:t}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(t)})}var _x=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Ex=function(e,t){var n=e.paymentMethodType,a=e.type;return Pg(_x({paymentMethodType:n,type:a}),function(){return Ef.getInstance().getNameAndIcon({paymentMethodType:n,type:a}).then(function(e){return null==e?void 0:e.data})},t)},Cx=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Sx=function(e,t){var n=e.paymentMethodType,a=e.type;return Pg(Cx({paymentMethodType:n,type:a}),function(){return Ef.getInstance().getRequiredFields({paymentMethodType:n,type:a}).then(function(e){return null==e?void 0:e.data})},t)};function Rx(e){var t=e.accountCode;return Pg(["styling-sdk-dynamic",t],function(){return Ef.getInstance().getStylingSdkDynamic({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Tx(e){var t=e.accountCode;return Pg(["styling-theme",t],function(){return Ef.getInstance().getStylingTheme({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function jx(e){var t=e.accountCode;return Pg(["styling-settings",t],function(){return Ef.getInstance().getStylingSettings({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ax(e){var t=e.accountCode,n=e.environment,a=void 0===n?"live":n;return Pg(["styling-settings-v2",t],function(){return Ef.getInstance().getStylingSettingsV2({accountCode:t,environment:a}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ix(){return Lg(function(e){var t=e.accountCode,n=e.environment,a=void 0===n?"live":n,o=e.payload;return Ef.getInstance().changeStylingSettings({accountCode:t,environment:a,payload:o}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Ox(){return Pg(["fetch-profile"],function(){return Ef.getInstance().getProfile().then(function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t}).catch(function(e){throw e})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Px(e,t){return Pg(["fetch-permissions",e,t],function(){var e,t,n,a=localStorage.getItem("account"),o=localStorage.getItem("user"),i=a&&JSON.parse(a),r=o&&JSON.parse(o);return((null==r?void 0:r.merlin)?null===(e=null==r?void 0:r.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})}function Lx(e){return Pg(["email-verification",e],function(){return Ef.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function zx(){return Pg({queryKey:["get-login-methods"],queryFn:function(){return Ef.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})}function Dx(){return Pg(["fetch-impersonation-users"],function(){return Ef.getInstance().getImpersonationUsers().then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function qx(){return Pg(["fetch-impersonation-enabled"],function(){return Ef.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Nx(e){var a=this;return Pg(["get-users-to-impersonate",e],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getUsersToImpersonate(e).then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.users)||[]})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Mx(e){var t;return Pg(["fetch-communications",e],function(){return Ef.getInstance().getCommunications(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Fx(){return Pg(["fetch-communications-filters"],function(){return Ef.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Ux(e,t){return Pg(["fetch-communication-details",e],function(){return Ef.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function Bx(e){return Pg(["notifications-customer",e],function(){return Ef.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})}function Hx(e){return Pg(["validate-opsgenie-key",e],function(){return Ef.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})}function Wx(){return Pg(["notifications-merged"],function(){return Ef.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})}function Gx(){return Lg(function(e){return Ef.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Vx(){var e=this;return Lg(function(a){return t(e,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().pathNotification(a)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})})}var $x={key:"metadata_fields",name:"metadata_fields"};function Kx(){return Pg(["reports"],function(){return Ef.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Qx(e){return void 0===e&&(e=!0),Pg(["reports-multi-env"],function(){return Ef.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})}function Jx(e,t,n){return void 0===t&&(t=!1),Pg(["reports/".concat(e)],function(){return Ef.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})}function Xx(e){return Pg(["GET/reports/templates"],function(){return Ef.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})}function Yx(a,o,i){var r=this;return Pg(["GET/reports/columns/".concat(o,"/").concat(i)],function(){return t(r,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getReportColumns(o,i).then(function(t){return o===Mm.ALL&&i===Nm.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[$x],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:a,useErrorBoundary:!1})}function Zx(e,a){var o=this,i=ib();return Pg(["getRefundPdf",e,i,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getRefundPdf(e,i,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!e&&!!i,useErrorBoundary:!1})}function ek(){var e=ib();return Pg(["teams-filters-members"],function(){return Ef.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function tk(e){var t=e.organizationCode,n=e.accountCodes,a=e.email,o=e.page,i=e.pageSize,r=ib();return Pg(["fetch-post-members-v2",t,n,a,o,i],function(){return Ef.getInstance().postMembersPaginatedV2({organizationCode:r,accountCodes:n,email:a,page:o,pageSize:i}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function nk(){return Pg(["fetch-roles"],function(){return Ef.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ak(){return Pg(["fetch-rolespermissions"],function(){return Ef.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function ok(){return Pg(["fetch-permissions-catalog"],function(){return Ef.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function ik(e){return Pg(["data-report",e],function(){return Ef.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})}function rk(e,t,n){return void 0===n&&(n=!0),Pg(["get-insights-conversion-rate-metrics-v2",e,t],function(){return Ef.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:3e5,cacheTime:3e5,useErrorBoundary:!1,retry:1})}function sk(e,t){return Pg(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function ck(e){return Pg(["get-insights-conversion-rate-fallback-metrics",e],function(){return Ef.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function uk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-volume-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function lk(e,t,n,a){return void 0===a&&(a=!0),delete t.account_code,Pg(["get-insights-volume-metrics-v2",t,e,n],function(){return Ef.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:a,cacheTime:200,useErrorBoundary:!1})}function pk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-total-payment-fraud-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function dk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Pg(["get-insights-customer-payment-fraud-metrics",t,e],function(){return Ef.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function mk(e){return Pg(["get-insights-overview",e],function(){return Ef.getInstance().getInsightOverview(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function hk(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Pg(["get-insights-overview-v3",e,t],function(){return Ef.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})}function fk(e){return Pg(["get-insights-home-metrics",e],function(){return Ef.getInstance().getInsighstHomeMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function gk(e){return Pg(["get-insights-reports",e],function(){return Ef.getInstance().getInsightsReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function yk(e){return Pg(["get-insights-reports-again",e],function(){return Ef.getInstance().getInsightsReportAgain(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function vk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function bk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-fraud-screening-conversion-rate",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsFraudScreeningConversionRate(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function xk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-volume-and-count-tx",a,e],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function kk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsConversionRateAndEvolution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function wk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-decline-reasons",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsDeclineReasons(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function _k(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsights3dsFrictionlessVsChallenge(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ek(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksVolumeAndCountTx(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ck(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Sk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-win-rate",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksWinRate(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Rk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-disputed",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksDisputed(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Tk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function jk(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-reasons-distribution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksReasonsDistribution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ak(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-status-distribution",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksStatusDistribution(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ik(e,a,o){var i=this;return void 0===o&&(o={enabled:!0}),Pg({queryKey:["post-insights-chargebacks-by-card-brand",e,a],queryFn:function(){return t(i,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,Ef.getInstance().getInsightsChargebacksByCardBrand(e,a)];case 1:return[2,t.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ok(e,t){return Pg(["fetch-reconciliation-transaction",e],function(){return Ef.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function Pk(e,t){return Pg(["fetch-reconciliation-settlements",e],function(){return Ef.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function Lk(e,t){return Pg(["fetch-reconciliation-metrics",e],function(){return Ef.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})}function zk(){return Pg(["GET-reconciliation-filters"],function(){return Ef.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Dk(e){return Pg(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return Ef.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function qk(){return Pg(["GET/v1/reconciliation/active"],function(){return Ef.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Nk(e,t,n){return Pg(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return Ef.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function Mk(e){return Pg(["GET/reconciliation/reports/templates"],function(){return Ef.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function Fk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/alerts/list",t,n],function(){return Ef.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Uk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/agenda/list",t,n],function(){return Ef.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Bk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/agenda/insights",t,n],function(){return Ef.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Hk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/sales/list",t,n],function(){return Ef.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Wk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/advancements/list",t,n],function(){return Ef.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Gk(e){var t=e.body,n=e.params,a=e.enabled;return Pg(["GET/reconciliation/fees/list",t,n],function(){return Ef.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:a,useErrorBoundary:!1})}function Vk(e){var a=this,o=Object.values(e).filter(Boolean);return Pg(["feature-flags",o],function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getFeatureFlagId(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o.length>1,useErrorBoundary:!1})}function $k(e){var a=this,o=Pg({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),i=Rg();return E(function(){i.setQueryData(["cached-feature-flags"],o)},[o,i]),o}function Kk(e){var t=Rg();return Pg({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=t.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}})}function Qk(e){return Pg(["events",e],function(){return Ef.getInstance().getAuditEvents(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function Jk(e){return Pg(["audit-monitor-event-detail",e],function(){return Ef.getInstance().getAuditMonitorDetail(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function Xk(e,t){return Pg(["fetch-payment-links",e,t],function(){return Ef.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})}function Yk(e){return Pg(["payment-link"],function(){return Ef.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function Zk(e){return void 0===e&&(e=!0),Pg(["countries",e],function(){return Ef.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})}function ew(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Pg(["countries-v2",n],function(){return Ef.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})}function tw(e){return Pg(["timezone"],function(){return Ef.getInstance().getTimezone(e).then(function(e){return sf(e)?pf:null==e?void 0:e.data}).catch(function(){return pf})},{enabled:!0,keepPreviousData:!0})}function nw(e){return Lg(function(e){var t=e.payload;return Ef.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function aw(e,t){return Pg(["get-cofig-allow-list",e],function(){return Ef.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})}function ow(e){return Pg(["get-black-list",e],function(){return Ef.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e})}function iw(e,t,n,a){var o;return Pg(["post-black-list",e],function(){return Ef.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=a?a:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})}function rw(e,t,n){return Pg(["get-block-list-summary",e,t,n],function(){var a=Ef.getInstance();return n?a.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})}function sw(e,t,n,a,o,i){return Pg(["black-list-detail",e,t,a,o,i],function(){return Ef.getInstance().getBlacklistDetail(e,t,n,a,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&i,cacheTime:0})}function cw(e,t,n){return Pg(["allow-list-detail",e],function(){return Ef.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})}function uw(e){return Pg(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return Ef.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function lw(e,a){var o=this;return void 0===e&&(e=26),void 0===a&&(a=0),Pg(["batch-refunds",e,a],function(){return t(o,void 0,void 0,function(){return n(this,function(t){return[2,Ef.getInstance().getBatchRefunds(e,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})}function pw(e){return Pg(["velocity-rules",e],function(){var t=Ef.getInstance();return e?t.getVelocityRules(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e,keepPreviousData:!0})}function dw(){return Pg(["config-rules"],function(){return Ef.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})}function mw(e,t){var n=e.organizationCode;return Pg(["mfa-excluded-users",n],function(){return Ef.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function hw(e,t){var n=e.organizationCode;return Pg(["mfa-config",n],function(){return Ef.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function fw(e,t){return Pg(["mfa-enforcement-status",e.accountCode],function(){return Ef.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function gw(e){return Pg(["fetch-organization-saml-config",e],function(){return Ef.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function yw(e){return Pg(["chartgpt-chart-execute",e],function(){return Ef.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})}function vw(){return Pg(["chartgpt-user-charts"],function(){return Ef.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function bw(){var e=this;return Pg(["chartgpt-user-charts-with-results"],function(){return t(e,void 0,void 0,function(){var e,a,i,r=this;return n(this,function(s){switch(s.label){case 0:return[4,(e=Ef.getInstance()).getChartsByUser()];case 1:return a=s.sent(),i=(null==a?void 0:a.data)||[],[4,Promise.all(i.map(function(a){return t(r,void 0,void 0,function(){var t,i,r,s,c,u,l,p;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(a.code)];case 1:return t=n.sent(),[2,o(o({},a),{user_prompt:null!==(s=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.user_prompt)&&void 0!==s?s:a.user_prompt,unit_to_display:null!==(u=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:a.unit_to_display,results:null!==(p=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==p?p:[]})];case 2:return i=n.sent(),console.error("Failed to execute chart ".concat(a.chart_id,":"),i),[2,o(o({},a),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,s.sent()]}})})})}function xw(e,a,o){var i=this;return void 0===o&&(o=!0),Pg(["chartgpt-patch-and-execute",e,a],function(){return t(i,void 0,void 0,function(){var t,o,i,r,s;return n(this,function(n){switch(n.label){case 0:return[4,(t=Ef.getInstance()).patchChartGPTChart(e,a)];case 1:return o=n.sent(),i=null==o?void 0:o.data,[4,t.executeChartGPTChart(e)];case 2:return r=n.sent(),s=null==r?void 0:r.data,[2,{chart:i,execution:s}]}})})},{enabled:o&&!!e,retry:!1})}function kw(){return Pg(["languages"],function(){return Ef.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})}function ww(){var e=localStorage.getItem("lang")||"en";return Pg(["translations",e],function(){return Ef.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})}var _w=function(e){var t,n,a,o=e.plots||[],i=o.find(function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label}),r=o.find(function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label}),s=o.find(function(e){return"CONVERSION_RATE_LABEL"===e.label});return{communications:{distribution:(null===(t=null==i?void 0:i.rows)||void 0===t?void 0:t.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==i?void 0:i.value)||"0")},conversion_rate:{distribution:(null===(n=null==s?void 0:s.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),percentage:parseFloat(e.value)}}))||[],total:parseFloat((null==s?void 0:s.value)||"0")},completed_communications:{distribution:(null===(a=null==r?void 0:r.rows)||void 0===a?void 0:a.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==r?void 0:r.value)||"0")}}},Ew=function(e){var t,n;return{distribution:(null===(t=e.plots)||void 0===t?void 0:t.map(function(e){return{key:e.label,total:parseFloat(e.value),percentage:parseFloat(e.percentage||"0"),amount:parseFloat(e.value)}}))||[],total:(null===(n=e.plots)||void 0===n?void 0:n.reduce(function(e,t){return e+parseFloat(t.value)},0))||0}},Cw=function(e){var t,n={};return null===(t=e.plots)||void 0===t||t.forEach(function(e){var t;n[e.label]=(null===(t=e.rows)||void 0===t?void 0:t.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[]}),n},Sw=function(e){var t,n,a=null===(t=e.plots)||void 0===t?void 0:t[0];return{distribution:(null===(n=null==a?void 0:a.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},Rw=function(e){var t,n,a=null===(t=e.plots)||void 0===t?void 0:t[0];return{distribution:(null===(n=null==a?void 0:a.rows)||void 0===n?void 0:n.map(function(e){return{key:e.date,total:parseFloat(e.value),current_label:new Date(e.date).toLocaleDateString(),current_amount:parseFloat(e.value)}}))||[],total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},Tw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/nova-insights/communications-by-day",a)];case 1:return o=n.sent(),[2,_w(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},jw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/nova-insights/communications-by-substatus",a)];case 1:return o=n.sent(),[2,Ew(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Aw=function(e,a){return Pg(o({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/nova-insights/communications-substatus-by-day",a)];case 1:return o=n.sent(),[2,Cw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Iw=function(e,a){return Pg(o({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/nova-insights/recovered-tpv-by-day",a)];case 1:return o=n.sent(),[2,Sw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))},Ow=function(e,a){return Pg(o({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,function(){var t,a,o;return n(this,function(n){switch(n.label){case 0:return t=Ef.getInstance(),a={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[]},[4,t.post("/nova-insights/recovered-payments-by-day",a)];case 1:return o=n.sent(),[2,Rw(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},a))};function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pw.apply(this,arguments)}
|
|
59
59
|
/**
|
|
60
60
|
* match-sorter-utils
|
|
61
61
|
*
|