@tap-payments/os-micro-frontend-shared 0.3.227 → 0.3.228

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.
Files changed (45) hide show
  1. package/build/_chunks/chunk-RZJSME6H.js +1 -0
  2. package/build/_chunks/chunk-UTT6RR33.js +2 -0
  3. package/build/components/AppServices/index.js +1 -1
  4. package/build/components/AppServicesBar/index.js +1 -1
  5. package/build/components/BrandLogo/index.js +1 -1
  6. package/build/components/ColumnViews/index.js +1 -1
  7. package/build/components/DateFilter/index.js +1 -1
  8. package/build/components/FileInputPreview/index.js +1 -1
  9. package/build/components/FilterDropdown/index.js +1 -1
  10. package/build/components/Inputs/index.d.ts +0 -1
  11. package/build/components/Inputs/index.js +1 -1
  12. package/build/components/ListColumnFilter/index.js +1 -1
  13. package/build/components/ListHeader/index.js +1 -1
  14. package/build/components/MerchantLogo/index.js +1 -1
  15. package/build/components/PaymentSourceFilter/index.js +1 -1
  16. package/build/components/PhoneFilter/index.js +1 -1
  17. package/build/components/ReferenceTypeFilter/index.js +1 -1
  18. package/build/components/StatusFilter/index.js +1 -1
  19. package/build/components/StatusIcons/index.js +1 -1
  20. package/build/components/TableCells/index.js +1 -1
  21. package/build/components/TableReports/index.js +1 -1
  22. package/build/components/VerificationIcon/index.js +1 -1
  23. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  24. package/build/components/WindowSideBar/index.js +1 -1
  25. package/build/components/index.d.ts +0 -1
  26. package/build/components/index.js +1 -1
  27. package/build/index.js +1 -1
  28. package/package.json +1 -1
  29. package/build/_chunks/chunk-UO33K26R.js +0 -1
  30. package/build/_chunks/chunk-W4I7CKBI.js +0 -2
  31. package/build/components/Customer/CustomerDropdown/CustomerDropdown.d.ts +0 -8
  32. package/build/components/Customer/CustomerDropdown/index.d.ts +0 -1
  33. package/build/components/Customer/CustomerDropdown/style.d.ts +0 -10
  34. package/build/components/Customer/CustomerForms/CustomerEmailForm.d.ts +0 -12
  35. package/build/components/Customer/CustomerForms/CustomerFullInfo.d.ts +0 -14
  36. package/build/components/Customer/CustomerForms/CustomerFullInfoForm.d.ts +0 -12
  37. package/build/components/Customer/CustomerForms/CustomerPhoneNumberForm.d.ts +0 -12
  38. package/build/components/Customer/CustomerForms/index.d.ts +0 -9
  39. package/build/components/Customer/CustomerForms/style.d.ts +0 -24
  40. package/build/components/Customer/CustomerForms/validation.d.ts +0 -30
  41. package/build/components/Customer/index.d.ts +0 -2
  42. package/build/components/Customer/index.js +0 -1
  43. package/build/components/Inputs/CountriesDropDown/CountriesDropdown.d.ts +0 -13
  44. package/build/components/Inputs/CountriesDropDown/index.d.ts +0 -3
  45. package/build/components/Inputs/CountriesDropDown/style.d.ts +0 -22
@@ -1,2 +0,0 @@
1
- import {a as a$2}from'./chunk-FKG3SYY6.js';import {b as b$b,c as c$6}from'./chunk-TH5E43JD.js';import {b as b$1}from'./chunk-DPOBKAVX.js';import {a as a$c}from'./chunk-QGQRTANO.js';import {f as f$3,b as b$9,g,a as a$g,e as e$1,d as d$4,c as c$5}from'./chunk-KV7KQ6MZ.js';import {a as a$j}from'./chunk-545BCGVE.js';import {a as a$b}from'./chunk-W4PURLBP.js';import {a as a$l}from'./chunk-XSRIBZ5H.js';import {a as a$3}from'./chunk-MMFW3YZV.js';import {a as a$a}from'./chunk-ZGZK4AZ3.js';import {b as b$5}from'./chunk-4SWNFKMX.js';import {b as b$c}from'./chunk-WAY7BWQL.js';import {b as b$7}from'./chunk-EI4VQCCM.js';import {a as a$f,b as b$a}from'./chunk-ZONDSLTR.js';import {a as a$7,c as c$1,b as b$6}from'./chunk-UO33K26R.js';import {a as a$k,b as b$d,d as d$5,c as c$7}from'./chunk-32CPM4J3.js';import {a as a$i}from'./chunk-R5PUIGMB.js';import {a as a$1}from'./chunk-5DLQTR4L.js';import {h as h$1}from'./chunk-OYJYQKLK.js';import {a as a$8}from'./chunk-J4V7VRJY.js';import {b as b$8}from'./chunk-MFFVCCTZ.js';import {a as a$e}from'./chunk-VQ4INPUZ.js';import {c as c$4}from'./chunk-6VQVT7U4.js';import {a,j,d,c,h,o,b as b$2,i,f as f$2,k,l,p as p$1,q,n as n$1,m}from'./chunk-WE7NB24K.js';import {a as a$4}from'./chunk-T5WRDF6Z.js';import {a as a$d}from'./chunk-TKU4GMEV.js';import {f,a as a$6,b as b$3,d as d$2,c as c$3,e}from'./chunk-UD33MPJX.js';import {a as a$h}from'./chunk-MHZSYMQP.js';import'./chunk-GAL3X7PR.js';import {b as b$4,c as c$2,d as d$3}from'./chunk-FTG5LY7I.js';import {a as a$9}from'./chunk-JQTHWXQR.js';import {p,z,j as j$1,V,t,L,R,b,D,d as d$1,v,f as f$1,r,x as x$1}from'./chunk-TIO3V7XA.js';import {n,r as r$1}from'./chunk-OBHJVUFA.js';import {a as a$5}from'./chunk-LIHS4ZYZ.js';import {Wa as Wa$1,wa,lc,La,x,Cb as Cb$2,Bb as Bb$1,Ab as Ab$2,Va as Va$1,zc,ac as ac$1,Aa,Wb as Wb$1,Yb as Yb$1,bb,vb as vb$1,wb as wb$2,Xb as Xb$1,Mb as Mb$1,yb,zb as zb$2,xb as xb$1,_b as _b$1,Ia,Da as Da$1,Ha as Ha$1,cc as cc$1,dc,o as o$1,f as f$4,t as t$1,gb}from'./chunk-4XXNGLS6.js';import {Ab as Ab$1,xb,zb as zb$1,Ud,Cj,pc,Bi,zi as zi$1,Ai,Bh as Bh$1,Mg as Mg$1,Sh as Sh$1,Se,gk,ja as ja$1,yk,pk,F,E,Zo,Kj,Jj,Ij,Gj,Ej,Fj,Hj,hc,ic,fc,ma as ma$1,Jl,Cb as Cb$1,Db,Eb,C,Xj,Ah as Ah$1,wb as wb$1,fm as fm$1,Kh as Kh$1,Jh,hb as hb$1,Rd,We,vb,oo,vj,Ve,hm,Wc,Vc,Ze,Xe,Ye,Fb as Fb$1,dh as dh$1,ih as ih$1,jh as jh$1,gh as gh$1,fh as fh$1,ah as ah$1,bh as bh$1,ch as ch$1,_g as _g$1,$g as $g$1,kh,H,io as io$1,G,ub,T,wi,yi,xi,vi,Ci,Tg as Tg$1,Pj,Qj,tb as tb$1,ek,hk,fk,Kn,va as va$1,ua as ua$1,qk,h as h$2,Sg,z as z$1,da as da$1,ca as ca$1,na as na$1,rk,Ak,sk,ik,kk,vk,xk,nk as nk$1,ok,ac as ac$2,bc,Oh,tk,lh as lh$1,wh as wh$1,vh as vh$1,uh as uh$1,th,sh as sh$1,rh as rh$1,qh as qh$1,ph,oh as oh$1,nh as nh$1,mh as mh$1,Vh as Vh$1,Th as Th$1,Uh as Uh$1,Yh as Yh$1,Xh,ae,Xd,$d,Cn,An,si,ob as ob$1,Yd,rn,Zd,pb as pb$1,Dh as Dh$1,Ch as Ch$1,Fh as Fh$1,Hh as Hh$1,Gh as Gh$1,Ih as Ih$1,je,sf,rf,qf as qf$1,pf,of,tf,nf,Ba,Aa as Aa$1,kf,jf,if as _if,ei,di,gi,fi,hi,_j,Yj,Zj,tc as tc$1,Di,uc,Hi,ai,yd,Lk,Jk,Kk,Rb as Rb$1,vf,yf,xf,wf,uf,Lm,Im,Dm,Em as Em$1,Km as Km$1,wm as wm$1,Mm,xm as xm$1,Nm as Nm$1,ym,Fm as Fm$1,Am as Am$1,Cm as Cm$1,Jm as Jm$1,Bm,um as um$1,Gm,Hm,vm as vm$1,zm,tm,sm,rm,qm,pm as pm$1,Yg as Yg$1,zk,Vk,$j,Fo as Fo$1,Ho as Ho$1,dk,ui,A,jo,Go}from'./chunk-V2RLDP5A.js';import um,{memo,createContext,forwardRef,useState,useEffect,useMemo,useCallback,useId,useRef,useReducer,Fragment as Fragment$1,useContext}from'react';import Or from'@mui/material/Box';import {styled,alpha,useTheme}from'@mui/material/styles';import {styled as styled$1,Box,Paper,Button,TextField,alpha as alpha$1,Typography,Popper,CircularProgress,Link,useTheme as useTheme$1,TableCell,ClickAwayListener}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {motion,AnimatePresence,Reorder,useDragControls}from'framer-motion';import HT from'@mui/material/SvgIcon';import Bt from'lodash/camelCase';import tc from'dayjs';import EP from'dayjs/plugin/timezone';import MP from'dayjs/plugin/utc';import fx from'lodash/startCase';import rA from'@mui/material/Popover';import mA from'lodash/capitalize';import CE from'@mui/material/ClickAwayListener';import cE from'@mui/material/Popper';import PE from'@mui/material/Typography';import Ky from'@mui/material/Button';import MM from'@mui/material/Menu';import {yupResolver}from'@hookform/resolvers/yup';import {useForm,Controller}from'react-hook-form';import*as ye from'yup';import {useDropzone}from'react-dropzone';import NL from'@mui/material/CircularProgress';import rc from'@mui/material/LinearProgress';import BR from'lodash/values';import NR from'@mui/material/InputAdornment';var Of=styled(Or)({display:"flex",alignItems:"center",gap:"12px"});function qS({value:e,format:t,flagIcon:o,hasFlag:n,tableMode:r,...i}){let a$1=o&&jsx(p,{title:La(o||""),children:jsx(a$4,{countryCode:o})}),l=useMemo(()=>x(e,t),[e]);return jsx(a,{...i,children:jsxs(Of,{children:[n&&jsx(b$2,{sx:{visibility:"visible"},className:"geography-box",children:a$1}),jsx(Box,{sx:{...Wa$1(r)&&{fontSize:"11px"}},children:l})]})})}var _n=qS;function _f({value:e,currentTimezone:t=io$1.UTC,timezoneOffset:o=0,defaultTimezoneOffset:n=0,hideTimezoneIcon:r=false,...i}){let a=m=>t$1(e,{currentTimezone:t,targetTimezone:m}),l=a(o),s=a(n),p$1=x(s),c=!r&&n!==o;return jsxs(Or,{sx:{display:"flex",gap:"8px"},children:[jsx(_n,{value:l,...i}),c&&jsx(p,{title:p$1,children:jsx("img",{src:H,width:14,alt:"timezone"})})]})}function QS({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`,a$1=jsx(Fragment,{children:o?.map(l=>{let s=l.name||l.description,p=(s?.length||0)>20?`${s?.slice(0,20)}...`:s;return jsx("div",{children:p},l.id)})});return jsx(p,{title:(o||[]).length>1?a$1:void 0,children:jsx(a,{...n,children:jsx("span",{children:i})})})}var eT=QS;function oT({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`;return jsx(a,{sx:{fontSize:"11px"},...n,children:i})}var nT=oT;var zf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ki=styled("span",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"25ch",flex:1,...Wa$1(t)&&{fontSize:"11px",color:e.palette.text.primary}})),$f=styled("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),Uf=styled("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});function aT({customerInitiated:e,children:t,isTimezoneIconShown:o,hasCustomerIcon:n,customerIcon:r,customerName:i$1,hideCustomerInitiatedIcon:a$1,hideTimezoneIcon:l,phone:s,email:p$1,id:c,...m}){let{t:d}=useTranslation(),u=e===false?d("merchantInitiated"):"",f=_b$1(i$1),C=i$1?.split(" ")?.map(T=>T?.[0]?.toUpperCase()).join(""),y=useMemo(()=>Aa(),[]),w=n&&jsx(p,{title:t,children:jsx(i,{"data-testid":"CustomerCell_customerShownIcon",sx:{background:y},src:r,alt:r,children:C})}),g=useMemo(()=>[{name:"ID",value:c},{name:"Name",value:i$1},{name:"Email",value:p$1},{name:"Phone",value:s}],[p$1,s,c,i$1]),x=useMemo(()=>g.some(({value:T})=>T)?jsx("div",{"data-testid":"CustomerCell_customerTooltip",children:g.map(({name:T,value:I},S)=>I&&jsx("div",{"data-testid":`CustomerCell_customerTooltip_${T}`,children:T==="Name"?I:`${T}: ${I}`},`${S}-${I}`))}):null,[g]);return jsx(a,{...m,"data-testid":"CustomerCell_TableCell",children:jsxs(zf,{"data-testid":"CustomerCell_StyledCustomerCell",children:[w,jsx(p,{title:x,children:jsx(ki,{"data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":f,children:t})}),!l&&jsx($f,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(Uf,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!a$1&&jsx(p,{title:u,children:jsx(f$2,{"data-testid":"CustomerCell_StarBadgeWrapper",className:"geography-box",isShown:!!u,children:u&&jsx("img",{"data-testid":"CustomerCell_merchantInitiatedIcon",src:ub,alt:"merchant",style:{width:"16px",height:"16px"}})})})]})})}var lT=aT;function pT({children:e,customerName:t}){let o=_b$1(t);return jsx(ki,{tableMode:"sheet","data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":o,children:e})}var mT=pT;var Ni=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),Gf=styled("span")(({theme:e,tableMode:t})=>({backgroundColor:e.palette.grey[100],display:"block",borderRadius:"4px",padding:"1.5px 3px",fontSize:Wa$1(t)?"11px":"10px",lineHeight:"13px",textTransform:"uppercase",fontWeight:e.typography.fontWeightBold})),Yf=styled("span")(({theme:e,tableMode:t})=>({fontSize:Wa$1(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),Ps=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"})),Fi=styled("div")(({theme:e,count:t})=>({justifyContent:"space-between",display:"flex",width:"100%",gap:(t||1)<=1?e.spacing(1.5):e.spacing(1)}));var nk=({type:e,selectAmount:t,selectCurrency:o,requestAmount:n,requestCurrency:r,merchantAmount:i,merchantCurrency:a})=>{let l=Ia(t,o),s=Ia(n,r),p=Ia(i,a);return jsxs(Ps,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Da$1[e]:""}),jsxs(Ps,{children:[e!=="fx"&&jsxs(Fi,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(a$e,{currency:o})," ",l.integerAmount,".",l.decimalAmount]})]}),jsxs(Fi,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(a$e,{currency:r})," ",s.integerAmount,".",s.decimalAmount]})]}),jsxs(Fi,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(a$e,{currency:a})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var Lo=({tableMode:e,conversionType:t})=>t?jsx(Gf,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var Ro=({tableMode:e,amount:t,currency:o})=>jsx(Yf,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(a$e,{currency:o,fontSize:10})})," ",jsx(b$8,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var qf="default";function CT({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(a,{...i,children:jsxs(Ni,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(Lo,{tableMode:qf,conversionType:e})})}),o&&jsx(p,{title:jsx(a$e,{currency:o}),children:jsx(a$4,{currencyCode:o})}),jsx(p,{title:r,children:jsx(Ro,{tableMode:qf,amount:t,currency:o})})]})})}var xT=CT;var Kf="text";function yT({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(a,{...i,children:jsxs(Ni,{children:[jsx(p,{title:n||"",children:jsx(Lo,{tableMode:Kf,conversionType:e})}),jsx(p,{title:jsx(a$e,{currency:o}),children:jsx("span",{})}),jsx(p,{title:r,children:jsx(Ro,{tableMode:Kf,amount:t,currency:o})})]})})}var IT=yT;var Xf="sheet";function ST({conversionType:e,amount:t,currency:o}){let{integerAmount:n,decimalAmount:r}=Ia(t,o);return jsxs(b$1,{copyTrigger:"press",copyText:t?`${n}.${r}`:"-",children:[jsx(Lo,{tableMode:Xf,conversionType:e}),jsx(Ro,{tableMode:Xf,amount:t,currency:o})]})}var TT=ST;var Jf=styled(motion.img)(()=>({width:"14px",height:"14px"})),Qf=styled(motion.span)(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:e.palette.secondary.main})),As=styled(motion.div)(({theme:e})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.secondary.main}1A`,paddingInline:e.spacing(.5),borderRadius:"56px"})),ko=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}}),No=styled(motion.span)(({isTextShown:e,theme:t})=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e?"auto":"36px",...e&&{border:"none"}})),Fo=styled(motion.div,{shouldForwardProp:e=>e!=="order"})(({order:e=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:e+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Vo=styled(motion.div,{shouldForwardProp:e=>e!=="statusesCount"})(({statusesCount:e=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${e*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),eg=styled("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var tg=e=>e?Object.keys(e).filter(t=>e[t]).reduce((t,o)=>(t[o]=e[o],t),{}):{};var Wo=({statuses:e,centerIconKey:t})=>{let o=useMemo(()=>tg(e),[e]),n=useMemo(()=>Object.values(o).filter(Boolean),[o]),r=useMemo(()=>{if(!t)return 0;let i=Object.entries(o).findIndex(([a])=>a===t);return i===-1?Math.floor((n.length-1)/2):i},[o,t,n.length]);return {statusesList:n,centerIconIndex:r}};function PT({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=Wo({statuses:e,centerIconKey:t}),r=useTheme(),i=n.length||0;return jsx(a,{...o,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(Vo,{whileHover:"animate",animate:"start",statusesCount:i,children:n.map((a,l)=>a?jsx(Fo,{order:l,variants:ko(l,r.shadows[4],40),children:jsx(No,{children:a})},l):null)})})}var AT=PT;function MT({statuses:e,...t}){let{statusesList:o}=Wo({statuses:e});return jsx(a,{...t,children:jsx(eg,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var DT=MT;function RT({statuses:e,centerIconKey:t,xGap:o,...n}){let{statusesList:r}=Wo({statuses:e,centerIconKey:t}),i=useTheme(),a$1=r.length||0,l=o||120;return jsx(a,{...n,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(Vo,{whileHover:"animate",animate:"start",statusesCount:a$1,children:r.map((s,p)=>s?jsx(Fo,{order:p,variants:ko(p,i.shadows[4],l),children:jsx(No,{isTextShown:true,children:s})},p):null)})})}var BT=RT;var Oi=styled("section",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",textAlign:"center",borderRadius:"50%",gap:Wa$1(t)?"4px":e.spacing(1),overflow:"visible"})),_i=styled("span")(({selected:e})=>({overflow:"visible",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative","&:hover":{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},...e&&{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},span:{flexGrow:1}})),og=styled("img",{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({width:"18px",height:"18px",...!e&&{pointerEvents:"none",filter:"opacity(0.3)"}})),He=styled(motion.img)(({icon:e})=>({width:"13.3px",height:"13.3px",...e==="cancel"&&{padding:"1.15px"}}));function ng({isAnyActionLoading:e,isAnyActionHasError:t,isAnyActionSuccessful:o,areThereAnyShownActions:n}){let{t:r}=useTranslation();return t?jsx(He,{src:hc,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"fail-icon"):o?jsx(He,{src:ic,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(He,{src:fc,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(og,{alt:"more",src:ma$1,isActive:n},"ellipsis-icon")})}ng.displayName="ActionIconsVariants";var Yn=memo(ng);var Ho={GRAY:{icon:zb$1,color:"#CFCFCF"},ORANGE:{icon:xb,color:"#FFD503"},RED:{icon:Ab$1,color:"#FF0000"}},zi={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},$i={flag:E,dispute:F,refund:pk,void:yk,capture:ja$1,cancel:gk,clock:Se,reverse:Sh$1,destination:Mg$1,invoice:Bh$1,users:Ai,brand:zi$1,clipboard:Bi,viewApi:Ud,viewReceipt:pc,delete:Cj};function Ui({actions:e,isDropdownShown:t,onCloseDropdown:o,renderDropdown:n}){let[r,i]=useState(null),a=!!r,l=(e||[]).filter(f=>f.isShown!==false),s=l.some(f=>f.isLoading),p=l.some(f=>f.isError),c=l.some(f=>f.isSuccess),m=l.length>0||!!n,d=f=>{s||!m||i(f.currentTarget);},u=()=>{i(null),o?.();};return useEffect(()=>{t||i(null);},[t]),{anchorEl:r,open:a,filteredActions:l,isAnyActionLoading:s,isAnyActionHasError:p,isAnyActionSuccessful:c,areThereAnyShownActions:m,handleClick:d,handleClose:u,setAnchorEl:i}}var rg=e=>jsx(HT,{sx:{height:12.6,width:13},...e,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.07 10.66 12.66",fill:"none",children:jsxs("g",{transform:"translate(-4 -4)",children:[jsx("path",{d:"M7.5918 15.166C7.5918 16.4041 8.5959 17.4072 9.83398 17.4072H15.5273L15.334 17.6973C15.101 18.0473 14.7079 18.2577 14.2871 18.2578H9.83398C8.12641 18.2578 6.74219 16.8736 6.74219 15.166V8.71289C6.74219 8.2923 6.9526 7.89944 7.30273 7.66602L7.5918 7.47266V15.166ZM10.167 5.74121H15.5C16.4651 5.74121 17.2586 6.534 17.2588 7.49902V14.833C17.2586 15.798 16.4651 16.5908 15.5 16.5908H10.167C9.20193 16.5908 8.40838 15.798 8.4082 14.833V7.49902C8.40838 6.534 9.20193 5.74121 10.167 5.74121ZM10.167 6.59082C9.6596 6.59082 9.25896 6.99168 9.25879 7.49902V14.833C9.25896 15.3404 9.6596 15.7412 10.167 15.7412H15.5C16.0074 15.7412 16.408 15.3404 16.4082 14.833V7.49902C16.408 6.99168 16.0074 6.59082 15.5 6.59082H10.167Z",fill:"#20232B",stroke:"white",strokeWidth:"0.15"}),jsx("path",{d:"M10.7598 12.84V9H11.4851V12.84H10.7598Z",fill:"black"}),jsx("path",{d:"M12.2846 12.84V9H13.5272C13.5574 9 13.6197 9.00089 13.7139 9.00267C13.8081 9.00444 13.8988 9.01067 13.9859 9.02133C14.2952 9.05867 14.5574 9.16622 14.7726 9.344C14.9877 9.52178 15.1512 9.74756 15.2632 10.0213C15.3752 10.2951 15.4312 10.5947 15.4312 10.92C15.4312 11.2453 15.3752 11.5449 15.2632 11.8187C15.1512 12.0924 14.9877 12.3182 14.7726 12.496C14.5574 12.6738 14.2952 12.7813 13.9859 12.8187C13.8988 12.8293 13.8081 12.8356 13.7139 12.8373C13.6197 12.8391 13.5574 12.84 13.5272 12.84H12.2846ZM13.0206 12.1573H13.5272C13.5752 12.1573 13.6401 12.1564 13.7219 12.1547C13.8037 12.1511 13.8774 12.1431 13.9432 12.1307C14.1103 12.0969 14.2463 12.0187 14.3512 11.896C14.4579 11.7733 14.5361 11.6258 14.5859 11.4533C14.6374 11.2809 14.6632 11.1031 14.6632 10.92C14.6632 10.728 14.6366 10.5458 14.5832 10.3733C14.5317 10.2009 14.4526 10.0551 14.3459 9.936C14.2392 9.81689 14.105 9.74133 13.9432 9.70933C13.8774 9.69511 13.8037 9.68711 13.7219 9.68533C13.6401 9.68356 13.5752 9.68267 13.5272 9.68267H13.0206V12.1573Z",fill:"black"})]})})});var ag=".IDButton-root:not(.IDButton-hoverDisabled):hover &",lg=styled("div")(({theme:e})=>({paddingInlineStart:"8px",border:"1px solid transparent",display:"flex",gap:"4px",alignItems:"center",justifyContent:"flex-end",backgroundColor:e.palette.common.white,float:"right",borderRadius:"56px",height:"100%",paddingLeft:"4px",paddingRight:"4px",width:"24px",overflow:"hidden",[ag]:{width:"max-content",overflow:"visible",borderColor:"rgba(92, 92, 92, 0.05)",boxShadow:"-7px 0px 8px 0px #F2F2F2",position:"absolute",right:0,top:0,zIndex:101}})),sg=styled("div")(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",lineHeight:"120%",display:"grid",gridTemplateColumns:"0fr",opacity:0,transition:"grid-template-columns 0.1s ease, opacity 0.1s ease","& > span":{overflow:"hidden",minWidth:0,whiteSpace:"nowrap"},[ag]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function UT({icon:e=jsx(rg,{}),id:t,sx:o,disableOnHoverEffect:n=false,onCopyId:r,className:i,...a}){let{t:l}=useTranslation();return jsx(p,{title:l("copy"),children:jsx(Or,{className:lc("IDButton-root",n&&"IDButton-hoverDisabled",i),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...a,children:jsxs(lg,{className:"IDButton-button",children:[t?jsx(sg,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var Ds=memo(UT);var pF=memo(({flag:e,actions:t,flagTooltip:o,flagsCount:n,dropdownAction:r,onCloseDropdown:i,isDropdownShown:a$1=true,row:l,showJsonViewer:s=true,isTextShown:p$1,showIdButton:c$1=true,onCopyId:m,rowId:d$1,onJsonViewClick:u,renderDropdown:f$1,startSlot:C,...y})=>{let{t:w}=useTranslation(),{open:g,anchorEl:x,filteredActions:T,isAnyActionLoading:I,isAnyActionHasError:S,isAnyActionSuccessful:b,areThereAnyShownActions:v,handleClick:A,handleClose:D,setAnchorEl:M}=Ui({actions:t,isDropdownShown:a$1,onCloseDropdown:i,renderDropdown:f$1});return jsx(a,{...y,sx:{overflow:"visible",...y.sx},children:jsxs(Oi,{"data-testid":"ActionCell_ActionCellContainer",children:[C,e&&jsx(Fragment,{children:p$1?jsx(p,{title:o,children:jsx(j,{"data-testid":"ActionCell_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:o})}):jsx(p,{title:o,children:jsxs(d,{"data-testid":"ActionCell_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(He,{"data-testid":"ActionCell_FlagIcon",sx:{width:"12px",height:"11px"},src:Ho[e]?.icon,alt:"flag-icon"}),(n??0)>1&&jsx(motion.div,{"data-testid":"ActionCell_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:zi[Ho[e]?.color]||"orange","data-testid":"ActionCell_StyledBadge",children:[n,"x"]})})]})})}),c$1&&jsx(Ds,{id:d$1||l.id,onCopyId:m}),jsxs("div",{"data-testid":"ActionCell_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[s&&jsx(Fragment,{children:jsx(c,{onClick:u,type:"button","data-testid":"ActionCell_TransparentButton",children:jsx(p,{title:w("jsonViewer"),children:jsx(h,{"data-testid":"ActionCell_IdButtonContainer",children:jsx(motion.img,{src:Ud,alt:"icon"},"id-icon")})})})}),jsxs(_i,{id:"styled-popover",selected:!!r||g,"data-testid":"ActionCell_ActionsIconContainer","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:[jsx(c,{onClick:A,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(Yn,{isAnyActionLoading:I,isAnyActionHasError:S,isAnyActionSuccessful:b,areThereAnyShownActions:v})})}),r,f$1?f$1(x,M):jsx(Fragment,{children:v&&jsx(f,{style:{zIndex:2e3},open:g,onClose:D,anchorEl:x,menuItems:T.map(L=>({...L,onClick:H=>{L?.onClick?.(H),L.hasActionMenu||D();},onRightClick:H=>{L?.onRightClick?.(H),D();},icon:L.customIcon||jsx(He,{icon:L.icon,src:L.iconSrc??(L.icon&&$i[L.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${L.label.trim()}`)}))})})]})]})]})})});function ZT({flag:e,flagTooltip:t,flagsCount:o,row:n,showJsonViewer:r=true,isTextShown:i,showIdButton:a$1=true,rowId:l,onJsonViewClick:s,tableMode:p$1,...c}){return jsx(a,{...c,sx:{overflow:"visible"},children:jsxs(Oi,{"data-testid":"ActionsColumn_ActionCellContainer",tableMode:p$1,children:[e&&jsx(Fragment,{children:i?jsx(p,{title:t,children:jsx(j,{"data-testid":"ActionsColumn_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:t})}):jsx(p,{title:t,children:jsxs(d,{"data-testid":"ActionsColumn_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(He,{"data-testid":"ActionsColumn_FlagIcon",sx:{width:"12px",height:"11px"},src:Ho[e]?.icon,alt:"flag-icon"}),(o??0)>1&&jsx(motion.div,{"data-testid":"ActionsColumn_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:zi[Ho[e]?.color]||"orange","data-testid":"ActionsColumn_StyledBadge",children:[o,"x"]})})]})})}),a$1&&jsx(b$1,{sx:{minWidth:"213px"},children:l||n.id}),jsx("div",{"data-testid":"ActionsColumn_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:r&&jsx(b$1,{onClick:s,children:"View API"})})]})})}var JT=memo(ZT);function ow({actions:e,dropdownAction:t,onCloseDropdown:o,isDropdownShown:n=true,renderDropdown:r,...i}){let{open:a$1,anchorEl:l,filteredActions:s,isAnyActionLoading:p,isAnyActionHasError:c$1,isAnyActionSuccessful:m,areThereAnyShownActions:d,handleClick:u,handleClose:f$1,setAnchorEl:C}=Ui({actions:e,isDropdownShown:n,onCloseDropdown:o,renderDropdown:r});return jsx(a,{...i,sx:{overflow:"visible"},children:jsx("div",{"data-testid":"ActionIconColumn_Container",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:jsxs(_i,{id:"styled-popover",selected:!!t||a$1,"data-testid":"ActionIconColumn_ActionsIconContainer","data-is-active":d,sx:{...!d&&{pointerEvents:"none"}},children:[jsx(c,{onClick:u,"data-testid":"ActionIconColumn_ActionsIconContainer_TransparentButton","data-is-active":d,sx:{...!d&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(Yn,{isAnyActionLoading:p,isAnyActionHasError:c$1,isAnyActionSuccessful:m,areThereAnyShownActions:d})})}),r?r(l,C):jsxs(Fragment,{children:[t,d&&jsx(f,{style:{zIndex:2e3},open:a$1,onClose:f$1,anchorEl:l,menuItems:s.map(y=>({...y,onClick:w=>{y?.onClick?.(w),y.hasActionMenu||f$1();},onRightClick:w=>{y?.onRightClick?.(w),f$1();},icon:y.customIcon||jsx(He,{icon:y.icon,src:y.iconSrc??(y.icon&&$i[y.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${y.label.trim()}`)}))})]})]})})})}var nw=memo(ow);var Gi={ORDER:{label:"order",icon:vi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:xi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:yi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:wi,color:"#32ADE6"}},Yi={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled$1("img")(()=>({width:"35px",height:"16px",display:"block"}));styled$1("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled$1("img")(()=>({maxWidth:"100%",width:"100%"}));var ji=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),qi=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function mw({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=zc(useId(),"agreement-icon"),i=useTheme$1(),{t:a}=useTranslation(),l=useMemo(()=>[...t?[Yi.SAVED_TOKEN]:[],...(o||0)>0?[Yi.COUNT]:[],...e&&Gi[e]?[Gi[e]]:[]],[t,o,e]),s=m=>n?jsx(a$f,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a("totalPaymentCount",{amount:f$4(o)}),children:jsx(qi,{children:jsxs(ji,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:Yi.COUNT.color},children:["x",o]})})})},m):jsx(a$l,{value:o,index:m},m),p$1=l.map((m,d)=>m.label==="countBadge"?s(d):jsx(p,{title:a(m.label),children:jsx(a$f,{children:n?jsx(qi,{children:jsx(ji,{"data-testid":"AgreementCell_agreementType",sx:{color:m.color},children:a(m.label)})}):jsx(d$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:m.icon,alt:"agreement"})},m.color)},m.color)),c=jsx(p,{title:"No agreement",children:jsx(a$f,{children:n?jsx(qi,{children:jsx(ji,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(d$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ci,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:r,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:p$1?.length>0?p$1:c})}var cg=mw;var dw=cg;styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var ug=styled$1("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),fg=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled$1("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var gg=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Bs={"3DS":{tooltip:"3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Pj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:$g$1,borderColor:"rgba(31, 136, 208, 0.10)"}},Cg={FAILED:{tooltip:"Failed",icon:Tg$1,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ah$1,borderColor:"rgba(255, 61, 0, 0.10)"}};function fw({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=zc(useId(),"auth-icons"),i=useMemo(()=>{let l=e?Cg[e]:null,s=l?.tooltip,p=e==="AUTHENTICATED"?null:l?.icon;return [{tooltip:s,content:n?s:p,type:n?"text":"icon"},...o?[{tooltip:o,content:n?Bs[o]?.tooltip:Bs[o]?.icon,type:n?"text":"icon"}]:[],{tooltip:"",content:t?`ECI ${t}`:"",type:"text"}]},[e,n,o,t]),a=useMemo(()=>i.filter(l=>!!l.content).map((l,s)=>{let p$1=l.type==="text"?jsx(fg,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(ug,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":l.content,children:l.content})}):jsx(d$1,{sx:{width:"16px",height:"16px"},src:l.content,alt:l.tooltip});return jsx(p,{title:l.tooltip,children:p$1},`${l.tooltip}-${s}`)}),[i]);return jsx(gg,{id:r,"data-testid":"AuthIcons",children:a})}var hg=fw;var gw=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}});var Cw=hg;var Xn={VOID:{icon:fk},CAPTURED:{icon:ek}};var Ki=styled(motion.div)(({theme:e,isCapture:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),paddingInline:e.spacing(.3),paddingBlock:e.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:t?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),Xi=styled("div")(({theme:e,percentage:t,isCapture:o})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} ${o?e.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:o?e.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),Zi=styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`})),Ji=styled("img")({width:"14px",height:"14px"}),zo=styled(o)({width:"16px",height:"16px"}),eo=styled("img")({width:"16px",height:"16px"}),yg=styled(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Qi(e){return e<5?5:e===100?95:e}function ww({voidPercentage:e,capturePercentage:t,captureCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:a,isTextShown:l,remainingAmount:s,isSheetViewShown:p$1,selectionProps:c={}}){let m=Number(t)+Number(e)===100||s<=0,d=zc(useId(),"capture-auto-icon"),u=useTheme(),{t:f}=useTranslation(),C=Ha$1(s||0),y=useCallback(I=>`Auto ${I} - ${a} ${C.integerAmount}.${C.decimalAmount}`,[a,C.decimalAmount,C.integerAmount]),w=useCallback(I=>{let S=I==="Capture"?r:i,{integerAmount:b,decimalAmount:v}=Ia(S,a);return `Partial ${I} - ${a} ${b}.${v}`},[r,i,a]),g=t>0?jsx(p,{title:w("Capture"),children:jsxs(Ki,{isCapture:true,isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:u.shadows[4]}},children:[jsx(Ji,{src:tb$1,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(Xi,{isCapture:true,percentage:t,children:[t,"% ",jsx(Zi,{isCapture:true,percentage:Qi(t)})]}),o>1&&jsxs(z,{compact:true,color:"dark",children:[o,"x"]})]})]})}):n==="CAPTURED"&&!m?jsx(p,{title:y("Capture"),children:jsx(zo,{children:jsx(eo,{src:Xn.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:y("Capture"),children:jsx(zo,{children:jsx(eo,{src:Xn.CAPTURED?.icon,alt:"auto"})})}),x=t===100?jsx(p,{title:f("captured"),children:jsx(yg,{children:jsx(eo,{src:hk,alt:"captured"})})}):g,T=useMemo(()=>p$1&&x?jsx(b$1,{copyTrigger:"press",copyText:f("captured"),children:f("captured")}):l&&x?jsx(k,{children:f("captured")}):x,[l,x,p$1,f]);return T&&jsx("div",{id:d,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:T})}var bg=ww;function Dw({voidPercentage:e,capturePercentage:t,voidCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:a,isTextShown:l$1,isSheetViewShown:s,selectionProps:p$1={},remainingAmount:c}){let m=Number(t)+Number(e)===100||c<=0,d=zc(useId(),"void-auto-icon"),u=useTheme(),{t:f}=useTranslation(),C=Ha$1(c||0),y=useCallback(I=>`Auto ${I} - ${a} ${C.integerAmount}.${C.decimalAmount}`,[a,C.decimalAmount,C.integerAmount]),w=useCallback(I=>{let S=I==="Capture"?r:i,{integerAmount:b,decimalAmount:v}=Ia(S,a);return `Partial ${I} - ${a} ${b}.${v}`},[r,i,a]),g=e>0||i?jsx(p,{title:w("Void"),children:jsxs(Ki,{isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:u.palette.common.white,border:`0.75px solid ${u.palette.grey[600]}1A`},variants:{animate:{boxShadow:u.shadows[4]}},children:[jsx(Ji,{src:yk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(Xi,{percentage:e,children:[e,"% ",jsx(Zi,{percentage:Qi(e)})]}),o>0&&jsxs(z,{compact:true,color:"neutral",children:[o,"x"]})]})]})}):n==="VOID"&&!m?jsx(p,{title:y("Void"),children:jsx(zo,{children:jsx(eo,{src:Xn.VOID?.icon,alt:"auto"})})}):null,x=e===100?jsx(p,{title:f("void"),children:jsx(zo,{children:jsx(eo,{src:yk,alt:"void"})})}):g,T=useMemo(()=>s&&x?jsx(b$1,{copyTrigger:"press",copyText:f("void"),children:f("void")}):l$1&&x?jsx(l,{children:f("void")}):x,[l$1,x,s,f]);return T?jsx("div",{id:d,"data-testid":"VoidAutoIcon",style:{...!s&&{zIndex:11}},children:T}):null}var Tg=Dw;var Lw=bg;var Nw=({authorizedStatus:e,isTextShown:t,iconStyles:o,tableMode:n,chipIndex:r=0,selectionProps:i={}})=>{let{t:a}=useTranslation(),l=useTheme(),s=a(Bt(e));return Wa$1(n)?jsx(b$1,{copyTrigger:"press",copyText:s,children:s}):jsx(p,{title:s,children:t?jsx(j,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:l.palette.info.dark},children:s}):jsx(d$1,{src:f$3[e],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var wg=styled(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)})),vg=styled(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),ks=styled("img")(()=>({width:"10px",height:"10px"})),Ns=styled(motion.span)(({theme:e})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Fs=styled(motion.div,{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!e&&{padding:"0 !important"}})),Pg=styled(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Ag=styled(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Eg={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Mg={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Dg={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Lg={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Vs={fadeIn:{duration:.3},animate:{duration:.1}},Rg={fadeIn:{opacity:1}},Bg=styled(j)(()=>({width:"88px",height:"100%"})),Ws=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.25),height:"100%"}));function ct({chargeStatus:e,gatewayTooltip:t,acquirerTooltip:o$1,chargeTooltip:n,errorCode:r,isTextShown:i,gatewayCode:a,acquirerCode:l,unCapturedStyles:s,iconStyles:p$2,iconWrapperStyles:c,gatewayIconWrapperStyles:m,gatewayContainerStyles:d,gateWayIconStyles:u,showBadge:f=true,isSheetViewShown:C=false,selectionProps:y={},chipIndex:w=0}){let g$1=e?b$9[e]:null,x=e?g[e]:null,T=useTheme(),{t:I}=useTranslation(),S=zc(useId(),"charge-status-icon"),b=n&&jsx(Fragment,{children:jsx("div",{children:n})}),v=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o$1})]}),A=t&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:t})]}),D=e&&a$g[e]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:g$1?"50%":"",...c},children:jsx(p$1,{src:a$g[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:g$1?"50%":"",width:"16px",height:"16px",...p$2}})});return C?jsxs(Ws,{children:[jsxs(b$1,{copyTrigger:"press",copyText:I(Bt(e)),children:[I(Bt(e))," ",r]}),g$1&&jsxs(Fragment,{children:[a&&jsxs(b$1,{copyTrigger:"press",copyText:"Gateway",children:["Gateway ",a]}),l&&jsxs(b$1,{copyTrigger:"press",copyText:"Acquirer",children:["Acquirer ",l]})]})]}):i?jsxs(Ws,{children:[jsx(p,{title:b,children:jsxs(Bg,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Bt(e),sx:{background:g$1?.background||x?.background||"transparent",color:g$1?.color||x?.color||T.palette.info.dark,borderColor:`${g$1?.color||x?.color||T.palette.info.dark}1A`},children:[I(Bt(e))," ",r]})}),g$1&&jsxs(Fragment,{children:[a&&jsx(p,{title:A,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Bt(e),sx:{background:g$1?.background||x?.background||"transparent",color:g$1?.color||x?.color||T.palette.info.dark},children:["Gateway ",a]})}),l&&jsx(p,{title:v,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Bt(e),sx:{background:g$1?.background||x?.background||"transparent",color:g$1?.color||x?.color||T.palette.info.dark},children:["Acquirer ",l]})})]})]}):jsx(o,{id:S,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...c},children:Kn?.includes(e||"")&&(b||v||A)?jsxs(Ag,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...f&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...s},children:[jsx(Pg,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:g$1?.background}},children:jsx(p,{title:b??I(Bt(e)),children:jsxs(Fragment,{children:[D,jsx(vg,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Lg,style:{...r&&{padding:"0 !important"}},children:jsx(wg,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:g$1?.color},transition:Eg,variants:Rg,initial:{opacity:0},children:r})})]})})}),jsx(Fs,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Vs,variants:Mg,style:d,isVisible:!!A,children:A&&jsx(p,{title:A,children:jsx(Ns,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:g$1?.background,...m},children:jsx(ks,{src:g$1?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:u})})})}),jsx(Fs,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Vs,variants:Dg,style:d,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Ns,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:g$1?.background,...m},children:jsx(ks,{src:g$1?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:u})})})})]}):jsx(p,{title:b??I(Bt(e)),children:jsx(o,{children:D})})})}var zw=()=>{let{t:e}=useTranslation(),t=zc(useId(),"customer-initiated-icon");return jsx(p,{title:e("merchantInitiated"),children:jsx("img",{id:t,"data-testid":"merchantInitiatedIcon",src:ub,alt:"merchant",style:{width:"16px",height:"16px"}})})};var $w={G:"Global",R:"Regional",L:"Local"},to=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?$w[e]:void 0,r=n||t?`${n||""} ${n&&t?"-":""} ${t?`Country - ${t}`:""}`:void 0;return o||!t?null:jsx(p,{title:r,children:jsx(a$4,{countryCode:t})})};var Yw=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let i=zc(useId(),"device-icon-chip");return jsxs(Or,{id:i,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Wa$1(r)&&{height:"18px"}},children:[jsx(to,{geographyVariant:e,isTextShown:t,countryCode:o}),jsx(c$4,{type:n,isTextShown:t,tableMode:r})]})};var Kw=({isDisputeOpen:e,iconStyles:t})=>{let o=zc(useId(),"dispute-icon");return jsx(p$1,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:e?va$1:ua$1,alt:"dispute-icon",style:t})};var Wg=styled(Or,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...Wa$1(t)&&{height:"18px"},alignItems:"center"})),Hg=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function Os({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let i=zc(useId(),"issuer-icon"),a=o?.slice(0,4),l=o?.slice(-4);return jsxs(Wg,{id:i,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(to,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(Hg,{children:`${a||""} ${l||""}`})})]})}var e0=Os;styled$1(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:e.palette.text.primary}));var _s=styled$1("img")(()=>({height:"13.125px",width:"12px"})),na=styled$1("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),Og=styled$1("div")(({theme:e})=>({color:e.palette.common.white,background:e.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),_g=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var i0=({payoutStatus:e="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:i=0,selectionProps:a={}})=>{let{t:l}=useTranslation(),s=zc(useId(),"payout-icon"),p$2=l(Bt(e)),c=o||p$2;return r?jsx(b$1,{copyTrigger:"press",copyText:p$2,children:p$2}):jsx(p,{title:c,children:t?jsx(na,{id:s,"data-testid":"StatusCell_PayoutStatusLabel",children:p$2}):jsx(p$1,{id:s,src:e$1[e],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:n})})};var m0=({isTextShown:e,refundStatus:t="PENDING",refundTooltip:o="",refundCount:n,iconStyles:r,isSheetViewShown:i,chipIndex:a=0,selectionProps:l={}})=>{let{t:s}=useTranslation(),p$2=useTheme(),c=zc(useId(),"refund-icon"),m=(n||0)>1,d=s(Bt(t));if(i)return jsxs(b$1,{copyTrigger:"press",copyText:d,children:[d," ",m?`${n}x`:null]});let u=jsxs(Qf,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[n,"x"]});return e?jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(na,{id:c,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d$4[t].color,backgroundColor:d$4[t].backgroundColor,width:"90px"},children:jsxs(As,{whileInView:m?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$2.shadows[4],gap:p$2.spacing(.5)}},children:[d," ",m?u:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:m?jsxs(As,{id:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$2.shadows[4],gap:p$2.spacing(.5)}},children:[jsx(Jf,{src:qk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),u]}):jsx(p$1,{id:c,src:c$5[t],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:r})})},zg=m0;var c0=zg;var d0={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},xe=e=>d0[e?.toLowerCase()||""]||e;styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var $g=styled$1("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var Ug=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),Gg=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled$1("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var Yg=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function et({source:e,isTextShown:t,title:o,width:n,height:r,imgSx:i}){let{t:a}=useTranslation(),l=h$2(e);return jsx(p,{title:o,children:t?jsx(Gg,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(Ug,{"data-testid":"SourceCell_TextLabel","data-source":e,children:a(Bt(e))})}):jsx($g,{src:l,alt:e,width:n,height:r,onError:s=>{s.currentTarget.src=h$2("card");},sx:i})})}function I0({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=zc(useId(),"source-icons"),{t:i}=useTranslation(),a=useCallback(()=>{let p=[],c=cc$1(e),m=e?.method,d=e?.scheme;return xe(m)?.toLowerCase()===xe(d)?.toLowerCase()?p.push(xe(m),xe(c)):p.push(xe(m),xe(c),xe(d)),p},[e]),l=useMemo(()=>jsx(et,{source:n,isTextShown:o,title:i(Bt(n))},n),[n,o,i]),s=useMemo(()=>a()?.filter(p=>!!p&&p!==n)?.map((p,c,m)=>{let d=e?.wallet===i("sv_wallet")?i("storedValueWallet"):i("passThruWallet"),u=c===m.length-1&&t?.last_four?`${i(Bt(p))} - ${t?.last_four}`:i(Bt(p));return jsx(et,{source:p,isTextShown:o,title:c===0&&p==="Wallet"?d:u},`${p}-${c}`)}),[a,e,t,o,i,n]);return jsxs(Box,{id:r,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[n&&l,s,t?.last_four&&jsxs(Yg,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var Jn={PROCESSED:Sg,FAILED:""};var Xg=styled$1("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Zg=styled$1("img")(()=>({width:"16px",height:"16px"})),Jg=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function la({status:e,isTextShown:t,isSheetViewShown:o}){let n=useTheme$1(),{t:r}=useTranslation(),i=zc(useId(),"destination-icon"),a=r(Bt(e));return o&&Jn[e]?jsx(b$1,{copyTrigger:"press",copyText:a,children:a}):t&&Jn[e]?jsx(Xg,{id:i,"data-testid":"ChargeStatusIcon_isTextShown","data-status":Bt(e),sx:{background:"#1F88D00D",color:e==="PROCESSED"?n.palette.info.dark:n.palette.common.black},children:a}):jsx(Jg,{id:i,"data-testid":"DestinationIcon",className:"destination-status",children:e&&Jn[e]&&jsx(p,{title:r(Bt(e)),children:jsx(Zg,{src:Jn[e],alt:"destination-icon"})})})}function v0({deviceType:e,geographyVariant:t,isTextShown:o,deviceCountry:n,...r}){return jsx(a,{...r,children:jsxs(Or,{sx:{display:"flex",gap:"8px",alignItems:"center"},children:[jsx(to,{geographyVariant:t,isTextShown:o,countryCode:n}),jsx(c$4,{type:e,isTextShown:o})]})})}var P0=v0;var Qg=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),eC=styled$1("span")(({theme:e})=>({fontSize:e.typography.pxToRem(12),color:e.palette.info.dark,fontWeight:700,paddingInline:e.spacing(1),borderRadius:e.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.info.dark}1A`})),tC=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`,paddingInline:e.spacing(1),borderRadius:"56px",height:"24px"}));styled$1("img")(({theme:e,order:t})=>({borderRadius:"50%",backgroundColor:e.palette.common.white,width:"16px",height:"16px",padding:"2px",zIndex:t+1,position:"absolute",left:`${t*9}px`}));var oC=styled$1("img")(({pointLeft:e})=>({width:"12.5px",height:"13px",transform:`scale(${e?"-1":"1"}, 1)`}));styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.common.white,borderRadius:"50%",width:"16px",height:"16px",fontSize:"8px",fontWeight:e.typography.fontWeightBold,lineHeight:"11px",position:"absolute",left:"18px",zIndex:4,textAlign:"center",span:{flexGrow:1}}));function D0({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...a}){let l=useMemo(()=>{if(typeof e=="number")return e;let c=Number(e);return Number.isNaN(c)?void 0:c},[e]),s=l!==void 0?l>0:!!e,p$1=l!==void 0&&l>1;return !s||r?null:jsx(Or,{sx:{width:"fit-content",overflow:"visible"},...a,children:jsx(p,{title:t,children:jsxs(tC,{children:[jsx(oC,{src:z$1,pointLeft:i==="left"}),p$1&&jsx(Qg,{children:jsx(eC,{children:e})})]})})})}var L0=D0;function k0(e){let{destination:t,...o}=e,n={...o};delete n.destinationsCount,delete n.destinationsTooltip,delete n.destinationsAmount,delete n.hidden,delete n.iconDirection,delete n.selectionProps,delete n.flagIcon;let r=t?.destination||[];return jsx(Or,{sx:{display:"flex",gap:"4px",alignItems:"center"},...n,children:r.map((i,a)=>{let l=Ha$1(i?.amount||0),s=`${l.integerAmount}.${l.decimalAmount}`;return jsxs(b$1,{copyTrigger:"press",copyText:s,children:[i?.id," | ",jsx(a$e,{currency:i?.currency})," ",s]},i?.id||a)})})}var N0=k0;function W0({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...a}){let l=o?.destination||[],s=Ha$1(n||0),p$1=Ha$1(l?.[0]?.amount||0);return !e||r?null:jsx(Or,{sx:{width:"fit-content",overflow:"visible"},...a,children:jsx(p,{title:t,children:jsx(j,{sx:{textAlign:"left",justifyContent:"flex-start",height:"auto"},children:e&&typeof e=="number"&&e>1?jsxs("div",{children:["Destination ",l?.[0]?.id," - ",jsx(a$e,{currency:l?.[0]?.currency})," ",p$1.integerAmount,".",p$1.decimalAmount," +",e-1]}):jsxs("div",{children:["Destination ",l?.[0]?.id," - ",jsx(a$e,{currency:l?.[0]?.currency})," ",s.integerAmount,".",s.decimalAmount]})})})})}var H0=W0;var H5=({destination:e,amount:t})=>{let o=e?.destination||[];return o?.length>1?jsxs("div",{children:[jsx("div",{children:"Destination"}),e?.destination?.map(r=>{let i=Ha$1(r.amount||0);return jsxs("div",{children:[r?.id," - ",jsx(a$e,{currency:r?.currency})," ",i.integerAmount,".",i.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(a$e,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var iC=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",minWidth:"24px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,zIndex:10,position:"absolute"})),aC=styled$1("div")(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function lC(e){return e<5?5:e===100?95:e}function U0({percentage:e=0,days:t,remainingAmount:o=0,currency:n,...r}){let i=useTheme(),a$1=jsx(a$e,{currency:n}),{integerAmount:l,decimalAmount:s}=Ia(o,n),p$1=`${l}.${s}`,c=useMemo(()=>jsxs(Fragment,{children:["Remaining Authorized Balance - ",a$1," ",p$1]}),[o,n]);return e===0||o<0?null:jsx(a,{...r,children:jsx(p,{title:c,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(iC,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:i.shadows[4]}}},children:[jsxs(aC,{percentage:e,children:[e,"% ",jsx(q,{percentage:lC(e)})]}),!!t&&jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px",width:0},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs("span",{children:[t," days left"]})})]})})})})}var G0=U0;function j0({remainingAmount:e,currency:t}){let o=jsx(a$e,{currency:t}),{integerAmount:n,decimalAmount:r}=Ia(e,t),i=`${n}.${r}`;return jsxs(b$1,{copyTrigger:"press",copyText:`${n}.${r}`,children:[o," ",i]})}var q0=j0;var Ks=["authenticationMode","paymentAuth","paymentAgreement"],Xs=["paymentIssuer","paymentInitiated","paymentDevice"],sC=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...Xs,...Ks];var cC=styled(Or)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),dC=styled(Or)(()=>({marginLeft:"8px",width:20}));function Q0(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let a of sC)if(e?.[a])return {centerIcon:e?.[a],centerIconId:a};return {centerIcon:null,centerIconId:null}},[e]);if(!o)return null;let n=o!=="paymentScheme"&&e.paymentScheme,r=o!=="paymentCardNumber"&&e.paymentCardNumber,i=o!=="paymentType"&&e.paymentType;return jsx(a$3,{expandedZIndex:0,centerIcon:t,leftIcons:Xs.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),rightIcons:Ks.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),expandableCenterRight:(n||r)&&jsxs(cC,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}),expandableCenterLeft:i&&jsx(dC,{children:e.paymentType})})}var ev=memo(Q0);var fC=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function N6({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let i=e?.name||`${r(Bt(dc(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:i,children:jsxs(fC,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function _6({method:e}){let{t}=useTranslation();return e?jsx(et,{source:xe(e)??e,title:`Payment Method - ${t(Bt(e))}`}):null}function j6({type:e}){let{t}=useTranslation();return e?jsx(et,{source:xe(e)??e??"",title:`Payment Type - ${t(Bt(e))}`}):null}function Q6({scheme:e}){let{t}=useTranslation();return e?jsx(et,{source:xe(e)??e,title:`Payment Scheme - ${t(Bt(e))}`}):null}var CC=({mode:e})=>e?jsx(p,{title:Zo[e],children:jsx(Or,{component:"img",src:e==="C"?da$1:ca$1})}):null;var pa={ORDER:{label:"order",icon:vi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:xi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:yi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:wi,color:"#32ADE6"}},ma={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled$1("img")(()=>({width:"35px",height:"16px",display:"block"}));styled$1("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled$1("img")(()=>({maxWidth:"100%",width:"100%"}));var ca=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),da=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),xC=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),hC=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Zs=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),ua=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});function Sv({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let i=useTheme(),{t:a$1}=useTranslation(),l=useMemo(()=>[...t?[ma.SAVED_TOKEN]:[],...(o||0)>0?[ma.COUNT]:[],...e&&pa[e]?[pa[e]]:[]],[t,o,e]),s=d=>n?jsx(a$f,{"data-testid":"AgreementCell_countBadge",order:d,variants:ua(d,n?85:0),children:jsx(p,{title:a$1("totalPaymentCount",{amount:f$4(o)}),children:jsx(da,{children:jsxs(ca,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:ma.COUNT.color},children:["x",o]})})})},d):jsx(a$l,{value:o,index:d},d),p$1=l.map((d,u)=>d.label==="countBadge"?s(u):jsx(p,{title:a$1(d.label),children:jsx(a$f,{order:u,variants:ua(u,u>1&&n?62:0),sx:{width:n?"auto":"36px"},children:n?jsx(da,{children:jsx(ca,{"data-testid":"AgreementCell_agreementType",sx:{color:d.color},children:a$1(d.label)})}):jsx(Zs,{src:d.icon,alt:"agreement"})},d.color)},d.color)),c=p$1.length,m=jsx(p,{title:"No agreement",children:jsx(a$f,{order:0,variants:ua(0,0),sx:{width:n?"auto":"36px"},children:n?jsx(da,{children:jsx(ca,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(Zs,{src:Ci,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(a,{...r,children:jsx(hC,{"data-testid":"AgreementCell",children:jsx(xC,{layout:true,className:"payment-sources-container","data-testid":"AgreementCell_PaymentSourcesContainer",whileHover:"animate",animate:"start",sourcesCount:c||0,variants:{animate:{width:(c||0)*38}},children:p$1?.length>0?p$1:m})})})}var Tv=Sv;var IC=styled("img")(()=>({width:"12.67px",height:"15px"}));styled("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));function vv({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(a,{style:{textAlign:n||"center",overflow:"visible",display:"flex",width:"100%",justifyContent:n==="left"?"flex-start":"center"},...r,children:e?jsx(p,{title:t,children:jsx(d,{"data-testid":"AuthCell_BadgeWrapper",children:o?jsx(j,{"data-testid":"AuthCell_TextLabel",sx:{minWidth:"max-content"},children:t}):jsx(IC,{src:na$1,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var Pv=vv;var bC={REFUNDED:ok,PAID_OUT:nk$1,SETTLED:qk,PENDING:pk,UNKNOWN:xk,TIMEDOUT:vk,CANCELLED:gk,FAILED:kk,DECLINED:ik,RESTRICTED:sk,IN_PROGRESS:Ak,ACCEPTED:rk},SC={REFUNDED:"refunded"};function TC({status:e,refundTooltip:t}){let{t:o$1}=useTranslation();return jsx(p,{title:jsxs("div",{children:[jsx("div",{children:o$1(Bt(e))}),t]}),children:jsx(o,{children:jsx("img",{src:bC[e],alt:"refund-requested"})})})}function vC({status:e,gatewayTooltip:t,unCapturedTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:a,refundTooltip:l}){let{t:s}=useTranslation();return Kn?.includes(e??"")?jsx(ct,{chargeStatus:e,gatewayTooltip:t,chargeTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:a,iconWrapperStyles:{height:17}}):jsx(TC,{status:e,refundTooltip:l})}var PC=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.625),paddingBlock:e.spacing(.625),height:"24px",minWidth:"24px",backgroundColor:"#ede8fb",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),AC=styled("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0})),EC=styled(_n)(({theme:e})=>({fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var MC=styled("img")({width:"14px",height:"14px"}),DC=styled(Or)(({theme:e})=>({position:"relative",zIndex:25,border:`1px solid ${e.palette.divider}`,height:24,borderRadius:"12px",padding:"3px 4px","> div":{paddingTop:0,paddingBottom:0,height:16}}));function Js({status:e,refundIcon:t,refundTooltip:o,refundTooltipLabel:n,date:r,gatewayTooltip:i,unCapturedTooltip:a,acquirerTooltip:l,errorCode:s,acquirerCode:p$1,gatewayCode:c,timezone:m}){let d=useTheme(),{t:u}=useTranslation(),f=t$1(new Date(Number(r)),{currentTimezone:jo,targetTimezone:m?.offset}),C=useMemo(()=>t||(e==="REFUNDED"?ok:qk),[e,t]);return ["REFUNDED","PAID_OUT"].includes(e??"")?jsx(p,{title:jsxs("div",{children:[jsx("div",{children:n??u(SC.REFUNDED)}),o]}),children:jsxs(PC,{whileHover:["animate","fadeIn"],animate:"start",variants:{...r&&{animate:{boxShadow:d.shadows[4]}}},sx:{...!r&&{backgroundColor:"transparent"}},children:[jsx(MC,{sx:{...!r&&{width:"16px",height:"16px"}},src:C,alt:"refunded"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:r&&jsx(AC,{children:jsx(EC,{value:f})})})]})}):jsx(vC,{status:e,refundTooltip:o,gatewayTooltip:i,unCapturedTooltip:a,acquirerTooltip:l,errorCode:s,acquirerCode:p$1,gatewayCode:c})}var RC=()=>{let e=useTheme();return {REFUNDED:{color:e.palette.common.lightPurple,backgroundColor:`${e.palette.common.lightPurple}1A`},PENDING:{color:e.palette.custom[500],backgroundColor:`${e.palette.custom[500]}0d`},PAID_OUT:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},SETTLED:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},UNKNOWN:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},TIMEDOUT:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},FAILED:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},DECLINED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},RESTRICTED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},IN_PROGRESS:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`},CANCELLED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},ACCEPTED:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`}}};function _v({status:e,date:t,refundTooltip:o,isTextShown:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:a$1,acquirerCode:l,gatewayCode:s,unCapturedTooltip:p$1,timezone:c,refundTooltipLabel:m,refundIcon:d,...u}){let{t:f}=useTranslation(),C=RC(),y=useCallback(g=>tc(g).format("MMM D, YYYY"),[]),w=Kn.includes(e);return jsx(a,{...u,style:{overflow:"visible"},children:jsx(n$1,{children:jsx(DC,{width:n?"auto":"36px",sx:{...w&&{border:"none"}},children:n?jsx(p,{title:t?y(t):f(Bt(e)),children:jsx(j,{sx:{...C[e]?C[e]:C.PENDING},children:f(Bt(e))})}):jsx(Js,{status:e,refundTooltip:o,date:t,gatewayTooltip:r,unCapturedTooltip:p$1,acquirerTooltip:i,errorCode:a$1,acquirerCode:l,gatewayCode:s,timezone:c,refundTooltipLabel:m,refundIcon:d})})})})}var zv=_v;var kC=styled$1("img")(()=>({width:"16px",height:"16px"})),NC=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),FC=styled$1("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.info.dark}1a`})),VC=styled$1("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function $v({walletId:e,country:t,showCountry:o=true,...n}){return jsx(a,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(NC,{children:[o&&t&&jsx(p,{title:La(t),children:jsx(a$4,{countryCode:t})}),jsxs(FC,{children:[jsx(kC,{src:ac$2,alt:"wallet-icon"}),e&&jsxs(VC,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Uv=$v;var WC=styled$1("img")(()=>({width:"16px",height:"16px"})),HC=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),OC=styled$1("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.common.white}`,border:`1px solid ${e.palette.divider}`})),_C=styled$1("span")(({theme:e})=>({color:`${e.palette.text.primary}`,fontSize:"14px",lineHeight:"16.8px"}));styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Gv({walletId:e,country:t,name:o,...n}){return jsx(a,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(HC,{children:[t&&jsx(p,{title:La(t),children:jsx(a$4,{countryCode:t})}),jsxs(OC,{children:[jsx(WC,{src:bc,alt:"bank-icon"}),e&&jsxs(_C,{children:[o," \xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Yv=Gv;var tp={PAID_OUT:nk$1,SETTLED:tk,PENDING:Oh,INITIATED:Oh,FAILED:kk};function Xv({payoutStatus:e="PAID_OUT",...t}){let{t:o$1}=useTranslation(),n=useTheme();return jsx(a,{...t,children:jsx(n$1,{children:jsx(o,{className:"payout-status",style:{visibility:"visible",width:"36px",borderRadius:"23.1px",backgroundColor:n.palette.common.white,border:`1.029px solid ${n.palette.divider}`},children:e&&tp[e]&&jsx(p,{title:o$1(Bt(e)),children:jsx(p$1,{src:tp[e],alt:"settled-icon",style:{width:"16px",height:"16px",objectFit:"contain"}})})})})})}var Zv=Xv;styled(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"}));styled(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"}));styled(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)}));styled("img")(()=>({width:"13px",height:"13px"}));styled(motion.span)(({theme:e})=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"}));styled(motion.div)(()=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0}));styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"}));var Jv=styled("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));var op=a$g;function tP({status:e,chargeStatus:t,isTextShown:o,...n}){let{t:r}=useTranslation();return jsx(a,{...n,children:jsxs(n$1,{children:[jsx(la,{status:e,isTextShown:o}),t&&op[t]&&jsx(p,{title:r(Bt(t)),children:jsx(p$1,{src:op[t],alt:"charge-icon"})})]})})}var oP=tP;var rP={FAILED:dh$1,PENDING:kh,INITIATED:$g$1,ATTEMPTED:_g$1,EXEMPTED:ch$1,EXEMPTED_WITH_TRANSACTION:ch$1,EXEMPTED_WITHOUT_TRANSACTION:bh$1,REJECTED:ah$1,UNAVAILABLE:fh$1,UNDETERMINED:gh$1,SUCCESS:jh$1,AUTHENTICATED:ih$1,AUTHENTICATED_WITH_TRANSACTION:ih$1,AUTHENTICATED_WITHOUT_TRANSACTION:ih$1,AUTHENTICATED_AUTHORIZE_FAILED:dh$1},np={FAILED:lh$1,PENDING:mh$1,INITIATED:nh$1,ATTEMPTED:oh$1,EXEMPTED:ph,EXEMPTED_WITH_TRANSACTION:ph,EXEMPTED_WITHOUT_TRANSACTION:qh$1,REJECTED:rh$1,UNAVAILABLE:sh$1,UNDETERMINED:th,SUCCESS:uh$1,AUTHENTICATED:vh$1,AUTHENTICATED_WITH_TRANSACTION:vh$1,AUTHENTICATED_WITHOUT_TRANSACTION:wh$1,AUTHENTICATED_AUTHORIZE_FAILED:lh$1},io=a$g;function lP({status:e,authorizedStatus:t,chargeStatus:o,chargeTooltip:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:a$1,...l}){let{t:s}=useTranslation(),p$1=useTheme(),c=[e&&np[e]?jsx(p,{title:s(Bt(e)),children:jsx("img",{src:np[e],alt:"authentication-icon",style:{width:"36px",height:"24px",objectFit:"scale-down"}})}):null,o&&io[o]?jsx(p,{title:s(Bt(o)),children:jsx(ct,{showAuthorizedStatus:true,chargeStatus:o,gatewayTooltip:r,chargeTooltip:n,acquirerTooltip:i,errorCode:a$1})}):null,t&&f$3[t]?jsx(p,{title:s(Bt(t)),children:jsx("img",{src:f$3[t],alt:"authorized-icon",style:{width:"36px",height:"20px",objectFit:"scale-down"}})}):null].filter(Boolean),m=c.length||0;return jsx(a,{...l,sx:{position:"relative",overflow:"visible"},children:jsx(Vo,{whileHover:"animate",animate:"start",statusesCount:m,children:c.map((d,u)=>d?jsx(Fo,{order:u,variants:ko(u,p$1.shadows[4],40),children:jsx(No,{children:d})},u):null)})})}var sP=lP;var ip={issuer:Xh,scheme:Yh$1,device:Vh$1,app:Uh$1,wallet:Th$1,biometric:Vh$1};function cP({type:e,...t}){let{t:o$1}=useTranslation();return jsx(a,{...t,children:jsx(n$1,{children:jsx(o,{className:"authentication-status",children:e&&ip[e]&&jsx(p,{title:o$1(Bt(e)),children:jsx(p$1,{src:ip[e],alt:"authentication-type"})})})})})}var dP=cP;var zC={SMS:$d,EMAIL:Xd,WHATSAPP:ae};var $C=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),UC=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),GC=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),YC=styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),jC=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),qC=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});function CP({channels:e,isTextShown:t,...o}){let{t:n}=useTranslation(),r=useTheme(),i={WHATSAPP:r.palette.custom[700],EMAIL:r.palette.custom[800],SMS:r.palette.custom[900]},l=e?.sort(p=>p==="EMAIL"?-1:p==="SMS"?1:p==="WHATSAPP"?2:0)?.filter(p=>!!p)?.map((p$1,c)=>{if(!p$1)return null;let m=n(p$1?.toLowerCase());return jsx(b$a,{order:c,variants:qC(c,t?74:0),sx:{width:t?"70px":"36px"},children:jsx(p,{title:m,placement:"top",wrapperProps:{sx:{width:"100%",height:"100%",justifyContent:"center"}},children:t?jsx(jC,{children:jsx(YC,{sx:{color:i[p$1]},children:m})}):jsx(UC,{src:zC[p$1],alt:p$1})})},`${p$1}-${c}`)}),s=l?.length||0;return jsx(a,{...o,children:jsx($C,{children:l?.length>0?jsx(GC,{layout:true,className:"payment-sources-container",whileHover:"animate",animate:"start",sourcesCount:s||0,variants:{animate:{width:(s||0)*38}},style:{zIndex:29},children:l}):null})})}var xP=CP;function sr(e){return x(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD, YYYY",lastWeek:"MMM DD, YYYY",nextWeek:"MMM DD, YYYY"})}styled$1(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"80px",fontSize:"10px",color:e.palette.text.primary}));styled$1("img")(()=>({width:"16px",height:"16px"}));styled$1("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));styled$1("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));var KC=styled$1(j$1)(({theme:e})=>({fontSize:"11px",fontWeight:500,color:"#000",cursor:"default"}));function yP({dueDate:e,expiryDate:t,...o}){let n=useMemo(()=>({label:sr(tc(e).valueOf()),tooltip:"Due Date"}),[e]),r=useMemo(()=>({label:sr(tc(t).valueOf()),tooltip:"Expiry Date"}),[t]),i=s=>jsx(p,{title:s.tooltip,children:jsx(KC,{children:s.label})}),a$1=useMemo(()=>e?i(n):t?i(r):null,[n,r,e,t]),l=useMemo(()=>t&&e?[i(r)]:[],[n,r,e,t]);return !e&&!t?null:jsx(a,{...o,sx:{position:"relative",overflow:"visible"},children:jsx(a$3,{sx:{justifyContent:"flex-start"},centerIcon:a$1,rightIcons:l})})}var IP=yP;var ZC=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),height:"34px",minWidth:"24px",borderRadius:"8px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`}}));styled$1("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled$1("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var ap=styled$1("img")({width:"24px",height:"24px"});function TP({products:e,...t}){let o=e?.map((r,i)=>jsx(ap,{sx:{...r?.toLowerCase()===An.tokens.code?.toLowerCase()&&{borderRadius:"8px",border:"1px solid rgba(0, 0, 0, 0.10)"}},className:"app-logo",src:Cn.find(a=>a.code?.toLowerCase()===r?.toLowerCase())?.iconUrl,alt:"product-icon"},`${i}-${r}`)),n=jsxs(ZC,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:"10px 0px 8px 0px #F2F2F2"}},children:[jsx(ap,{src:si,alt:"products-icon"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:o})]});return jsx(a,{...t,style:{overflow:"visible"},children:jsx(n$1,{children:jsx("div",{style:{width:"30px",position:"relative",zIndex:24},children:n})})})}var wP=TP;function ba(e){return jsx(m,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var tx=styled(Or)(()=>({display:"flex",alignItems:"center",gap:"8px"})),ox=styled(Or)(({theme:e})=>({fontSize:"14px",color:e.palette.text.primary,lineHeight:"16.8px"}));function U8({currency:e}){return jsxs(tx,{children:[jsx(a$4,{currencyCode:e}),jsx(ox,{children:e})]})}tc.extend(MP);tc.extend(EP);function ix({value:e,...t}){let o=useMemo(()=>x(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM D, YYYY",lastWeek:"MMM D, YYYY",nextWeek:"MMM D, YYYY"}),[e]);return jsx(a,{...t,children:o})}var ax=styled(Or)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:36,height:24,border:`1px solid ${e.palette.divider}`,borderRadius:"24px","&:hover":{boxShadow:e.shadows[4]}}));function mz({reference:e}){return e?jsx(p,{title:`Bank - ${e}`,children:jsx(ax,{children:jsx(Or,{component:"img",src:ob$1,alt:"bank",width:14})})}):jsx(Fragment,{})}var lp={acquirer:ob$1,generic:pb$1,payment:Zd,gateway:rn,order:Yd};var lx=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),sx=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),px=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),mx=styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),cx=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled$1("div")(()=>({height:"18px"}));var dx=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var HP=120,OP=50;function _P({isTextShown:e,getTooltipTitle:t,...o}){let[n,r]=useState(false),[i,a$1]=useState(null),l=useRef(null),s=useRef(false),p$1=useRef(false),c=useRef(null),m=useTheme(),d=useMemo(()=>Object.keys(lp).filter(I=>!!o[I]),[o]),u=()=>{c.current&&(clearTimeout(c.current),c.current=null);},f=()=>{a$1(l.current);},C=()=>{s.current=true,p$1.current=false,r(true),a$1(null),u(),c.current=setTimeout(()=>{p$1.current=true,f();},HP);};useEffect(()=>()=>u(),[]);let y=()=>{s.current||C();},w=()=>{u(),l.current=null,s.current=false,p$1.current=false,a$1(null),r(false);},g=I=>{if(l.current=I,p$1.current){u(),a$1(I);return}s.current||C();},x=()=>{l.current=null,p$1.current&&(u(),c.current=setTimeout(f,OP));},T=d.length;return jsx(a,{...o,children:jsx(lx,{children:T>0?jsx(px,{layout:true,className:"reference-sources-container",whileHover:"animate",onHoverStart:y,onHoverEnd:w,animate:n?"animate":"start",sourcesCount:T,variants:{animate:{width:T*38}},style:{zIndex:29},children:d.map((I,S)=>{let b=t?.(I)||`${fx(I)} - ${o[I]}`,v=i===I;return jsx(b$a,{order:S,variants:dx(S,m.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>g(I),onMouseLeave:x,children:jsx(p,{open:v,disableHoverListener:true,disableInteractive:true,title:v?b:"",children:e?jsx(cx,{children:jsx(mx,{children:fx(I)})}):jsx(sx,{src:lp[I],alt:I,sx:{...I==="order"&&{width:"11.82px"}}})})},`${I}-${S}`)})}):null})})}var zP=_P;var sp={Y:{tooltip:"Authenticated",icon:ih$1,borderColor:"rgba(31, 136, 208, 0.10)"},N:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},R:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},A:{tooltip:"Attempted",icon:_g$1,borderColor:"rgba(31, 136, 208, 0.10)"},U:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},noAuth:{tooltip:"Not Authenticated",icon:$g$1,borderColor:"#F2F2F2"}},pp={"3DS":{tooltip:"3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Pj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"}};styled$1("img")(()=>({width:"12.67px",height:"15px"}));var Cx=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),xx=styled$1("img")({width:"16px",height:"16px"});styled$1("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"10px",fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));var hx=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),yx=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}}),Ix=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function UP({transactionStatus:e,isTextShown:t,eci:o,authType:n,...r}){let i=useTheme$1(),a$1=useMemo(()=>{let p=sp[e??"noAuth"]??sp.noAuth,c=p?.tooltip,m=p?.icon;return [{tooltip:c,content:t?c:m,type:t?"text":"icon"},...n?[{tooltip:n,content:t?pp[n]?.tooltip:pp[n]?.icon,type:t?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[e,o,t]),l=useMemo(()=>a$1.filter(p=>!!p.content).map((p$1,c)=>{let m=p$1.type==="text"?jsx(Ix,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(j,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":p$1.content,children:p$1.content})}):jsx(xx,{src:p$1.content,alt:p$1.tooltip});return jsx(p,{title:p$1.tooltip,children:jsx(b$a,{order:-1*c,variants:yx(c,i.shadows[4],t?124:39),sx:{...p$1.type==="text"&&{width:t?"120px":"58px"}},children:m})},`${p$1.tooltip}-${c}`)}),[r,a$1,t,i]),s=l.length;return jsx(a,{...r,children:jsx(Cx,{children:s>0?jsx(hx,{layout:true,className:"authentication-sources-container",whileHover:"animate",animate:"start",sourcesCount:s,variants:{animate:{width:38}},style:{zIndex:29},children:l}):null})})}var GP=UP;var mp={checkout:Ch$1,checkoutSuccess:Dh$1};function qP({status:e,...t}){let{t:o}=useTranslation();return jsx(a,{...t,sx:{overflow:"visible"},children:jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:e&&mp[e]&&jsx(p,{title:o(Bt(e)),children:jsx(p$1,{src:mp[e],alt:"checkout-icon"})})})})}var KP=qP;var cp={TRANSACTED:Ih$1,INITIATED:Gh$1,CANCELLED:Hh$1,EXPIRED:Fh$1};function Tx({status:e,chargeStatus:t,...o}){let{t:n}=useTranslation();return jsx(a,{...o,sx:{overflow:"visible"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:[e&&cp[e]&&jsx(p,{title:n(Bt(e)),children:jsx(p$1,{src:cp[e],alt:"intents-icon"})}),t&&io[t]&&jsx(p,{title:n(Bt(t)),children:jsx(ct,{chargeStatus:t})})]})})}var vx=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",fontSize:"10px",color:e.palette.text.primary,zIndex:24,overflow:"visible",position:"absolute",gap:"0px"})),Px=styled$1(motion.div)(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(.5),minWidth:"44px"}));styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function Ax(e){return e<5?5:e===100?95:e}var va={PAID_OUT:{color:"#2ACE00",backgroundColor:"#2ACE000D"},PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},SETTLED:{color:"#2ACE00",backgroundColor:""}};function e1({percentage:e,date:t,payoutStatus:o$1,payoutTooltip:n,chargeTooltip:r,refundCount:i,isTextShown:a$1,...l}){let{t:s}=useTranslation(),p$2=useTheme();return e===0?null:jsx(a,{...l,style:{overflow:"visible",position:"relative"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:[jsx(p,{title:r,children:jsxs(vx,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{gap:"4px"}},sx:{...a$1&&{height:"auto",padding:"0",backgroundColor:"transparent"}},children:[jsx(Px,{percentage:e,sx:{backgroundColor:"#eeeeee",...a$1&&{backgroundColor:"transparent",border:"none"}},variants:{...!a$1&&{animate:{boxShadow:p$2.shadows[4]}}},children:a$1?jsxs(j,{children:[e,"%"]}):jsxs(Fragment,{children:[e," % ",jsx(q,{percentage:Ax(e)})]})}),i>1&&jsx(motion.div,{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:jsx(motion.div,{style:{alignItems:"center",justifyContent:"center",gap:"4px",position:"relative",zIndex:22,overflow:"visible"},initial:{width:0,opacity:0,paddingRight:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",paddingRight:"4px",boxShadow:p$2.shadows[4]},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:"neutral",children:[i,"x"]})})})]})}),jsx(o,{className:"payout-status",style:{visibility:o$1==="PENDING"?"hidden":"visible",position:"relative",left:"57px",width:a$1?"auto":"24px"},children:o$1&&e$1[o$1]&&jsx(p,{title:n||s(Bt(o$1)),children:a$1?jsx(j,{sx:{color:va[o$1].color,border:`1px solid ${va[o$1].color}1a`,backgroundColor:va[o$1].backgroundColor},children:s(Bt(o$1))}):jsx(p$1,{src:e$1[o$1],alt:"settled-icon"})})})]})})}var t1=e1;var Dx={DELETED:_if,DRAFT:jf,CREATED:kf,CANCELLED:Aa$1,CANCELED:Aa$1,EXPIRED:Ba,PAID:nf,REFUNDED:tf,DELIVERED:of,VIEWED:pf,SAVED:qf$1,SCHEDULED:rf,PENDING:sf,REMINDED:""};function Lx(e){switch(e){case "CANCELLED":case "DELETED":return {color:"#FF3D00",background:"#FFF5F2"};case "VIEWED":return {color:"#1F88D0",background:"#e1edf8"};case "REFUNDED":return {color:"#4E1FD0",background:"#ede8fb"};case "PAID":return {color:"#2ACE00",background:"#EAFAE5"};case "EXPIRED":return {color:"#FF7A00",background:"#FFF2E5"};case void 0:return {color:"#FF7A00",background:"transparent"};default:return {color:"#818181",background:"#F2F2F2"}}}function Rx({chargeStatus:e,chargeTooltip:t,errorCode:o,iconStyles:n,iconWrapperStyles:r}){let{t:i}=useTranslation(),a=e?b$9[e]:null,l=e&&a$g[e]&&jsx(_g,{style:r,children:jsx(p$1,{src:a$g[e],alt:"charge-icon",style:{width:"16px",height:"16px",...n}})}),s=t&&jsx(Fragment,{children:jsx("div",{children:t})});return e?jsx(p,{title:s??i(Bt(e)),children:jsxs(Or,{sx:{display:"flex",gap:"6px",alignItems:"center"},children:[l,!!Kn?.includes(e||"")&&jsx(Og,{style:{background:a?.color},children:o})]})}):null}function Bx({status:e,date:t,viewsCount:o,chargeStatus:n,errorCode:r,chargeTooltip:i,remindedCount:a$1=0,...l}){let{t:s}=useTranslation(),p$1=useTheme(),c=e?Dx[e]:null,m=Lx(e),d=`${s(e?.toLowerCase()||"")} ${sr(tc(t).valueOf())}`,u=useMemo(()=>jsx(Rx,{chargeStatus:n,errorCode:r,chargeTooltip:i}),[n,r,i]),f=useMemo(()=>jsx(p,{title:s("reminded"),children:jsxs(Or,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[jsx(_s,{sx:{width:"14px",height:"14px"},src:je,alt:"icon"}),jsx(z,{style:{background:p$1.palette.error.main,fontWeight:600,color:p$1.palette.common.white},children:a$1})]})}),[a$1]),C=useMemo(()=>{if(c)return jsx(p,{title:s(d||""),children:jsx(_s,{src:c,alt:"status icon"})});if(n&&io[n])return u;if(a$1)return f},[c,n,a$1]);return !e&&!n&&!a$1?null:jsx(a,{...l,sx:{position:"relative",overflow:"visible"},children:jsx(a$3,{sx:{justifyContent:"flex-start"},expandableCenterRight:o&&e==="VIEWED"&&c?[jsx(z,{style:{marginRight:"8px",color:"#fff",backgroundColor:m.color},children:o})]:void 0,centerIcon:C,leftIcons:a$1&&c?[f]:void 0,rightIcons:n&&io[n]&&c?[u]:void 0})})}function u1({tooltip:e,children:t,badge:o,...n}){return jsx(a,{style:{textAlign:"center",overflow:"visible"},...n,children:t?jsx(p,{title:e,children:jsx(d,{"data-testid":"BadgeCell_BadgeWrapper",children:jsxs(j,{"data-testid":"BadgeCell_TextLabel",sx:{minWidth:"max-content",gap:"0.5rem"},children:[t,(o||0)>1&&jsxs(z,{color:"dark",style:{fontWeight:"bold"},children:["+",o]})]})})}):null})}var f1=u1;var gp={ACTIVE:gi,EXPIRED:fi,PENDING:gi,SAVED:di,TRANSACTED:ei,CONSUMED:ei};var g1=(d=>(d.ABANDONED="ABANDONED",d.IN_PROGRESS="IN_PROGRESS",d.VOID="VOID",d.CANCELLED="CANCELLED",d.CAPTURED="CAPTURED",d.INITIATED="INITIATED",d.FAILED="FAILED",d.DECLINED="DECLINED",d.RESTRICTED="RESTRICTED",d.TIMEDOUT="TIMEDOUT",d.UNKNOWN="UNKNOWN",d.AUTHORIZED="AUTHORIZED",d))(g1||{});function x1({status:e,chargeTooltip:t,gatewayTooltip:o,acquirerTooltip:n,errorCode:r,cardId:i,hasChargeIcon:a$1,hasAuthorizedIcon:l,...s}){let{t:p$2}=useTranslation();return jsx(a,{...s,sx:{position:"relative",overflow:"visible"},children:jsxs(n$1,{sx:{gap:"0.5rem"},children:[e&&gp[e]&&jsx(p,{title:p$2(Bt(e)),children:jsx(p$1,{src:gp[e],alt:"token-icon"})}),i&&jsx(p,{title:p$2(Bt(e)),children:jsx(p$1,{src:hi,alt:"card-icon"})}),a$1&&jsx(p,{title:p$2(Bt("CAPTURED")),children:jsx(ct,{showAuthorizedStatus:true,chargeStatus:"CAPTURED",gatewayTooltip:o,chargeTooltip:t,acquirerTooltip:n,errorCode:r})}),l&&jsx(p,{title:p$2(Bt("AUTHORIZED")),children:jsx(p$1,{src:f$3.AUTHORIZED,alt:"authorized-icon"})})]})})}var h1=x1;var xp=styled$1("img")(()=>({maxWidth:"13px",maxHeight:"13px"})),Nx=styled$1("div")(({theme:e})=>({width:"24px",height:"24px",border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"})),Fx=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));function I1({brandName:e,brandIcon:t,...o}){return jsx(a,{style:{textAlign:"center",overflow:"visible"},...o,children:jsxs(Fx,{children:[jsx(Nx,{children:t?jsx(p,{title:e,children:jsx(xp,{src:t,alt:"brand icon",onError:r=>{r.currentTarget.src=zi$1;}})}):jsx(xp,{src:zi$1,alt:"brand icon"})}),jsx("span",{children:e})]})})}var b1=I1;function Wx({metadata:e}){let t=Object.keys(e)[0]??"",o=Object.keys(e)[1]??"",n=Object.keys(e)[2]??"",r=Object.keys(e)[3]??"",i=Object.keys(e)[4]??"",a=t||o||n||r||i?`${e[t]?`${e[t]}${e[o]||e[n]||e[r]||e[i]?",":""}`:""}${e[o]?`${e[o]}${e[n]||e[r]||e[i]?",":""}`:""}${e[n]?`${e[n]}${e[r]||e[i]?",":""}`:""}${e[r]?`${e[r]}${e[i]?",":""}`:""}${e[i]??""}`:"";return a?jsx(p,{title:a,children:jsx(Box,{component:"img",src:_j,alt:"meta",sx:{cursor:"pointer"}})}):null}var Ox=styled("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"36px",cursor:"pointer"})),_x=styled(motion.img)(()=>({width:"16px",height:"16px"}));var P1=({onClick:e,isSettlementsAvailable:t,isDownloadError:o,isDownloadLoading:n,isDownloadSuccess:r})=>{let i=useMemo(()=>n||r||o,[n,r,o]),a=useMemo(()=>r?ic:o?hc:Yj,[r,o]);return jsx(p,{title:t?"":"Pending",children:jsx(Ox,{onClick:()=>t&&!i&&e(),children:jsx(AnimatePresence,{mode:"wait",initial:false,children:n?jsx(a$h,{},"spinner"):jsx(_x,{src:t?a:Zj,alt:"Download Report"})})})})};var E1=({receiptId:e})=>jsx(TableCell,{component:"div",children:jsx(p,{title:`Receipt - ${e}`,children:jsx(j,{sx:{padding:"3px 8px",maxWidth:"50px"},children:jsx("img",{src:pc,alt:"receipt"})})})});var M1=({receiptId:e})=>jsx(m,{children:jsx("span",{children:e})});var D1=({receiptId:e})=>jsx(ba,{children:jsx("span",{children:e})});var Gx=styled$1("div",{shouldForwardProp:e=>!["licenseNumber","hasClick"].includes(e)})(({theme:e,licenseNumber:t,hasClick:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:o?"pointer":"default",...t&&{padding:"3.5px 8px"}})),Yx=styled$1(Or)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled$1("img")(()=>({width:"16px",height:"11.73px"}));var jx=styled$1("div",{shouldForwardProp:e=>!["licenseNumber"].includes(e)})(({theme:e,licenseNumber:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",margin:"0",width:"74px",...!t&&{color:"#B1B1B1",width:"84px"}})),qx=styled$1("img")(()=>({width:"10.5px",height:"10.5px"})),Kx=styled$1("div")({marginLeft:"auto",width:"auto"});var Xx={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function Zx({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...i}){let a$1=Xx[o??"incomplete"];return jsx(a,{...i,sx:{cursor:i?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(Gx,{hasClick:!!i?.onClick,licenseNumber:n,children:jsxs(Yx,{children:[jsx(p,{title:t?La(t):"",children:jsx(a$4,{countryCode:t})}),jsx(jx,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(Kx,{children:jsx(qx,{src:a$1})})]})})})})}var Jx=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Qx=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var eh=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*40,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});function oh({acceptance:e,payout:t,hideAcceptance:o,hidePayout:n,closed:r,...i}){let a$1=e?.toLowerCase()==="enabled",l=t?.toLowerCase()==="enabled",s=r?.toLowerCase()==="closed",[p$1,c]=useState(false),m=useTheme(),d=useMemo(()=>[{icon:a$1?tc$1:Di,tooltip:"Acceptance",enabled:a$1,shown:!o,zIndex:a$1&&!l?3:1},{icon:l?uc:Hi,tooltip:"Payout",enabled:l,shown:!n,zIndex:2},{icon:ai,tooltip:"Closed",enabled:s,shown:s,zIndex:3}].filter(C=>C.shown),[a$1,l,o,n,s]),u=useMemo(()=>d.map((C,y)=>{let w=C.tooltip;return jsx(b$a,{order:y,variants:eh(y,m.shadows[4],40),sx:{width:"36px",zIndex:C.zIndex+6},children:jsx(p,{onOpen:()=>{c(true);},onClose:()=>{c(false);},title:w,children:jsx(a$i,{mainIcon:C.icon,mainIconSize:16,containerSize:16,sx:{borderRadius:"40px"},onError:g=>{g.currentTarget.src=C.icon,g.currentTarget.style.borderRadius="0px";},borderColor:"transparent"})})},`${C.tooltip}-${y}`)}),[d,m]),f=d?.length||0;return jsx(a,{...i,children:jsx(Jx,{children:f>0?jsx(Qx,{layout:true,className:"reference-sources-container",whileHover:"animate",animate:p$1?"animate":"start",sourcesCount:f,variants:{animate:{width:f*38}},style:{zIndex:29},children:u}):null})})}var fr={technology:Kk,institution:Jk,payment:Zd,developmentHouse:Lk,platform:yd};var nh=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),rh=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),ih=styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),ah=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),lh=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*40,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var sh=e=>{let t="";switch(e.type){case "technology":case "institution":t="Payment";break;default:t="";break}return `${t} ${gb(e.type)} - ${e.name}`};function _1({isTextShown:e,segments:t,...o}){let[n,r]=useState(false),i=useTheme(),a$1=useMemo(()=>t?.filter(s=>!!s.name).map((s,p$1)=>{let c=s.type?.toLowerCase?.().includes("platform"),m=s.tooltip||sh(s),d=s.type,u=c?fr.platform:fr[d];return jsx(b$a,{order:p$1,variants:lh(p$1,i.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},children:jsx(p,{onOpen:()=>{r(true);},onClose:()=>{r(false);},title:m,children:e?jsx(ah,{children:jsx(ih,{children:fx(s.name)})}):jsx(a$i,{mainIcon:s.icon||u,mainIconSize:16,containerSize:16,sx:{...s.icon?{borderRadius:"40px"}:{borderRadius:"0px"}},onError:f=>{fr[d]&&(f.currentTarget.src=fr[d],f.currentTarget.style.borderRadius="0px");},borderColor:"transparent"})})},`${s.name}-${p$1}`)}),[t,e,i]),l=a$1?.length||0;return jsx(a,{...o,children:jsx(nh,{children:l>0?jsx(rh,{layout:true,className:"reference-sources-container",whileHover:"animate",animate:n?"animate":"start",sourcesCount:l,variants:{animate:{width:l*38}},style:{zIndex:29},children:a$1}):null})})}var z1=_1;function mh({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(a,{...o,children:jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:t&&jsxs(Fragment,{children:[jsx(Box,{sx:{width:"24px",height:"24px",border:"1px solid #F2F2F2",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e??jsx("img",{src:Rb$1,alt:"marketplace",style:{maxWidth:"18px",maxHeight:"18px",objectFit:"cover"}})}),jsx(Typography,{noWrap:true,sx:{fontSize:"14px",fontWeight:400},children:t})]})})})}var ch={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};var dh=styled$1("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),uh=styled$1("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),fh=styled$1("img")(()=>({width:"10.5px",height:"10.5px"})),gh=styled$1("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),Ch=styled$1("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),xh=styled$1("div")({display:"flex",alignItems:"center",gap:"8px"}),hh=styled$1("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function yh({id:e,status:t,count:o,name:n,...r}){let i=ch[t??"incomplete"];return jsx(a,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx(dh,{children:e?jsxs(Ch,{children:[jsx(uh,{children:e}),jsxs(xh,{children:[jsx(fh,{src:i}),o>1&&jsx("div",{children:jsxs(gh,{children:["+",o-1]})})]})]}):jsx(hh,{children:"Not Available"})})})})}var Ih=styled$1("div",{shouldForwardProp:e=>!["hasClick"].includes(e)})(({theme:e,hasClick:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:t?"pointer":"default"})),bh=styled$1(Or)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),Sh=styled$1("p",{shouldForwardProp:e=>!["brandName"].includes(e)})(({theme:e,brandName:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"74px",margin:"0",...!t&&{color:"#B1B1B1",width:"84px"}})),Th=styled$1("img")(()=>({width:"10.5px",height:"10.5px"})),wh=styled$1("div")({marginLeft:"auto",width:"auto"});var vh={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function Ph({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let i=vh[t??"incomplete"];return jsx(a,{...r,children:jsx(p,{title:e.name,children:jsx(Ih,{hasClick:!!r.onClick,children:jsxs(bh,{children:[n,jsx(Sh,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(wh,{children:jsx(Th,{src:i})})]})})})})}var Ah=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Eh=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),Mh=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var Dh=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},...o&&{boxShadow:"7px 0px 8px 0px #F2F2F2"}}}),Lh=styled$1(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var X1=e=>!e.startsWith("http://")&&!e.startsWith("https://"),Da=e=>/^https?:\/\//i.test(e),Rh=(e,t)=>{switch(t){case "website":return e;case "physical_store":case "call_center":return null;case "linkedin":case "instagram":case "twitter":case "social_media":return Z1(e,t);case "ios":case "android":case "mobile_app":return J1(e,t);default:return e}},Z1=(e,t)=>{let o=e.toLowerCase();return t==="linkedin"?o.includes("linkedin.com")||o.includes("linked.com")?e:Da(e)?null:`https://linkedin.com/company/${e}`:t==="instagram"?o.includes("instagram.com")?e:Da(e)?null:`https://instagram.com/${e}`:t==="twitter"?o.includes("twitter.com")||o.includes("x.com")?e:Da(e)?null:`https://x.com/${e}`:null},J1=(e,t)=>e.toLowerCase().includes("apps.apple.com")&&t==="ios"?e:t==="android"?Da(e)?e:`https://play.google.com/store/apps/details?id=${e}`:null,Bh=e=>{!e||typeof e!="string"||window.open(X1(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function Q1({channels:e,...t}){let o=e?.filter(r=>!!r.address)?.map((r,i)=>{let a=r.address,l=r.code?.replace(/_/g,""),s=i===e?.length-1,p$1=Rh(r.address??"",r.code??"");return jsx(p,{title:a,children:jsx(b$a,{order:i,variants:Dh(i,0,s),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&Bh(p$1);},children:jsx(Eh,{src:r.logo,alt:l})})},`${r}-${i}`)}),n=o?.length||0;return jsx(a,{...t,children:jsx(Ah,{children:o?.length>0?jsx(Mh,{layout:true,className:"sales-channels-container",whileHover:"animate",animate:"start",sourcesCount:n||0,variants:{animate:{width:(n||0)*38}},style:{zIndex:29},children:o}):null})})}var eA=Q1;function iA({channels:e}){let t=useRef(null),[o,n]=useState(false),[r,i]=useState(null),a=!!r;useEffect(()=>{t.current&&n(t.current.scrollHeight>20);},[e]);let l=useMemo(()=>(e||[]).filter(s=>!!s.address),[e]);return jsxs(Lh,{children:[jsx(Or,{sx:{display:"flex",flexWrap:"wrap",gap:o?"8px":"4px"},ref:t,children:l.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px","& div":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px"}},children:[s.name?.en,": ",s.address]},s.id))}),o&&jsx(Or,{onClick:s=>{i(s.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(rA,{open:a,anchorEl:r,sx:{minWidth:r?.clientWidth},onClose:()=>{i(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:r?.clientWidth,marginTop:"22px"}}},children:jsx(Or,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:l.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,children:[s.name?.en,": ",s.address]},s.id))})})]})}var aA=iA;var bp={active:uf,completed:vf,closed:wf,expired:xf,ready:yf,registered:vf};var Nh=styled$1("span")(({theme:e})=>({width:"36px",height:"24px",borderRadius:"24px",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:`1px solid ${e.palette.divider}`}));function Fh({status:e,...t}){let{t:o}=useTranslation();return jsx(a,{...t,children:e&&bp[e]&&jsx(p,{title:o(mA(Bt(e))),children:jsx(Nh,{children:jsx(a$i,{mainIcon:bp[e],mainIconSize:16,containerSize:16,borderColor:"transparent"})})})})}var Vh={SAVED_CARD:"Card Agreement",ORDER:"Order",SUBSCRIPTION:"Subscription",INSTALLMENT:"Installment"};function uA({type:e,count:t,sx:o,...n}){let{t:r}=useTranslation(),i=t?.toString();return jsxs(Or,{sx:{display:"flex",flexDirection:"row",gap:"4px"},children:[jsx(b$1,{copyTrigger:"press",copyText:e,unknownText:r("noPaymentAgreement"),sx:o,...n,children:e&&Vh[e]}),i&&jsx(b$1,{copyTrigger:"press",copyText:i,sx:{minWidth:"38px"},...n,children:i})]})}var fA=uA;var Hh={CYBERSOURCE:pm$1,MPGS:qm,NETCETERA:rm,APPLEPAY:sm,TAP3DS:tm,FSS:zm,BENEFIT:vm$1,QPAY:Hm,POSTPAY:Gm,BENEFITPAY:um$1,MEEZA:Bm,STC_PAY:Jm$1,NGENIUS:Cm$1,KNET:Am$1,PAYPAL:Fm$1,FAWRY:ym,TPG:Nm$1,DEEMA:xm$1,TPAY:Mm,"CAREEM PAY":wm$1,TABBY:Km$1,OMANNET:Em$1,NPG:Dm,SPG:Im,TAMARA:Lm};var _h=styled$1(Or)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"24px",gap:"8px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper})),zh=styled$1("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function $h({provider:e,...t}){let o=Hh[e];return o?jsx(_h,{children:jsx(zh,{src:o,alt:e})}):jsx(a,{...t,children:jsx(j,{children:e})})}var Uh={CHARGE:Vk,AUTHORIZE:zk,SAVE_TOKEN:Yg$1},Gh={CHARGE:"Charge",AUTHORIZE:"Authorization",SAVE_TOKEN:"Save Token"},Yh={CHARGE:{backgroundColor:"#1F88D01A",color:"#1F88D0",border:"none"},AUTHORIZE:{backgroundColor:"#FFFFFF",color:"#1F88D0",border:"#1F88D01A"},SAVE_TOKEN:{backgroundColor:"#1F88D00D",color:"#1F88D0",border:"#1F88D01A"}};var jh=styled$1(Or,{shouldForwardProp:e=>!["purposeType"].includes(e)})(({purposeType:e})=>{let t=Yh[e];return {display:"flex",alignItems:"center",justifyContent:"start",gap:"4px",minWidth:"86px",width:"100%",height:"24px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${t.border}`,backgroundColor:t.backgroundColor,color:t.color,fontSize:"12px",fontWeight:400}}),qh=styled$1("img")(()=>({width:"16px",height:"16px",objectFit:"contain",flexShrink:0})),Kh=styled$1("span")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}));function Zh({purpose:e,...t}){let o=Uh[e],n=Gh[e];return jsxs(jh,{purposeType:e,...t,children:[jsx(qh,{src:o,alt:e}),jsx(Kh,{children:n})]})}var Qh=8,yA=16,Ot=Qh*2+yA,ey=100,ty=6,IA=Ot+ty+ey,oy=styled(a)(()=>({position:"relative",overflow:"visible",width:Ot,minWidth:Ot,maxWidth:Ot,display:"inline-flex",padding:0})),ny=styled(Or)(()=>({position:"relative",width:Ot,height:24,flexShrink:0,overflow:"visible"})),ry=styled(Or,{shouldForwardProp:e=>e!=="hasLabel"})(({theme:e,hasLabel:t})=>({position:"absolute",top:0,left:0,width:Ot,minWidth:Ot,maxWidth:Ot,height:24,display:"inline-flex",alignItems:"center",gap:ty,paddingInline:Qh,borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper,boxSizing:"border-box",cursor:"pointer",overflow:"hidden",transition:e.transitions.create(["max-width","box-shadow"]),"& img":{flexShrink:0},...t&&{"&:hover":{width:"max-content",maxWidth:IA,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:ey,opacity:1}}}})),iy=styled("span")(({theme:e})=>({display:"inline-block",maxWidth:0,opacity:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,transition:e.transitions.create(["max-width","opacity"],{duration:e.transitions.duration.shorter})}));function SA({url:e,label:t}){let o=n(),n$1=()=>{try{bb(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(oy,{children:jsx(ny,{children:jsxs(ry,{hasLabel:!!t,onClick:n$1,children:[jsx(d$1,{src:Jl,alt:"link"}),t&&jsx(iy,{className:"link-cell-label",children:t})]})})}):null}var TA=memo(SA);function xj({items:e}){let[t,o]=useState(null),n=!!t,r=useCallback(({quantity:l,currency:s,amount:p,name:c})=>`${l?`Qty ${l}`:""} ${c?`- ${c}`:""} ${s||p?"-":""} ${s||""} ${p||""}`,[]);if(!e||!e.length)return null;let[i,...a]=e;return jsxs(Or,{sx:{display:"flex",gap:"4px",alignItems:"center"},children:[jsx(b$1,{children:jsx(j$1,{noWrap:true,sx:{maxWidth:e.length>1?190:220,fontSize:11},children:r(i)})}),e.length>1&&jsx(Or,{onClick:l=>{o(l.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(rA,{open:n,anchorEl:t,sx:{minWidth:t?.clientWidth},onClose:()=>{o(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:t?.clientWidth,marginTop:"22px"}}},children:jsx(Or,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:a?.map(l=>jsx(b$1,{copyTrigger:"press",copyText:r(l),children:r(l)},l.id))})})]})}var ay="ListHeader";var ly=styled$1(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),sy=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%",marginBottom:e.spacing(2.25),marginTop:e.spacing(2)})),py=styled$1(j$1)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),my=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),cy=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),dy=styled$1(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function Na({children:e,component:t="header",...o}){return jsx(ly,{component:t,...o,children:e})}function Fa({title:e,toolbar:t}){return jsxs(sy,{children:[jsx("span",{children:!!e&&jsx(py,{children:e})}),t]})}function Va({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(cy,{as:"aside",children:[o,jsx(a$c,{status:e?.value,availableStatuses:e?.options,onStatusChange:e?.onChange,isActiveFilterVisible:n,buttonSx:e?.buttonSx}),jsx(a$d,{ids:t?.ids,visible:n,label:t?.label,dismissible:t?.dismissible,onDismiss:t?.onDismiss})]})}var an=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:e.palette.common.white,padding:"8px",border:"1px solid",borderColor:e.palette.divider,gap:8,height:32,cursor:"pointer","&:hover":{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),Wa=styled$1(Box)(({theme:e})=>({background:e.palette.common.white,display:"flex",gap:e.spacing(1),alignItems:"center",color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,textTransform:"capitalize",position:"relative",transition:"0.5s",paddingRight:0,marginRight:0,"&:after":{content:'""',position:"absolute",left:-8,right:0,width:"100%",height:"100%",boxShadow:e.shadows[11],borderRadius:e.spacing(.5),paddingInlineStart:e.spacing(1),paddingTop:"9px",paddingBottom:"9px",paddingInlineEnd:"9px",zIndex:-1},"& > *:last-child":{marginRight:0,paddingRight:"6px"}})),ln=styled$1(Box)(({theme:e})=>({background:e.palette.common.white,borderRadius:e.spacing(1),boxShadow:e.shadows[5],border:"1px solid",borderColor:e.palette.divider,zIndex:5,fontSize:"11px",width:192})),sn=styled$1(Box)(()=>({minWidth:160,position:"relative",marginRight:0,paddingRight:0})),pn=styled$1(Box,{shouldForwardProp:e=>e!=="addColumnViewEl"})(({theme:e})=>({padding:e.spacing(1),paddingInlineEnd:2,borderBottom:"1px solid",borderColor:e.palette.divider,display:"flex",alignItems:"center",height:32,cursor:"pointer",img:{height:12},".check-icon":{height:"auto",marginInlineEnd:e.spacing(1)},"&:hover":{color:e.palette.info.dark,fontWeight:e.typography.fontWeightBold},"&.add-column":{justifyContent:"space-between",paddingInlineEnd:e.spacing(1),position:"relative",border:"none",zIndex:5,borderBottom:"1px solid",borderColor:e.palette.divider,borderTopRightRadius:e.spacing(1),borderTopLeftRadius:e.spacing(1),"&:hover":{boxShadow:e.shadows[6]}}})),mn=styled$1(Box)(()=>({width:15})),yr=styled$1(Box)(()=>({width:16})),Cy=styled$1(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),xy=styled$1(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),hy=styled$1(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),yy=styled$1(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),Iy=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),by=styled$1(Box,{shouldForwardProp:e=>e!=="isHovered"&&e!=="isDate"})(({theme:e,isHovered:t,isDate:o})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:t?e.palette.action.hover:e.palette.background.paper,cursor:o?"default":"grab","&:hover":{backgroundColor:o?e.palette.background.paper:e.palette.action.hover},"&:last-child":{borderBottom:"none"}})),wp=styled$1(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),vp=styled$1(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),Sy=styled$1(Box)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,height:35,borderTop:"1px solid",borderColor:e.palette.divider,background:"#F6F8FACC",backdropFilter:"blur(24px)"})),Ty=styled$1(Box)(({theme:e})=>({position:"absolute",bottom:12,right:16,padding:6,backgroundColor:e.palette.background.paper,border:"1px solid #9F9F9F29",borderRadius:"4px"})),Ha=styled$1(Paper)(()=>({paddingTop:4,paddingBottom:4,minWidth:180,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",borderRadius:"8px"}));styled$1(Box)(()=>({display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer"}));var wy=styled$1(Button)(({theme:e})=>({color:e.palette.error.main,textTransform:"none",fontSize:10,fontWeight:500,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,"&:hover":{backgroundColor:"transparent"}})),vy=styled$1(Button)(({theme:e})=>({fontSize:9,fontWeight:600,borderRadius:4,paddingLeft:20,paddingRight:20,paddingTop:8,paddingBottom:8,height:28,textTransform:"none",backgroundColor:e.palette.info.dark,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{backgroundColor:e.palette.grey[300],color:e.palette.grey[500]}}));styled$1(TextField)(({theme:e})=>({"& .MuiFilledInput-root":{borderRadius:"8px",backgroundColor:e.palette.background.paper,border:"1px solid",borderColor:e.palette.divider,"&:hover":{backgroundColor:e.palette.background.paper},"&.Mui-focused":{backgroundColor:e.palette.background.paper},"&::before, &::after":{display:"none"}}}));var Pp={display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0,"& .MuiSvgIcon-root":{width:16,height:16},"& img":{width:14,height:14}},Py=styled$1(motion.div)(({theme:e})=>({position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",backgroundColor:e.palette.background.paper,boxShadow:"0px 8px 32px rgba(0, 0, 0, 0.15)",borderRadius:12,overflow:"hidden",boxSizing:"border-box"})),Ay=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover}})),Ey={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},My=styled$1(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),Dy=styled$1(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),Ly=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",gap:12,paddingTop:8,paddingBottom:8,paddingLeft:12,paddingRight:12,flexShrink:0,borderTop:"1px solid",borderColor:e.palette.divider})),Ry={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},By=e=>({fontSize:11,fontWeight:500,textTransform:"none",backgroundColor:"info.dark",minWidth:80,height:38,borderRadius:"8px",boxShadow:"none","&:hover":{backgroundColor:e.palette.info.dark}});function Ep(e,t){let[o,n]=useState(null),[r,i]=useState(null),a=useCallback(()=>{n(null),i(null);},[]),l=useCallback((p,c)=>{n(p.currentTarget),i(c);},[]),s=useCallback(()=>{r&&a();},[r,a]);return useEffect(()=>{e||(a(),t?.());},[e,t,a]),{subMenuAnchorEl:o,openSubMenuName:r,handleSubMenuClose:a,handleSubMenuOpen:l,handleMenuScroll:s}}function WA(e){let t=e;for(;t&&t!==document.body;){let n=window.getComputedStyle(t).overflowY;if((n==="auto"||n==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement;}return document.documentElement}function Mp(e){let t=useRef(false),o=useRef(null),n=useRef({x:0,y:0}),r=useRef(1),i=useRef(null),a=useRef(0),l=useRef(false),s=useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null);},[]),p=useCallback((f,C)=>{l.current=true,window.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,cancelable:true,pointerId:r.current,clientX:f,clientY:C+a.current,pointerType:"mouse",isPrimary:true})),l.current=false;},[]),c=useCallback(()=>{if(o.current!==null)return;let f=()=>{let C=i.current;if(!t.current||!C)return;let y=C.getBoundingClientRect(),{x:w,y:g}=n.current,x=g-y.top,T=y.bottom-g;if(x>0&&x<60){let I=(60-x)/60*15;C.scrollTop-=I,a.current-=I,p(w,g);}else if(T>0&&T<60){let I=(60-T)/60*15;C.scrollTop+=I,a.current+=I,p(w,g);}o.current=requestAnimationFrame(f);};o.current=requestAnimationFrame(f);},[p]),m=useCallback(f=>{l.current||(n.current={x:f.clientX,y:f.clientY},r.current=f.pointerId,t.current&&a.current!==0&&(f.stopImmediatePropagation(),p(f.clientX,f.clientY)));},[p]),d=useCallback(()=>{i.current=WA(e.current),a.current=0,t.current=true,window.addEventListener("pointermove",m,{capture:true}),c();},[e,m,c]),u=useCallback(()=>{t.current=false,a.current=0,s(),window.removeEventListener("pointermove",m,{capture:true});},[m,s]);return useEffect(()=>()=>{t.current=false,s(),window.removeEventListener("pointermove",m,{capture:true});},[m,s]),{onDragStart:d,onDragEnd:u}}function Lp({columns:e,setTableViews:t}){let o=useCallback(i=>{let a=i.map(l=>e.find(s=>s.name===l)).filter(l=>!!l);t?.(a);},[e,t]),n=useCallback(i=>{let a=e.map(l=>{if(l.name!==i)return l;let s=l.menuItems&&l.menuItems.length>0,p=!l.selected;if(!s)return {...l,selected:p};let c=l.menuItems?.map(m=>({...m,selected:p}));return {...l,selected:p,menuItems:c}});t?.(a);},[e,t]),r=useCallback((i,a)=>{let l=e.map(s=>{if(s.name!==i)return s;let p=s.menuItems?.map(m=>m.name===a?{...m,selected:!m.selected}:m),c=p?.some(m=>m.selected)??false;return {...s,menuItems:p,selected:c}});t?.(l);},[e,t]);return {reorderColumns:o,toggleColumnSelection:n,toggleSubmenuItem:r}}function Bp({column:e,index:t,openSubMenuName:o,toggleColumnSelection:n,handleSubMenuOpen:r,handleSubMenuClose:i}){let a=e.menuItems&&e.menuItems.length>0,l=o===e.name,s=t===0,p=useMemo(()=>!!(e.selected&&e.menuItems?.some(u=>u.selected)&&!e.menuItems?.every(u=>u.selected)),[e.selected,e.menuItems]),c=useCallback(()=>{n(e.name);},[n,e.name]),m=useCallback(u=>{a&&r(u,e.name);},[a,r,e.name]),d=useCallback(()=>{a||i();},[a,i]);return {isIndeterminate:p,hasSubmenuItems:a,isSubmenuOpen:l,isFirstItem:s,handleColumnClick:c,handleMouseEnter:m,handleMouseLeave:d}}var O=(e="")=>e.toLowerCase()==="date",Oe=(e="")=>e.toLowerCase()==="index",Oa=(e,t="en")=>{let o=[];return e.forEach(n=>{n.columns.forEach(r=>{let i=r.name.find(l=>l.lang===t)?.text||r.name[0]?.text||r.code,a=r.fields?.length?r.fields.map(l=>({name:l.code,label:l.name?.find(s=>s.lang===t||s.lang==="")?.text||l.code,selected:l.default??false})):void 0;o.push({name:r.code,label:i,selected:O(r.code)?true:r.default??false,menuItems:a?.length?a:void 0});});}),o},OA=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?Oa([n]):[]},kp=(e,t,o="en")=>{let n=e.map((i,a)=>{let l=i.menuItems?.map(p=>({code:p.name,name:[{text:typeof p.label=="string"?p.label:p.name,lang:o||""}],default:p.selected??false})),s=typeof i.label=="string"?i.label:i.name;return {code:i.name,name:[{text:s,lang:o}],order:a+1,default:i.selected??false,...l?.length?{fields:l}:{}}});return {code:t==="sheet"?"Sheet":"Advanced",columns:n}},_A=e=>{let t=new Map;return e.forEach(o=>{o.layout.forEach(n=>{let r=t.get(n.code);if(r){let i=new Set(r.columns.map(a=>a.code));n.columns.forEach(a=>{i.has(a.code)||r.columns.push(a);});}else t.set(n.code,{...n,columns:[...n.columns]});});}),Array.from(t.values())};var zA=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),$A=(e,t)=>e.map(o=>({...o,default:o.id===t})),_a=e=>e.role??(e.default?"default":void 0),mo=e=>!!e.role||!!e.default,_e=e=>!mo(e),Ny=e=>_e(e),br=e=>e.filter(Ny).length,Np=e=>e.filter(_e).length,za=(e,t="sheet",o="en")=>{let n=[],r=[],i;e.forEach(l=>{let s=t==="sheet"?"sheet":"advanced",p=l.layout.find(S=>S.code.toLowerCase()===s),c=p?Oa([p],o):[],m=l.id,d=vb$1,u=wb$2,f=c.some(S=>O(S.name))?c:[u,...c],C=f.findIndex(S=>O(S.name)),w=(C>0?[f[C],...f.filter(S=>!O(S.name))]:f).filter(S=>!Oe(S.name)),g=[d,...w],x=_a(l),T=mo(l),I={id:m,label:l.name,role:x,isCustom:!T,selected:l.selected,default:!!l.default,columns:g.map(S=>S.name),submenu:g};T?(l.default&&!i&&(i=g),r.push(I)):n.push(I);});let a=r.find(l=>l.default)??r[0];return {customViews:n,defaultTemplates:r,defaultTemplateColumns:i,defaultTemplate:a}},Fp=(e,t="sheet",o="en")=>{let{customViews:n,defaultTemplates:r,defaultTemplate:i}=za(e,t,o),a=[...r,...n];return {customViews:n,defaultTemplates:r,defaultTemplate:i,allTemplates:a}},$a=(e,t)=>{let o=[];_e(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=vb$1;if(!o.some(m=>O(m.name)))return [n,wb$2,...o];let i=o.findIndex(m=>O(m.name)),a=i>=0?o[i]:wb$2,l=o.filter(m=>!O(m.name)&&!Oe(m.name)),s=[a,...l],p=s.some(m=>Oe(m.name)),c=s.findIndex(m=>Oe(m.name));if(p&&c>0){let m=s[c],d=s.filter(u=>!Oe(u.name));return [m,...d]}return p&&c===0?s:[n,...s]},UA=(e,t)=>$a(e,t).length>0,dn=e=>e.filter(t=>!Oe(t.name));var Me=e=>e.toLowerCase(),Fy=e=>new Map(e.filter(t=>!O(t.name)).map(t=>[Me(t.name),t])),Vy=(e,t)=>e.some(o=>Me(o)===Me(t)),Vp=(e,t)=>({...e,selected:t.selected??false,menuItems:e.menuItems?.map(o=>{let n=t.menuItems?.find(r=>Me(r.name)===Me(o.name));return {...o,selected:n?.selected??false}})}),Sr=e=>{if(!e.menuItems?.length)return {checked:e.selected??false,indeterminate:false};let t=e.menuItems.filter(o=>o.selected).length;return {checked:t>0,indeterminate:t>0&&t<e.menuItems.length}},Hp=(e,t)=>e.map(o=>{if(o.name!==t)return o;let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),Tr=(e,t,o)=>e.map(n=>{if(n.name!==t)return n;let r=n.menuItems?.map(a=>a.name===o?{...a,selected:!a.selected}:a),i=r?.some(a=>a.selected)??false;return {...n,menuItems:r,selected:i}}),Op=(e,t)=>e.map(o=>{if(O(o.name))return o;let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),_p=e=>{let t=e.filter(o=>!O(o.name));return t.length===0?false:t.every(o=>o.menuItems?.length?o.menuItems.every(n=>n.selected):o.selected)},zp=(e,t)=>e.filter(r=>!O(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(i=>i.selected):r.selected)&&!t,$p=(e,t)=>e.trim().length>0&&e.length<=t,pe=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),Up=(e,t)=>e.map(o=>{if(o.name!==t)return o;if(O(o.name))return {...o,selected:true};let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),Gp=(e,t)=>e.map(o=>{if(O(o.name))return {...o,selected:true};let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),Yp=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),jp=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,Wp=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),wr=(e,t)=>{if(e.length!==t.length)return false;let o=Wp(e),n=Wp(t);for(let r=0;r<o.length;r++){let i=o[r],a=n[r];if(i.name!==a.name||i.selected!==a.selected)return false;if(i.menuItems&&a.menuItems){if(i.menuItems.length!==a.menuItems.length)return false;for(let l=0;l<i.menuItems.length;l++)if(i.menuItems[l].name!==a.menuItems[l].name||i.menuItems[l].selected!==a.menuItems[l].selected)return false}else if(i.menuItems||a.menuItems)return false}return true},GA=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),qp=(e,t)=>{let o=e.filter(i=>!O(i.name)).map(i=>i.name),n=Fy(t),r=[];for(let i of o){let a=e.find(s=>Me(s.name)===Me(i)),l=n.get(Me(i));l?r.push(a?Vp(l,a):{...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))}):a&&r.push(a);}for(let[,i]of n)if(!Vy(o,i.name)){let a=e.find(l=>Me(l.name)===Me(i.name));r.push(a?Vp(i,a):{...i,selected:false,menuItems:i.menuItems?.map(l=>({...l,selected:false}))});}return r},Kp=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),Xp=(e,t)=>{let o=Fy(e),n=t.filter(i=>!O(i.name)).map(i=>i.name),r=[];for(let i of n){let a=t.find(s=>Me(s.name)===Me(i)),l=o.get(Me(i));l&&a?r.push(Vp(l,a)):l&&r.push({...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))});}for(let[,i]of o)Vy(n,i.name)||r.push({...i,selected:false,menuItems:i.menuItems?.map(a=>({...a,selected:false}))});return r};function Wy(e,t,o="en"){if(!e?.layout?.length)return [];let n=Wa$1(t)?"sheet":"advanced",r=e.layout.find(l=>l.code?.toLowerCase()===n);if(!r?.columns?.length)return [];let i=r.columns.map(l=>{let s=l.name?.find(c=>c.lang===o)?.text||l.name?.[0]?.text||l.code,p=l.fields?.length?l.fields.map(c=>({name:c.code,label:c.name?.find(m=>m.lang===o||m.lang==="")?.text||c.code,selected:c.default??false})):void 0;return {name:l.code,label:s,selected:O(l.code)?true:l.default??false,...p&&p.length>0&&{menuItems:p}}});return i.some(l=>O(l.name))?i:[{name:wb$2.name,label:wb$2.label,selected:true},...i]}var Ua=e=>{let t=e?.order;if(t==null)return 999;let o=Number(t);return Number.isFinite(o)?o:999};function Ga(e){return {...e,layout:e.layout?.map(t=>({...t,columns:[...t.columns??[]]}))??[]}}function YA(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((i,a)=>Ua(i)-Ua(a))})),n=Wy(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:_a(e),isCustom:_e(e),default:e.default}}var Ya=(e,t)=>{if(!e)return [];let o=e;if(e.layout&&Array.isArray(e.layout)&&e.layout.length>0){let n=Va$1(t)?"Advanced":"Sheet",r=e.layout.find(i=>{let a=i.code?.trim();return a===n||a?.toLowerCase()===n.toLowerCase()})||e.layout.find(i=>{let a=i.code?.trim()?.toLowerCase();return Va$1(t)?a==="default"||a==="advanced":a==="sheet"||a==="sheets"});if(r&&r.columns&&r.columns.length>0)return r.columns.map(a=>{let s=!!a.fields?.length&&a.fields.some(c=>c.default??false),p=(a.default??false)||s;return {code:a.code,name:a.name&&a.name.length>0?a.name:[{text:a.code,lang:"en"}],selected:p,sort_order:Ua(a),fields:a.fields?.map(c=>({code:c.code.toLowerCase(),type:"single",parameters:[{parameter:c.code.toLowerCase(),code:c.code.toLowerCase(),selected:c.default??false}]}))||[{code:a.code.toLowerCase(),type:"single",parameters:[{parameter:a.code.toLowerCase(),code:a.code.toLowerCase(),selected:a.default??false}]}]}}).sort((a,l)=>(a.sort_order??999)-(l.sort_order??999))}return o.submenu&&Array.isArray(o.submenu)&&o.submenu.length>0?o.submenu.map((r,i)=>{let a=r.name.toLowerCase(),l;r.menuItems&&r.menuItems.length>0?l=r.menuItems.filter(m=>m.selected):l=[{name:a,label:r.label||r.name,selected:true}];let s=l.length>0?l.map(m=>({parameter:m.name.toLowerCase(),code:m.name.toLowerCase()})):[{parameter:a,code:a}],p=l.length>1?"combined":"single";return {code:r.name,name:[{text:r.label||r.name,lang:"en"}],selected:r.selected,sort_order:i+1,fields:[{code:a,type:p,parameters:s}]}}):[]},jA=(e,t)=>{if(!e||!Array.isArray(e)||e.length===0)return [];let o=e?.find(n=>n.default)||e[0];return o?Ya(o,t):[]};function Zp(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function Jp(e,t){let o=t?.name??e?.name??"",n=t?.layout,r=Array.isArray(n)?n[0]:n??null,a=[...e?.layout??[]];if(r){let l=r.code?.toLowerCase(),s=a.findIndex(p=>p.code?.toLowerCase()===l);s>=0?a[s]=r:a.push(r);}return {name:o,layout:a}}var Qp=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var Hy=e=>[...yb[e]??yb.default],qA=e=>zb$2[e]??zb$2.default,KA=(e,t)=>({code:e,name:[{text:xb$1[e],lang:"en"}],selected:true,sort_order:t}),XA=(e,t)=>e?.layout?.some(o=>Hy(t).includes(o.code?.toLowerCase()??""))??false,em=(e,t,o)=>{let n=zb$2[t],r=o?.layout?.find(a=>a.code?.toLowerCase()===n.toLowerCase()),i=r?{...r,columns:r.columns?.map(a=>({...a,name:a.name?.map(l=>({...l})),fields:a.fields?.map(l=>({...l,name:l.name?.map(s=>({...s}))}))}))??[]}:{code:n,columns:[]};return [e,i]};var ja=({tableMode:e,templates:t,lang:o="en",mainDefaultTemplate:n})=>useMemo(()=>{let{customViews:r,defaultTemplates:i,defaultTemplate:a,allTemplates:l}=Fp(t,e,o),p=(n?za([n],e,o).defaultTemplate:void 0)??a,c=p?.submenu?structuredClone(p.submenu):[],m=br(t);return {customViews:r,defaultTemplates:i,defaultTemplate:a,allTemplates:l,defaultColumns:c,customTemplateCount:m}},[t,e,o,n]);var qa=({mode:e,onViewChange:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:i,defaultTemplate:a,allTemplates:l,customTemplateCount:s})=>{let[p,c]=useState(null),[m,d]=useState(false),[u,f]=useState(null),[C,y]=useState(false),[w,g]=useState(null),[x,T]=useState(null),[I,S]=useState(),[b,v]=useState(l.find(R=>R.selected)?.id??a?.id),A=useRef(l.find(R=>R.selected)?.id??a?.id),D=useCallback(R=>{let W=R.submenu?.filter(te=>te.selected)||[];return {...R,submenu:W,columns:W.map(te=>te.name)}},[]),M=useCallback(R=>{A.current=R?.id,t?.(R?D(R):void 0);},[t,D]),L=useMemo(()=>b?l.find(R=>R.id===b):a,[l,b,a]),H=useMemo(()=>pe(L?.submenu||i),[L,i]),_=useMemo(()=>({id:b||a?.id||"default",label:L?.label||a?.label||"Default"}),[L,b,a?.id,a?.label]);useEffect(()=>{let R=l.find(ve=>ve.selected)?.id,W=a?.id,te=b?l.some(ve=>ve.id===b):false;if(!(b&&!te&&R!==b)){if(R&&R!==b){v(R);return}if(!b){v(R??W);return}te||v(R??W);}},[l,a?.id,b]),useEffect(()=>{!b||!L||L.id===b&&A.current!==b&&(A.current=b,t?.(D(L)));},[b,L,t,D]);let ee=useCallback(R=>{c(W=>W?null:R.currentTarget);},[]),Ie=useCallback(()=>{c(null);},[]),Fe=useCallback((R,W)=>{v(W?.id),M(W),Ie();},[Ie,M]),we=useCallback((R=false,W,te,ve)=>{s!=null&&s>=3||(f(null),y(R),g(W??null),T(te?.length?te:null),S(ve),d(true),c(null));},[s]),z=useCallback(R=>{let W=l.find(te=>te.id===R.id)??R;f(W),y(true),g(null),T(W.submenu?.length?pe(W.submenu):null),d(true);},[l]),at=useCallback(()=>{d(false),f(null),y(false),g(null),T(null),S(void 0);},[]);useEffect(()=>{if(!m||!u?.id)return;let R=l.find(W=>W.id===u.id);R&&(f(R),T(R.submenu?.length?pe(R.submenu):null));},[m,u?.id,l]);let Ol=useCallback(async R=>{if(u){let W=u.id;await n?.(W,R),v(W);let te=l.find(ve=>ve.id===W)??u;M(te),Ie();}else {let W=await o?.({...R,sourceTemplateId:I});if(W?.id){v(W.id);let te=l.find(ve=>ve.id===W.id);M(te??{id:W.id,label:W.name,isCustom:true,columns:R.selectedColumns.map(ve=>ve.name),submenu:R.selectedColumns});}}},[u,n,o,Ie,l,M,I]),_l=useCallback(async R=>{let W=l.find(te=>te.id===R);await r?.(W?.id??R),b===(W?.id??R)&&v(a?.id);},[l,r,b,a]);return {anchorEl:p,isCreateDialogOpen:m,editingView:u,selectedViewInfo:_,shouldUseCurrentState:C,selectedView:L,currentViewColumns:H,initialColumnsForCreate:w,availableColumnsForCreate:x,handleViewButtonClick:ee,handleCloseViewDropdown:Ie,handleSelectedViewInfo:Fe,handleOpenCreateDialog:we,handleOpenEditDialog:z,handleCloseCreateDialog:at,handleSaveView:Ol,handleDeleteView:_l}};var un=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((p,c)=>{r.current&&(clearTimeout(r.current),r.current=null),t(p),n(c);},[]),a=useCallback(()=>{r.current=setTimeout(()=>{t(null),n(null);},0);},[]),l=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),t(null),n(null);},[]);return {hoveredColumn:e,anchorEl:o,openSubmenu:i,closeSubmenu:a,cancelClose:l,forceClose:s}};var zy=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((s,p)=>{t(s),n(p);},[]),a=useCallback(()=>{t(null),n(null);},[]),l=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]);return {hoveredNestedColumn:e,nestedSubmenuAnchorEl:o,openNestedSubmenu:i,closeNestedSubmenu:a,cancelNestedClose:l}};var im=({open:e,availableColumns:t,defaultColumns:o,editingView:n,tableViews:r=[]})=>{let[i,a]=useState(()=>n?.label||""),[l,s]=useState([]),p=useRef(false),c=useRef([]),m=useRef(n?.label?.trim()||""),{hoveredColumn:d,anchorEl:u,openSubmenu:f,closeSubmenu:C,cancelClose:y}=un(),w=vb$1,g=wb$2;useEffect(()=>{if(!e){p.current=false;return}if(!p.current&&e)if(n){let _=n.submenu&&n.submenu.length>0?n.submenu:o,ee=t.length>0?t:_,Fe=qp(_,ee).filter(at=>!Oe(at.name)&&!O(at.name)),we=[w,g,...Fe];s(we),c.current=pe(we);let z=n.label?.trim()||"";m.current=z,a(z);}else {let _=t.length>0?t:r,Ie=(r&&r.length>0?Xp(_,r):Kp(_)).filter(we=>!Oe(we.name)&&!O(we.name)),Fe=[w,g,...Ie];s(Fe),c.current=pe(Fe),m.current="",a("");}else if(e&&n){let _=n.label?.trim()||"";a(_);}p.current=e;},[e,n?.id,n?.label,n?.submenu,t,o,r,w,g]);let x=useMemo(()=>l.map(H=>H.name),[l]),T=useMemo(()=>_p(l),[l]),I=useMemo(()=>zp(l,T),[l,T]),S=useMemo(()=>$p(i,20),[i]),b=useMemo(()=>{let H=i.trim()!==m.current,_=c.current.length>0&&!wr(l,c.current);return H||_},[i,l]);return {templateName:i,setTemplateName:a,selectedColumns:l,columnNames:x,allSelected:T,someSelected:I,isNameValid:S,hasChanges:b,hoveredColumn:d,anchorEl:u,openSubmenu:f,closeSubmenu:C,cancelClose:y,handleReorder:H=>{let _=H.filter(ee=>!O(ee)).flatMap(ee=>l.find(Ie=>Ie.name===ee)??[]);s([w,g,..._]);},handleColumnToggle:H=>{s(_=>Hp(_,H));},handleSubItemToggle:(H,_)=>{s(ee=>Tr(ee,H,_));},handleSelectAll:()=>{s(H=>Op(H,!T));},handleResetToDefault:()=>{c.current.length>0&&s(pe(c.current));}}};function lm({templates:e,setTemplates:t,createTemplate:o,updateTemplate:n,deleteTemplate:r,tableMode:i,isTemplatesLoading:a,lang:l="en",mainDefaultTemplate:s}){let p=useMemo(()=>s??e.find(g=>g.default),[e,s]),c=e.find(g=>g.selected)?.id??p?.id,m=useCallback(g=>{t(x=>x.find(I=>I.selected)?.id===g?x:x.map(I=>({...I,selected:g?I.id===g:false})));},[t]),d=useCallback(async({name:g,layout:x,sourceTemplateId:T})=>{if(br(e)>=3)return;let I=e.find(A=>A.id===T)??e.find(A=>A.id===c)??p,S=em(x,i,I),b=await o({name:g,layout:S}),v=Ga(b);return t(A=>[...A.filter(M=>M.id!==v.id).map(M=>({...M,selected:false})),{...v,selected:true}]),{id:b.id,name:b.name??""}},[o,t,i,p,e,c]),u=useCallback(async g=>{await r(g),t(x=>x.filter(T=>T.id!==g)),m(c===g?p?.id:c);},[r,t,p,m]),f=useCallback(async(g,x)=>{let T=e.find(A=>A.id===g),{name:I,layout:S}=Jp(T,x),b=await n(g,{name:I,layout:S}),v=Ga(b);t(A=>Zp(A,D=>D.id===g,v)),m(v.id);},[e,n,t,m]),C=useMemo(()=>({templates:e,onCreateCustomView:d,onEditCustomView:f,onDeleteCustomView:u,isLoading:a,mainDefaultTemplate:s}),[e,d,f,u,a,s]),y=useCallback(g=>{if(!p){m(void 0);return}if(!g?.id){m(p.id);return}if(mo(g)){m(g.id);return}let x=e.find(T=>T.id===g.id);if(x){m(x.id);return}_e(g)&&m(g.id);},[e,p,m]),w=useMemo(()=>{let g=e.find(T=>c?T.id===c:false)??p;if(!g)return [];let x=Ya(g,i);return x.length>0?x:[]},[i,e,c,p]);return {customViews:C,onViewChange:y,columnsView:w,selectedViewId:c}}function iE({column:e,index:t,openSubMenuName:o,subMenuAnchorEl:n,toggleColumnSelection:r,toggleSubmenuItem:i,handleSubMenuOpen:a,handleSubMenuClose:l}){let{t:s}=useTranslation(),p=useTheme(),{isIndeterminate:c,hasSubmenuItems:m,isSubmenuOpen:d,isFirstItem:u,handleColumnClick:f,handleMouseEnter:C,handleMouseLeave:y}=Bp({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:a,handleSubMenuClose:l}),w=g=>g?s(g)??fx(g):"";return jsxs(Or,{sx:{borderTop:`1px solid ${p.palette.divider}`,...u&&{borderTop:"none",height:33}},children:[jsxs(V,{isIndeterminate:c,isSelected:e.selected,onMouseEnter:C,onMouseLeave:y,onClick:f,children:[jsx(Or,{sx:{flex:1},children:w(e.label)}),m&&jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),m&&jsx(R,{open:d,anchorEl:n,placement:"right-start",onMouseEnter:()=>{},onMouseLeave:l,children:e.menuItems?.map(g=>jsx(V,{isSelected:e.selected&&g.selected,onClick:()=>i(e.name,g.name),children:w(g.label)},g.name))})]},e.name)}var Yy=iE;function pE({open:e,onSelect:t,setTableViews:o,tableViews:n,anchorEl:r,onClose:i}){let{t:a}=useTranslation(),l=useMemo(()=>n||[],[n]),s=useMemo(()=>l.map(w=>w.name),[l]),{reorderColumns:p,toggleColumnSelection:c,toggleSubmenuItem:m}=Lp({columns:l,setTableViews:o}),{subMenuAnchorEl:d,openSubMenuName:u,handleSubMenuClose:f,handleSubMenuOpen:C,handleMenuScroll:y}=Ep(e,i);return jsxs(sn,{"data-testid":"TableView_CustomViews",children:[jsxs(an,{"data-testid":"TableView_CustomViews_Button",onClick:t,children:[jsx("div",{children:a("columns")}),jsx("img",{src:Cb$1,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsxs(R,{open:e,anchorEl:r,"data-testid":"TableView_CustomViews_Popper",sx:{padding:0,marginTop:"8px",borderRadius:1},children:[e&&jsx(a$5,{onClick:i}),jsx(ln,{component:"article","data-testid":"TableView_CustomViews_List",children:jsx(Reorder.Group,{as:"div",axis:"y",onReorder:p,values:s,onScroll:y,children:l.map((w,g)=>jsx(Yy,{column:w,index:g,openSubMenuName:u,subMenuAnchorEl:d,toggleColumnSelection:c,toggleSubmenuItem:m,handleSubMenuOpen:C,handleSubMenuClose:f},w.name))})})]})]})}var pm=memo(pE);function uE({open:e,selectedViewInfo:t,setSelectedViewInfo:o,onSelect:n,onTableViewOptionClick:r,anchorEl:i}){let{t:a}=useTranslation();return jsxs(sn,{"data-testid":"TableView_DefaultViews",children:[jsxs(an,{onClick:l=>{n(l);},children:[jsx("div",{children:t.label}),jsx("img",{src:Cb$1,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx(cE,{open:e,anchorEl:i,placement:"bottom-start",children:jsxs(ln,{children:[Cb$2.map(l=>jsxs(pn,{onClick:()=>{o(l),r?.(l);},children:[l.id===t.id?jsx("img",{className:"check-icon",src:Db,alt:"arrow"}):jsx(mn,{}),jsx("span",{children:l.label}),jsx(yr,{})]},l.id)),jsxs(pn,{sx:{border:"none"},onClick:l=>{l.stopPropagation(),o(Bb$1),r?.(Bb$1);},children:[t.id===Bb$1.id?jsx("img",{className:"check-icon",src:Db,alt:"arrow"}):jsx(mn,{}),jsx("span",{children:a("createCustomView")}),jsx(yr,{})]})]})})]})}var mm=um.memo(uE);function xE({onViewChange:e,setIsViewVisible:t,setTableViews:o,tableViews:n,resetTableViews:r,onTableViewOptionClick:i}){let[a,l]=useState(null),[s,p$1]=useState(null),[c,m]=useState(null),[d,u]=useState(Ab$2),{t:f}=useTranslation(),C$1=x=>{e?.(),l(x.currentTarget),t(true);},y=()=>{p$1(null),m(null);},w=()=>{l(null),t(false),u(Ab$2);},g=x=>{u(x),x.id!==Bb$1.id&&r?.(x),y();};return a?jsx(CE,{onClickAway:y,children:jsxs(Wa,{"data-testid":"TableView",children:[d.id===Bb$1.id&&jsx(pm,{tableViews:n,setTableViews:o,anchorEl:c,open:!!c,onSelect:x=>{m(c?null:x.currentTarget),p$1(null);},onClose:()=>{m(null);}}),jsx(mm,{open:!!s,anchorEl:s,setSelectedViewInfo:x=>{g(x);},selectedViewInfo:d,onSelect:x=>{p$1(s?null:x.currentTarget),m(null);},onTableViewOptionClick:i}),jsx(an,{sx:{width:32,justifyContent:"center"},onClick:w,children:jsx("img",{src:Eb,alt:"close"})})]})}):jsx(p,{title:f("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d$1,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"TableView_no_anchorViewEl",onClick:C$1,"aria-label":f("tableView")})})}var cm=memo(xE);var qy=({columns:e,allCurrentSelected:t,someCurrentSelected:o,onSelectAll:n,onReset:r,onColumnToggle:i,onNestedItemToggle:a,isModified:l=false})=>{let{hoveredNestedColumn:s,nestedSubmenuAnchorEl:p,openNestedSubmenu:c,closeNestedSubmenu:m,cancelNestedClose:d}=zy();return jsxs(Fragment,{children:[jsxs(Ay,{children:[jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsx(f$1,{checked:t,indeterminate:o,onChange:u=>{u.stopPropagation(),n();},onClick:u=>{u.stopPropagation();},sx:Ey})}),jsx(Typography,{component:"button",disabled:!l,onClick:u=>{u.stopPropagation(),l&&r();},sx:{fontSize:11,fontWeight:500,color:"#1F88D0",background:"none",border:"none",cursor:l?"pointer":"default",padding:0,opacity:l?1:.5,pointerEvents:l?"auto":"none","&:hover":l?{textDecoration:"underline"}:void 0},children:"Reset"})]}),jsx(v,{}),jsx(Dy,{onScroll:m,children:jsx(Box,{component:"ul",sx:{listStyle:"none",padding:0,margin:0},children:e.map((u,f)=>{let C=u.menuItems&&u.menuItems.length>0,{checked:y,indeterminate:w}=Sr(u),g=O(u.name);return jsxs(Box,{component:"li",sx:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%"},children:[jsxs(Box,{sx:{position:"relative"},onMouseEnter:x=>C&&c(u.name,x.currentTarget),onMouseLeave:()=>C&&m(),children:[jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[jsx(V,{isSelected:C?y:u.selected,isIndeterminate:C?w:false,isDisabled:g,onClick:()=>{g||i(u.name);},sx:{flex:1,display:"flex",alignItems:"center"},children:jsx("span",{children:u.label||u.name})}),C&&jsx(Box,{sx:{display:"flex",alignItems:"center",pr:1,pointerEvents:"none"},children:jsx("img",{src:wb$1,alt:"arrow",style:{height:12}})})]}),C&&jsx(Popper,{open:s===u.name,anchorEl:p,placement:"right-start",sx:{zIndex:1e4},children:jsxs(Box,{onMouseEnter:d,onMouseLeave:m,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Ha,{children:u.menuItems?.map((x,T)=>jsxs(um.Fragment,{children:[jsx(V,{isSelected:x.selected,isDisabled:g,onClick:()=>{g||a(u.name,x.name);},children:x.label||x.name}),T<(u.menuItems?.length??0)-1&&jsx(v,{})]},x.name))})]})})]}),f<e.length-1&&jsx(v,{})]},u.name)})})})]})};function AE({open:e,selectedViewInfo:t,setSelectedViewInfo:o,anchorEl:n,onClose:r,onCreateCustomView:i,customViews:a=[],onEditCustomView:l,defaultColumns:s=[],defaultTemplate:p$1,defaultTemplates:c=[],customTemplateCount:m,isLoading:d}){let{t:u}=useTranslation(),{hoveredColumn:f,anchorEl:C,openSubmenu:y,closeSubmenu:w,cancelClose:g,forceClose:x}=un(),[T,I]=um.useState(null),[S,b]=um.useState(null),v$1=useMemo(()=>[...c.length?c:p$1?[p$1]:[],...a],[c,p$1,a]),A=useCallback(B=>B.submenu?.length?B.submenu:s,[s]),D=useCallback(B=>B?$a(B,A(B)):s,[s,A]),M=useCallback(B=>D(B).length>0,[D]),L=useMemo(()=>f?v$1.find(B=>B.id===f):void 0,[f,v$1]),H=useMemo(()=>D(L),[L,D]),_=useMemo(()=>f?S?.length?S:H:[],[f,H,S]),ee=useMemo(()=>Yp(_),[_]),Ie=useMemo(()=>jp(_,ee),[_,ee]),Fe=S!=null&&!wr(S,H),we=(m??Np(a))>=3,z=d||we,at=z||!Fe;function Ol(B){x(),b(null);let ie;if(mo(B)){let Le=B.submenu?.length?B.submenu:s.length?s:p$1?.submenu??[];ie={...B,submenu:pe(Le),columns:Le.map(qe=>qe.name)};}else _e(B)&&(ie=B);o(B,ie);}function _l(B,ie){let Le=v$1.find(qe=>qe.id===B);b(pe(D(Le))),y(B,ie);}function R$1(){b(null),w(),x();}function W(B){if(B.stopPropagation(),at)return;let ie=pe(H),Le=S?.length?pe(S):ie;i?.(true,Le,ie,L?.id),b(null),x();}function te(B){S&&b(Up(S,B));}function ve(B,ie){S&&b(Tr(S,B,ie));}function _S(){S&&b(Gp(S,!ee));}function zS(){b(pe(H));}return jsxs(sn,{"data-testid":"ViewsDropdown",children:[jsx(cE,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(ln,{onScroll:x,children:[jsx(PE,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v,{}),v$1.map(B=>{let ie=_e(B),Le=!ie&&M(B);return jsxs(pn,{onMouseEnter:qe=>{ie?I(B.id):Le&&_l(B.id,qe.currentTarget);},onMouseLeave:()=>{ie?I(null):Le&&w();},onClick:()=>Ol(B),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[B.id===t.id?jsx("img",{style:{width:15,height:15},src:Xj,alt:"check"}):jsx(mn,{}),jsx("span",{style:{flex:1,fontSize:11},children:B.label}),ie&&T===B.id&&jsx("img",{src:Ah$1,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:qe=>{qe.stopPropagation(),r?.(),l?.(B);}}),Le&&jsx("img",{src:wb$1,alt:"arrow",style:{height:12}})]},B.id)}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"left",disableHoverListener:!we,children:jsxs(pn,{sx:{border:"none",opacity:z?.5:1,cursor:z?"not-allowed":"pointer"},onClick:B=>{if(B.stopPropagation(),z)return;let ie=pe(D(p$1)),Le=ie.map(qe=>({...qe,selected:false,menuItems:qe.menuItems?.map($S=>({...$S,selected:false}))}));i?.(true,Le,ie,p$1?.id),x();},children:[jsx(mn,{}),jsxs(Or,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsx("img",{src:fm$1,alt:"",style:{opacity:z?.5:1,width:10,height:10}}),jsx("span",{style:{color:z?"#999":"#1F88D0",fontSize:11,fontWeight:500},children:u("New Custom View")})]}),jsx(yr,{})]})})]})}),f&&C&&_.length>0&&jsx(R,{open:!!C,anchorEl:C,placement:"auto-end",onMouseEnter:g,onMouseLeave:R$1,children:jsxs(My,{children:[jsx(qy,{columns:dn(_),allCurrentSelected:ee,someCurrentSelected:Ie,onSelectAll:_S,onReset:zS,onColumnToggle:te,onNestedItemToggle:ve,anchorEl:C,isModified:Fe}),jsxs(Ly,{children:[jsx(Ky,{variant:"text",onClick:R$1,sx:Ry,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!we,children:jsx(Ky,{variant:"contained",onClick:W,disabled:at,sx:By,children:"Create view"})})]})]})})]})}var fm=um.memo(AE);var Jy=({selectedColumns:e,columnNames:t,allSelected:o,someSelected:n,hoveredColumn:r,anchorEl:i,onReorder:a,onColumnToggle:l,onSubItemToggle:s,onSelectAll:p,onResetToDefault:c,onSubmenuEnter:m,onSubmenuLeave:d,onCancelClose:u})=>{let f=useRef(null),{onDragStart:C$1,onDragEnd:y}=Mp(f),w=useCallback(g=>{if(Qp(g.target)){g.preventDefault();return}C$1();},[C$1]);return jsxs(yy,{children:[jsxs(Iy,{children:[jsx(wp,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(vp,{onClick:g=>{g.stopPropagation(),p();},children:jsx(f$1,{checked:o,indeterminate:n,size:"small",sx:Pp,onChange:g=>{g.stopPropagation(),p();},onClick:g=>{g.stopPropagation();}})}),jsx(Typography,{onClick:g=>{g.stopPropagation(),p();},sx:{flex:1,fontSize:13,fontWeight:500,color:"text.primary",ml:.75,cursor:"pointer"},children:"Select All"}),jsx(Link,{component:"button",type:"button",onClick:g=>{g.stopPropagation(),c();},underline:"none",sx:{fontSize:13,fontWeight:500,cursor:"pointer",color:"common.blue"},children:"Reset to default"})]}),jsx(Box,{sx:{flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto",position:"relative"},children:jsx(Reorder.Group,{ref:f,axis:"y",onReorder:a,values:t,style:{listStyle:"none",padding:0,margin:0},children:e.map(g=>{let x=O(g.name),T=g.menuItems&&g.menuItems.length>0,{checked:I,indeterminate:S}=Sr(g);return jsxs(Reorder.Item,{value:g.name,drag:x?false:"y",dragListener:!x,dragConstraints:f,dragElastic:{top:0,bottom:0,left:0,right:0},transition:{duration:0},whileDrag:{zIndex:9999,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",scale:1},style:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%",willChange:"transform"},onDragStart:w,onDragEnd:y,children:[jsxs(by,{isHovered:r===g.name,isDate:x,onMouseEnter:b=>T&&m(g.name,b.currentTarget),onMouseLeave:()=>T&&d(),onClick:b=>{(b.target.closest('[role="checkbox"]')||b.target.closest('input[type="checkbox"]'))&&b.stopPropagation();},sx:{width:"100%",position:"relative"},children:[jsx(wp,{children:jsx("img",{src:Fb$1,alt:"drag",draggable:false,style:{width:16,height:16,cursor:x?"default":"grab",pointerEvents:"none"}})}),jsx(vp,{onMouseDown:b=>{b.stopPropagation();},onPointerDown:b=>{b.stopPropagation();},children:jsx(f$1,{checked:I,indeterminate:S,onChange:b=>{b.stopPropagation(),l(g.name);},onClick:b=>{b.stopPropagation();},disabled:x,size:"small",sx:Pp})}),jsx(Typography,{sx:{flex:1,fontSize:13,fontWeight:400,color:"text.primary",ml:1},children:g.label||g.name}),T&&jsx(Box,{sx:{display:"flex",alignItems:"center",ml:1,flexShrink:0},children:jsx("img",{src:vb,alt:"arrow",style:{width:12,height:12}})})]}),T&&jsx(Popper,{open:r===g.name,anchorEl:i,placement:"right-start",sx:{zIndex:1e4},modifiers:[{name:"offset",options:{offset:[0,0]}}],children:jsxs(Box,{onMouseEnter:u,onMouseLeave:d,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Ha,{children:g.menuItems?.map((b,v$1)=>jsxs(um.Fragment,{children:[jsx(V,{isSelected:b.selected,isDisabled:x,onClick:()=>{x||s(g.name,b.name);},sx:{fontSize:13},children:b.label||b.name}),v$1<(g.menuItems?.length??0)-1&&jsx(v,{})]},b.name))})]})})]},g.name)})})})]})};function NE({open:e,onClose:t,onCreate:o,availableColumns:n=[],defaultColumns:r=[],editingView:i,onDelete:a,tableViews:l=[],mode:s="sheet",stackOrder:p=1}){let{t:c}=useTranslation(),m=useDragControls(),[d,u]=useState(false),[f,C]=useState(false);useEffect(()=>{e||(u(false),C(false));},[e]),useEffect(()=>{if(!e)return;let z=at=>{at.key==="Escape"&&t();};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[e,t]);let{templateName:y,setTemplateName:w,selectedColumns:g,allSelected:x,someSelected:T,isNameValid:I,hasChanges:S,hoveredColumn:b,anchorEl:v,openSubmenu:A,closeSubmenu:D,cancelClose:M,handleReorder:L,handleColumnToggle:H,handleSubItemToggle:_,handleSelectAll:ee,handleResetToDefault:Ie}=im({open:e,availableColumns:n,defaultColumns:r,editingView:i,tableViews:l}),Fe=async()=>{if(!(!I||!S||f||d)){C(true);try{let z=kp(g,s);await o?.({name:y,selectedColumns:g,layout:z}),t();}catch{console.warn("Failed to create view");}finally{C(false);}}},we=async()=>{if(!i||d||f)return;let z=i.id;u(true);try{await a?.(z),t();}catch{console.warn("Failed to delete view");}finally{u(false);}};return e?jsxs(Py,{role:"dialog","aria-modal":"true","data-testid":"CreateViewDialog",drag:true,dragListener:false,dragControls:m,dragMomentum:false,initial:false,style:{width:450,minWidth:0,maxWidth:"min(100vw - 16px, 450px)",height:600,left:`max(8px, calc(50% - ${450/2}px))`,top:`max(8px, calc(50% - ${600/2}px))`},animate:{zIndex:2+p},transition:{duration:.1},children:[jsx(c$2,{id:"draggable-dialog-title",onPointerDown:z=>m.start(z),style:{cursor:"move",flexShrink:0},children:jsx(d$3,{isHovered:true,title:i?"Edit Custom View":c("createCustomView")||"Create Custom View",leftActions:jsx(a$9,{onClick:t,onPointerDown:z=>z.stopPropagation()})})}),jsxs(Cy,{children:[jsxs(xy,{onScroll:()=>{D();},children:[jsxs(hy,{children:[jsxs(Box,{children:[jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#9F9F9F",lineHeight:"0.7"},children:"Custom"}),jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#20232B",lineHeight:1.2},children:"View"})]}),i&&jsx(wy,{onClick:we,disabled:d||f,children:d?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:"Deleting..."})]}):"Delete View"})]}),jsx(Box,{sx:{mb:3},children:jsx(b$7,{name:"custom-template-name",label:"Template Name",value:y,onChange:z=>w(z),inputProps:{maxLength:20,autoComplete:"off",readOnly:true,"data-form-type":"other",onFocus:z=>z.currentTarget.removeAttribute("readonly")},required:true})}),jsx(Jy,{selectedColumns:dn(g),columnNames:dn(g).map(z=>z.name),allSelected:x,someSelected:T,hoveredColumn:b,anchorEl:v,onReorder:L,onColumnToggle:H,onSubItemToggle:_,onSelectAll:ee,onResetToDefault:Ie,onSubmenuEnter:A,onSubmenuLeave:D,onCancelClose:M})]}),jsx(Sy,{}),jsx(Ty,{children:jsx(vy,{variant:"contained",onClick:Fe,disabled:!I||!S||f||d,title:I?void 0:`Name is required. Current: "${y}"`,children:f?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:i?"Saving...":"Creating..."})]}):i?"Update View":"Create View"})})]})]}):null}var gm=NE;function HE({onViewChange:e,templates:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,tableMode:i="default",lang:a="en",isLoading:l,mainDefaultTemplate:s}){let{t:p$1}=useTranslation(),{defaultColumns:c,defaultTemplate:m,defaultTemplates:d,customViews:u,allTemplates:f,customTemplateCount:C$1}=ja({tableMode:i,templates:t,lang:a,mainDefaultTemplate:s}),{anchorEl:y,isCreateDialogOpen:w,editingView:g,selectedViewInfo:x,shouldUseCurrentState:T,currentViewColumns:I,initialColumnsForCreate:S,availableColumnsForCreate:b$1,handleViewButtonClick:v,handleCloseViewDropdown:A,handleSelectedViewInfo:D,handleOpenCreateDialog:M,handleOpenEditDialog:L,handleCloseCreateDialog:H,handleSaveView:_,handleDeleteView:ee}=qa({mode:i,onViewChange:e,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:c,defaultTemplate:m,allTemplates:f,customTemplateCount:C$1});return jsxs(Fragment,{children:[jsx(CE,{onClickAway:A,children:jsxs(Wa,{sx:{width:"32px"},"data-testid":"ViewsMenu",children:[jsx(p,{title:p$1("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d$1,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"ViewsMenu_button",onClick:v,"aria-label":p$1("tableView")})}),jsx(fm,{open:!!y,anchorEl:y,onClose:A,setSelectedViewInfo:D,selectedViewInfo:x,onCreateCustomView:M,customViews:u,onEditCustomView:L,defaultColumns:c,defaultTemplate:m,defaultTemplates:d,customTemplateCount:C$1,isLoading:l})]})}),jsx(gm,{open:w,onClose:H,availableColumns:b$1?.length?b$1:c,defaultColumns:c,onCreate:_,editingView:g,onDelete:ee,tableViews:T?S??I:void 0,mode:i})]})}var Cm=memo(HE);function xm(e=[]){let[t,o]=useState(false),n=useMemo(()=>e.map(({code:r})=>r),[e]);return {isColumnPickerVisible:t,setIsColumnPickerVisible:o,timezoneCountryCodes:n}}function UE({tableMode:e,onToggle:t}){let o=Va$1(e),n=Wa$1(e);return jsx(b,{variant:"secondary",size:"md",icon:jsx(d$1,{src:n?Kh$1:Jh,alt:`${e}-mode`,sx:{width:14,height:14}}),onClick:t,"aria-label":`${e}-mode`,sx:r=>o?{}:{borderColor:r.v2.palette.brand[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}})}var iI=memo(UE);function Er({children:e,component:t="aside",...o}){return jsx(dy,{component:t,"data-testid":"ListHeaderToolbar",...o,children:e})}function el({display:e,timezone:t,calendar:o,views:n,search:r,slots:i,reportsVisible:a,lang:l}){let{isColumnPickerVisible:s,setIsColumnPickerVisible:p,timezoneCountryCodes:c}=xm(t?.segmentCountries),m=e?.variant==="acceptance",d=n?.tableMode??"default",u=useMemo(()=>n?.onSheetToggle?jsx(iI,{tableMode:d,onToggle:n.onSheetToggle}):null,[d,n?.onSheetToggle]);return jsxs(Er,{children:[i?.leading&&!s&&i.leading,!s&&jsxs(Fragment,{children:[r?.onChange&&jsx(a$a,{onSearchChange:r.onChange,placeholder:r.placeholder}),i?.filter,u&&!m&&u,o&&t&&jsx(a$b,{defaultDate:o.date,onDateChange:f=>{let[C,y]=f;C&&y&&o.onDateChange([C,y]);},mode:o.mode,onCalendarModeSwitch:o.onModeChange,maxDateRange:o.maxRange??31,groupBy:o.groupBy,onCalendarGroupChange:o.onGroupByChange,browserTimezone:t.browserTimezone,defaultCountryTimezone:t.defaultCountryTimezone,timezone:t.timezone,onChangeTimezone:t.onChangeTimezone,timezoneCountriesCodes:c}),a&&i?.reports,u&&m&&u]}),n?.onViewChange&&(n.templates?jsx(Cm,{onViewChange:n.onViewChange,tableMode:d,lang:l,...n.templates}):jsx(cm,{onViewChange:n.onViewChange,setIsViewVisible:p,tableViews:n.columns,setTableViews:n.setColumns,resetTableViews:n.onPresetReset,onTableViewOptionClick:n.onPresetOptionClick})),i?.trailing&&!s&&i.trailing]})}function ZE({title:e,display:t,lang:o,reportsVisible:n,timezone:r,calendar:i,status:a,activeFilter:l,views:s,search:p,slots:c,children:m}){let d=zc(useId(),"list-header"),u=useMemo(()=>jsx(el,{display:t,timezone:r,calendar:i,views:s,search:p,slots:c,reportsVisible:n,lang:o}),[t,r,i,s,p,c,n,o]);return jsxs(Na,{id:d,"data-testid":ay,children:[t?.maximized&&jsx(Fa,{title:e,toolbar:u}),jsxs(my,{as:"section",children:[jsx(Va,{status:a,activeFilter:l,beforeStatus:c?.beforeStatus}),!t?.maximized&&u]}),m]})}var sI=memo(ZE);var mI=styled(Or,{shouldForwardProp:e=>e!=="maximized"})(({theme:e,maximized:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),overflow:"hidden",height:t?"4.75rem":"4.1875rem",paddingBottom:t?"0rem":"1.2rem",paddingInline:e.spacing(4),paddingTop:t?"1.35rem":e.spacing(.5)})),QE=wa(),cI=styled(j$1,{shouldForwardProp:e=>e!=="title"&&e!=="isDropdown"})(({title:e,isDropdown:t,theme:o})=>{let{base:n}=o.v2.palette;return {position:"relative",fontWeight:o.typography.fontWeightMedium,padding:o.spacing(1),color:n.black,fontSize:"11px",lineHeight:"15px",borderRadius:o.shape.borderRadius,transition:o.transitions.create(["backgroundColor","boxShadow"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.complex}),whiteSpace:"nowrap",textTransform:"capitalize","&:hover, &.active":{...!t&&{backgroundColor:n.white,boxShadow:o.shadows[2]},cursor:"pointer",position:"relative",color:"transparent","&:after":{...e&&{content:`"${e}"`},color:n.black,fontWeight:o.v2.typography.fontWeightBold,overflow:"hidden",position:"absolute",top:0,bottom:0,right:0,left:0,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",letterSpacing:QE==="safari"?"-1px":"",padding:8,borderRadius:o.shape.borderRadius}}}});function nM({isDropdown:e=false,name:t,code:o,activeCode:n,navigateToMenuItem:r,onClickServiceItem:i}){let[a,l]=useState(null),{t:s}=useTranslation(),p=!!a,c=()=>{l(null);};return jsxs(Fragment,{children:[jsx(cI,{isDropdown:e,className:n.toLowerCase()===o.toLowerCase()?"active":"",onClick:m=>{m.preventDefault(),m.stopPropagation(),r(o);},title:t,onContextMenu:m=>{m.preventDefault(),m.stopPropagation(),c(),l(m.currentTarget);},children:t}),jsx(f,{open:p,anchorEl:a,onClose:c,menuItems:[{label:s("openNewWindow"),name:"new",icon:jsx("img",{src:hb$1,alt:"new-window-icon"}),onClick:m=>{m.stopPropagation(),i?.(o),c();}}]})]})}var dI=memo(nM);var uM=e$1=>jsx(e,{src:e$1.className.includes("MuiSelect-iconOpen")?Wc:Vc,alt:"dropdown"});function fM({isMaximized:e,serviceCode:t,dimensions:o,services:n,onChangeServiceCode:r,onClickServiceItem:i}){let a=zc(useId(),"app-services"),[l,s]=useState(0),[p,c]=useState(false),[m,d]=useState(""),u=useRef(null),[f,C]=um.useState(false),{i18n:y}=useTranslation(),w=S=>{d(S.target.value);},g=()=>{C(S=>!S);},x=useMemo(()=>ac$1(n.filter(S=>S.code.toLowerCase()===decodeURIComponent(t).toLowerCase())?.[0]?.name,y.language),[n,y.language,t]);useEffect(()=>{d(x);},[x]),useEffect(()=>{s(u.current?.offsetWidth+51+8+3);},[]),useEffect(()=>{c(Number(o?.width)<l+10);},[o?.width,l]);let T=S=>{r?.(S),C(false);},I=S=>jsx(c$3,{children:S});return jsxs(mI,{id:a,"data-testid":"AppServices",maximized:e,children:[!!n?.length&&!p&&jsx(Box,{ref:u,display:"flex",gap:"8px",flexDirection:"row",sx:{userSelect:"none"},children:n.map((S,b)=>jsx(dI,{activeCode:t,onClickServiceItem:i,navigateToMenuItem:T,name:ac$1(S.name,y.language)||"",code:S.code},`service-item-${S.code}-${b}`))}),!!n?.length&&p&&jsx(a$6,{open:f,onClick:g,displayEmpty:true,inputProps:{"aria-label":"Without label"},MenuProps:{anchorOrigin:{vertical:40,horizontal:83},PaperProps:{style:{borderRadius:"0.25rem",width:"10.43rem",padding:0}},MenuListProps:{disablePadding:true}},value:m,IconComponent:uM,onChange:w,renderValue:I,sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},children:n.map((S,b)=>ac$1(S.name,y.language)?.toLowerCase()===m?.toLowerCase()?null:jsx(b$3,{value:ac$1(S.name,y.language),onClick:v=>{v.preventDefault(),v.stopPropagation(),T(S.code);},children:jsx(d$2,{children:ac$1(S.name,y.language)})},`option-${S.code}-${b}`))})]})}var uI=memo(fM);var Sm=uI;function IM({appCode:e,services:t,isMaximized:o,dimensions:n,serviceCode:r,ui:{onStartDrag:i},onChangeServiceCode:a,onClickServiceItem:l,sx:s}){let p=zc(useId(),"app-services-bar"),[c,m]=useState(false),d=useCallback(f=>{i?.(f),m(true);},[i,m]),u=()=>{m(false);};return !e||!t?.length?null:jsx(b$4,{id:p,"data-testid":"AppServicesBar",onPointerDown:d,onPointerUp:u,isDragging:c,sx:s,children:jsx(Sm,{onClickServiceItem:l,dimensions:{width:n.width},serviceCode:r,services:t,isMaximized:o,onChangeServiceCode:a})})}var gI=memo(IM);var bM=gI;var CI=({width:e,height:t})=>jsx(r,{variant:"circular",width:e,height:t});function PM({data:e,isError:t,isLoading:o,width:n=24,height:r=24,fallbackIconUrl:i=Rd,...a}){let l=zc(useId(),"brand-logo"),s=useTheme(),p=useMemo(()=>e?.type?.includes("application/pdf"),[e]),c=useMemo(()=>e?(window.URL?URL:webkitURL).createObjectURL(e):"",[e]),m=useMemo(()=>t||!e?i:p?We:c,[e,t,p,c,i]);return o?jsx(CI,{width:n,height:r}):jsx(d$1,{id:l,"data-testid":"BrandLogo",alt:"brand",src:m,sx:{borderRadius:"50%",backgroundColor:s.palette.common.white,width:n,height:r,objectFit:p?"none":"contain",...a.sx}})}var wm=memo(PM);var yI=styled(wm)(({theme:e})=>({filter:"drop-shadow(0px 0px 28px rgba(0, 0, 0, 0.09))",borderRadius:"50%",backgroundColor:e.palette.common.white})),II=styled(Or)(()=>({display:"flex",alignItems:"center",justifyContent:"center"}));function SI({data:e,width:t=51,height:o=51,...n}){let r=zc(useId(),"merchant-logo");return jsx(II,{id:r,"data-testid":"MerchantLogo",width:t,height:o,children:jsx(yI,{data:e,width:t,height:o,...n})})}var wI=styled(Or,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,minHeight:32,minWidth:30,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:e.palette.common.white,":hover":{opacity:.7},...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`,border:`1px solid ${e.palette.info.dark}`,backgroundColor:`${e.palette.info.dark}0D`,gap:"6px",padding:"0 8px"}})),vI=styled(Or)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:14,height:14,borderRadius:"50%",background:e.palette.background.gradient.shadedBlue,color:e.palette.common.white,fontSize:"8px",fontWeight:700,lineHeight:"14px",flexShrink:0})),PI=styled(Or)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"2px","& img":{width:14,height:14}})),AI=styled(MM)(({theme:e})=>({marginTop:e.spacing(1),marginBottom:e.spacing(1),minWidth:193,"& .MuiPaper-root":{borderRadius:e.spacing(.5),"&>.MuiList-root":{padding:0}}})),EI=styled(j$1)(({theme:e})=>{let{grey:t}=e.v2.palette;return {fontWeight:e.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:t[500],paddingInlineStart:e.v2.spacing(16),paddingTop:e.v2.spacing(8),paddingBottom:e.v2.spacing(8),paddingInlineEnd:e.v2.spacing(8),borderBottom:`1px solid ${t[100]}`,display:"block"}}),vm=styled(Or)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",backgroundColor:e.palette.common.white,borderTop:`1px solid ${e.palette.divider}`})),Pm=styled(Ky)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.info.dark}`,backgroundColor:e.palette.info.dark,fontWeight:700,fontSize:"11px",color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{color:"#fff !important",opacity:.5}})),Am=styled(Ky)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,fontWeight:500,fontSize:"11px",color:e.palette.text.primary,"&:hover":{background:"transparent"}}));var Em=createContext(null);function RM(){let e=useContext(Em);if(!e)throw new Error("useFilterDropdown must be used inside a FilterDropdown");return e}function DI({onConfirm:e,onCancel:t,isOkayButDisabled:o,children:n,isDisabled:r,icon:i,title:a,menuStyle:l,hideTitle:s=false,hideFooter:p=false,activeFiltersCount:c,onClearFilters:m,renderButton:d,onOpenChange:u,menuProps:f,...C}){let y=zc(useId(),"filter-dropdown"),[w,g]=useState(null),x=!!w,{t:T}=useTranslation(),I=()=>{g(null),u?.(false);},S=M=>{if(!r){if(!x){g(M.currentTarget),u?.(true);return}I();}},b=()=>{x&&(t?.(),I());},v=()=>{e?.(),I();},A=typeof c=="number"&&c>0,D=M=>{M.stopPropagation(),m?.();};return jsx(Em.Provider,{value:{onConfirm:v,onCancel:b,onClose:I},children:jsx(CE,{onClickAway:b,children:jsxs(Or,{id:y,"data-testid":"FilterDropdown",...C,children:[jsx(wI,{className:"filter-button",isActive:x||A,onClick:S,sx:{...r&&{pointerEvents:"none",opacity:.5,...C.sx}},children:d??jsxs(Fragment,{children:[jsx(Or,{component:"img",src:i??$j,alt:"filter"}),A&&jsxs(Fragment,{children:[jsx(vI,{children:c}),jsx(PI,{onClick:D,"aria-label":"clear filters",children:jsx(Or,{component:"img",src:Eb,alt:"clear"})})]})]})}),jsxs(AI,{anchorEl:w,open:x,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{marginTop:"8px",marginBottom:"8px",width:193,...l},...f,children:[!s&&jsx(EI,{component:"span",children:a??T("filterBy")}),n,!p&&jsxs(vm,{children:[jsx(Am,{onClick:b,children:T("cancel")}),jsx(Pm,{disabled:o,onClick:v,children:T("okay")})]})]}),x&&jsx(a$5,{onClick:I})]})})})}var LI=styled(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),RI=styled(Or)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),BI=styled(Or)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),kI=styled(Or)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"178px"}));function Rm({brand:e,merchantsIds:t,onChangeMerchant:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,anchorEl:i}){let[a,l]=useState(""),s=!!i,p=useCallback(w=>t.includes(w),[t]),c=(w,g)=>{if(w.stopPropagation(),p(g)){o?.(t.filter(T=>T!==g));return}let x=[...new Set([...t,g])];o?.(x);},m=w=>t.length===1&&t[0]===w&&n,d=w=>{l(w);},u=()=>{l("");},f=useMemo(()=>e.merchants??[],[e.merchants]),C=useMemo(()=>{if(!a?.trim())return f;let w=a.trim().toLowerCase();return f?.filter(g=>(g?.display_name??"").toLowerCase().includes(w)||(g?.legacy_id??"").toLowerCase().includes(w))},[a,f]),y=useMemo(()=>r?C:f,[C,f,r]);return jsxs(R,{open:s,anchorEl:i,placement:"right-start",children:[r&&f.length>1&&jsx(Or,{sx:{p:"8px"},children:jsx(b$5,{fullWidth:true,placeholder:"Merchants",name:"merchants",value:a,onChange:w=>d(w.target.value),onClear:u})}),y?.map(w=>jsx(LI,{isDisabled:m(w.legacy_id),isSelected:p(w.legacy_id),onClick:g=>{m(w.legacy_id)||c(g,w.legacy_id);},sx:{maxHeight:36,minHeight:36},children:jsxs(RI,{children:[jsx(kI,{component:"span",children:w.display_name}),jsx(BI,{component:"span",children:w.legacy_id})]})},w?.legacy_id))]})}var nl=Rm;var FI=styled(Or)(()=>({display:"flex",gap:"4px",alignItems:"center",flex:1,marginInlineEnd:"8px"}));function Nm({brand:e,merchantsIds:t,isDisabled:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,renderBrandLogo:i,onChangeMerchant:a}){let[l,s]=useState(null),p=!!l,c=y=>{s(y.currentTarget);},m=()=>{s(null);},d=useMemo(()=>e.merchants?.filter(y=>t.includes(y.legacy_id)),[t,e.merchants]),u=useMemo(()=>d?.length===e.merchants?.length,[d?.length,e.merchants?.length]),f=useMemo(()=>!u&&d.length>0,[u,d]),C=y=>{if(y.stopPropagation(),u){a?.(t.filter(w=>!e.merchants.some(({legacy_id:g})=>w===g)));return}if(f){let w=[...new Set([...t,...d.map(({legacy_id:g})=>g)])];a?.(w);return}a?.([...t,...e.merchants.map(({legacy_id:w})=>w)]);};return jsxs(V,{isSelected:u,isIndeterminate:f,onMouseEnter:c,onMouseLeave:m,onClick:y=>{o||C(y);},isDisabled:o,sx:{maxHeight:35,minHeight:35,...p&&{boxShadow:"0px 0px 16px 0px #00000021"}},children:[jsxs(FI,{children:[i?.(e.logo),jsx(j$1,{sx:{fontSize:"11px"},children:ac$1(e.name)})]}),e.merchants?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(nl,{anchorEl:l,brand:e,merchantsIds:t,onChangeMerchant:a,atLeastOneMerchantSelected:n,showSearchInput:r})]})}var WI=Nm;function Fm({brands:e,isLoading:t,onFilterChange:o,merchantsIds:n=[],atLeastOneMerchantSelected:r=false,showSearchInput:i=false,hideCheckbox:a=false,renderBrandLogo:l}){let[s,p]=useState(null),[c,m]=useState(""),d=!!s,{t:u}=useTranslation(),f=A=>{p(A.currentTarget);},C=()=>{p(null);},y=useMemo(()=>e.length?e.every(A=>A.merchants?.every(({legacy_id:D})=>n.includes(D))):false,[n,e,a]),w=useMemo(()=>!y&&n.length>0,[n,y]),g=useMemo(()=>e.filter(A=>A.merchants?.some(D=>n?.includes(D.legacy_id))).length,[e,n]),x=()=>{if(y&&!r){o?.([]);return}let A=e.flatMap(D=>D.merchants?.map(({legacy_id:M})=>M));o?.(A);},T=t||!e?.length,I=A=>{m(A);},S=()=>{m("");},b=useMemo(()=>{if(!c.trim())return e;let A=c.trim().toLowerCase();return e.filter(D=>ac$1(D.name)?.toLowerCase()?.includes(A)||D.merchants?.some(M=>M.legacy_id?.toLowerCase().includes(A)))},[c,e]),v=useMemo(()=>i?b:e,[e,b,i]);return jsxs(V,{isDisabled:T,isSelected:y,startAdornment:a?null:void 0,isIndeterminate:w,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...d&&{boxShadow:"0px 0px 16px 0px #00000021"},...T&&{pointerEvents:"none",opacity:.5,cursor:"default"}},onMouseEnter:f,onMouseLeave:C,onClick:x,children:[jsx(j$1,{sx:{fontSize:"11px",flex:1},children:u("merchant")}),e.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),e?.length===1?jsx(nl,{anchorEl:s,brand:e[0],merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i}):jsxs(R,{open:d,anchorEl:s,placement:"right-start",children:[i&&e.length>1&&jsx(Or,{sx:{p:"8px"},children:jsx(b$5,{id:"merchants-search-input",fullWidth:true,placeholder:"Brands",name:"brands",value:c,onChange:A=>I(A.target.value),onClear:S})}),v?.map(A=>jsx(WI,{isDisabled:g===1&&r,brand:A,merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i,renderBrandLogo:l},A.id))]})]})}var _I=styled(Or)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"164px"}));function JM({retailersIds:e=[],isLoading:t,retailers:o=[],onFilterChange:n,atLeastOneRetailerSelected:r=false,showSearchInput:i=false,hideCheckbox:a=false}){let[l,s]=useState(null),p=!!l,{t:c,i18n:m}=useTranslation(),[d,u]=useState(""),f=M=>{s(M.currentTarget);},C=()=>{s(null);},y=useCallback(M=>e?.includes(M),[e]),w=useMemo(()=>o.length?o.every(M=>y(M.id)):false,[o,y,a]),g=useMemo(()=>!w&&e.length>0,[e,w]),x=()=>{if(w&&!r){n?.([]);return}n?.(o.map(M=>M.id));},T=M=>e.length===1&&e[0]===M&&r,I=(M,L)=>{if(M.stopPropagation(),T(L))return;if(y(L)){n?.(e.filter(_=>_!==L));return}let H=[...new Set([...e,L])];n?.(H);},S=t||!o?.length,b=M=>{u(M);},v=()=>{u("");},A=useMemo(()=>d?.trim()?o?.filter(M=>(M?.brand?.name?.[m.language]??M?.brand?.name?.en??"").toLowerCase().includes(d.trim().toLowerCase())):o,[d,o,m.language]),D=useMemo(()=>i?A:o,[A,o,i]);return jsxs(V,{isDisabled:S,isSelected:w,startAdornment:a?null:void 0,isIndeterminate:g,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...p&&{boxShadow:"0px 0px 16px 0px #00000021"},...S&&{opacity:.5,pointerEvents:"none",cursor:"default"}},onMouseEnter:f,onMouseLeave:C,onClick:x,children:[jsx(j$1,{sx:{fontSize:"11px",flex:1},children:c("retailers")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsxs(R,{open:p,anchorEl:l,placement:"right-start",sx:{height:300,width:200,overflow:"auto"},children:[i&&jsx(Or,{sx:{p:"8px"},children:jsx(b$5,{id:"retailers-search-field",fullWidth:true,placeholder:"Retailers",name:"retailers",value:d,onChange:M=>b(M.target.value),onClear:v})}),D?.map((M,L)=>jsx(V,{isSelected:y(M.id),isDisabled:t||T(M.id),onClick:H=>{I(H,M.id);},sx:{maxHeight:35,minHeight:35},children:jsx(_I,{children:M?.brand?.name?.[m.language]??M?.brand?.name?.en})},`key-${M?.id}-${L}`))]})]})}var UI=memo(JM);function nD({countriesIds:e=[],isLoading:t,countries:o=[],onFilterChange:n,atLeastOneCountrySelected:r=false,hideCheckbox:i=false}){let[a,l]=useState(null),s=!!a,{t:p}=useTranslation(),c=x=>{s||l(x.currentTarget);},m=()=>{s&&l(null);},d=useCallback(x=>e?.includes(x),[e]),u=useMemo(()=>o.length?o.every(x=>d(x)):false,[o,d]),f=useMemo(()=>!u&&e.length>0,[e,u]),C=()=>{if(!r){if(u){n?.([]);return}n?.(o);}},y=x=>e.length===1&&e[0]===x&&r,w=(x,T)=>{if(x.stopPropagation(),y(T))return;if(d(T)){n?.(e.filter(S=>S!==T));return}let I=[...new Set([...e,T])];n?.(I);},g=t||o?.length<=0||r;return jsxs(V,{isDisabled:g,isSelected:u,startAdornment:i?null:void 0,isIndeterminate:f,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:c,onMouseLeave:m,onClick:C,children:[jsx(j$1,{sx:{fontSize:"11px",flex:1},children:p("walletCountry")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:a,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((x,T)=>jsxs(V,{isSelected:d(x),isDisabled:t||y(x),onClick:I=>{w(I,x);},sx:{maxHeight:35,minHeight:35},children:[jsx(a$4,{countryCode:x}),jsx(j$1,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:La(x)})]},`key-${x}-${T}`))})]})}var jI=memo(nD);function sD({currenciesIds:e=[],isLoading:t,currencies:o=[],onFilterChange:n,atLeastOneCurrencySelected:r=false,hideCheckbox:i=false}){let[a,l]=useState(null),s=!!a,{t:p}=useTranslation(),c=x=>{s||l(x.currentTarget);},m=()=>{s&&l(null);},d=useCallback(x=>e?.includes(x),[e]),u=useMemo(()=>o.length?o.every(x=>d(x)):false,[o,d]),f=useMemo(()=>!u&&e.length>0,[e,u]),C=()=>{if(!r){if(u){n?.([]);return}n?.(o);}},y=x=>e.length===1&&e[0]===x&&r,w=(x,T)=>{if(x.stopPropagation(),y(T))return;if(d(T)){n?.(e.filter(S=>S!==T));return}let I=[...new Set([...e,T])];n?.(I);},g=t||o?.length<=0||r;return jsxs(V,{isDisabled:g,isSelected:u,startAdornment:i?null:void 0,isIndeterminate:f,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:c,onMouseLeave:m,onClick:C,children:[jsx(j$1,{sx:{fontSize:"11px",flex:1},children:p("currency")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:a,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((x,T)=>oo[x]?.country?jsxs(V,{isSelected:d(x),isDisabled:t||y(x),onClick:S=>{w(S,x);},sx:{maxHeight:35,minHeight:35},children:[jsx(a$4,{countryCode:oo[x].country})," ",jsx(j$1,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:x})]},`key-${x}-${T}`):null)})]})}var XI=memo(sD);var pD=(r=>(r.BRAND="BRAND",r.COUNTRY="COUNTRY",r.ENTITY="ENTITY",r.MERCHANT="MERCHANT",r))(pD||{});var mD="/",Nr=5,ZI=(...e)=>e.join(mD),Vm=e=>[e.label,e.id],JI=(e,t)=>{if(e.levelKey==="MERCHANT")return e.id.toLowerCase().includes(t)?e:null;let o=(e.children??[]).map(i=>JI(i,t)).filter(i=>i!==null);if(!o.length)return null;let{searchProps:n,...r}=e;return {...r,children:o,...o.length>=Nr&&{searchProps:n}}},QI=(e,t,o)=>{let n=e.map(r=>{let i=r.entities??[],l=Array.from(new Set(i.map(s=>s.country).filter(Boolean))).map(s=>{let c=i.filter(m=>m.country===s).map(m=>{let u=(m.merchants??[]).map(f=>({id:f.legacy_id,label:f.display_name,levelKey:"MERCHANT",status:t.includes(f.legacy_id)?"CHECKED":"UNCHECKED",hintText:f.legacy_id}));return {id:ZI(r.id,s,m.id),label:ac$1(m.legal_name,o)??m.id,levelKey:"ENTITY",children:u,header:"Merchants",...u.length>=Nr&&{searchProps:{getValues:Vm}}}});return {id:ZI(r.id,s),label:La(s)??s,levelKey:"COUNTRY",children:c,header:"Entities",iconComponent:jsx(a$4,{countryCode:s,width:14}),...c.length>=Nr&&{searchProps:{getValues:Vm}}}});return {id:r.id,label:ac$1(r.name,o)??r.id,levelKey:"BRAND",children:l,header:"Countries",icon:{fileId:r.logo},...l.length>=Nr&&{searchProps:{getValues:Vm}}}});return {levelKey:"BRAND",children:n,header:"Brands",...n.length>=Nr&&{searchProps:{filterItem:(r,i)=>(typeof r.label=="string"?r.label.toLowerCase():"").includes(i)?r:JI(r,i)}}}};var CD=e=>{let{brands:t,isLoading:o,initialValue:n,onFilterChange:r,BrandLogoComponent:i,hideCheckbox:a}=e,[l,s]=useState(null),[p,c]=useState("UNCHECKED"),m=useRef(null),d=!!l,{t:u,i18n:f}=useTranslation(),C=useMemo(()=>QI(t,n,f.language),[t,n,f.language]),y=C.children??[],w=o||!y.length,g=useCallback(S=>{let b=S.filter(A=>A.status==="CHECKED"),v=S.filter(A=>A.status==="INDETERMINATE");return b.length===y.length?"CHECKED":v.length>0||b.length>0?"INDETERMINATE":"UNCHECKED"},[y]),x=useCallback(({selectedTree:S})=>{c(g(S));},[g]),T=useCallback(S=>{c(g(S));let b=b$b.filterNodesByLevelKey(S,"MERCHANT").map(({id:v})=>v);r?.(b);},[r,g]),I=useCallback(()=>{m.current?.toggleAll(p!=="CHECKED");},[p]);return jsxs(V,{startAdornment:a?null:void 0,isSelected:p==="CHECKED",isIndeterminate:p==="INDETERMINATE",isDisabled:w,onMouseEnter:S=>s(S.currentTarget),onMouseLeave:()=>s(null),onClick:I,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...d&&{boxShadow:"0px 0px 16px 0px #00000021"},...w&&{pointerEvents:"none",opacity:.5,cursor:"default"}},children:[jsx(j$1,{sx:{fontSize:"11px",flex:1},children:u("merchant")}),t.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),!o&&jsx(c$6,{ref:m,placement:"right-start",anchorEl:l,exposeOnlySelectedTree:true,treeDefinition:C,onChange:T,onMounted:x,IconComponent:i})]})},tb=CD;var hD=tb;function ob({onPhoneChange:e,onCountryChange:t,selectedPhone:o,selectedCountry:n,countriesOptions:r,isCountriesLoading:i}){let a=zc(useId(),"phone-filter");return jsx(b$c,{id:a,"data-testid":"ColumnFilterInputs_PhoneInput",phoneValue:o,onPhoneChange:l=>{e(l);},countryValue:n,onCountryChange:l=>{t(l?.countryId);},countries:r||[],isCountriesLoading:i||false,error:false,disabled:i,placeholder:"User Mobile",sx:{"&.MuiInputBase-root":{paddingLeft:"0px !important"}}})}var rb=styled(Or)(()=>({position:"relative",flexGrow:0})),ib=styled(Or)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,display:"flex",padding:e.spacing(1),gap:e.spacing(1),border:`1px solid ${e.palette.divider}`,borderRadius:"4px",backgroundColor:e.palette.common.white,alignItems:"center",height:32,textTransform:"capitalize",cursor:"pointer"})),ab=styled(t)(({theme:e})=>({width:16,height:16,cursor:"pointer",fontSize:"5.667px",color:e.palette.common.white,fontWeight:500,border:`1px solid ${e.palette.common.white}`}));var lb=styled(Or)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",alignItems:"center",borderRadius:"4px",height:"40px"}));styled(Or)(()=>({display:"flex",alignItems:"center"}));var Gt=styled(Or)(({theme:e})=>({padding:"8px",display:"flex",flexDirection:"column",gap:"8px",position:"relative",background:e.palette.common.white,borderRadius:"4px",width:"max-content",maxWidth:230,boxShadow:e.shadows[3]})),In=styled(Ky)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",textTransform:"capitalize",padding:"8px 13px",minWidth:89,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,color:e.palette.common.white,textAlign:"center","&.Mui-disabled":{backgroundColor:alpha(e.palette.grey[700],.5),color:e.palette.common.white,cursor:"not-allowed"},"&:hover":{background:e.palette.info.dark}})),he=styled(L,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),sb=styled(L,{shouldForwardProp:e=>e!=="error"})(({error:e})=>({flexGrow:1,maxWidth:"100%",img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),le=styled(a$1)(()=>({borderTopLeftRadius:0,borderTopRightRadius:0,height:25}));var pb=ye.object().shape({email:ye.string().matches(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,"invalidEmail").required("requiredEmail"),firstName:ye.string().required("requiredFirstName").min(3,"invalidFirstName"),lastName:ye.string().required("requiredLastName").min(3,"invalidLastName")}),al=e=>ye.object().shape({email:ye.string().transform((t,o)=>{if(o!=="")return t}).matches(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{1,}$/i,"invalidEmail").optional(),phoneNumber:ye.string().transform((t,o)=>{if(o)return t}).length(e,"invalidMobile").optional(),firstName:ye.string().min(3,"invalidFirstName").required("requiredFirstName"),lastName:ye.string().min(3,"invalidLastName").required("requiredLastName")}).test("atLeastOne","atLeastOne",function(o,n){let{email:r,phoneNumber:i}=this.originalValue??{};return !r&&!i?n.createError({message:"atLeastOne"}):true}),mb=e=>ye.object().shape({firstName:ye.string().required("requiredFirstName").min(3,"invalidFirstName"),lastName:ye.string().required("requiredLastName").min(3,"invalidLastName"),phoneNumber:ye.string().length(e,"invalidMobile").required("requiredMobile")});function ED({customer:e,country:t,defaultCountry:o,countries:n,isCountriesLoading:r,onCustomerChange:i,onCountryChange:a,isCustomerNotValid:l}){let s=zc(useId(),"customer-full-info"),p=useRef(),c=useRef(),m=useRef(),d=useRef(),{t:u}=useTranslation(),{control:f,watch:C,formState:{errors:y,isValid:w}}=useForm({mode:"onChange",resolver:yupResolver(al(t.max_digits)),defaultValues:{firstName:e.firstName,email:e.email,lastName:e.lastName,phoneNumber:e.phoneNumber}});useEffect(()=>{C(({firstName:T="",lastName:I="",email:S="",phoneNumber:b=""})=>{i({firstName:T,lastName:I,email:S,phoneNumber:b});});},[C,y,e]);let g=useCallback(()=>y.firstName?.message??y.lastName?.message??y.email?.message??y.phoneNumber?.message,[y]);return useEffect(()=>{l?.(!w,g());},[w,g]),jsxs(Gt,{id:s,"data-testid":"CustomerFullInfo",onMouseLeave:T=>{T.stopPropagation();},children:[jsx(Controller,{control:f,name:"firstName",render:({field:{ref:T,...I},fieldState:{error:S}})=>jsxs(Or,{ref:p,children:[jsx(he,{...I,placeholder:u("firstName"),inputProps:{autoComplete:"off"},error:!!S?.message}),S?.message&&jsx(le,{error:u(S.message)})]})},"fullInfoFirstName"),jsx(Controller,{control:f,name:"lastName",render:({field:{ref:T,...I},fieldState:{error:S}})=>jsxs(Or,{ref:c,children:[jsx(he,{...I,placeholder:u("lastName"),inputProps:{autoComplete:"off"},error:!!S?.message}),S?.message&&jsx(le,{error:u(S.message)})]})},"fullInfoLastName"),jsx(Controller,{control:f,name:"email",render:({field:{ref:T,...I},fieldState:{error:S}})=>jsxs(Or,{ref:m,children:[jsx(he,{...I,placeholder:u("email"),inputProps:{autoComplete:"off"},error:!!S?.message}),S?.message&&jsx(le,{error:u(S.message)})]})},"fullInfoEmail"),jsx(Controller,{control:f,name:"phoneNumber",render:({field:{ref:T,...I},fieldState:{error:S}})=>jsxs(Or,{ref:d,children:[jsxs(lb,{sx:{...S?.message&&{borderBottom:"none"}},children:[jsx(c$1,{defaultCountry:t?.iso2??o?.code??"SA",value:t,onChangeCountry:a,countries:n,isLoading:r}),jsx(sb,{...I,type:"number",placeholder:u("mobile"),inputProps:{autoComplete:"off"},error:!!S?.message,sx:{border:"none",paddingInlineEnd:0},hideArrows:true,disableFocusRing:true})]}),S?.message&&jsx(le,{error:u(S.message,{numberLen:t.max_digits})})]})},"fullInfoPhoneNumber")]})}var db=ED;function ND({...e}){let t=zc(useId(),"customer-dropdown"),[o,n]=useState(null),{firstName:r,lastName:i}=e.customer,{t:a}=useTranslation(),l=!!o,s=m=>{l||n(m.currentTarget);},p=()=>{l&&n(null);},c=useMemo(()=>Aa(),[]);return jsxs(rb,{id:t,"data-testid":"CustomerDropdown",sx:{...e.isDisabled&&{pointerEvents:"none",opacity:.7}},children:[jsxs(ib,{onClick:s,children:[(!r||!i)&&jsxs(Fragment,{children:[jsx("img",{src:vj,alt:"c"}),jsx("span",{children:a("customer")})]}),r&&i&&jsxs(Fragment,{children:[jsx(ab,{src:"#",alt:"a",sx:{background:c},children:`${r[0]?.toUpperCase()}${i[0]?.toUpperCase()||""}`}),`${r} ${i}`]})]}),l&&jsx(a$5,{onClick:p}),jsx(cE,{open:l,anchorEl:o,placement:"bottom-start",children:jsx(db,{...e})})]})}var fb=memo(ND);function _D({submitButtonText:e,onSubmit:t,customer:o,isItemsNotValid:n,items:r,onCustomerChange:i}){let a=zc(useId(),"customer-email-form"),l=useRef(),s=useRef(),p=useRef(),{t:c}=useTranslation(),{control:m,formState:{isValid:d,errors:u},watch:f,trigger:C}=useForm({mode:"onChange",resolver:yupResolver(pb),defaultValues:{firstName:o.firstName,email:o.email,lastName:o.lastName}});return useEffect(()=>{o.firstName&&o.email&&o.lastName&&C();},[]),useEffect(()=>{f(({firstName:w="",lastName:g="",email:x=""})=>{i({...o,email:x,firstName:w,lastName:g});});},[f,u,o]),jsxs(Gt,{id:a,"data-testid":"CustomerEmailForm",onMouseLeave:w=>{w.stopPropagation();},children:[jsx(Controller,{control:m,name:"email",render:({field:{ref:w,...g},fieldState:{error:x}})=>jsxs(Or,{ref:p,children:[jsx(he,{...g,"data-testid":"EmailForm_email",placeholder:c("email"),inputProps:{autoComplete:"off",form:{autoComplete:"off"}},error:!!x?.message}),x?.message&&jsx(le,{error:c(x.message)})]})}),jsx(Controller,{control:m,name:"firstName",render:({field:{ref:w,...g},fieldState:{error:x}})=>jsxs(Or,{ref:l,children:[jsx(he,{...g,"data-testid":"EmailForm_firstName",placeholder:c("firstName"),inputProps:{autoComplete:"off",form:{autoComplete:"off"}},error:!!x?.message}),x?.message&&jsx(le,{error:c(x.message)})]})}),jsx(Controller,{control:m,name:"lastName",render:({field:{ref:w,...g},fieldState:{error:x}})=>jsxs(Or,{ref:s,children:[jsx(he,{...g,"data-testid":"EmailForm_lastName",placeholder:c("lastName"),inputProps:{autoComplete:"off",form:{autoComplete:"off"}},error:!!x?.message}),x?.message&&jsx(le,{error:c(x.message)})]})}),jsx(In,{type:"button","data-testid":"EmailForm_submit",onClick:t,disabled:!d||n||!r.length,children:e})]})}var Cb=memo(_D);function YD({submitButtonText:e,onSubmit:t,customer:o,country:n,items:r,isItemsNotValid:i,defaultCountry:a,countries:l,isCountriesLoading:s,onCustomerChange:p,onCountryChange:c}){let m=useRef(),d=useRef(),u=useRef(),f=useRef(),{t:C}=useTranslation(),{control:y,watch:w,trigger:g,formState:{isValid:x,errors:T}}=useForm({mode:"onChange",resolver:yupResolver(al(n.max_digits)),defaultValues:{firstName:o.firstName,email:o.email,lastName:o.lastName,phoneNumber:o.phoneNumber}});return useEffect(()=>{w(({firstName:I="",lastName:S="",email:b="",phoneNumber:v=""})=>{p({email:b,firstName:I,lastName:S,phoneNumber:v});});},[w,T,o]),useEffect(()=>{o.firstName&&o.lastName&&(o.email||o.phoneNumber)&&g();},[]),jsxs(Gt,{onMouseLeave:I=>{I.stopPropagation();},children:[jsx(Controller,{control:y,name:"firstName",render:({field:{ref:I,...S},fieldState:{error:b}})=>jsxs(Or,{ref:m,children:[jsx(he,{...S,placeholder:C("firstName"),inputProps:{autoComplete:"off"},error:!!b?.message}),b?.message&&jsx(le,{error:C(b.message)})]})},"fullInfoFormFirstName"),jsx(Controller,{control:y,name:"lastName",render:({field:{ref:I,...S},fieldState:{error:b}})=>jsxs(Or,{ref:d,children:[jsx(he,{...S,placeholder:C("lastName"),inputProps:{autoComplete:"off"},error:!!b?.message}),b?.message&&jsx(le,{error:C(b.message)})]})},"fullInfoFormLastName"),jsx(Controller,{control:y,name:"email",render:({field:{ref:I,...S},fieldState:{error:b}})=>jsxs(Or,{ref:u,children:[jsx(he,{...S,placeholder:C("email"),inputProps:{autoComplete:"off"},error:!!b?.message}),b?.message&&jsx(le,{error:C(b.message)})]})},"fullInfoFormEmail"),jsx(Controller,{control:y,name:"phoneNumber",render:({field:{ref:I,...S},fieldState:{error:b}})=>jsxs(Or,{ref:f,children:[jsxs(a$7,{sx:{...b?.message&&{borderBottom:"none"}},children:[jsx(c$1,{defaultCountry:n?.iso2??a?.code??"SA",value:n,onChangeCountry:c,countries:l,isLoading:s}),jsx(b$6,{...S,type:"number",placeholder:C("mobile"),inputProps:{autoComplete:"off"},error:!!b?.message,sx:{border:"none",paddingInlineEnd:0},hideArrows:true,disableFocusRing:true})]}),b?.message&&jsx(le,{error:C(b.message,{numberLen:n.max_digits})})]})}),jsx(In,{onClick:t,disabled:!x||i||!r.length,children:e})]})}var hb=memo(YD);function JD({submitButtonText:e,onSubmit:t,customer:o,country:n,isItemsNotValid:r,items:i,defaultCountry:a,countries:l,isCountriesLoading:s,onCustomerChange:p,onCountryChange:c}){let m=zc(useId(),"customer-phone-number-form"),d=useRef(),u=useRef(),f=useRef(),{t:C}=useTranslation(),{control:y,formState:{isValid:w,errors:g},watch:x,trigger:T}=useForm({mode:"onChange",resolver:yupResolver(mb(n.max_digits)),defaultValues:{firstName:o.firstName,phoneNumber:o.phoneNumber,lastName:o.lastName}});return useEffect(()=>{o.firstName&&o.phoneNumber&&o.lastName&&T();},[]),useEffect(()=>{x(({firstName:S="",lastName:b="",phoneNumber:v=""})=>{p({...o,firstName:S,lastName:b,phoneNumber:v});});},[x,g,o]),jsxs(Gt,{id:m,"data-testid":"CustomerPhoneNumberForm",onMouseLeave:S=>{S.stopPropagation();},children:[jsx(Controller,{control:y,name:"phoneNumber",render:({field:{ref:S,...b},fieldState:{error:v}})=>jsxs(Or,{ref:f,children:[jsxs(a$7,{sx:{...v?.message&&{borderBottom:"none"}},children:[jsx(c$1,{defaultCountry:n?.iso2??a?.code??"SA",value:n,onChangeCountry:c,countries:l,isLoading:s}),jsx(b$6,{...b,type:"number",placeholder:C("mobile"),error:!!v?.message,sx:{border:"none",paddingInlineEnd:0},inputProps:{autoComplete:"off",form:{autoComplete:"off"}},hideArrows:true,disableFocusRing:true})]}),v?.message&&jsx(le,{error:C(v.message,{numberLen:n.max_digits})})]})},"phoneNumberFormPhone"),jsx(Controller,{control:y,name:"firstName",render:({field:{ref:S,...b},fieldState:{error:v}})=>jsxs(Or,{ref:d,children:[jsx(he,{...b,placeholder:C("firstName"),inputProps:{autoComplete:"off"},error:!!v?.message}),v?.message&&jsx(le,{error:C(v.message)})]})},"phoneNumberFormFirstName"),jsx(Controller,{control:y,name:"lastName",render:({field:{ref:S,...b},fieldState:{error:v}})=>jsxs(Or,{ref:u,children:[jsx(he,{...b,placeholder:C("lastName"),inputProps:{autoComplete:"off"},error:!!v?.message}),v?.message&&jsx(le,{error:C(v.message)})]})},"phoneNumberFormLastName"),jsx(In,{onClick:t,disabled:!w||r||!i.length,children:e})]})}var Ib=memo(JD);var Sb=styled(Or,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:t})=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"8px",padding:"8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:t?e.palette.grey[400]:e.palette.common.white,...t&&{cursor:"default",pointerEvents:"none"}})),Tb=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,marginBottom:"8px",margin:0}));var eL=(e,t)=>e.name===t.name&&e.size===t.size,wb=(e,t)=>t?.length?t.some(o=>Xb$1(o)?eL(o.file,e):o.name===e.name):false;function lL({options:e,error:t,files:o,label:n,disabled:r,hideUpload:i=false,preventDuplicates:a,onChangeFiles:l,onRemoveFile:s,renderBrandLogo:p,renderOpenFileInNewTab:c}){let m=zc(useId(),"file-input-preview"),{t:d}=useTranslation(),[u,f]=useState(null),{getRootProps:C,getInputProps:y,open:w,isDragReject:g,fileRejections:x}=useDropzone({...e,disabled:r||e?.disabled}),T=Wb$1(e?.maxSize||0,0).toUpperCase(),I=useMemo(()=>{let v=x.length&&x[0].errors.some(D=>D.code==="file-invalid-type"),A=x.length&&x[0].errors.some(D=>D.code==="file-too-large");return g||v?d("invalidFileType"):A?`File is larger than ${T}`:u||t},[g,t,x,u,d,T]);return jsxs(Sb,{id:m,"data-testid":"FileInputPreview",disabled:r,children:[jsx(Tb,{children:n}),jsx(h$1,{files:o,onRemoveFile:s,disabled:r,getFilePreview:v=>v.type.includes("image")?URL.createObjectURL(v):v.name.includes(".pdf")?We:v.name,renderBrandLogo:p,renderOpenFileInNewTab:c}),!i&&jsx(a$8,{getRootProps:C,getInputProps:y,open:w,onChangeFiles:l,processFiles:v=>{if(f(null),!a)return v.map(M=>({file:M,id:M.name}));let{duplicates:A,uniqueFiles:D}=v.reduce((M,L)=>(wb(L,o)?M.duplicates.push(L.name):M.uniqueFiles.push({file:L,id:L.name}),M),{duplicates:[],uniqueFiles:[]});if(A.length>0){let M=A.length===1?"file":"files";f(`Duplicate ${M} detected: ${A.join(", ")}`);}return D},disabled:r,errorMessage:I,maxFileSize:T,preventDuplicates:a})]})}var sL=memo(lL);var Pb=styled(R)(()=>({marginTop:"-1px","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),Ab=styled(V)(({theme:e})=>({height:40,flex:"unset",paddingTop:0,paddingBottom:0,borderBottom:`1px solid ${e.palette.divider}`,paddingLeft:"16px",maxHeight:"35px",".label":{flexGrow:1}}));function Cl({menuLabel:e,options:t,selectedValue:o,onValueChange:n}){let r=zc(useId(),"view-column-radio-filter"),[i,a]=useState(null),[l,s]=useState(o),p=useRef(null);return useEffect(()=>{s(o);},[o]),jsxs(Ab,{id:r,ref:p,onMouseEnter:f=>{a(f.currentTarget);},onMouseLeave:()=>{a(null);},onClick:f=>{f.stopPropagation(),a(f.currentTarget);},startAdornment:null,children:[jsx("span",{className:"label",children:e}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(Pb,{open:!!i,anchorEl:i,placement:"right-start",children:jsx(a$j,{options:t,value:l||"",onOptionChange:f=>{s(f),n(f);},defaultValue:t[0].value})})]})}var Mb=(e,t)=>{let o=e||{},n={};return t?.forEach(({value:r})=>{let i=o?.[r];n[r]=i===void 0?"all":i;}),n};function Lb({anchorEl:e,options:t,apiKey:o="statuses",initialStatuses:n,onCloseDropdown:r,onClear:i,onConfirm:a}){let l=!!e,s=zc(useId(),"status-filter"),{t:p}=useTranslation(),[c,m]=useState(()=>Mb(n,t)),d=useRef(null),[u,f]=useState(null),[C,y]=useState(null),w=(v,A)=>{f(v.currentTarget),y(A);},g=useCallback(()=>{f(null),y(null);},[]),x=useCallback(v=>{r(v),g();},[g,r]),T=()=>{let v=Object.keys(c).reduce((D,M)=>{let L=c[M];return L!=="all"&&(D[M]=L),D},{});Object.values(c).every(D=>D==="all")?i([o]):a({[o]:v});},I=r$1(T,r),S=v=>{T(),r(v);},b=v=>{C&&m(A=>({...A,[C]:v}));};return jsx(ClickAwayListener,{onClickAway:v=>{v.stopPropagation(),r(v);},children:jsxs(Or,{id:s,"data-testid":"StatusFilter",ref:d,tabIndex:-1,onKeyDown:I,children:[jsxs(R,{open:l,anchorEl:e,children:[jsx(a$k,{component:"span",children:p("filterBy")}),t.map(({value:v,label:A})=>jsxs(V,{onClick:D=>{f(D.currentTarget);},onMouseOver:D=>{w(D,v);},sx:{minHeight:"35px",padding:"8px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}},startAdornment:null,children:[jsx(Or,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:A}),jsx(Or,{component:"img",src:vb,width:16,height:12,sx:{marginLeft:"auto"}})]},v)),jsxs(b$d,{children:[jsx(d$5,{onClick:x,children:p("cancel")}),jsx(c$7,{onClick:S,children:p("okay")})]})]}),jsx(Popper,{open:!!u,anchorEl:u,placement:"right-start",onMouseLeave:g,children:jsx(Or,{sx:{backgroundColor:"#fff",borderEndEndRadius:"8px",border:"1px solid #F2F2F2"},children:jsx(a$j,{options:[{value:"all",label:"All"},{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}],value:c[C||""],onOptionChange:b})})})]})})}var Rb=styled$1(motion.div,{shouldForwardProp:e=>!["notificationState","open","loading","ready","failed"].includes(e)})(({theme:e,notificationState:t,open:o,loading:n,ready:r,failed:i})=>({position:"relative",border:`1px solid ${e.palette.divider}`,padding:"0 8px",height:32,borderRadius:"4px",display:"flex",alignItems:"center",overflow:"hidden",fontSize:"11px",fontWeight:500,color:e.palette.text.primary,transition:"width 2s ease-in-out",cursor:"pointer",...(t?.success||t?.failed)&&!n&&!r&&!i&&{"&:after":{content:'""',width:7,height:7,backgroundColor:t?.failed?e.palette.common.red:e.palette.success.dark,borderRadius:"50%",position:"absolute",top:5,border:`1px solid ${e.palette.common.white}`,right:6}},...o&&{border:`1px solid ${e.palette.info.dark}`,boxShadow:e.shadows[7]}})),Bb=styled$1(Box)(()=>({position:"relative"})),kb=styled$1(Box)(({theme:e})=>({background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:"4px",marginTop:"8px"})),Nb=styled$1(Box)(({theme:e})=>({background:e.palette.background.transparent[2],backdropFilter:"blur(2px)",color:e.palette.text.primary,fontSize:"11px",fontWeight:500,height:31,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"})),Fb=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"5.5px 8px",minHeight:48,height:"auto",borderBottom:`1px solid ${e.palette.divider}`,cursor:"pointer","&:hover":{boxShadow:e.shadows[3]}})),Vb=styled$1("img")(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),Wb=styled$1(Box)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Hb=styled$1(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1})),Ob=styled$1(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:500,wordBreak:"break-all",paddingInlineEnd:"8px"})),_b=styled$1(Box)(({theme:e})=>({fontSize:"9px",color:e.palette.text.textSecondary,fontWeight:600})),zb=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",height:32,padding:"4px 8px",borderBottom:`1px solid ${e.palette.divider}`,cursor:"pointer","&:hover":{boxShadow:e.shadows[3]}})),$b=styled$1(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:400,textTransform:"uppercase"})),Km=styled$1(Box)(({theme:e})=>({borderTop:`2px solid ${e.palette.divider}`})),yl=styled$1(Box)(({theme:e})=>({position:"absolute",bottom:0,right:0,left:0,".MuiLinearProgress-root":{backgroundColor:e.palette.divider,height:2},".MuiLinearProgress-bar":{background:e.palette.background.gradient.shadedBlue},"&.done .MuiLinearProgress-bar":{background:e.palette.success.dark},"&.failed .MuiLinearProgress-bar":{background:e.palette.common.red}})),Yt=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:alpha$1(e.palette.common.black,.62)}})),Il=styled$1(Box)(()=>({position:"relative"})),bl=styled$1(Box)(({theme:e})=>({position:"absolute",color:e.palette.common.black,fontSize:"7.875px",fontWeight:700,width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center"})),Sl=styled$1("img")(()=>({width:14,height:14})),Ub=styled$1(Box)(()=>({display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",padding:"8px"}));var Yb=e=>{let t=new Date,o=tc(e).isSame(t,"year"),n={sameDay:"DD MMM, YYYY",nextDay:"DD MMM, YYYY",lastDay:"DD MMM, YYYY",sameElse:"DD MMM, YYYY",lastWeek:"DD MMM, YYYY",nextWeek:"DD MMM, YYYY"};return o&&(n={sameDay:"DD MMM",nextDay:"DD MMM",lastDay:"DD MMM",sameElse:"DD MMM",lastWeek:"DD MMM",nextWeek:"DD MMM"}),tc(e).calendar(null,n)},jb=(e,t)=>{let o=new Date().toISOString().split("T")[0],n=t??`file_${o}`,i=/\.(xlx|xlsx|csv|txt|doc|docx|pdf|jpg|png|gif|zip|rar)$/i.exec(e),a=i?i[0]:".csv";return `${n}${a}`};var Xm={loading:false,success:false,error:null},TL=(e=Xm,t)=>{switch(t.type){case "RESET":return Xm;case "LOADING":return {...e,loading:true};case "SUCCESS":return {...e,success:true};case "ERROR":return {...e,error:t.error};default:return e}},Tl=({onDownload:e})=>{let t=n(),[{loading:o,error:n$1,success:r},i]=useReducer(TL,Xm),a=useCallback(()=>i({type:"LOADING"}),[]),l=useCallback(()=>i({type:"SUCCESS"}),[]),s=useCallback(m=>i({type:"ERROR",error:m}),[]),p=useCallback(()=>i({type:"RESET"}),[]);useEffect(()=>{(r||n$1)&&setTimeout(()=>{p();},3e3);},[r,n$1,p]);let c=useCallback(()=>{e&&(a(),e().then(m=>{l(),Mb$1(m.url,jb(m.result_file,m.id));}).catch(m=>{s(m),t.error(m?.response?.data?.error?.message||m?.message||"Failed to download report");}));},[e,a,l,s]);return {loading:o,error:n$1,success:r,handleDownloadReport:c}};function vL({onDownload:e}){let{loading:t,error:o,success:n,handleDownloadReport:r}=Tl({onDownload:e});return t?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Yt,{children:jsxs(Il,{children:[jsx(bl,{children:"1"}),jsx(CircularProgress,{})]})})}):n?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Yt,{children:jsx(Sl,{src:Ze,alt:"done"})})}):o?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Yt,{children:jsx(Sl,{src:Ij,alt:"failed"})})}):jsx(Sl,{onClick:r,src:Xe,alt:"reports"})}var Jm=vL;function ec(){return jsxs(Ub,{children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}function DL({reports:e,isLoading:t=false,onDownloadReport:o}){let n=useCallback(i=>o?o(i):Promise.reject(new Error("No download report function provided")),[o]),r=e.map(i=>{let a=tc(i.created_at).isBefore(tc().subtract(1,"day")),l=Yb$1(i.result_file);return jsxs(Fb,{children:[jsx(Vb,{src:l,alt:"download"}),jsxs(Hb,{children:[jsxs(Wb,{children:[jsx(Ob,{children:i.result_file}),jsx(_b,{children:a?Yb(new Date(i.created_at)):tc(new Date(i.created_at)).fromNow()})]}),jsx(Jm,{onDownload:()=>n(i.id)})]})]},i.id)});return t?jsxs(Km,{children:[jsx(ec,{}),jsx(ec,{})]}):jsx(Km,{children:r})}var qb=memo(DL);function VL(e){let{progress:t,reportsQueryResult:o,isStatusReady:n,isStatusFailed:r,isLoading:i,notificationState:a,onOpenDropdown:l,onRequestReportFile:s,onOpenReportsApp:p$1,hideOpenReportsApp:c=false,onDownloadReport:m,customContent:d}=e,[u,f]=useState(null),{t:C}=useTranslation(),y=!!u,{data:w,isLoading:g}=o,x=useCallback(v=>{i||n||(l?.(),f(v.currentTarget));},[i,n,l]),T=useCallback(()=>{f(null);},[]),I=useCallback(()=>{i||(T(),s?.());},[i,T,s]),S=v=>{v.stopPropagation(),p$1?.(),T();},b=()=>i?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Yt,{children:[jsxs(Il,{children:[jsx(bl,{children:"1"}),jsx(NL,{})]}),jsx("span",{children:C("preparing")}),jsx(yl,{children:jsx(rc,{variant:"determinate",value:t})})]})}):n?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Yt,{children:[jsx("img",{src:Ze,alt:"done"}),jsx("span",{children:C("ready")}),jsx(yl,{className:"done",children:jsx(rc,{variant:"determinate",value:100})})]})}):r?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Yt,{children:[jsx("img",{src:Ij,alt:"failed"}),jsx("span",{children:C("failed")}),jsx(yl,{className:"failed",children:jsx(rc,{variant:"determinate",value:100})})]})}):jsx("img",{src:Ye,alt:"reports"});return jsxs(Bb,{"data-testid":"TableReports_ReportsWrapper",children:[jsx(AnimatePresence,{children:jsx(p,{title:C("reports"),children:jsx(Rb,{"data-testid":"TableReports_ExportButton",onClick:x,notificationState:a,open:y,loading:i,ready:n,failed:r,sx:{...(i||n||r)&&{borderBottom:"none"}},initial:{width:"auto"},transition:{duration:.25},children:b()})})}),y&&jsx(a$5,{onClick:T}),jsx(cE,{open:y,anchorEl:u,placement:"bottom-end",children:jsxs(kb,{sx:{width:208},children:[d?.({closeDropdown:T})??jsxs(zb,{onClick:I,children:[jsx("img",{src:Ve,alt:"download"}),jsx($b,{children:"csv"})]}),jsx(qb,{reports:w?.reports??[],isLoading:g,onDownloadReport:m}),!c&&jsx(Nb,{onClick:S,children:C("openReportsApp")})]})})]})}var Kb=memo(VL);var Xb=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",width:54,height:18,backgroundColor:"#1F88D0",borderRadius:"2px",fontSize:"8px",fontWeight:600,color:e.palette.common.white}));function GL({onDownload:e}){let t=zc(useId(),"download-button"),{loading:o,error:n,success:r,handleDownloadReport:i}=Tl({onDownload:e}),{t:a}=useTranslation(),l=!o&&!n&&!r;return jsx(Xb,{id:t,"data-testid":"DownloadButton",onClick:i,children:jsxs(AnimatePresence,{mode:"wait",initial:false,children:[o&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{display:"flex",alignItems:"center"},children:jsx(NL,{size:"10px",sx:{color:"rgba(255, 255, 255, 0.62)"}})},"loading"),!!n&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(d$1,{src:hm,sx:{width:"auto",height:"auto"},alt:"error"})},"error"),l&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:a("download")},"text")]})})}var Zb=memo(GL);var jL=Zb;var qL=Kb;var ue=styled(V)(({theme:e})=>({height:40,flex:"unset",paddingTop:0,paddingBottom:0,borderBottom:`1px solid ${e.palette.divider}`,".label":{flexGrow:1}})),Qb=styled(Or)(({theme:e})=>({width:36,height:24,border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"12px"}));function vl({type:e}){return jsx(Qb,{children:jsx(Or,{component:"img",src:h$2(e),sx:{width:18,height:12,objectFit:"contain"},onError:t=>{t.currentTarget.src=h$2("card");}})})}function ac({icon:e,name:t,options:o=[],filters:n,setFilters:r}){let[i,a]=useState(null),l=n?.payment_methods??[],s=C=>{a(C.currentTarget);},p=()=>{a(null);},c=useCallback(C=>l.includes(C)??false,[l.length]),m=useMemo(()=>o?.every(C=>c(C.type)),[l.length]),d=useMemo(()=>!m&&o?.some(C=>c(C.type)),[l.length]),u=C=>{if(C.stopPropagation(),m){let y=o?.reduce((x,T)=>x.filter(I=>I!==T.type),l)??[],{payment_methods:w,...g}=n;r(y?.length>0?{...n,payment_methods:y}:g);}else r({...n,payment_methods:[...l,...o?.map(y=>y.type)??[]]});},f=(C,y)=>{C.stopPropagation(),c(y)?r({...n,payment_methods:l?.filter(w=>w!==y)??[]}):r({...n,payment_methods:[...l??[],y]});};return jsxs(ue,{isSelected:m,isIndeterminate:d,onMouseEnter:s,onMouseLeave:p,onClick:u,children:[jsx("img",{src:e,alt:t}),jsx("span",{className:"label",children:t}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!i,anchorEl:i,placement:"right-end",children:o?.map(C=>jsx(ue,{isSelected:c(C.type),onClick:y=>f(y,C.type),children:jsx(vl,{type:C.type})},C.type))})]})}function Al({paymentMethodsSource:e,filters:t,setFilters:o}){let[n,r]=useState(null),i=t?.payment_methods??[],a=!e?.options?.length,l=u=>{r(u.currentTarget);},s=()=>{r(null);},p=useMemo(()=>(e?.options??[])?.reduce((u,f)=>(u.push(...(f.options??[])?.map(C=>C.type)??[]),u),[])??[],[]),c=useMemo(()=>p?.length===i.length&&i.length>0,[i.length,p?.length]),m=useMemo(()=>!c&&i.length>0,[i.length,c]);return jsxs(ue,{isSelected:c,isIndeterminate:m,onMouseEnter:l,onMouseLeave:s,onClick:()=>{if(!a){if(c){let{payment_methods:u,...f}=t;o(f);return}o({...t,payment_methods:p});}},sx:{...a&&{opacity:.5,pointerEvents:"none"}},children:[jsx("span",{className:"label",children:e?.name}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!n,anchorEl:n,placement:"right-start",children:e?.options?.map(u=>jsx(ac,{...u,filters:t,setFilters:o},u.type))})]})}function El({paymentSchemesSource:e,filters:t,setFilters:o}){let[n,r]=useState(null),i=t?.payment_scheme??[],a=!e?.options?.length,l=f=>{r(f.currentTarget);},s=()=>{r(null);},p=useMemo(()=>i?.length===e?.options?.length&&i.length>0,[i?.length,e?.options?.length]),c=useMemo(()=>!p&&i.length>0,[i.length,p]),m=useCallback(f=>i.includes(f)??false,[i]),d=()=>{if(!a){if(p){let{payment_scheme:f,...C}=t;o(C);return}o({...t,payment_scheme:e?.options?.map(f=>f.type)??[]});}},u=(f,C)=>{f.stopPropagation(),m(C)?o({...t,payment_scheme:i.filter(y=>y!==C)??[]}):o({...t,payment_scheme:[...t?.payment_scheme??[],C]});};return jsxs(ue,{isSelected:p,isIndeterminate:c,onMouseEnter:l,onMouseLeave:s,onClick:d,sx:{...a&&{opacity:.5,pointerEvents:"none"}},children:[jsx("span",{className:"label",children:e?.name}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!n,anchorEl:n,placement:"right-start",children:e?.options?.map(f=>jsx(ue,{isSelected:m(f.type),onClick:C=>u(C,f.type),children:jsx(vl,{type:f.type})},f.type))})]})}function Dl({filters:e,setFilters:t}){let[o,n]=useState(null),{t:r}=useTranslation(),i=useMemo(()=>e?.payment_initiated??[],[e?.payment_initiated]),a=d=>{n(d.currentTarget);},l=()=>{n(null);},s=useCallback(d=>i.includes(d),[i]),p=i?.length===Fo$1.length,c=()=>{t?.({...e,payment_initiated:p?[]:Fo$1.map(({key:d})=>d)});},m=d=>{t?.({...e,payment_initiated:s(d)?i?.filter(u=>u!==d):[...i,d]});};return jsxs(ue,{onMouseEnter:a,onMouseLeave:l,isSelected:p,isIndeterminate:i.length===1,onClick:c,children:[jsx("span",{className:"label",children:r("paymentInitiated")}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:Fo$1.map(({label:d,key:u})=>jsx(V,{isSelected:s(u),onClick:f=>{f.stopPropagation(),m(u);},children:d},u))})]})}function sc({filters:e,setFilters:t}){let[o,n]=useState(null),r=useMemo(()=>e?.payment_locations??[],[e?.payment_locations]),i=m=>{n(m.currentTarget);},a=()=>{n(null);},l=useCallback(m=>r.includes(m),[r]),s=r?.length===Go.length,p=()=>{t?.({...e,payment_locations:s?[]:Go.map(({key:m})=>m)});},c=m=>{t?.({...e,payment_locations:l(m)?r?.filter(d=>d!==m):[...r,m]});};return jsxs(ue,{onMouseEnter:i,onMouseLeave:a,isSelected:s,isIndeterminate:r.length>0&&r.length<Go.length,onClick:p,children:[jsx("span",{className:"label",children:"Payment Locations"}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:Go.map(({label:m,key:d})=>jsxs(V,{isSelected:l(d),onClick:u=>{u.stopPropagation(),c(d);},children:[jsx(Or,{sx:u=>({border:`1px solid ${u.palette.divider}`,borderRadius:"20px",width:36,height:24,display:"flex",alignItems:"center",justifyContent:"center"}),children:jsx(b$2,{sx:{visibility:"visible",width:15,height:9.176},variant:m})}),m]},d))})]})}function Rl({filters:e,setFilters:t}){let[o,n]=useState(null),{t:r}=useTranslation(),i=useMemo(()=>e?.authentication_type??[],[e?.authentication_type]),a=d=>{n(d.currentTarget);},l=()=>{n(null);},s=useCallback(d=>i.includes(d),[i]),p=i?.length===Ho$1.length,c=()=>{t?.({...e,authentication_type:p?[]:Ho$1.map(({key:d})=>d)});},m=d=>{t?.({...e,authentication_type:s(d)?i?.filter(u=>u!==d):[...i,d]});};return jsxs(ue,{onMouseEnter:a,onMouseLeave:l,isSelected:p,isIndeterminate:i.length>0&&i.length<Ho$1.length,onClick:c,children:[jsx("span",{className:"label",children:r("authenticationType")}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:Ho$1.map(({label:d,key:u})=>jsx(V,{isSelected:s(u),onClick:f=>{f.stopPropagation(),m(u);},children:d},u))})]})}function iS({filters:e,setFilters:t,anchorEl:o,showPaymentSchemes:n=true,showPaymentMethods:r=true,showPaymentInitiated:i=true,showPaymentLocations:a=false,showAuthenticationType:l=false,paymentMethodsSource:s,paymentSchemesSource:p,onCloseDropdown:c,onConfirm:m}){let{t:d}=useTranslation(),u=zc(useId(),"payment-source-filter"),f=!!o,C=()=>m?.(),y=r$1(C,c),w=g=>{C(),c(g);};return jsxs(R,{id:u,"data-testid":"PaymentSourceFilter",open:f,anchorEl:o,sx:{marginTop:"8px",marginBottom:"8px"},onKeyDown:y,panelProps:{tabIndex:-1,autoFocus:true},children:[jsx(a$k,{component:"span",children:d("filterBy")}),r&&jsx(Al,{filters:e,setFilters:t,paymentMethodsSource:s}),n&&jsx(El,{filters:e,setFilters:t,paymentSchemesSource:p}),i&&jsx(Dl,{filters:e,setFilters:t}),l&&jsx(Rl,{filters:e,setFilters:t}),a&&jsx(sc,{filters:e,setFilters:t}),jsxs(b$d,{children:[jsx(d$5,{onClick:c,children:d("cancel")}),jsx(c$7,{onClick:w,children:d("okay")})]})]})}var mc=[{label:Zo.C,value:"C"},{label:Zo.F,value:"F"}],TR=({filters:e,setFilters:t})=>{let[o,n]=useState(null),r=!!o,i=e?.auth_mode??[],a=f=>{r||n(f.currentTarget);},l=()=>{r&&n(null);},s=useMemo(()=>mc.map(f=>f.value),[]),p=useMemo(()=>mc.length===i.length&&i.length>0,[i.length,s?.length]),c=useMemo(()=>!p&&i.length>0,[i.length,p]),m=()=>{if(p){let{auth_mode:f,...C}=e;t(C);return}t({...e,auth_mode:s});},d=useCallback(f=>i.includes(f)??false,[i.length]),u=(f,C)=>{f.stopPropagation(),d(C)?t({...e,auth_mode:i?.filter(y=>y!==C)??[]}):t({...e,auth_mode:[...i??[],C]});};return jsxs(ue,{isSelected:p,isIndeterminate:c,onMouseEnter:a,onMouseLeave:l,onClick:m,children:[jsx("span",{className:"label",children:"Authentication Mode"}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:r,anchorEl:o,placement:"right-start",children:mc.map(f=>jsxs(V,{isSelected:d(f.value),onClick:C=>u(C,f.value),children:[jsx(CC,{mode:f.value}),f.label]},f.value))})]})};var wR=styled(j$1)(()=>({fontSize:"11px"})),lS=styled(Or)(()=>({display:"flex",alignItems:"center",gap:"4px",width:"100%",paddingInline:"16px"})),sS=styled(Or)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${e.palette.divider}`})),pS=styled(b)(()=>({minWidth:"auto",width:70})),mS=styled(b)(()=>({minWidth:"auto",width:70})),cS=styled(Or)(()=>({display:"flex",flexDirection:"column",gap:"8px",marginBottom:"8px"})),cc=styled(wR)(()=>({fontSize:"11px",fontWeight:500,color:"#8D8D94",padding:"8px 16px"})),dS=styled(Or)(({theme:e})=>({borderBlock:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",gap:"2px",width:"100%"})),uS=styled(Or)(({theme:e})=>({...a$2(e),width:"auto",marginTop:"8px","&:focus":{outline:"none"}})),fS=styled(cc)(()=>({color:"#1F88D0",padding:"4px 24px",cursor:"pointer"})),gS=styled(b,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:t})=>{let{brand:o}=t.v2.palette;return {fontSize:"11px",fontWeight:t.v2.typography.fontWeightMedium,padding:t.v2.spacing(8),width:"100%",height:32,justifyContent:"space-between",gap:t.v2.spacing(4),...e&&{borderColor:o[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}}});function xS({dateRange:e,onDateRangeChange:t,calendarMode:o,onCalendarModeChange:n,timezone:r,browserTimezone:i,defaultCountryTimezone:a,onTimezoneChange:l,timezoneCountriesCodes:s=[],onConfirm:p,onCloseDropdown:c}){let m=zc(useId(),"date-filter"),{t:d}=useTranslation(),u=useRef(null),f=()=>p(e),C=r$1(f,c),y=T=>{t(T),requestAnimationFrame(()=>u.current?.focus());},w=T=>{f(),c(T);},g=useCallback(T=>n(T),[n]),x=T=>{if(!T)return "";let[I,S]=T,b=tc(I).format("MMM D"),v=tc(S).format("MMM D");return b===v?b:`${b} - ${v}`};return jsxs(uS,{ref:u,tabIndex:-1,onKeyDown:C,id:m,"data-testid":"DateFilter",children:[jsxs(cS,{children:[jsx(dS,{children:jsx(cc,{component:"span",children:d("filterBy")})}),jsx(lS,{children:jsx(a$b,{defaultDate:e||o$1(0),onDateChange:y,maxDateRange:365,mode:o,onCalendarModeSwitch:g,browserTimezone:i,defaultCountryTimezone:a,timezone:r,onChangeTimezone:l,timezoneCountriesCodes:s,mainSx:{width:"100%"},popperProps:{placement:"right-start"},renderCalendarButton:(T,I)=>jsxs(gS,{variant:"secondary",size:"md",fullWidth:true,open:T,onClick:I,children:[jsx("span",{children:x(e)||"Date"}),jsx(d$1,{src:dk,alt:"selected",sx:{width:16,height:16}})]})},x(e))}),e&&jsx(fS,{component:"span",onClick:()=>t(void 0),children:"Clear"})]}),jsxs(sS,{children:[jsx(mS,{variant:"secondary",size:"md",onClick:c,children:d("cancel")}),jsx(pS,{variant:"primary",size:"md",onClick:w,children:d("okay")})]})]})}var yS=styled(R)(()=>({marginBottom:"8px"})),IS=styled(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),bS=styled(Or)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),SS=styled(Ky)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),TS=styled(Or)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));function vS({selectedRadioValue:e,onRadioButtonChange:t,radioOptions:o,label:n,onConfirm:r,onClear:i,inputValues:a,onInputValuesChange:l,anchorEl:s,onCloseDropdown:p,inputFilters:c=[]}){let m=zc(useId(),"reference-type-filter"),{t:d}=useTranslation(),u=()=>r(),f=r$1(u,p),C=I=>{u(),p(I);},y=I=>{i(),p(I);},w=I=>a?.[I]!==void 0&&a?.[I].length>0,g=I=>{w(I)&&l({...a,[I]:""});},x=useMemo(()=>BR(a).some(I=>!!I),[a]),T=()=>{l(c.reduce((I,{apiKey:S})=>({...I,[S]:""}),{}));};return jsxs(yS,{id:m,"data-testid":"ReferenceTypeFilter",open:!!s,anchorEl:s,onKeyDown:f,children:[jsx(a$k,{component:"span",children:d("filterBy")}),jsx(Cl,{menuLabel:n,options:o,selectedValue:e,onValueChange:t}),c.length>0&&jsx(bS,{"data-testid":"ColumnFilterInputs_inputs",component:"main",children:c.map(({apiKey:I,placeholder:S})=>jsx(IS,{className:"input","data-testid":"ColumnFilterInputs_InputStyled",name:I,placeholder:S,onChange:b=>{l({...a,[I]:b.target.value});},defaultValue:a?.[I]??"",value:a?.[I],inputProps:{autoComplete:"off","data-testid":"ColumnFilterInputs_input"},endAdornment:jsx(NR,{position:"end",children:jsx(Box,{component:"img","data-testid":"ColumnFilterInputs_icon","data-icon":w(I)?"close":"search",src:w(I)?ui:A,alt:"search",className:"icon",sx:{cursor:w(I)?"pointer":"default"},onClick:()=>{g(I);}})})},I))}),jsx(x$1,{in:x,component:"section","data-testid":"ColumnFilterInputs_Collapse",children:jsx(TS,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(SS,{type:"button",onClick:T,"data-testid":"ColumnFilterInputs_ClearButton",children:d("clear")})})}),jsxs(b$d,{children:[jsx(d$5,{onClick:y,children:d("cancel")}),jsx(c$7,{onClick:C,children:d("okay")})]})]})}var PS=styled(Or)(()=>({maxHeight:"210px",maxWidth:"177px",overflowY:"auto",padding:0})),AS=styled(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},maxHeight:35,minHeight:35})),ES=styled(Or)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),MS=styled(Or)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),DS=styled(Or)(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"120px"})),LS=styled(R)(()=>({marginBottom:"8px"}));function kS({anchorEl:e,onCloseDropdown:t,list:o,apiKey:n,placeholder:r,onConfirm:i,onClear:a,onClickItem:l,inputValue:s,onInputValueChange:p,selectedListItems:c}){let m=zc(useId(),"list-column-filter"),{t:d}=useTranslation(),u=()=>i(),f=r$1(u,t),C=b=>{u(),t(b);},y=b=>{a?.(),t(b);},w=!!s.trim().length,g=()=>{w&&p("");},x=b=>{p(b);},T=useMemo(()=>w?o?.filter(b=>b.name.toLowerCase().includes(s.trim().toLowerCase())):o,[s,w,o]),I=w&&!T.length||!o.length,S=useMemo(()=>new Set(c),[c]);return jsxs(LS,{id:m,"data-testid":"ListColumnFilter",open:!!e,anchorEl:e,onKeyDown:f,children:[jsx(a$k,{component:"span",children:d("filterBy")}),!!o?.length&&jsx(Box,{sx:{padding:"8px 16px"},children:jsx(b$5,{fullWidth:true,value:s,name:n,placeholder:r,onChange:b=>x(b.target.value),onClear:g})}),jsx(PS,{children:I?jsx(Box,{sx:{p:1,textAlign:"center",fontSize:"11px"},children:"No data available"}):T?.map((b,v)=>jsx(AS,{isSelected:S.has(b?.id),onClick:()=>{l(b?.id);},children:jsxs(ES,{children:[jsx(DS,{children:b.name}),jsx(MS,{component:"span",children:b.id})]})},`${b.id}-${v}`))}),jsxs(b$d,{children:[jsx(d$5,{onClick:y,children:d("cancel")}),jsx(c$7,{onClick:C,children:d("okay")})]})]})}var NS="os-shared-VerificationIcon",Fl={root:`${NS}-root`,img:`${NS}-img`},FS=(l=>(l.Verified="verified",l.Reviewed="reviewed",l.Completed="completed",l.Incomplete="incomplete",l.Rejected="rejected",l.Closed="closed",l.Archived="archived",l))(FS||{});var Vl={verified:Hj,reviewed:Fj,completed:Ej,incomplete:Gj,rejected:Ij,closed:Jj,archived:Kj},Wl={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var OR=2.3,VS=styled("span",{shouldForwardProp:e=>!["$variant","$bgColor","$size"].includes(e)})(({$variant:e="default",$bgColor:t,$size:o=10.5})=>{let n=Math.round(o*OR);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...e==="circle"&&{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:t||"#D9D9D929"}}});var WS=forwardRef(({className:e,sx:t,icon:o,label:n,variant:r="default",size:i=10.5,width:a,height:l,...s},p$1)=>{let c=Vl[o]||Vl.incomplete,m=Wl[o]||Wl.incomplete,d=n===null?"":n||fx(o),u=a??i,f=l??i,C=jsx(VS,{ref:p$1,className:lc(Fl.root,e),sx:t,"data-testid":"VerificationIcon",$variant:r,$bgColor:m,$size:i,...s,children:jsx("img",{className:Fl.img,loading:"lazy",src:c,alt:d||o,width:u,height:f})});return n===null?C:jsx(p,{title:d,wrapperProps:{display:"inline-flex"},children:C})});WS.displayName="VerificationIcon";var UR=memo(WS);var Hl="32px";var Cc=styled(Or,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:t})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:t?Hl:"16px",height:"100%",overflow:"auto"})),xc=styled(Or)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),HS=styled(Or,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"}));function KR({sections:e,isMaximized:t,onClick:o,activeSection:n}){let r=zc(useId(),"window-side-bar"),i=n||e?.[0]?.id;return jsx(Cc,{id:r,"data-testid":"WindowSideBar",isMaximized:t,children:jsx(xc,{children:e?.map(a=>jsx(HS,{onClick:()=>{o?.(a);},isActive:i===a.id,children:a.title},a.id))})})}var OS=memo(KR);var GR=OS;
2
- export{q0 as $,TA as $a,qa as $b,Wl as $c,pF as A,zP as Aa,$p as Ab,ZI as Ac,JT as B,GP as Ba,pe as Bb,QI as Bc,nw as C,KP as Ca,Up as Cb,hD as Cc,dw as D,Tx as Da,Gp as Db,ob as Dc,gw as E,t1 as Ea,Yp as Eb,fb as Ec,Cw as F,Bx as Fa,jp as Fb,Cb as Fc,Tg as G,f1 as Ga,Wp as Gb,hb as Gc,Lw as H,g1 as Ha,wr as Hb,Ib as Hc,Nw as I,h1 as Ia,GA as Ib,sL as Ic,ct as J,b1 as Ja,qp as Jb,Cl as Jc,zw as K,Wx as Ka,Kp as Kb,Lb as Kc,to as L,P1 as La,Xp as Lb,Tl as Lc,Yw as M,E1 as Ma,Wy as Mb,Jm as Mc,Kw as N,M1 as Na,Ua as Nb,jL as Nc,e0 as O,D1 as Oa,Ga as Ob,qL as Oc,i0 as P,Zx as Pa,YA as Pb,Al as Pc,c0 as Q,oh as Qa,Ya as Qb,El as Qc,xe as R,z1 as Ra,jA as Rb,Dl as Rc,et as S,mh as Sa,Zp as Sb,Rl as Sc,I0 as T,yh as Ta,Jp as Tb,iS as Tc,la as U,Ph as Ua,Qp as Ub,TR as Uc,P0 as V,eA as Va,Hy as Vb,xS as Vc,L0 as W,aA as Wa,qA as Wb,vS as Wc,N0 as X,Fh as Xa,KA as Xb,kS as Xc,H0 as Y,fA as Ya,XA as Yb,Fl as Yc,H5 as Z,$h as Za,em as Zb,FS as Zc,G0 as _,Zh as _a,ja as _b,Vl as _c,Hl as a,ev as aa,xj as ab,un as ac,UR as ad,Cc as b,N6 as ba,O as bb,lm as bc,xc as c,_6 as ca,Oe as cb,pm as cc,GR as d,j6 as da,Oa as db,mm as dc,_n as e,Q6 as ea,OA as eb,cm as ec,_f as f,CC as fa,kp as fb,fm as fc,eT as g,Tv as ga,_A as gb,gm as gc,nT as h,Pv as ha,zA as hb,Cm as hc,lT as i,TC as ia,$A as ib,Er as ic,mT as j,vC as ja,_a as jb,sI as jc,Ni as k,zv as ka,mo as kb,Sm as kc,Gf as l,Uv as la,_e as lb,bM as lc,Yf as m,Yv as ma,Ny as mb,wm as mc,Ps as n,Zv as na,br as nb,SI as nc,Fi as o,Jv as oa,Np as ob,vm as oc,nk as p,oP as pa,za as pb,Pm as pc,Lo as q,rP as qa,Fp as qb,Am as qc,Ro as r,sP as ra,$a as rb,RM as rc,xT as s,dP as sa,UA as sb,DI as sc,IT as t,xP as ta,dn as tb,Fm as tc,TT as u,IP as ua,Sr as ub,UI as uc,AT as v,wP as va,Hp as vb,jI as vc,DT as w,ba as wa,Tr as wb,XI as wc,BT as x,U8 as xa,Op as xb,pD as xc,Yn as y,ix as ya,_p as yb,mD as yc,Ds as z,mz as za,zp as zb,Nr as zc};