@tap-payments/os-micro-frontend-shared 0.3.275 → 0.3.277
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/{chunk-VNUT3HGU.js → chunk-4UMT2J46.js} +1 -1
- package/build/_chunks/chunk-BPHG6RDC.js +1 -0
- package/build/_chunks/{chunk-F4TXGFRW.js → chunk-JGCMUAHD.js} +1 -1
- package/build/_chunks/chunk-QWWCMSYY.js +2 -0
- package/build/_chunks/chunk-WAQJPDMU.js +2 -0
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusButton/style.d.ts +8 -1
- package/build/components/StatusButton/type.d.ts +7 -4
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/components/ActionMenu.d.ts +17 -0
- package/build/components/TableCells/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +1 -1
- package/build/components/modules/JSONViewWindow/index.js +1 -1
- package/build/components/modules/JSONViewWindow/style.d.ts +16 -13
- package/build/components/modules/WindowShell/index.js +1 -1
- package/build/components/modules/index.js +1 -1
- package/build/datetime/components/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-LIYQWK6K.js +0 -2
- package/build/_chunks/chunk-PCGC6E7J.js +0 -2
- package/build/_chunks/chunk-S27723NU.js +0 -1
- package/build/_chunks/chunk-VLS6WUBL.js +0 -1
- package/build/components/DropdownMenu/DropdownMenu.d.ts +0 -4
- package/build/components/DropdownMenu/index.d.ts +0 -4
- package/build/components/DropdownMenu/index.js +0 -1
- package/build/components/DropdownMenu/styles.d.ts +0 -21
- package/build/components/DropdownMenu/type.d.ts +0 -26
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-WEDCKMUU.js';import {b as b$4,h,c,j as j$1,i}from'./chunk-7L6NBFKR.js';import {a as a$4,f as f$2,e,b as b$c,g as g$1,d as d$3,c as c$4}from'./chunk-PQRI2WMI.js';import {b as b$9,c as c$2}from'./chunk-KPY3W62P.js';import {b as b$3}from'./chunk-BVAZARPH.js';import {b as b$1}from'./chunk-RSIJKVO6.js';import {a as a$3}from'./chunk-F4TXGFRW.js';import {b as b$a}from'./chunk-KVZJDQV2.js';import {b as b$5}from'./chunk-46V3JVHX.js';import {g,a as a$6}from'./chunk-FJNHU3S4.js';import {a as a$2}from'./chunk-UZVOPL5U.js';import {a as a$7}from'./chunk-265MSIZH.js';import {a as a$1}from'./chunk-W2HSCMPT.js';import {b as b$6}from'./chunk-ZFVCIKJ5.js';import {d as d$1}from'./chunk-JDEIU7E5.js';import {a as a$5,b as b$b,d as d$2,c as c$3}from'./chunk-XMGXCCSD.js';import {b as b$7}from'./chunk-SN2KTD4P.js';import {c as c$1}from'./chunk-QZJCQWTE.js';import {f}from'./chunk-S27723NU.js';import {b as b$2}from'./chunk-ADEEIE7D.js';import {b as b$8}from'./chunk-SKASDIJH.js';import {t,p,z,j,V,b,R,D,d,B,v,f as f$1}from'./chunk-CAVYK7HF.js';import {l,p as p$1}from'./chunk-HZCNE5Q2.js';import {Bc,gc,Ya,nc,Na,z as z$1,Eb as Eb$2,Db,Cb as Cb$1,Xa,db,xb as xb$1,yb as yb$1,Ab as Ab$1,Bb as Bb$1,zb as zb$1,ac,Ca,Ka,Fa,Ja as Ja$1,fc,cc as cc$1,q,ec,f as f$3,v as v$1}from'./chunk-Z2DUFVI5.js';import {Cb,zb,Bb,Wd,Ej,rc,Di,Bi as Bi$1,Ci as Ci$1,Dh,Og as Og$1,Uh,Ue,hk,ja,zk,qk,F,E,Mj,Lj,Kj,Ij,Gj,Hj,Jj,jc,kc,hc,ma,Kl as Kl$1,Eb as Eb$1,Fb as Fb$1,Gb,C,Yj,Ch as Ch$1,yb,hm,Mh,Lh as Lh$1,xb,po,Hb,fh as fh$1,kh as kh$1,lh,ih,hh,ch as ch$1,dh as dh$1,eh as eh$1,ah,bh as bh$1,mh as mh$1,T,yi,Ai,zi as zi$1,xi,Ei,Vg as Vg$1,Qj,Rj,H as H$1,jo,G,wb as wb$1,z as z$2,_o,da,ca,na,sk,Bk,tk,jk,lk,wk,yk,rk,ok,pk,Ln as Ln$1,cc,dc,Qh,uk,nh as nh$1,yh as yh$1,xh,wh,vh,uh as uh$1,th as th$1,sh,rh as rh$1,qh,ph as ph$1,oh as oh$1,Xh,Vh,Wh as Wh$1,_h,Zh as Zh$1,ce,Zd as Zd$1,be,Dn,Bn,ui,qb,_d as _d$1,vn,$d,rb as rb$1,Fh,Eh,Hh as Hh$1,Jh,Ih as Ih$1,Kh,le,uf as uf$1,tf,sf as sf$1,rf,qf as qf$1,vf as vf$1,pf,Ba,Aa,mf as mf$1,lf as lf$1,kf as kf$1,gi,fi,ii as ii$1,hi as hi$1,ji,$j,Zj,_j,Tb as Tb$1,Om,Lm,Gm as Gm$1,Hm,Nm,zm,Pm,Am,Qm as Qm$1,Bm,Im,Dm,Fm,Mm,Em,xm,Jm as Jm$1,Km as Km$1,ym,Cm,wm,vm,um,tm,sm,_g as _g$1,Ak,Wk,ak,ek,vb as vb$1,fk,ik,gk,va,ua,h as h$1,Ug,ko}from'./chunk-3M2GZVQW.js';import As,{forwardRef,useId,memo,createContext,useState,useEffect,useMemo,useCallback,useRef,Fragment as Fragment$1,useContext}from'react';import {useTranslation}from'react-i18next';import {styled,Box,Paper,Button,TextField,Typography,Popper,CircularProgress,Link,useTheme as useTheme$1,TableCell,ClickAwayListener}from'@mui/material';import {motion,AnimatePresence,Reorder,useDragControls}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {styled as styled$1,alpha,useTheme}from'@mui/material/styles';import Hh from'@mui/material/TableCell';import Gn from'@mui/material/Box';import zy from'@mui/material/SvgIcon';import wt from'lodash/camelCase';import Mu from'dayjs';import cS from'dayjs/plugin/timezone';import mS from'dayjs/plugin/utc';import Ku from'lodash/startCase';import NT from'@mui/material/Popover';import Uw from'@mui/material/ClickAwayListener';import Hw from'@mui/material/Popper';import e0 from'@mui/material/Typography';import Tg from'@mui/material/Button';import v0 from'@mui/material/Menu';var kr={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},Vr={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var Br=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),Nr=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),Wr=styled(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function Lh({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=Bc(useId(),"agreement-icon"),i=useTheme$1(),{t:l}=useTranslation(),a=useMemo(()=>[...t?[Vr.SAVED_TOKEN]:[],...(o||0)>0?[Vr.COUNT]:[],...e&&kr[e]?[kr[e]]:[]],[t,o,e]),s=m=>n?jsx(Wr,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:l("totalPaymentCount",{amount:f$3(o)}),children:jsx(Nr,{children:jsxs(Br,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:Vr.COUNT.color},children:["x",o]})})})},m):jsx(a$7,{value:o,index:m},m),p$1=a.map((m,f)=>m.label==="countBadge"?s(f):jsx(p,{title:l(m.label),children:jsx(Wr,{children:n?jsx(Nr,{children:jsx(Br,{"data-testid":"AgreementCell_agreementType",sx:{color:m.color},children:l(m.label)})}):jsx(d,{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(Wr,{children:n?jsx(Nr,{children:jsx(Br,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(d,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,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 Gm=Lh;var kh=Gm;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(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 jm=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Km=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("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(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var qm=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var qa={"3DS":{tooltip:"3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh$1,borderColor:"rgba(31, 136, 208, 0.10)"}},Xm={FAILED:{tooltip:"Failed",icon:Vg$1,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch$1,borderColor:"rgba(255, 61, 0, 0.10)"}};function Bh({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=Bc(useId(),"auth-icons"),i=useMemo(()=>{let a=e?Xm[e]:null,s=a?.tooltip,p=e==="AUTHENTICATED"?null:a?.icon;return [{tooltip:s,content:n?s:p,type:n?"text":"icon"},...o?[{tooltip:o,content:n?qa[o]?.tooltip:qa[o]?.icon,type:n?"text":"icon"}]:[],{tooltip:"",content:t?`ECI ${t}`:"",type:"text"}]},[e,n,o,t]),l=useMemo(()=>i.filter(a=>!!a.content).map((a,s)=>{let p$1=a.type==="text"?jsx(Km,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(jm,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":a.content,children:a.content})}):jsx(d,{sx:{width:"16px",height:"16px"},src:a.content,alt:a.tooltip});return jsx(p,{title:a.tooltip,children:p$1},`${a.tooltip}-${s}`)}),[i]);return jsx(qm,{id:r,"data-testid":"AuthIcons",children:l})}var Jm=Bh;var Nh=(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 Wh=Jm;var Qm=styled$1(Hh,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var $h=forwardRef(({children:e,...t},o)=>{let n=Bc(useId(),"table-cell");return jsx(Qm,{id:n,component:"div","data-testid":"TableCell",...t,ref:o,children:e})}),w=memo($h);var td=styled("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?gc(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),Zo=styled("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),pt=styled(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),Uv=styled("img")(()=>({width:"12px",height:"12px"})),od=styled("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),Gv=styled("span")(({theme:e})=>({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})),nd=styled("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),rd=styled(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),H=styled("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),id=styled(H)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),ad=styled(H)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),Fr=styled(w)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Te=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ye=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),$=styled("img")(()=>({width:"36px",height:"24px"})),Hr=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"}`})),ct=styled(motion.span)(({theme:e,order:t})=>({position:"absolute",left:0,zIndex:t+6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var Jo={VOID:{icon:gk},CAPTURED:{icon:fk}};var Or=styled$1(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})),_r=styled$1("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)})),zr=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"}`})),$r=styled$1("img")({width:"14px",height:"14px"}),Qt=styled$1(ye)({width:"16px",height:"16px"}),Dt=styled$1("img")({width:"16px",height:"16px"}),ld=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Ur(e){return e<5?5:e===100?95:e}var sd=styled$1(Gn)({display:"flex",alignItems:"center",gap:"12px"});function Zh({value:e,format:t,flagIcon:o,hasFlag:n,tableMode:r,...i}){let l=o&&jsx(p,{title:Na(o||""),children:jsx(b$2,{countryCode:o})}),a=useMemo(()=>z$1(e,t),[e]);return jsx(w,{...i,children:jsxs(sd,{children:[n&&jsx(td,{sx:{visibility:"visible"},className:"geography-box",children:l}),jsx(Box,{sx:{...Ya(r)&&{fontSize:"11px"}},children:a})]})})}var en=Zh;function pd({value:e,currentTimezone:t=jo.UTC,timezoneOffset:o=0,defaultTimezoneOffset:n=0,hideTimezoneIcon:r=false,...i}){let l=m=>v$1(e,{currentTimezone:t,targetTimezone:m}),a=l(o),s=l(n),p$1=z$1(s),c=!r&&n!==o;return jsxs(Gn,{sx:{display:"flex",gap:"8px"},children:[jsx(en,{value:a,...i}),c&&jsx(p,{title:p$1,children:jsx("img",{src:H$1,width:14,alt:"timezone"})})]})}function oy({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}`,l=jsx(Fragment,{children:o?.map(a=>{let s=a.name||a.description,p=(s?.length||0)>20?`${s?.slice(0,20)}...`:s;return jsx("div",{children:p},a.id)})});return jsx(p,{title:(o||[]).length>1?l:void 0,children:jsx(w,{...n,children:jsx("span",{children:i})})})}var ny=oy;function iy({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(w,{sx:{fontSize:"11px"},...n,children:i})}var ay=iy;var cd=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Yr=styled$1("span",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"25ch",flex:1,...Ya(t)&&{fontSize:"11px",color:e.palette.text.primary}})),md=styled$1("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),dd=styled$1("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});function py({customerInitiated:e,children:t,isTimezoneIconShown:o,hasCustomerIcon:n,customerIcon:r,customerName:i,hideCustomerInitiatedIcon:l,hideTimezoneIcon:a,phone:s,email:p$1,id:c,...m}){let{t:f}=useTranslation(),C=e===false?f("merchantInitiated"):"",x=ac(i),I=i?.split(" ")?.map(y=>y?.[0]?.toUpperCase()).join(""),S=useMemo(()=>Ca(),[]),b=n&&jsx(p,{title:t,children:jsx(rd,{"data-testid":"CustomerCell_customerShownIcon",sx:{background:S},src:r,alt:r,children:I})}),d=useMemo(()=>[{name:"ID",value:c},{name:"Name",value:i},{name:"Email",value:p$1},{name:"Phone",value:s}],[p$1,s,c,i]),g=useMemo(()=>d.some(({value:y})=>y)?jsx("div",{"data-testid":"CustomerCell_customerTooltip",children:d.map(({name:y,value:T},P)=>T&&jsx("div",{"data-testid":`CustomerCell_customerTooltip_${y}`,children:y==="Name"?T:`${y}: ${T}`},`${P}-${T}`))}):null,[d]);return jsx(w,{...m,"data-testid":"CustomerCell_TableCell",children:jsxs(cd,{"data-testid":"CustomerCell_StyledCustomerCell",children:[b,jsx(p,{title:g,children:jsx(Yr,{"data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":x,children:t})}),!a&&jsx(md,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(dd,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!l&&jsx(p,{title:C,children:jsx(od,{"data-testid":"CustomerCell_StarBadgeWrapper",className:"geography-box",isShown:!!C,children:C&&jsx("img",{"data-testid":"CustomerCell_merchantInitiatedIcon",src:wb$1,alt:"merchant",style:{width:"16px",height:"16px"}})})})]})})}var cy=py;function dy({children:e,customerName:t}){let o=ac(t);return jsx(Yr,{tableMode:"sheet","data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":o,children:e})}var uy=dy;var jr=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),ud=styled$1("span")(({theme:e,tableMode:t})=>({backgroundColor:e.palette.grey[100],display:"block",borderRadius:"4px",padding:"1.5px 3px",fontSize:Ya(t)?"11px":"10px",lineHeight:"13px",textTransform:"uppercase",fontWeight:e.typography.fontWeightBold})),fd=styled$1("span")(({theme:e,tableMode:t})=>({fontSize:Ya(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),Ja=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"})),Kr=styled$1("div")(({theme:e,count:t})=>({justifyContent:"space-between",display:"flex",width:"100%",gap:(t||1)<=1?e.spacing(1.5):e.spacing(1)}));var sE=({type:e,selectAmount:t,selectCurrency:o,requestAmount:n,requestCurrency:r,merchantAmount:i,merchantCurrency:l})=>{let a=Ka(t,o),s=Ka(n,r),p=Ka(i,l);return jsxs(Ja,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Fa[e]:""}),jsxs(Ja,{children:[e!=="fx"&&jsxs(Kr,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(b$7,{currency:o})," ",a.integerAmount,".",a.decimalAmount]})]}),jsxs(Kr,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(b$7,{currency:r})," ",s.integerAmount,".",s.decimalAmount]})]}),jsxs(Kr,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(b$7,{currency:l})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var eo=({tableMode:e,conversionType:t})=>t?jsx(ud,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var to=({tableMode:e,amount:t,currency:o})=>jsx(fd,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(b$7,{currency:o,fontSize:10})})," ",jsx(b$8,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var gd="default";function yy({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(w,{...i,children:jsxs(jr,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(eo,{tableMode:gd,conversionType:e})})}),o&&jsx(p,{title:jsx(b$7,{currency:o}),children:jsx(b$2,{currencyCode:o})}),jsx(p,{title:r,children:jsx(to,{tableMode:gd,amount:t,currency:o})})]})})}var Iy=yy;var xd="text";function Sy({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(w,{...i,children:jsxs(jr,{children:[jsx(p,{title:n||"",children:jsx(eo,{tableMode:xd,conversionType:e})}),jsx(p,{title:jsx(b$7,{currency:o}),children:jsx("span",{})}),jsx(p,{title:r,children:jsx(to,{tableMode:xd,amount:t,currency:o})})]})})}var Ty=Sy;var hd="sheet";function Py({conversionType:e,amount:t,currency:o}){let{integerAmount:n,decimalAmount:r}=Ka(t,o);return jsxs(b$1,{copyTrigger:"press",copyText:t?`${n}.${r}`:"-",children:[jsx(eo,{tableMode:hd,conversionType:e}),jsx(to,{tableMode:hd,amount:t,currency:o})]})}var vy=Py;var Id=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),bd=styled$1(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})),Qa=styled$1(motion.div)(({theme:e})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.secondary.main}1A`,paddingInline:e.spacing(.5),borderRadius:"56px"})),no=(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}}),ro=styled$1(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"}})),io=styled$1(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}})),ao=styled$1(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"})),Sd=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Td=e=>e?Object.keys(e).filter(t=>e[t]).reduce((t,o)=>(t[o]=e[o],t),{}):{};var lo=({statuses:e,centerIconKey:t})=>{let o=useMemo(()=>Td(e),[e]),n=useMemo(()=>Object.values(o).filter(Boolean),[o]),r=useMemo(()=>{if(!t)return 0;let i=Object.entries(o).findIndex(([l])=>l===t);return i===-1?Math.floor((n.length-1)/2):i},[o,t,n.length]);return {statusesList:n,centerIconIndex:r}};function Dy({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=lo({statuses:e,centerIconKey:t}),r=useTheme(),i=n.length||0;return jsx(w,{...o,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:i,children:n.map((l,a)=>l?jsx(io,{order:a,variants:no(a,r.shadows[4],40),children:jsx(ro,{children:l})},a):null)})})}var My=Dy;function Ry({statuses:e,...t}){let{statusesList:o}=lo({statuses:e});return jsx(w,{...t,children:jsx(Sd,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var ky=Ry;function By({statuses:e,centerIconKey:t,xGap:o,...n}){let{statusesList:r}=lo({statuses:e,centerIconKey:t}),i=useTheme(),l=r.length||0,a=o||120;return jsx(w,{...n,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:l,children:r.map((s,p)=>s?jsx(io,{order:p,variants:no(p,i.shadows[4],a),children:jsx(ro,{isTextShown:true,children:s})},p):null)})})}var Ny=By;var Jr=styled$1("section",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",textAlign:"center",borderRadius:"50%",gap:Ya(t)?"4px":e.spacing(1),overflow:"visible"})),Qr=styled$1("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}})),wd=styled$1("img",{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({width:"18px",height:"18px",...!e&&{pointerEvents:"none",filter:"opacity(0.3)"}})),De=styled$1(motion.img)(({icon:e})=>({width:"13.3px",height:"13.3px",...e==="cancel"&&{padding:"1.15px"}}));function Pd({isAnyActionLoading:e,isAnyActionHasError:t,isAnyActionSuccessful:o,areThereAnyShownActions:n}){let{t:r}=useTranslation();return t?jsx(De,{src:jc,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"fail-icon"):o?jsx(De,{src:kc,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(De,{src:hc,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(wd,{alt:"more",src:ma,isActive:n},"ellipsis-icon")})}Pd.displayName="ActionIconsVariants";var an=memo(Pd);var so={GRAY:{icon:Bb,color:"#CFCFCF"},ORANGE:{icon:zb,color:"#FFD503"},RED:{icon:Cb,color:"#FF0000"}},ei={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},ti={flag:E,dispute:F,refund:qk,void:zk,capture:ja,cancel:hk,clock:Ue,reverse:Uh,destination:Og$1,invoice:Dh,users:Ci$1,brand:Bi$1,clipboard:Di,viewApi:Wd,viewReceipt:rc,delete:Ej};function oi({actions:e,isDropdownShown:t,onCloseDropdown:o,renderDropdown:n}){let[r,i]=useState(null),l=!!r,a=(e||[]).filter(x=>x.isShown!==false),s=a.some(x=>x.isLoading),p=a.some(x=>x.isError),c=a.some(x=>x.isSuccess),m=a.length>0||!!n,f=x=>{s||!m||i(x.currentTarget);},C=()=>{i(null),o?.();};return useEffect(()=>{t||i(null);},[t]),{anchorEl:r,open:l,filteredActions:a,isAnyActionLoading:s,isAnyActionHasError:p,isAnyActionSuccessful:c,areThereAnyShownActions:m,handleClick:f,handleClose:C,setAnchorEl:i}}var vd=e=>jsx(zy,{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 Ed=".IDButton-root:not(.IDButton-hoverDisabled):hover &",Dd=styled$1("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",[Ed]:{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}})),Md=styled$1("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"},[Ed]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function jy({icon:e=jsx(vd,{}),id:t,sx:o,disableOnHoverEffect:n=false,onCopyId:r,className:i,...l}){let{t:a}=useTranslation();return jsx(p,{title:a("copy"),children:jsx(Gn,{className:nc("IDButton-root",n&&"IDButton-hoverDisabled",i),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...l,children:jsxs(Dd,{className:"IDButton-button",children:[t?jsx(Md,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var ol=memo(jy);var fM=memo(({flag:e,actions:t,flagTooltip:o,flagsCount:n,dropdownAction:r,onCloseDropdown:i,isDropdownShown:l=true,row:a,showJsonViewer:s=true,isTextShown:p$1,showIdButton:c=true,onCopyId:m,rowId:f$1,onJsonViewClick:C,renderDropdown:x,startSlot:I,...S})=>{let{t:b}=useTranslation(),{open:d,anchorEl:g,filteredActions:y,isAnyActionLoading:T,isAnyActionHasError:P,isAnyActionSuccessful:h,areThereAnyShownActions:v,handleClick:A,handleClose:D,setAnchorEl:E}=oi({actions:t,isDropdownShown:l,onCloseDropdown:i,renderDropdown:x});return jsx(w,{...S,sx:{overflow:"visible",...S.sx},children:jsxs(Jr,{"data-testid":"ActionCell_ActionCellContainer",children:[I,e&&jsx(Fragment,{children:p$1?jsx(p,{title:o,children:jsx(H,{"data-testid":"ActionCell_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:o})}):jsx(p,{title:o,children:jsxs(pt,{"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(De,{"data-testid":"ActionCell_FlagIcon",sx:{width:"12px",height:"11px"},src:so[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:ei[so[e]?.color]||"orange","data-testid":"ActionCell_StyledBadge",children:[n,"x"]})})]})})}),c&&jsx(ol,{id:f$1||a.id,onCopyId:m}),jsxs("div",{"data-testid":"ActionCell_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[s&&jsx(Fragment,{children:jsx(Zo,{onClick:C,type:"button","data-testid":"ActionCell_TransparentButton",children:jsx(p,{title:b("jsonViewer"),children:jsx(nd,{"data-testid":"ActionCell_IdButtonContainer",children:jsx(motion.img,{src:Wd,alt:"icon"},"id-icon")})})})}),jsxs(Qr,{id:"styled-popover",selected:!!r||d,"data-testid":"ActionCell_ActionsIconContainer","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:[jsx(Zo,{onClick:A,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(an,{isAnyActionLoading:T,isAnyActionHasError:P,isAnyActionSuccessful:h,areThereAnyShownActions:v})})}),r,x?x(g,E):jsx(Fragment,{children:v&&jsx(f,{style:{zIndex:2e3},open:d,onClose:D,anchorEl:g,menuItems:y.map(k=>({...k,onClick:N=>{k?.onClick?.(N),k.hasActionMenu||D();},onRightClick:N=>{k?.onRightClick?.(N),D();},icon:k.customIcon||jsx(De,{icon:k.icon,src:k.iconSrc??(k.icon&&ti[k.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${k.label.trim()}`)}))})})]})]})]})})});function eI({flag:e,flagTooltip:t,flagsCount:o,row:n,showJsonViewer:r=true,isTextShown:i,showIdButton:l=true,rowId:a,onJsonViewClick:s,tableMode:p$1,...c}){return jsx(w,{...c,sx:{overflow:"visible"},children:jsxs(Jr,{"data-testid":"ActionsColumn_ActionCellContainer",tableMode:p$1,children:[e&&jsx(Fragment,{children:i?jsx(p,{title:t,children:jsx(H,{"data-testid":"ActionsColumn_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:t})}):jsx(p,{title:t,children:jsxs(pt,{"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(De,{"data-testid":"ActionsColumn_FlagIcon",sx:{width:"12px",height:"11px"},src:so[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:ei[so[e]?.color]||"orange","data-testid":"ActionsColumn_StyledBadge",children:[o,"x"]})})]})})}),l&&jsx(b$1,{sx:{minWidth:"213px"},children:a||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 tI=memo(eI);function iI({actions:e,dropdownAction:t,onCloseDropdown:o,isDropdownShown:n=true,renderDropdown:r,...i}){let{open:l,anchorEl:a,filteredActions:s,isAnyActionLoading:p,isAnyActionHasError:c,isAnyActionSuccessful:m,areThereAnyShownActions:f$1,handleClick:C,handleClose:x,setAnchorEl:I}=oi({actions:e,isDropdownShown:n,onCloseDropdown:o,renderDropdown:r});return jsx(w,{...i,sx:{overflow:"visible"},children:jsx("div",{"data-testid":"ActionIconColumn_Container",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:jsxs(Qr,{id:"styled-popover",selected:!!t||l,"data-testid":"ActionIconColumn_ActionsIconContainer","data-is-active":f$1,sx:{...!f$1&&{pointerEvents:"none"}},children:[jsx(Zo,{onClick:C,"data-testid":"ActionIconColumn_ActionsIconContainer_TransparentButton","data-is-active":f$1,sx:{...!f$1&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(an,{isAnyActionLoading:p,isAnyActionHasError:c,isAnyActionSuccessful:m,areThereAnyShownActions:f$1})})}),r?r(a,I):jsxs(Fragment,{children:[t,f$1&&jsx(f,{style:{zIndex:2e3},open:l,onClose:x,anchorEl:a,menuItems:s.map(S=>({...S,onClick:b=>{S?.onClick?.(b),S.hasActionMenu||x();},onRightClick:b=>{S?.onRightClick?.(b),x();},icon:S.customIcon||jsx(De,{icon:S.icon,src:S.iconSrc??(S.icon&&ti[S.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${S.label.trim()}`)}))})]})]})})})}var aI=memo(iI);function pI({deviceType:e,geographyVariant:t,isTextShown:o,deviceCountry:n,...r}){return jsx(w,{...r,children:jsxs(Gn,{sx:{display:"flex",gap:"8px",alignItems:"center"},children:[jsx(kt,{geographyVariant:t,isTextShown:o,countryCode:n}),jsx(c$1,{type:e,isTextShown:o})]})})}var cI=pI;var kd=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),Vd=styled("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`})),Bd=styled("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("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 Nd=styled("img")(({pointLeft:e})=>({width:"12.5px",height:"13px",transform:`scale(${e?"-1":"1"}, 1)`}));styled("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 fI({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...l}){let a=useMemo(()=>{if(typeof e=="number")return e;let c=Number(e);return Number.isNaN(c)?void 0:c},[e]),s=a!==void 0?a>0:!!e,p$1=a!==void 0&&a>1;return !s||r?null:jsx(Gn,{sx:{width:"fit-content",overflow:"visible"},...l,children:jsx(p,{title:t,children:jsxs(Bd,{children:[jsx(Nd,{src:z$2,pointLeft:i==="left"}),p$1&&jsx(kd,{children:jsx(Vd,{children:e})})]})})})}var CI=fI;function hI(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(Gn,{sx:{display:"flex",gap:"4px",alignItems:"center"},...n,children:r.map((i,l)=>{let a=Ja$1(i?.amount||0),s=`${a.integerAmount}.${a.decimalAmount}`;return jsxs(b$1,{copyTrigger:"press",copyText:s,children:[i?.id," | ",jsx(b$7,{currency:i?.currency})," ",s]},i?.id||l)})})}var yI=hI;function SI({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...l}){let a=o?.destination||[],s=Ja$1(n||0),p$1=Ja$1(a?.[0]?.amount||0);return !e||r?null:jsx(Gn,{sx:{width:"fit-content",overflow:"visible"},...l,children:jsx(p,{title:t,children:jsx(H,{sx:{textAlign:"left",justifyContent:"flex-start",height:"auto"},children:e&&typeof e=="number"&&e>1?jsxs("div",{children:["Destination ",a?.[0]?.id," - ",jsx(b$7,{currency:a?.[0]?.currency})," ",p$1.integerAmount,".",p$1.decimalAmount," +",e-1]}):jsxs("div",{children:["Destination ",a?.[0]?.id," - ",jsx(b$7,{currency:a?.[0]?.currency})," ",s.integerAmount,".",s.decimalAmount]})})})})}var TI=SI;var SL=({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=Ja$1(r.amount||0);return jsxs("div",{children:[r?.id," - ",jsx(b$7,{currency:r?.currency})," ",i.integerAmount,".",i.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(b$7,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var Hd=styled(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"})),Od=styled("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("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 _d(e){return e<5?5:e===100?95:e}function EI({percentage:e=0,days:t,remainingAmount:o=0,currency:n,...r}){let i=useTheme(),l=jsx(b$7,{currency:n}),{integerAmount:a,decimalAmount:s}=Ka(o,n),p$1=`${a}.${s}`,c=useMemo(()=>jsxs(Fragment,{children:["Remaining Authorized Balance - ",l," ",p$1]}),[o,n]);return e===0||o<0?null:jsx(w,{...r,children:jsx(p,{title:c,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(Hd,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:i.shadows[4]}}},children:[jsxs(Od,{percentage:e,children:[e,"% ",jsx(Hr,{percentage:_d(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 DI=EI;function LI({remainingAmount:e,currency:t}){let o=jsx(b$7,{currency:t}),{integerAmount:n,decimalAmount:r}=Ka(e,t),i=`${n}.${r}`;return jsxs(b$1,{copyTrigger:"press",copyText:`${n}.${r}`,children:[o," ",i]})}var RI=LI;var pl=["authenticationMode","paymentAuth","paymentAgreement"],cl=["paymentIssuer","paymentInitiated","paymentDevice"],zd=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...cl,...pl];var Gd=styled$1(Gn)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),Yd=styled$1(Gn)(()=>({marginLeft:"8px",width:20}));function WI(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let l of zd)if(e?.[l])return {centerIcon:e?.[l],centerIconId:l};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$1,{expandedZIndex:0,centerIcon:t,leftIcons:cl.filter(l=>l!==o&&e?.[l]).map(l=>e?.[l]),rightIcons:pl.filter(l=>l!==o&&e?.[l]).map(l=>e?.[l]),expandableCenterRight:(n||r)&&jsxs(Gd,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}),expandableCenterLeft:i&&jsx(Yd,{children:e.paymentType})})}var FI=memo(WI);var Kd=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function hR({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let i=e?.name||`${r(wt(fc(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:i,children:jsxs(Kd,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function wR({method:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e,title:`Payment Method - ${t(wt(e))}`}):null}function MR({type:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e??"",title:`Payment Type - ${t(wt(e))}`}):null}function NR({scheme:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e,title:`Payment Scheme - ${t(wt(e))}`}):null}var $R=({mode:e})=>e?jsx(p,{title:_o[e],children:jsx(Gn,{component:"img",src:e==="C"?da:ca})}):null;var ri={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},ii={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ai=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),li=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),Zd=styled(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"})),Jd=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ml=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),si=(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"}}}),pi=styled(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function rb({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let i=useTheme(),{t:l}=useTranslation(),a=useMemo(()=>[...t?[ii.SAVED_TOKEN]:[],...(o||0)>0?[ii.COUNT]:[],...e&&ri[e]?[ri[e]]:[]],[t,o,e]),s=f=>n?jsx(pi,{"data-testid":"AgreementCell_countBadge",order:f,variants:si(f,n?85:0),children:jsx(p,{title:l("totalPaymentCount",{amount:f$3(o)}),children:jsx(li,{children:jsxs(ai,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:ii.COUNT.color},children:["x",o]})})})},f):jsx(a$7,{value:o,index:f},f),p$1=a.map((f,C)=>f.label==="countBadge"?s(C):jsx(p,{title:l(f.label),children:jsx(pi,{order:C,variants:si(C,C>1&&n?62:0),sx:{width:n?"auto":"36px"},children:n?jsx(li,{children:jsx(ai,{"data-testid":"AgreementCell_agreementType",sx:{color:f.color},children:l(f.label)})}):jsx(ml,{src:f.icon,alt:"agreement"})},f.color)},f.color)),c=p$1.length,m=jsx(p,{title:"No agreement",children:jsx(pi,{order:0,variants:si(0,0),sx:{width:n?"auto":"36px"},children:n?jsx(li,{children:jsx(ai,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(ml,{src:Ei,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(w,{...r,children:jsx(Jd,{"data-testid":"AgreementCell",children:jsx(Zd,{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 ib=rb;var eu=styled$1("img")(()=>({width:"12.67px",height:"15px"}));styled$1("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 lb({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(w,{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(pt,{"data-testid":"AuthCell_BadgeWrapper",children:o?jsx(H,{"data-testid":"AuthCell_TextLabel",sx:{minWidth:"max-content"},children:t}):jsx(eu,{src:na,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var sb=lb;var tu={REFUNDED:pk,PAID_OUT:ok,SETTLED:rk,PENDING:qk,UNKNOWN:yk,TIMEDOUT:wk,CANCELLED:hk,FAILED:lk,DECLINED:jk,RESTRICTED:tk,IN_PROGRESS:Bk,ACCEPTED:sk},ou={REFUNDED:"refunded"};function nu({status:e,refundTooltip:t}){let{t:o}=useTranslation();return jsx(p,{title:jsxs("div",{children:[jsx("div",{children:o(wt(e))}),t]}),children:jsx(ye,{children:jsx("img",{src:tu[e],alt:"refund-requested"})})})}function iu({status:e,gatewayTooltip:t,unCapturedTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:l,refundTooltip:a}){let{t:s}=useTranslation();return Ln$1?.includes(e??"")?jsx(qe,{chargeStatus:e,gatewayTooltip:t,chargeTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:l,iconWrapperStyles:{height:17}}):jsx(nu,{status:e,refundTooltip:a})}var au=styled$1(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})),lu=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})),su=styled$1(en)(({theme:e})=>({fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main}));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 pu=styled$1("img")({width:"14px",height:"14px"}),cu=styled$1(Gn)(({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 dl({status:e,refundIcon:t,refundTooltip:o,refundTooltipLabel:n,date:r,gatewayTooltip:i,unCapturedTooltip:l,acquirerTooltip:a,errorCode:s,acquirerCode:p$1,gatewayCode:c,timezone:m}){let f=useTheme(),{t:C}=useTranslation(),x=v$1(new Date(Number(r)),{currentTimezone:ko,targetTimezone:m?.offset}),I=useMemo(()=>t||(e==="REFUNDED"?pk:rk),[e,t]);return ["REFUNDED","PAID_OUT"].includes(e??"")?jsx(p,{title:jsxs("div",{children:[jsx("div",{children:n??C(ou.REFUNDED)}),o]}),children:jsxs(au,{whileHover:["animate","fadeIn"],animate:"start",variants:{...r&&{animate:{boxShadow:f.shadows[4]}}},sx:{...!r&&{backgroundColor:"transparent"}},children:[jsx(pu,{sx:{...!r&&{width:"16px",height:"16px"}},src:I,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(lu,{children:jsx(su,{value:x})})})]})}):jsx(iu,{status:e,refundTooltip:o,gatewayTooltip:i,unCapturedTooltip:l,acquirerTooltip:a,errorCode:s,acquirerCode:p$1,gatewayCode:c})}var du=()=>{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 Tb({status:e,date:t,refundTooltip:o,isTextShown:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:l,acquirerCode:a,gatewayCode:s,unCapturedTooltip:p$1,timezone:c,refundTooltipLabel:m,refundIcon:f,...C}){let{t:x}=useTranslation(),I=du(),S=useCallback(d=>Mu(d).format("MMM D, YYYY"),[]),b=Ln$1.includes(e);return jsx(w,{...C,style:{overflow:"visible"},children:jsx(Te,{children:jsx(cu,{width:n?"auto":"36px",sx:{...b&&{border:"none"}},children:n?jsx(p,{title:t?S(t):x(wt(e)),children:jsx(H,{sx:{...I[e]?I[e]:I.PENDING},children:x(wt(e))})}):jsx(dl,{status:e,refundTooltip:o,date:t,gatewayTooltip:r,unCapturedTooltip:p$1,acquirerTooltip:i,errorCode:l,acquirerCode:a,gatewayCode:s,timezone:c,refundTooltipLabel:m,refundIcon:f})})})})}var wb=Tb;var fu=styled("img")(()=>({width:"16px",height:"16px"})),Cu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),gu=styled("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`})),xu=styled("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function Pb({walletId:e,country:t,showCountry:o=true,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(Cu,{children:[o&&t&&jsx(p,{title:Na(t),children:jsx(b$2,{countryCode:t})}),jsxs(gu,{children:[jsx(fu,{src:cc,alt:"wallet-icon"}),e&&jsxs(xu,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var vb=Pb;var hu=styled("img")(()=>({width:"16px",height:"16px"})),yu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),Iu=styled("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}`})),bu=styled("span")(({theme:e})=>({color:`${e.palette.text.primary}`,fontSize:"14px",lineHeight:"16.8px"}));styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Ab({walletId:e,country:t,name:o,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(yu,{children:[t&&jsx(p,{title:Na(t),children:jsx(b$2,{countryCode:t})}),jsxs(Iu,{children:[jsx(hu,{src:dc,alt:"bank-icon"}),e&&jsxs(bu,{children:[o," \xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Eb=Ab;var Cl={PAID_OUT:ok,SETTLED:uk,PENDING:Qh,INITIATED:Qh,FAILED:lk};function Rb({payoutStatus:e="PAID_OUT",...t}){let{t:o}=useTranslation(),n=useTheme();return jsx(w,{...t,children:jsx(Te,{children:jsx(ye,{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&&Cl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:Cl[e],alt:"settled-icon",style:{width:"16px",height:"16px",objectFit:"contain"}})})})})})}var kb=Rb;styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"}));styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"}));styled$1(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$1("img")(()=>({width:"13px",height:"13px"}));styled$1(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$1(motion.div)(()=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"}));var Vb=styled$1("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));var gl=a$4;function Wb({status:e,chargeStatus:t,isTextShown:o,...n}){let{t:r}=useTranslation();return jsx(w,{...n,children:jsxs(Te,{children:[jsx(Ci,{status:e,isTextShown:o}),t&&gl[t]&&jsx(p,{title:r(wt(t)),children:jsx($,{src:gl[t],alt:"charge-icon"})})]})})}var Fb=Wb;var Ob={FAILED:fh$1,PENDING:mh$1,INITIATED:bh$1,ATTEMPTED:ah,EXEMPTED:eh$1,EXEMPTED_WITH_TRANSACTION:eh$1,EXEMPTED_WITHOUT_TRANSACTION:dh$1,REJECTED:ch$1,UNAVAILABLE:hh,UNDETERMINED:ih,SUCCESS:lh,AUTHENTICATED:kh$1,AUTHENTICATED_WITH_TRANSACTION:kh$1,AUTHENTICATED_WITHOUT_TRANSACTION:kh$1,AUTHENTICATED_AUTHORIZE_FAILED:fh$1},xl={FAILED:nh$1,PENDING:oh$1,INITIATED:ph$1,ATTEMPTED:qh,EXEMPTED:rh$1,EXEMPTED_WITH_TRANSACTION:rh$1,EXEMPTED_WITHOUT_TRANSACTION:sh,REJECTED:th$1,UNAVAILABLE:uh$1,UNDETERMINED:vh,SUCCESS:wh,AUTHENTICATED:xh,AUTHENTICATED_WITH_TRANSACTION:xh,AUTHENTICATED_WITHOUT_TRANSACTION:yh$1,AUTHENTICATED_AUTHORIZE_FAILED:nh$1},Nt=a$4;function $b({status:e,authorizedStatus:t,chargeStatus:o,chargeTooltip:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:l,...a}){let{t:s}=useTranslation(),p$1=useTheme(),c=[e&&xl[e]?jsx(p,{title:s(wt(e)),children:jsx("img",{src:xl[e],alt:"authentication-icon",style:{width:"36px",height:"24px",objectFit:"scale-down"}})}):null,o&&Nt[o]?jsx(p,{title:s(wt(o)),children:jsx(qe,{showAuthorizedStatus:true,chargeStatus:o,gatewayTooltip:r,chargeTooltip:n,acquirerTooltip:i,errorCode:l})}):null,t&&f$2[t]?jsx(p,{title:s(wt(t)),children:jsx("img",{src:f$2[t],alt:"authorized-icon",style:{width:"36px",height:"20px",objectFit:"scale-down"}})}):null].filter(Boolean),m=c.length||0;return jsx(w,{...a,sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:m,children:c.map((f,C)=>f?jsx(io,{order:C,variants:no(C,p$1.shadows[4],40),children:jsx(ro,{children:f})},C):null)})})}var Ub=$b;var yl={issuer:Zh$1,scheme:_h,device:Xh,app:Wh$1,wallet:Vh,biometric:Xh};function jb({type:e,...t}){let{t:o}=useTranslation();return jsx(w,{...t,children:jsx(Te,{children:jsx(ye,{className:"authentication-status",children:e&&yl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:yl[e],alt:"authentication-type"})})})})})}var Kb=jb;var Su={SMS:be,EMAIL:Zd$1,WHATSAPP:ce};var Tu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),wu=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Pu=styled(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"})),vu=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),Au=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),Eu=(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 Jb({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]},a=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(ct,{order:c,variants:Eu(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(Au,{children:jsx(vu,{sx:{color:i[p$1]},children:m})}):jsx(wu,{src:Su[p$1],alt:p$1})})},`${p$1}-${c}`)}),s=a?.length||0;return jsx(w,{...o,children:jsx(Tu,{children:a?.length>0?jsx(Pu,{layout:true,className:"payment-sources-container",whileHover:"animate",animate:"start",sourcesCount:s||0,variants:{animate:{width:(s||0)*38}},style:{zIndex:29},children:a}):null})})}var Qb=Jb;function xn(e){return z$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD, YYYY",lastWeek:"MMM DD, YYYY",nextWeek:"MMM DD, YYYY"})}styled(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("img")(()=>({width:"16px",height:"16px"}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));var Du=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,color:"#000",cursor:"default"}));function tS({dueDate:e,expiryDate:t,...o}){let n=useMemo(()=>({label:xn(Mu(e).valueOf()),tooltip:"Due Date"}),[e]),r=useMemo(()=>({label:xn(Mu(t).valueOf()),tooltip:"Expiry Date"}),[t]),i=s=>jsx(p,{title:s.tooltip,children:jsx(Du,{children:s.label})}),l=useMemo(()=>e?i(n):t?i(r):null,[n,r,e,t]),a=useMemo(()=>t&&e?[i(r)]:[],[n,r,e,t]);return !e&&!t?null:jsx(w,{...o,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},centerIcon:l,rightIcons:a})})}var oS=tS;var Lu=styled(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("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("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 Il=styled("img")({width:"24px",height:"24px"});function iS({products:e,...t}){let o=e?.map((r,i)=>jsx(Il,{sx:{...r?.toLowerCase()===Bn.tokens.code?.toLowerCase()&&{borderRadius:"8px",border:"1px solid rgba(0, 0, 0, 0.10)"}},className:"app-logo",src:Dn.find(l=>l.code?.toLowerCase()===r?.toLowerCase())?.iconUrl,alt:"product-icon"},`${i}-${r}`)),n=jsxs(Lu,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:"10px 0px 8px 0px #F2F2F2"}},children:[jsx(Il,{src:ui,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(w,{...t,style:{overflow:"visible"},children:jsx(Te,{children:jsx("div",{style:{width:"30px",position:"relative",zIndex:24},children:n})})})}var aS=iS;function hi(e){return jsx(Fr,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var Bu=styled$1(Gn)(()=>({display:"flex",alignItems:"center",gap:"8px"})),Nu=styled$1(Gn)(({theme:e})=>({fontSize:"14px",color:e.palette.text.primary,lineHeight:"16.8px"}));function E2({currency:e}){return jsxs(Bu,{children:[jsx(b$2,{currencyCode:e}),jsx(Nu,{children:e})]})}Mu.extend(mS);Mu.extend(cS);function Hu({value:e,...t}){let o=useMemo(()=>z$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM D, YYYY",lastWeek:"MMM D, YYYY",nextWeek:"MMM D, YYYY"}),[e]);return jsx(w,{...t,children:o})}var Ou=styled$1(Gn)(({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 K2({reference:e}){return e?jsx(p,{title:`Bank - ${e}`,children:jsx(Ou,{children:jsx(Gn,{component:"img",src:qb,alt:"bank",width:14})})}):jsx(Fragment,{})}var bl={acquirer:qb,generic:rb$1,payment:$d,gateway:vn,order:_d$1};var _u=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),zu=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),$u=styled(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"})),Uu=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),Gu=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled("div")(()=>({height:"18px"}));var Yu=(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 bS=120,SS=50;function TS({isTextShown:e,getTooltipTitle:t,...o}){let[n,r]=useState(false),[i,l]=useState(null),a=useRef(null),s=useRef(false),p$1=useRef(false),c=useRef(null),m=useTheme(),f=useMemo(()=>Object.keys(bl).filter(T=>!!o[T]),[o]),C=()=>{c.current&&(clearTimeout(c.current),c.current=null);},x=()=>{l(a.current);},I=()=>{s.current=true,p$1.current=false,r(true),l(null),C(),c.current=setTimeout(()=>{p$1.current=true,x();},bS);};useEffect(()=>()=>C(),[]);let S=()=>{s.current||I();},b=()=>{C(),a.current=null,s.current=false,p$1.current=false,l(null),r(false);},d=T=>{if(a.current=T,p$1.current){C(),l(T);return}s.current||I();},g=()=>{a.current=null,p$1.current&&(C(),c.current=setTimeout(x,SS));},y=f.length;return jsx(w,{...o,children:jsx(_u,{children:y>0?jsx($u,{layout:true,className:"reference-sources-container",whileHover:"animate",onHoverStart:S,onHoverEnd:b,animate:n?"animate":"start",sourcesCount:y,variants:{animate:{width:y*38}},style:{zIndex:29},children:f.map((T,P)=>{let h=t?.(T)||`${Ku(T)} - ${o[T]}`,v=i===T;return jsx(ct,{order:P,variants:Yu(P,m.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>d(T),onMouseLeave:g,children:jsx(p,{open:v,disableHoverListener:true,disableInteractive:true,title:v?h:"",children:e?jsx(Gu,{children:jsx(Uu,{children:Ku(T)})}):jsx(zu,{src:bl[T],alt:T,sx:{...T==="order"&&{width:"11.82px"}}})})},`${T}-${P}`)})}):null})})}var wS=TS;var Sl={Y:{tooltip:"Authenticated",icon:kh$1,borderColor:"rgba(31, 136, 208, 0.10)"},N:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},R:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},A:{tooltip:"Attempted",icon:ah,borderColor:"rgba(31, 136, 208, 0.10)"},U:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},noAuth:{tooltip:"Not Authenticated",icon:bh$1,borderColor:"#F2F2F2"}},Tl={"3DS":{tooltip:"3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"}};styled("img")(()=>({width:"12.67px",height:"15px"}));var Xu=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Zu=styled("img")({width:"16px",height:"16px"});styled("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 Ju=styled(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"})),Qu=(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}}}),ef=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function vS({transactionStatus:e,isTextShown:t,eci:o,authType:n,...r}){let i=useTheme$1(),l=useMemo(()=>{let p=Sl[e??"noAuth"]??Sl.noAuth,c=p?.tooltip,m=p?.icon;return [{tooltip:c,content:t?c:m,type:t?"text":"icon"},...n?[{tooltip:n,content:t?Tl[n]?.tooltip:Tl[n]?.icon,type:t?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[e,o,t]),a=useMemo(()=>l.filter(p=>!!p.content).map((p$1,c)=>{let m=p$1.type==="text"?jsx(ef,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(H,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":p$1.content,children:p$1.content})}):jsx(Zu,{src:p$1.content,alt:p$1.tooltip});return jsx(p,{title:p$1.tooltip,children:jsx(ct,{order:-1*c,variants:Qu(c,i.shadows[4],t?124:39),sx:{...p$1.type==="text"&&{width:t?"120px":"58px"}},children:m})},`${p$1.tooltip}-${c}`)}),[r,l,t,i]),s=a.length;return jsx(w,{...r,children:jsx(Xu,{children:s>0?jsx(Ju,{layout:true,className:"authentication-sources-container",whileHover:"animate",animate:"start",sourcesCount:s,variants:{animate:{width:38}},style:{zIndex:29},children:a}):null})})}var AS=vS;var wl={checkout:Eh,checkoutSuccess:Fh};function MS({status:e,...t}){let{t:o}=useTranslation();return jsx(w,{...t,sx:{overflow:"visible"},children:jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:e&&wl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:wl[e],alt:"checkout-icon"})})})})}var LS=MS;var Pl={TRANSACTED:Kh,INITIATED:Ih$1,CANCELLED:Jh,EXPIRED:Hh$1};function nf({status:e,chargeStatus:t,...o}){let{t:n}=useTranslation();return jsx(w,{...o,sx:{overflow:"visible"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:[e&&Pl[e]&&jsx(p,{title:n(wt(e)),children:jsx($,{src:Pl[e],alt:"intents-icon"})}),t&&Nt[t]&&jsx(p,{title:n(wt(t)),children:jsx(qe,{chargeStatus:t})})]})})}var af=styled(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"})),lf=styled(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("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 sf(e){return e<5?5:e===100?95:e}var Si={PAID_OUT:{color:"#2ACE00",backgroundColor:"#2ACE000D"},PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},SETTLED:{color:"#2ACE00",backgroundColor:""}};function NS({percentage:e$1,date:t,payoutStatus:o,payoutTooltip:n,chargeTooltip:r,refundCount:i,isTextShown:l,...a}){let{t:s}=useTranslation(),p$1=useTheme();return e$1===0?null:jsx(w,{...a,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(af,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{gap:"4px"}},sx:{...l&&{height:"auto",padding:"0",backgroundColor:"transparent"}},children:[jsx(lf,{percentage:e$1,sx:{backgroundColor:"#eeeeee",...l&&{backgroundColor:"transparent",border:"none"}},variants:{...!l&&{animate:{boxShadow:p$1.shadows[4]}}},children:l?jsxs(H,{children:[e$1,"%"]}):jsxs(Fragment,{children:[e$1," % ",jsx(Hr,{percentage:sf(e$1)})]})}),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$1.shadows[4]},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:"neutral",children:[i,"x"]})})})]})}),jsx(ye,{className:"payout-status",style:{visibility:o==="PENDING"?"hidden":"visible",position:"relative",left:"57px",width:l?"auto":"24px"},children:o&&e[o]&&jsx(p,{title:n||s(wt(o)),children:l?jsx(H,{sx:{color:Si[o].color,border:`1px solid ${Si[o].color}1a`,backgroundColor:Si[o].backgroundColor},children:s(wt(o))}):jsx($,{src:e[o],alt:"settled-icon"})})})]})})}var WS=NS;var mf={DELETED:kf$1,DRAFT:lf$1,CREATED:mf$1,CANCELLED:Aa,CANCELED:Aa,EXPIRED:Ba,PAID:pf,REFUNDED:vf$1,DELIVERED:qf$1,VIEWED:rf,SAVED:sf$1,SCHEDULED:tf,PENDING:uf$1,REMINDED:""};styled(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 Al=styled("img")(()=>({height:"13.125px",width:"12px"})),Ti=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),df=styled("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"})),uf=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));function ff(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 Cf({chargeStatus:e,chargeTooltip:t,errorCode:o,iconStyles:n,iconWrapperStyles:r}){let{t:i}=useTranslation(),l=e?b$c[e]:null,a=e&&a$4[e]&&jsx(uf,{style:r,children:jsx($,{src:a$4[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(wt(e)),children:jsxs(Gn,{sx:{display:"flex",gap:"6px",alignItems:"center"},children:[a,!!Ln$1?.includes(e||"")&&jsx(df,{style:{background:l?.color},children:o})]})}):null}function gf({status:e,date:t,viewsCount:o,chargeStatus:n,errorCode:r,chargeTooltip:i,remindedCount:l=0,...a}){let{t:s}=useTranslation(),p$1=useTheme(),c=e?mf[e]:null,m=ff(e),f=`${s(e?.toLowerCase()||"")} ${xn(Mu(t).valueOf())}`,C=useMemo(()=>jsx(Cf,{chargeStatus:n,errorCode:r,chargeTooltip:i}),[n,r,i]),x=useMemo(()=>jsx(p,{title:s("reminded"),children:jsxs(Gn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[jsx(Al,{sx:{width:"14px",height:"14px"},src:le,alt:"icon"}),jsx(z,{style:{background:p$1.palette.error.main,fontWeight:600,color:p$1.palette.common.white},children:l})]})}),[l]),I=useMemo(()=>{if(c)return jsx(p,{title:s(f||""),children:jsx(Al,{src:c,alt:"status icon"})});if(n&&Nt[n])return C;if(l)return x},[c,n,l]);return !e&&!n&&!l?null:jsx(w,{...a,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},expandableCenterRight:o&&e==="VIEWED"&&c?[jsx(z,{style:{marginRight:"8px",color:"#fff",backgroundColor:m.color},children:o})]:void 0,centerIcon:I,leftIcons:l&&c?[x]:void 0,rightIcons:n&&Nt[n]&&c?[C]:void 0})})}function XS({tooltip:e,children:t,badge:o,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:t?jsx(p,{title:e,children:jsx(pt,{"data-testid":"BadgeCell_BadgeWrapper",children:jsxs(H,{"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 ZS=XS;var Ml={ACTIVE:ii$1,EXPIRED:hi$1,PENDING:ii$1,SAVED:fi,TRANSACTED:gi,CONSUMED:gi};var JS=(f=>(f.ABANDONED="ABANDONED",f.IN_PROGRESS="IN_PROGRESS",f.VOID="VOID",f.CANCELLED="CANCELLED",f.CAPTURED="CAPTURED",f.INITIATED="INITIATED",f.FAILED="FAILED",f.DECLINED="DECLINED",f.RESTRICTED="RESTRICTED",f.TIMEDOUT="TIMEDOUT",f.UNKNOWN="UNKNOWN",f.AUTHORIZED="AUTHORIZED",f))(JS||{});function eT({status:e,chargeTooltip:t,gatewayTooltip:o,acquirerTooltip:n,errorCode:r,cardId:i,hasChargeIcon:l,hasAuthorizedIcon:a,...s}){let{t:p$1}=useTranslation();return jsx(w,{...s,sx:{position:"relative",overflow:"visible"},children:jsxs(Te,{sx:{gap:"0.5rem"},children:[e&&Ml[e]&&jsx(p,{title:p$1(wt(e)),children:jsx($,{src:Ml[e],alt:"token-icon"})}),i&&jsx(p,{title:p$1(wt(e)),children:jsx($,{src:ji,alt:"card-icon"})}),l&&jsx(p,{title:p$1(wt("CAPTURED")),children:jsx(qe,{showAuthorizedStatus:true,chargeStatus:"CAPTURED",gatewayTooltip:o,chargeTooltip:t,acquirerTooltip:n,errorCode:r})}),a&&jsx(p,{title:p$1(wt("AUTHORIZED")),children:jsx($,{src:f$2.AUTHORIZED,alt:"authorized-icon"})})]})})}var tT=eT;var Rl=styled("img")(()=>({maxWidth:"13px",maxHeight:"13px"})),hf=styled("div")(({theme:e})=>({width:"24px",height:"24px",border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"})),yf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));function nT({brandName:e,brandIcon:t,...o}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...o,children:jsxs(yf,{children:[jsx(hf,{children:t?jsx(p,{title:e,children:jsx(Rl,{src:t,alt:"brand icon",onError:r=>{r.currentTarget.src=Bi$1;}})}):jsx(Rl,{src:Bi$1,alt:"brand icon"})}),jsx("span",{children:e})]})})}var rT=nT;function bf({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]??"",l=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 l?jsx(p,{title:l,children:jsx(Box,{component:"img",src:$j,alt:"meta",sx:{cursor:"pointer"}})}):null}var Sf=styled$1(motion.img,{shouldForwardProp:e=>e!=="width"&&e!=="height"})(({width:e,height:t})=>({width:e||"16px",height:t||"16px"}));var cT=({width:e,height:t,sx:o}={})=>{let n=Bc(useId(),"animated-spinner-icon");return jsx(Sf,{id:n,"data-testid":"AnimatedSpinnerIcon",src:hc,alt:"Loading",className:"spinner-loader",width:e,height:t,sx:o,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}})},Tf=cT;var wf=Tf;var vf=styled$1("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"})),Af=styled$1(motion.img)(()=>({width:"16px",height:"16px"}));var fT=({onClick:e,isSettlementsAvailable:t,isDownloadError:o,isDownloadLoading:n,isDownloadSuccess:r})=>{let i=useMemo(()=>n||r||o,[n,r,o]),l=useMemo(()=>r?kc:o?jc:Zj,[r,o]);return jsx(p,{title:t?"":"Pending",children:jsx(vf,{onClick:()=>t&&!i&&e(),children:jsx(AnimatePresence,{mode:"wait",initial:false,children:n?jsx(wf,{},"spinner"):jsx(Af,{src:t?l:_j,alt:"Download Report"})})})})};var gT=({receiptId:e})=>jsx(TableCell,{component:"div",children:jsx(p,{title:`Receipt - ${e}`,children:jsx(H,{sx:{padding:"3px 8px",maxWidth:"50px"},children:jsx("img",{src:rc,alt:"receipt"})})})});var xT=({receiptId:e})=>jsx(Fr,{children:jsx("span",{children:e})});var hT=({receiptId:e})=>jsx(hi,{children:jsx("span",{children:e})});var Lf=styled("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"}})),Rf=styled(Gn)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled("img")(()=>({width:"16px",height:"11.73px"}));var kf=styled("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"}})),Vf=styled("img")(()=>({width:"10.5px",height:"10.5px"})),Bf=styled("div")({marginLeft:"auto",width:"auto"});var Nf={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};function Wf({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...i}){let l=Nf[o??"incomplete"];return jsx(w,{...i,sx:{cursor:i?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(Lf,{hasClick:!!i?.onClick,licenseNumber:n,children:jsxs(Rf,{children:[jsx(p,{title:t?Na(t):"",children:jsx(b$2,{countryCode:t})}),jsx(kf,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(Bf,{children:jsx(Vf,{src:l})})]})})})})}function Hf({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(w,{...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:Tb$1,alt:"marketplace",style:{maxWidth:"18px",maxHeight:"18px",objectFit:"cover"}})}),jsx(Typography,{noWrap:true,sx:{fontSize:"14px",fontWeight:400},children:t})]})})})}var Of={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};var _f=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),zf=styled("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),$f=styled("img")(()=>({width:"10.5px",height:"10.5px"})),Uf=styled("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),Gf=styled("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),Yf=styled("div")({display:"flex",alignItems:"center",gap:"8px"}),jf=styled("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function Kf({id:e,status:t,count:o,name:n,...r}){let i=Of[t??"incomplete"];return jsx(w,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx(_f,{children:e?jsxs(Gf,{children:[jsx(zf,{children:e}),jsxs(Yf,{children:[jsx($f,{src:i}),o>1&&jsx("div",{children:jsxs(Uf,{children:["+",o-1]})})]})]}):jsx(jf,{children:"Not Available"})})})})}var qf=styled("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"})),Xf=styled(Gn)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),Zf=styled("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"}})),Jf=styled("img")(()=>({width:"10.5px",height:"10.5px"})),Qf=styled("div")({marginLeft:"auto",width:"auto"});var eC={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};function tC({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let i=eC[t??"incomplete"];return jsx(w,{...r,children:jsx(p,{title:e.name,children:jsx(qf,{hasClick:!!r.onClick,children:jsxs(Xf,{children:[n,jsx(Zf,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(Qf,{children:jsx(Jf,{src:i})})]})})})})}var oC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),nC=styled("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),rC=styled(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("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var iC=(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"}}}),aC=styled(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var ET=e=>!e.startsWith("http://")&&!e.startsWith("https://"),vi=e=>/^https?:\/\//i.test(e),lC=(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 DT(e,t);case "ios":case "android":case "mobile_app":return MT(e,t);default:return e}},DT=(e,t)=>{let o=e.toLowerCase();return t==="linkedin"?o.includes("linkedin.com")||o.includes("linked.com")?e:vi(e)?null:`https://linkedin.com/company/${e}`:t==="instagram"?o.includes("instagram.com")?e:vi(e)?null:`https://instagram.com/${e}`:t==="twitter"?o.includes("twitter.com")||o.includes("x.com")?e:vi(e)?null:`https://x.com/${e}`:null},MT=(e,t)=>e.toLowerCase().includes("apps.apple.com")&&t==="ios"?e:t==="android"?vi(e)?e:`https://play.google.com/store/apps/details?id=${e}`:null,sC=e=>{!e||typeof e!="string"||window.open(ET(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function LT({channels:e,...t}){let o=e?.filter(r=>!!r.address)?.map((r,i)=>{let l=r.address,a=r.code?.replace(/_/g,""),s=i===e?.length-1,p$1=lC(r.address??"",r.code??"");return jsx(p,{title:l,children:jsx(ct,{order:i,variants:iC(i,0,s),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&sC(p$1);},children:jsx(nC,{src:r.logo,alt:a})})},`${r}-${i}`)}),n=o?.length||0;return jsx(w,{...t,children:jsx(oC,{children:o?.length>0?jsx(rC,{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 RT=LT;function WT({channels:e}){let t=useRef(null),[o,n]=useState(false),[r,i]=useState(null),l=!!r;useEffect(()=>{t.current&&n(t.current.scrollHeight>20);},[e]);let a=useMemo(()=>(e||[]).filter(s=>!!s.address),[e]);return jsxs(aC,{children:[jsx(Gn,{sx:{display:"flex",flexWrap:"wrap",gap:o?"8px":"4px"},ref:t,children:a.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(Gn,{onClick:s=>{i(s.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(NT,{open:l,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(Gn,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:a.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,children:[s.name?.en,": ",s.address]},s.id))})})]})}var FT=WT;var cC={SAVED_CARD:"Card Agreement",ORDER:"Order",SUBSCRIPTION:"Subscription",INSTALLMENT:"Installment"};function _T({type:e,count:t,sx:o,...n}){let{t:r}=useTranslation(),i=t?.toString();return jsxs(Gn,{sx:{display:"flex",flexDirection:"row",gap:"4px"},children:[jsx(b$1,{copyTrigger:"press",copyText:e,unknownText:r("noPaymentAgreement"),sx:o,...n,children:e&&cC[e]}),i&&jsx(b$1,{copyTrigger:"press",copyText:i,sx:{minWidth:"38px"},...n,children:i})]})}var zT=_T;var dC={CYBERSOURCE:sm,MPGS:tm,NETCETERA:um,APPLEPAY:vm,TAP3DS:wm,FSS:Cm,BENEFIT:ym,QPAY:Km$1,POSTPAY:Jm$1,BENEFITPAY:xm,MEEZA:Em,STC_PAY:Mm,NGENIUS:Fm,KNET:Dm,PAYPAL:Im,FAWRY:Bm,TPG:Qm$1,DEEMA:Am,TPAY:Pm,"CAREEM PAY":zm,TABBY:Nm,OMANNET:Hm,NPG:Gm$1,SPG:Lm,TAMARA:Om};var fC=styled(Gn)(({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})),CC=styled("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function gC({provider:e,...t}){let o=dC[e];return o?jsx(fC,{children:jsx(CC,{src:o,alt:e})}):jsx(w,{...t,children:jsx(H,{children:e})})}var xC={CHARGE:Wk,AUTHORIZE:Ak,SAVE_TOKEN:_g$1},hC={CHARGE:"Charge",AUTHORIZE:"Authorization",SAVE_TOKEN:"Save Token"},yC={CHARGE:{backgroundColor:"#1F88D01A",color:"#1F88D0",border:"none"},AUTHORIZE:{backgroundColor:"#FFFFFF",color:"#1F88D0",border:"#1F88D01A"},SAVE_TOKEN:{backgroundColor:"#1F88D00D",color:"#1F88D0",border:"#1F88D01A"}};var IC=styled(Gn,{shouldForwardProp:e=>!["purposeType"].includes(e)})(({purposeType:e})=>{let t=yC[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}}),bC=styled("img")(()=>({width:"16px",height:"16px",objectFit:"contain",flexShrink:0})),SC=styled("span")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}));function wC({purpose:e,...t}){let o=xC[e],n=hC[e];return jsxs(IC,{purposeType:e,...t,children:[jsx(bC,{src:o,alt:e}),jsx(SC,{children:n})]})}var vC=8,jT=16,ht=vC*2+jT,AC=100,EC=6,KT=ht+EC+AC,DC=styled$1(w)(()=>({position:"relative",overflow:"visible",width:ht,minWidth:ht,maxWidth:ht,display:"inline-flex",padding:0})),MC=styled$1(Gn)(()=>({position:"relative",width:ht,height:24,flexShrink:0,overflow:"visible"})),LC=styled$1(Gn,{shouldForwardProp:e=>e!=="hasLabel"})(({theme:e,hasLabel:t})=>({position:"absolute",top:0,left:0,width:ht,minWidth:ht,maxWidth:ht,height:24,display:"inline-flex",alignItems:"center",gap:EC,paddingInline:vC,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:KT,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:AC,opacity:1}}}})),RC=styled$1("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 XT({url:e,label:t}){let o=l(),n=()=>{try{db(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(DC,{children:jsx(MC,{children:jsxs(LC,{hasLabel:!!t,onClick:n,children:[jsx(d,{src:Kl$1,alt:"link"}),t&&jsx(RC,{className:"link-cell-label",children:t})]})})}):null}var ZT=memo(XT);function fO({items:e}){let[t,o]=useState(null),n=!!t,r=useCallback(({quantity:a,currency:s,amount:p,name:c})=>`${a?`Qty ${a}`:""} ${c?`- ${c}`:""} ${s||p?"-":""} ${s||""} ${p||""}`,[]);if(!e||!e.length)return null;let[i,...l]=e;return jsxs(Gn,{sx:{display:"flex",gap:"4px",alignItems:"center"},children:[jsx(b$1,{children:jsx(j,{noWrap:true,sx:{maxWidth:e.length>1?190:220,fontSize:11},children:r(i)})}),e.length>1&&jsx(Gn,{onClick:a=>{o(a.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(NT,{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(Gn,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:l?.map(a=>jsx(b$1,{copyTrigger:"press",copyText:r(a),children:r(a)},a.id))})})]})}var kC="ListHeader";var VC=styled(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),BC=styled(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)})),NC=styled(j)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),WC=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),FC=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),HC=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function Mi({children:e,component:t="header",...o}){return jsx(VC,{component:t,...o,children:e})}function Li({title:e,toolbar:t}){return jsxs(BC,{children:[jsx("span",{children:!!e&&jsx(NC,{children:e})}),t]})}function Ri({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(FC,{as:"aside",children:[o,jsx(a$3,{status:e?.value,availableStatuses:e?.options,onStatusChange:e?.onChange,isActiveFilterVisible:n,buttonSx:e?.buttonSx}),jsx(d$1,{value:t?.ids,visible:n,label:t?.label,dismissible:t?.dismissible,onDismiss:t?.onDismiss})]})}var wo=styled(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]}})),ki=styled(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"}})),Po=styled(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})),vo=styled(Box)(()=>({minWidth:160,position:"relative",marginRight:0,paddingRight:0})),Ao=styled(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]}}})),Eo=styled(Box)(()=>({width:15})),En=styled(Box)(()=>({width:16})),$C=styled(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),UC=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),GC=styled(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),YC=styled(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),jC=styled(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]}})),KC=styled(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"}})),Fl=styled(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),Hl=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),qC=styled(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)"})),XC=styled(Box)(({theme:e})=>({position:"absolute",bottom:12,right:16,padding:6,backgroundColor:e.palette.background.paper,border:"1px solid #9F9F9F29",borderRadius:"4px"})),Vi=styled(Paper)(()=>({paddingTop:4,paddingBottom:4,minWidth:180,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",borderRadius:"8px"}));styled(Box)(()=>({display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer"}));var ZC=styled(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"}})),JC=styled(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(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 Ol={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}},QC=styled(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"})),eg=styled(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}})),tg={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},og=styled(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),ng=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),rg=styled(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})),ig={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},ag=e=>({fontSize:11,fontWeight:500,textTransform:"none",backgroundColor:"info.dark",minWidth:80,height:38,borderRadius:"8px",boxShadow:"none","&:hover":{backgroundColor:e.palette.info.dark}}),lg=styled("div",{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="maximized"&&e!=="isDragging"})(({maximized:e,isDragging:t})=>({...!e&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0,position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function zl(e,t){let[o,n]=useState(null),[r,i]=useState(null),l=useCallback(()=>{n(null),i(null);},[]),a=useCallback((p,c)=>{n(p.currentTarget),i(c);},[]),s=useCallback(()=>{r&&l();},[r,l]);return useEffect(()=>{e||(l(),t?.());},[e,t,l]),{subMenuAnchorEl:o,openSubMenuName:r,handleSubMenuClose:l,handleSubMenuOpen:a,handleMenuScroll:s}}function dw(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 $l(e){let t=useRef(false),o=useRef(null),n=useRef({x:0,y:0}),r=useRef(1),i=useRef(null),l=useRef(0),a=useRef(false),s=useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null);},[]),p=useCallback((x,I)=>{a.current=true,window.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,cancelable:true,pointerId:r.current,clientX:x,clientY:I+l.current,pointerType:"mouse",isPrimary:true})),a.current=false;},[]),c=useCallback(()=>{if(o.current!==null)return;let x=()=>{let I=i.current;if(!t.current||!I)return;let S=I.getBoundingClientRect(),{x:b,y:d}=n.current,g=d-S.top,y=S.bottom-d;if(g>0&&g<60){let T=(60-g)/60*15;I.scrollTop-=T,l.current-=T,p(b,d);}else if(y>0&&y<60){let T=(60-y)/60*15;I.scrollTop+=T,l.current+=T,p(b,d);}o.current=requestAnimationFrame(x);};o.current=requestAnimationFrame(x);},[p]),m=useCallback(x=>{a.current||(n.current={x:x.clientX,y:x.clientY},r.current=x.pointerId,t.current&&l.current!==0&&(x.stopImmediatePropagation(),p(x.clientX,x.clientY)));},[p]),f=useCallback(()=>{i.current=dw(e.current),l.current=0,t.current=true,window.addEventListener("pointermove",m,{capture:true}),c();},[e,m,c]),C=useCallback(()=>{t.current=false,l.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:f,onDragEnd:C}}function Gl({columns:e,setTableViews:t}){let o=useCallback(i=>{let l=i.map(a=>e.find(s=>s.name===a)).filter(a=>!!a);t?.(l);},[e,t]),n=useCallback(i=>{let l=e.map(a=>{if(a.name!==i)return a;let s=a.menuItems&&a.menuItems.length>0,p=!a.selected;if(!s)return {...a,selected:p};let c=a.menuItems?.map(m=>({...m,selected:p}));return {...a,selected:p,menuItems:c}});t?.(l);},[e,t]),r=useCallback((i,l)=>{let a=e.map(s=>{if(s.name!==i)return s;let p=s.menuItems?.map(m=>m.name===l?{...m,selected:!m.selected}:m),c=p?.some(m=>m.selected)??false;return {...s,menuItems:p,selected:c}});t?.(a);},[e,t]);return {reorderColumns:o,toggleColumnSelection:n,toggleSubmenuItem:r}}function jl({column:e,index:t,openSubMenuName:o,toggleColumnSelection:n,handleSubMenuOpen:r,handleSubMenuClose:i}){let l=e.menuItems&&e.menuItems.length>0,a=o===e.name,s=t===0,p=useMemo(()=>!!(e.selected&&e.menuItems?.some(C=>C.selected)&&!e.menuItems?.every(C=>C.selected)),[e.selected,e.menuItems]),c=useCallback(()=>{n(e.name);},[n,e.name]),m=useCallback(C=>{l&&r(C,e.name);},[l,r,e.name]),f=useCallback(()=>{l||i();},[l,i]);return {isIndeterminate:p,hasSubmenuItems:l,isSubmenuOpen:a,isFirstItem:s,handleColumnClick:c,handleMouseEnter:m,handleMouseLeave:f}}var W=(e="")=>e.toLowerCase()==="date",Me=(e="")=>e.toLowerCase()==="index",Bi=(e,t="en")=>{let o=[];return e.forEach(n=>{n.columns.forEach(r=>{let i=r.name.find(a=>a.lang===t)?.text||r.name[0]?.text||r.code,l=r.fields?.length?r.fields.map(a=>({name:a.code,label:a.name?.find(s=>s.lang===t||s.lang==="")?.text||a.code,selected:a.default??false})):void 0;o.push({name:r.code,label:i,selected:W(r.code)?true:r.default??false,menuItems:l?.length?l:void 0});});}),o},fw=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?Bi([n]):[]},Kl=(e,t,o="en")=>{let n=e.map((i,l)=>{let a=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:l+1,default:i.selected??false,...a?.length?{fields:a}:{}}});return {code:t==="sheet"?"Sheet":"Advanced",columns:n}},Cw=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(l=>l.code));n.columns.forEach(l=>{i.has(l.code)||r.columns.push(l);});}else t.set(n.code,{...n,columns:[...n.columns]});});}),Array.from(t.values())};var gw=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),xw=(e,t)=>e.map(o=>({...o,default:o.id===t})),Ni=e=>e.role??(e.default?"default":void 0),_t=e=>!!e.role||!!e.default,Le=e=>!_t(e),pg=e=>Le(e),Mn=e=>e.filter(pg).length,ql=e=>e.filter(Le).length,Wi=(e,t="sheet",o="en")=>{let n=[],r=[],i;e.forEach(a=>{let s=t==="sheet"?"sheet":"advanced",p=a.layout.find(P=>P.code.toLowerCase()===s),c=p?Bi([p],o):[],m=a.id,f=xb$1,C=yb$1,x=c.some(P=>W(P.name))?c:[C,...c],I=x.findIndex(P=>W(P.name)),b=(I>0?[x[I],...x.filter(P=>!W(P.name))]:x).filter(P=>!Me(P.name)),d=[f,...b],g=Ni(a),y=_t(a),T={id:m,label:a.name,role:g,isCustom:!y,selected:a.selected,default:!!a.default,columns:d.map(P=>P.name),submenu:d};y?(a.default&&!i&&(i=d),r.push(T)):n.push(T);});let l=r.find(a=>a.default)??r[0];return {customViews:n,defaultTemplates:r,defaultTemplateColumns:i,defaultTemplate:l}},Xl=(e,t="sheet",o="en")=>{let{customViews:n,defaultTemplates:r,defaultTemplate:i}=Wi(e,t,o),l=[...r,...n];return {customViews:n,defaultTemplates:r,defaultTemplate:i,allTemplates:l}},Fi=(e,t)=>{let o=[];Le(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=xb$1;if(!o.some(m=>W(m.name)))return [n,yb$1,...o];let i=o.findIndex(m=>W(m.name)),l=i>=0?o[i]:yb$1,a=o.filter(m=>!W(m.name)&&!Me(m.name)),s=[l,...a],p=s.some(m=>Me(m.name)),c=s.findIndex(m=>Me(m.name));if(p&&c>0){let m=s[c],f=s.filter(C=>!Me(C.name));return [m,...f]}return p&&c===0?s:[n,...s]},hw=(e,t)=>Fi(e,t).length>0,Mo=e=>e.filter(t=>!Me(t.name));var Ie=e=>e.toLowerCase(),cg=e=>new Map(e.filter(t=>!W(t.name)).map(t=>[Ie(t.name),t])),mg=(e,t)=>e.some(o=>Ie(o)===Ie(t)),Zl=(e,t)=>({...e,selected:t.selected??false,menuItems:e.menuItems?.map(o=>{let n=t.menuItems?.find(r=>Ie(r.name)===Ie(o.name));return {...o,selected:n?.selected??false}})}),Ln=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}},Ql=(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}}),Rn=(e,t,o)=>e.map(n=>{if(n.name!==t)return n;let r=n.menuItems?.map(l=>l.name===o?{...l,selected:!l.selected}:l),i=r?.some(l=>l.selected)??false;return {...n,menuItems:r,selected:i}}),es=(e,t)=>e.map(o=>{if(W(o.name))return o;let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),ts=e=>{let t=e.filter(o=>!W(o.name));return t.length===0?false:t.every(o=>o.menuItems?.length?o.menuItems.every(n=>n.selected):o.selected)},os=(e,t)=>e.filter(r=>!W(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(i=>i.selected):r.selected)&&!t,ns=(e,t)=>e.trim().length>0&&e.length<=t,se=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),rs=(e,t)=>e.map(o=>{if(o.name!==t)return o;if(W(o.name))return {...o,selected:true};let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),is=(e,t)=>e.map(o=>{if(W(o.name))return {...o,selected:true};let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),as=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),ls=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,Jl=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),kn=(e,t)=>{if(e.length!==t.length)return false;let o=Jl(e),n=Jl(t);for(let r=0;r<o.length;r++){let i=o[r],l=n[r];if(i.name!==l.name||i.selected!==l.selected)return false;if(i.menuItems&&l.menuItems){if(i.menuItems.length!==l.menuItems.length)return false;for(let a=0;a<i.menuItems.length;a++)if(i.menuItems[a].name!==l.menuItems[a].name||i.menuItems[a].selected!==l.menuItems[a].selected)return false}else if(i.menuItems||l.menuItems)return false}return true},yw=e=>e.filter(t=>!W(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),ss=(e,t)=>{let o=e.filter(i=>!W(i.name)).map(i=>i.name),n=cg(t),r=[];for(let i of o){let l=e.find(s=>Ie(s.name)===Ie(i)),a=n.get(Ie(i));a?r.push(l?Zl(a,l):{...a,selected:false,menuItems:a.menuItems?.map(s=>({...s,selected:false}))}):l&&r.push(l);}for(let[,i]of n)if(!mg(o,i.name)){let l=e.find(a=>Ie(a.name)===Ie(i.name));r.push(l?Zl(i,l):{...i,selected:false,menuItems:i.menuItems?.map(a=>({...a,selected:false}))});}return r},ps=e=>e.filter(t=>!W(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),cs=(e,t)=>{let o=cg(e),n=t.filter(i=>!W(i.name)).map(i=>i.name),r=[];for(let i of n){let l=t.find(s=>Ie(s.name)===Ie(i)),a=o.get(Ie(i));a&&l?r.push(Zl(a,l)):a&&r.push({...a,selected:false,menuItems:a.menuItems?.map(s=>({...s,selected:false}))});}for(let[,i]of o)mg(n,i.name)||r.push({...i,selected:false,menuItems:i.menuItems?.map(l=>({...l,selected:false}))});return r};function dg(e,t,o="en"){if(!e?.layout?.length)return [];let n=Ya(t)?"sheet":"advanced",r=e.layout.find(a=>a.code?.toLowerCase()===n);if(!r?.columns?.length)return [];let i=r.columns.map(a=>{let s=a.name?.find(c=>c.lang===o)?.text||a.name?.[0]?.text||a.code,p=a.fields?.length?a.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:a.code,label:s,selected:W(a.code)?true:a.default??false,...p&&p.length>0&&{menuItems:p}}});return i.some(a=>W(a.name))?i:[{name:yb$1.name,label:yb$1.label,selected:true},...i]}var Hi=e=>{let t=e?.order;if(t==null)return 999;let o=Number(t);return Number.isFinite(o)?o:999};function Oi(e){return {...e,layout:e.layout?.map(t=>({...t,columns:[...t.columns??[]]}))??[]}}function Iw(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((i,l)=>Hi(i)-Hi(l))})),n=dg(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:Ni(e),isCustom:Le(e),default:e.default}}var _i=(e,t)=>{if(!e)return [];let o=e;if(e.layout&&Array.isArray(e.layout)&&e.layout.length>0){let n=Xa(t)?"Advanced":"Sheet",r=e.layout.find(i=>{let l=i.code?.trim();return l===n||l?.toLowerCase()===n.toLowerCase()})||e.layout.find(i=>{let l=i.code?.trim()?.toLowerCase();return Xa(t)?l==="default"||l==="advanced":l==="sheet"||l==="sheets"});if(r&&r.columns&&r.columns.length>0)return r.columns.map(l=>{let s=!!l.fields?.length&&l.fields.some(c=>c.default??false),p=(l.default??false)||s;return {code:l.code,name:l.name&&l.name.length>0?l.name:[{text:l.code,lang:"en"}],selected:p,sort_order:Hi(l),fields:l.fields?.map(c=>({code:c.code.toLowerCase(),type:"single",parameters:[{parameter:c.code.toLowerCase(),code:c.code.toLowerCase(),selected:c.default??false}]}))||[{code:l.code.toLowerCase(),type:"single",parameters:[{parameter:l.code.toLowerCase(),code:l.code.toLowerCase(),selected:l.default??false}]}]}}).sort((l,a)=>(l.sort_order??999)-(a.sort_order??999))}return o.submenu&&Array.isArray(o.submenu)&&o.submenu.length>0?o.submenu.map((r,i)=>{let l=r.name.toLowerCase(),a;r.menuItems&&r.menuItems.length>0?a=r.menuItems.filter(m=>m.selected):a=[{name:l,label:r.label||r.name,selected:true}];let s=a.length>0?a.map(m=>({parameter:m.name.toLowerCase(),code:m.name.toLowerCase()})):[{parameter:l,code:l}],p=a.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:l,type:p,parameters:s}]}}):[]},bw=(e,t)=>{if(!e||!Array.isArray(e)||e.length===0)return [];let o=e?.find(n=>n.default)||e[0];return o?_i(o,t):[]};function ms(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function ds(e,t){let o=t?.name??e?.name??"",n=t?.layout,r=Array.isArray(n)?n[0]:n??null,l=[...e?.layout??[]];if(r){let a=r.code?.toLowerCase(),s=l.findIndex(p=>p.code?.toLowerCase()===a);s>=0?l[s]=r:l.push(r);}return {name:o,layout:l}}var us=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var ug=e=>[...Ab$1[e]??Ab$1.default],Sw=e=>Bb$1[e]??Bb$1.default,Tw=(e,t)=>({code:e,name:[{text:zb$1[e],lang:"en"}],selected:true,sort_order:t}),ww=(e,t)=>e?.layout?.some(o=>ug(t).includes(o.code?.toLowerCase()??""))??false,fs=(e,t,o)=>{let n=Bb$1[t],r=o?.layout?.find(l=>l.code?.toLowerCase()===n.toLowerCase()),i=r?{...r,columns:r.columns?.map(l=>({...l,name:l.name?.map(a=>({...a})),fields:l.fields?.map(a=>({...a,name:a.name?.map(s=>({...s}))}))}))??[]}:{code:n,columns:[]};return [e,i]};var zi=({tableMode:e,templates:t,lang:o="en",mainDefaultTemplate:n})=>useMemo(()=>{let{customViews:r,defaultTemplates:i,defaultTemplate:l,allTemplates:a}=Xl(t,e,o),p=(n?Wi([n],e,o).defaultTemplate:void 0)??l,c=p?.submenu?structuredClone(p.submenu):[],m=Mn(t);return {customViews:r,defaultTemplates:i,defaultTemplate:l,allTemplates:a,defaultColumns:c,customTemplateCount:m}},[t,e,o,n]);var $i=({mode:e,onViewChange:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:i,defaultTemplate:l,allTemplates:a,customTemplateCount:s})=>{let[p,c]=useState(null),[m,f]=useState(false),[C,x]=useState(null),[I,S]=useState(false),[b,d]=useState(null),[g,y]=useState(null),[T,P]=useState(),[h,v]=useState(a.find(M=>M.selected)?.id??l?.id),A=useRef(a.find(M=>M.selected)?.id??l?.id),D=useCallback(M=>{let B=M.submenu?.filter(J=>J.selected)||[];return {...M,submenu:B,columns:B.map(J=>J.name)}},[]),E=useCallback(M=>{A.current=M?.id,t?.(M?D(M):void 0);},[t,D]),k=useMemo(()=>h?a.find(M=>M.id===h):l,[a,h,l]),N=useMemo(()=>se(k?.submenu||i),[k,i]),F=useMemo(()=>({id:h||l?.id||"default",label:k?.label||l?.label||"Default"}),[k,h,l?.id,l?.label]);useEffect(()=>{let M=a.find(he=>he.selected)?.id,B=l?.id,J=h?a.some(he=>he.id===h):false;if(!(h&&!J&&M!==h)){if(M&&M!==h){v(M);return}if(!h){v(M??B);return}J||v(M??B);}},[a,l?.id,h]),useEffect(()=>{!h||!k||k.id===h&&A.current!==h&&(A.current=h,t?.(D(k)));},[h,k,t,D]);let Z=useCallback(M=>{c(B=>B?null:M.currentTarget);},[]),fe=useCallback(()=>{c(null);},[]),ve=useCallback((M,B)=>{v(B?.id),E(B),fe();},[fe,E]),xe=useCallback((M=false,B,J,he)=>{s!=null&&s>=3||(x(null),S(M),d(B??null),y(J?.length?J:null),P(he),f(true),c(null));},[s]),_=useCallback(M=>{let B=a.find(J=>J.id===M.id)??M;x(B),S(true),d(null),y(B.submenu?.length?se(B.submenu):null),f(true);},[a]),Ye=useCallback(()=>{f(false),x(null),S(false),d(null),y(null),P(void 0);},[]);useEffect(()=>{if(!m||!C?.id)return;let M=a.find(B=>B.id===C.id);M&&(x(M),y(M.submenu?.length?se(M.submenu):null));},[m,C?.id,a]);let fa=useCallback(async M=>{if(C){let B=C.id;await n?.(B,M),v(B);let J=a.find(he=>he.id===B)??C;E(J),fe();}else {let B=await o?.({...M,sourceTemplateId:T});if(B?.id){v(B.id);let J=a.find(he=>he.id===B.id);E(J??{id:B.id,label:B.name,isCustom:true,columns:M.selectedColumns.map(he=>he.name),submenu:M.selectedColumns});}}},[C,n,o,fe,a,E,T]),Ca=useCallback(async M=>{let B=a.find(J=>J.id===M);await r?.(B?.id??M),h===(B?.id??M)&&v(l?.id);},[a,r,h,l]);return {anchorEl:p,isCreateDialogOpen:m,editingView:C,selectedViewInfo:F,shouldUseCurrentState:I,selectedView:k,currentViewColumns:N,initialColumnsForCreate:b,availableColumnsForCreate:g,handleViewButtonClick:Z,handleCloseViewDropdown:fe,handleSelectedViewInfo:ve,handleOpenCreateDialog:xe,handleOpenEditDialog:_,handleCloseCreateDialog:Ye,handleSaveView:fa,handleDeleteView:Ca}};var Lo=()=>{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);},[]),l=useCallback(()=>{r.current=setTimeout(()=>{t(null),n(null);},0);},[]),a=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:l,cancelClose:a,forceClose:s}};var gg=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((s,p)=>{t(s),n(p);},[]),l=useCallback(()=>{t(null),n(null);},[]),a=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]);return {hoveredNestedColumn:e,nestedSubmenuAnchorEl:o,openNestedSubmenu:i,closeNestedSubmenu:l,cancelNestedClose:a}};var ys=({open:e,availableColumns:t,defaultColumns:o,editingView:n,tableViews:r=[]})=>{let[i,l]=useState(()=>n?.label||""),[a,s]=useState([]),p=useRef(false),c=useRef([]),m=useRef(n?.label?.trim()||""),{hoveredColumn:f,anchorEl:C,openSubmenu:x,closeSubmenu:I,cancelClose:S}=Lo(),b=xb$1,d=yb$1;useEffect(()=>{if(!e){p.current=false;return}if(!p.current&&e)if(n){let F=n.submenu&&n.submenu.length>0?n.submenu:o,Z=t.length>0?t:F,ve=ss(F,Z).filter(Ye=>!Me(Ye.name)&&!W(Ye.name)),xe=[b,d,...ve];s(xe),c.current=se(xe);let _=n.label?.trim()||"";m.current=_,l(_);}else {let F=t.length>0?t:r,fe=(r&&r.length>0?cs(F,r):ps(F)).filter(xe=>!Me(xe.name)&&!W(xe.name)),ve=[b,d,...fe];s(ve),c.current=se(ve),m.current="",l("");}else if(e&&n){let F=n.label?.trim()||"";l(F);}p.current=e;},[e,n?.id,n?.label,n?.submenu,t,o,r,b,d]);let g=useMemo(()=>a.map(N=>N.name),[a]),y=useMemo(()=>ts(a),[a]),T=useMemo(()=>os(a,y),[a,y]),P=useMemo(()=>ns(i,20),[i]),h=useMemo(()=>{let N=i.trim()!==m.current,F=c.current.length>0&&!kn(a,c.current);return N||F},[i,a]);return {templateName:i,setTemplateName:l,selectedColumns:a,columnNames:g,allSelected:y,someSelected:T,isNameValid:P,hasChanges:h,hoveredColumn:f,anchorEl:C,openSubmenu:x,closeSubmenu:I,cancelClose:S,handleReorder:N=>{let F=N.filter(Z=>!W(Z)).flatMap(Z=>a.find(fe=>fe.name===Z)??[]);s([b,d,...F]);},handleColumnToggle:N=>{s(F=>Ql(F,N));},handleSubItemToggle:(N,F)=>{s(Z=>Rn(Z,N,F));},handleSelectAll:()=>{s(N=>es(N,!y));},handleResetToDefault:()=>{c.current.length>0&&s(se(c.current));}}};function bs({templates:e,setTemplates:t,createTemplate:o,updateTemplate:n,deleteTemplate:r,tableMode:i,isTemplatesLoading:l,lang:a="en",mainDefaultTemplate:s}){let p=useMemo(()=>s??e.find(d=>d.default),[e,s]),c=e.find(d=>d.selected)?.id??p?.id,m=useCallback(d=>{t(g=>g.find(T=>T.selected)?.id===d?g:g.map(T=>({...T,selected:d?T.id===d:false})));},[t]),f=useCallback(async({name:d,layout:g,sourceTemplateId:y})=>{if(Mn(e)>=3)return;let T=e.find(A=>A.id===y)??e.find(A=>A.id===c)??p,P=fs(g,i,T),h=await o({name:d,layout:P}),v=Oi(h);return t(A=>[...A.filter(E=>E.id!==v.id).map(E=>({...E,selected:false})),{...v,selected:true}]),{id:h.id,name:h.name??""}},[o,t,i,p,e,c]),C=useCallback(async d=>{await r(d),t(g=>g.filter(y=>y.id!==d)),m(c===d?p?.id:c);},[r,t,p,m]),x=useCallback(async(d,g)=>{let y=e.find(A=>A.id===d),{name:T,layout:P}=ds(y,g),h=await n(d,{name:T,layout:P}),v=Oi(h);t(A=>ms(A,D=>D.id===d,v)),m(v.id);},[e,n,t,m]),I=useMemo(()=>({templates:e,onCreateCustomView:f,onEditCustomView:x,onDeleteCustomView:C,isLoading:l,mainDefaultTemplate:s}),[e,f,x,C,l,s]),S=useCallback(d=>{if(!p){m(void 0);return}if(!d?.id){m(p.id);return}if(_t(d)){m(d.id);return}let g=e.find(y=>y.id===d.id);if(g){m(g.id);return}Le(d)&&m(d.id);},[e,p,m]),b=useMemo(()=>{let d=e.find(y=>c?y.id===c:false)??p;if(!d)return [];let g=_i(d,i);return g.length>0?g:[]},[i,e,c,p]);return {customViews:I,onViewChange:S,columnsView:b,selectedViewId:c}}function kw({column:e,index:t,openSubMenuName:o,subMenuAnchorEl:n,toggleColumnSelection:r,toggleSubmenuItem:i,handleSubMenuOpen:l,handleSubMenuClose:a}){let{t:s}=useTranslation(),p=useTheme(),{isIndeterminate:c,hasSubmenuItems:m,isSubmenuOpen:f,isFirstItem:C,handleColumnClick:x,handleMouseEnter:I,handleMouseLeave:S}=jl({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:l,handleSubMenuClose:a}),b=d=>d?s(d)??Ku(d):"";return jsxs(Gn,{sx:{borderTop:`1px solid ${p.palette.divider}`,...C&&{borderTop:"none",height:33}},children:[jsxs(V,{isIndeterminate:c,isSelected:e.selected,onMouseEnter:I,onMouseLeave:S,onClick:x,children:[jsx(Gn,{sx:{flex:1},children:b(e.label)}),m&&jsx("img",{src:xb,className:"arrow-icon",alt:"arrow"})]}),m&&jsx(R,{open:f,anchorEl:n,placement:"right-start",onMouseEnter:()=>{},onMouseLeave:a,children:e.menuItems?.map(d=>jsx(V,{isSelected:e.selected&&d.selected,onClick:()=>i(e.name,d.name),children:b(d.label)},d.name))})]},e.name)}var Ig=kw;function Ww({open:e,onSelect:t,setTableViews:o,tableViews:n,anchorEl:r,onClose:i}){let{t:l}=useTranslation(),a=useMemo(()=>n||[],[n]),s=useMemo(()=>a.map(b=>b.name),[a]),{reorderColumns:p,toggleColumnSelection:c,toggleSubmenuItem:m}=Gl({columns:a,setTableViews:o}),{subMenuAnchorEl:f,openSubMenuName:C,handleSubMenuClose:x,handleSubMenuOpen:I,handleMenuScroll:S}=zl(e,i);return jsxs(vo,{"data-testid":"TableView_CustomViews",children:[jsxs(wo,{"data-testid":"TableView_CustomViews_Button",onClick:t,children:[jsx("div",{children:l("columns")}),jsx("img",{src:Eb$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(B,{onClick:i}),jsx(Po,{component:"article","data-testid":"TableView_CustomViews_List",children:jsx(Reorder.Group,{as:"div",axis:"y",onReorder:p,values:s,onScroll:S,children:a.map((b,d)=>jsx(Ig,{column:b,index:d,openSubMenuName:C,subMenuAnchorEl:f,toggleColumnSelection:c,toggleSubmenuItem:m,handleSubMenuOpen:I,handleSubMenuClose:x},b.name))})})]})]})}var Ts=memo(Ww);function _w({open:e,selectedViewInfo:t,setSelectedViewInfo:o,onSelect:n,onTableViewOptionClick:r,anchorEl:i}){let{t:l}=useTranslation();return jsxs(vo,{"data-testid":"TableView_DefaultViews",children:[jsxs(wo,{onClick:a=>{n(a);},children:[jsx("div",{children:t.label}),jsx("img",{src:Eb$1,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx(Hw,{open:e,anchorEl:i,placement:"bottom-start",children:jsxs(Po,{children:[Eb$2.map(a=>jsxs(Ao,{onClick:()=>{o(a),r?.(a);},children:[a.id===t.id?jsx("img",{className:"check-icon",src:Fb$1,alt:"arrow"}):jsx(Eo,{}),jsx("span",{children:a.label}),jsx(En,{})]},a.id)),jsxs(Ao,{sx:{border:"none"},onClick:a=>{a.stopPropagation(),o(Db),r?.(Db);},children:[t.id===Db.id?jsx("img",{className:"check-icon",src:Fb$1,alt:"arrow"}):jsx(Eo,{}),jsx("span",{children:l("createCustomView")}),jsx(En,{})]})]})})]})}var ws=As.memo(_w);function Gw({onViewChange:e,setIsViewVisible:t,setTableViews:o,tableViews:n,resetTableViews:r,onTableViewOptionClick:i}){let[l,a]=useState(null),[s,p$1]=useState(null),[c,m]=useState(null),[f,C$1]=useState(Cb$1),{t:x}=useTranslation(),I=g=>{e?.(),a(g.currentTarget),t(true);},S=()=>{p$1(null),m(null);},b$1=()=>{a(null),t(false),C$1(Cb$1);},d$1=g=>{C$1(g),g.id!==Db.id&&r?.(g),S();};return l?jsx(Uw,{onClickAway:S,children:jsxs(ki,{"data-testid":"TableView",children:[f.id===Db.id&&jsx(Ts,{tableViews:n,setTableViews:o,anchorEl:c,open:!!c,onSelect:g=>{m(c?null:g.currentTarget),p$1(null);},onClose:()=>{m(null);}}),jsx(ws,{open:!!s,anchorEl:s,setSelectedViewInfo:g=>{d$1(g);},selectedViewInfo:f,onSelect:g=>{p$1(s?null:g.currentTarget),m(null);},onTableViewOptionClick:i}),jsx(wo,{sx:{width:32,justifyContent:"center"},onClick:b$1,children:jsx("img",{src:Gb,alt:"close"})})]})}):jsx(p,{title:x("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"TableView_no_anchorViewEl",onClick:I,"aria-label":x("tableView")})})}var Ps=memo(Gw);var Sg=({columns:e,allCurrentSelected:t,someCurrentSelected:o,onSelectAll:n,onReset:r,onColumnToggle:i,onNestedItemToggle:l,isModified:a=false})=>{let{hoveredNestedColumn:s,nestedSubmenuAnchorEl:p,openNestedSubmenu:c,closeNestedSubmenu:m,cancelNestedClose:f}=gg();return jsxs(Fragment,{children:[jsxs(eg,{children:[jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsx(f$1,{checked:t,indeterminate:o,onChange:C=>{C.stopPropagation(),n();},onClick:C=>{C.stopPropagation();},sx:tg})}),jsx(Typography,{component:"button",disabled:!a,onClick:C=>{C.stopPropagation(),a&&r();},sx:{fontSize:11,fontWeight:500,color:"#1F88D0",background:"none",border:"none",cursor:a?"pointer":"default",padding:0,opacity:a?1:.5,pointerEvents:a?"auto":"none","&:hover":a?{textDecoration:"underline"}:void 0},children:"Reset"})]}),jsx(v,{}),jsx(ng,{onScroll:m,children:jsx(Box,{component:"ul",sx:{listStyle:"none",padding:0,margin:0},children:e.map((C,x)=>{let I=C.menuItems&&C.menuItems.length>0,{checked:S,indeterminate:b}=Ln(C),d=W(C.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:g=>I&&c(C.name,g.currentTarget),onMouseLeave:()=>I&&m(),children:[jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[jsx(V,{isSelected:I?S:C.selected,isIndeterminate:I?b:false,isDisabled:d,onClick:()=>{d||i(C.name);},sx:{flex:1,display:"flex",alignItems:"center"},children:jsx("span",{children:C.label||C.name})}),I&&jsx(Box,{sx:{display:"flex",alignItems:"center",pr:1,pointerEvents:"none"},children:jsx("img",{src:yb,alt:"arrow",style:{height:12}})})]}),I&&jsx(Popper,{open:s===C.name,anchorEl:p,placement:"right-start",sx:{zIndex:1e4},children:jsxs(Box,{onMouseEnter:f,onMouseLeave:m,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Vi,{children:C.menuItems?.map((g,y)=>jsxs(As.Fragment,{children:[jsx(V,{isSelected:g.selected,isDisabled:d,onClick:()=>{d||l(C.name,g.name);},children:g.label||g.name}),y<(C.menuItems?.length??0)-1&&jsx(v,{})]},g.name))})]})})]}),x<e.length-1&&jsx(v,{})]},C.name)})})})]})};function t0({open:e,selectedViewInfo:t,setSelectedViewInfo:o,anchorEl:n,onClose:r,onCreateCustomView:i,customViews:l=[],onEditCustomView:a,defaultColumns:s=[],defaultTemplate:p$1,defaultTemplates:c=[],customTemplateCount:m,isLoading:f}){let{t:C}=useTranslation(),{hoveredColumn:x,anchorEl:I,openSubmenu:S,closeSubmenu:b,cancelClose:d,forceClose:g}=Lo(),[y,T]=As.useState(null),[P,h]=As.useState(null),v$1=useMemo(()=>[...c.length?c:p$1?[p$1]:[],...l],[c,p$1,l]),A=useCallback(R=>R.submenu?.length?R.submenu:s,[s]),D=useCallback(R=>R?Fi(R,A(R)):s,[s,A]),E=useCallback(R=>D(R).length>0,[D]),k=useMemo(()=>x?v$1.find(R=>R.id===x):void 0,[x,v$1]),N=useMemo(()=>D(k),[k,D]),F=useMemo(()=>x?P?.length?P:N:[],[x,N,P]),Z=useMemo(()=>as(F),[F]),fe=useMemo(()=>ls(F,Z),[F,Z]),ve=P!=null&&!kn(P,N),xe=(m??ql(l))>=3,_=f||xe,Ye=_||!ve;function fa(R){g(),h(null);let te;if(_t(R)){let be=R.submenu?.length?R.submenu:s.length?s:p$1?.submenu??[];te={...R,submenu:se(be),columns:be.map(Be=>Be.name)};}else Le(R)&&(te=R);o(R,te);}function Ca(R,te){let be=v$1.find(Be=>Be.id===R);h(se(D(be))),S(R,te);}function M(){h(null),b(),g();}function B(R){if(R.stopPropagation(),Ye)return;let te=se(N),be=P?.length?se(P):te;i?.(true,be,te,k?.id),h(null),g();}function J(R){P&&h(rs(P,R));}function he(R,te){P&&h(Rn(P,R,te));}function Sh(){P&&h(is(P,!Z));}function Th(){h(se(N));}return jsxs(vo,{"data-testid":"ViewsDropdown",children:[jsx(Hw,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(Po,{onScroll:g,children:[jsx(e0,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v,{}),v$1.map(R=>{let te=Le(R),be=!te&&E(R);return jsxs(Ao,{onMouseEnter:Be=>{te?T(R.id):be&&Ca(R.id,Be.currentTarget);},onMouseLeave:()=>{te?T(null):be&&b();},onClick:()=>fa(R),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[R.id===t.id?jsx("img",{style:{width:15,height:15},src:Yj,alt:"check"}):jsx(Eo,{}),jsx("span",{style:{flex:1,fontSize:11},children:R.label}),te&&y===R.id&&jsx("img",{src:Ch$1,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:Be=>{Be.stopPropagation(),r?.(),a?.(R);}}),be&&jsx("img",{src:yb,alt:"arrow",style:{height:12}})]},R.id)}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"left",disableHoverListener:!xe,children:jsxs(Ao,{sx:{border:"none",opacity:_?.5:1,cursor:_?"not-allowed":"pointer"},onClick:R=>{if(R.stopPropagation(),_)return;let te=se(D(p$1)),be=te.map(Be=>({...Be,selected:false,menuItems:Be.menuItems?.map(wh=>({...wh,selected:false}))}));i?.(true,be,te,p$1?.id),g();},children:[jsx(Eo,{}),jsxs(Gn,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsx("img",{src:hm,alt:"",style:{opacity:_?.5:1,width:10,height:10}}),jsx("span",{style:{color:_?"#999":"#1F88D0",fontSize:11,fontWeight:500},children:C("New Custom View")})]}),jsx(En,{})]})})]})}),x&&I&&F.length>0&&jsx(R,{open:!!I,anchorEl:I,placement:"auto-end",onMouseEnter:d,onMouseLeave:M,children:jsxs(og,{children:[jsx(Sg,{columns:Mo(F),allCurrentSelected:Z,someCurrentSelected:fe,onSelectAll:Sh,onReset:Th,onColumnToggle:J,onNestedItemToggle:he,anchorEl:I,isModified:ve}),jsxs(rg,{children:[jsx(Tg,{variant:"text",onClick:M,sx:ig,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!xe,children:jsx(Tg,{variant:"contained",onClick:B,disabled:Ye,sx:ag,children:"Create view"})})]})]})})]})}var Es=As.memo(t0);var vg=({selectedColumns:e,columnNames:t,allSelected:o,someSelected:n,hoveredColumn:r,anchorEl:i,onReorder:l,onColumnToggle:a,onSubItemToggle:s,onSelectAll:p,onResetToDefault:c,onSubmenuEnter:m,onSubmenuLeave:f,onCancelClose:C$1})=>{let x=useRef(null),{onDragStart:I,onDragEnd:S}=$l(x),b=useCallback(d=>{if(us(d.target)){d.preventDefault();return}I();},[I]);return jsxs(YC,{children:[jsxs(jC,{children:[jsx(Fl,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(Hl,{onClick:d=>{d.stopPropagation(),p();},children:jsx(f$1,{checked:o,indeterminate:n,size:"small",sx:Ol,onChange:d=>{d.stopPropagation(),p();},onClick:d=>{d.stopPropagation();}})}),jsx(Typography,{onClick:d=>{d.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:d=>{d.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:x,axis:"y",onReorder:l,values:t,style:{listStyle:"none",padding:0,margin:0},children:e.map(d=>{let g=W(d.name),y=d.menuItems&&d.menuItems.length>0,{checked:T,indeterminate:P}=Ln(d);return jsxs(Reorder.Item,{value:d.name,drag:g?false:"y",dragListener:!g,dragConstraints:x,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:b,onDragEnd:S,children:[jsxs(KC,{isHovered:r===d.name,isDate:g,onMouseEnter:h=>y&&m(d.name,h.currentTarget),onMouseLeave:()=>y&&f(),onClick:h=>{(h.target.closest('[role="checkbox"]')||h.target.closest('input[type="checkbox"]'))&&h.stopPropagation();},sx:{width:"100%",position:"relative"},children:[jsx(Fl,{children:jsx("img",{src:Hb,alt:"drag",draggable:false,style:{width:16,height:16,cursor:g?"default":"grab",pointerEvents:"none"}})}),jsx(Hl,{onMouseDown:h=>{h.stopPropagation();},onPointerDown:h=>{h.stopPropagation();},children:jsx(f$1,{checked:T,indeterminate:P,onChange:h=>{h.stopPropagation(),a(d.name);},onClick:h=>{h.stopPropagation();},disabled:g,size:"small",sx:Ol})}),jsx(Typography,{sx:{flex:1,fontSize:13,fontWeight:400,color:"text.primary",ml:1},children:d.label||d.name}),y&&jsx(Box,{sx:{display:"flex",alignItems:"center",ml:1,flexShrink:0},children:jsx("img",{src:xb,alt:"arrow",style:{width:12,height:12}})})]}),y&&jsx(Popper,{open:r===d.name,anchorEl:i,placement:"right-start",sx:{zIndex:1e4},modifiers:[{name:"offset",options:{offset:[0,0]}}],children:jsxs(Box,{onMouseEnter:C$1,onMouseLeave:f,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Vi,{children:d.menuItems?.map((h,v$1)=>jsxs(As.Fragment,{children:[jsx(V,{isSelected:h.selected,isDisabled:g,onClick:()=>{g||s(d.name,h.name);},sx:{fontSize:13},children:h.label||h.name}),v$1<(d.menuItems?.length??0)-1&&jsx(v,{})]},h.name))})]})})]},d.name)})})})]})};function p0({open:e,onClose:t,onCreate:o,availableColumns:n=[],defaultColumns:r=[],editingView:i$1,onDelete:l,tableViews:a=[],mode:s="sheet",stackOrder:p=1}){let{t:c$1}=useTranslation(),m=useDragControls(),[f,C]=useState(false),[x,I]=useState(false);useEffect(()=>{e||(C(false),I(false));},[e]),useEffect(()=>{if(!e)return;let _=Ye=>{Ye.key==="Escape"&&t();};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[e,t]);let{templateName:S,setTemplateName:b,selectedColumns:d,allSelected:g,someSelected:y,isNameValid:T,hasChanges:P,hoveredColumn:h$1,anchorEl:v,openSubmenu:A,closeSubmenu:D,cancelClose:E,handleReorder:k,handleColumnToggle:N,handleSubItemToggle:F,handleSelectAll:Z,handleResetToDefault:fe}=ys({open:e,availableColumns:n,defaultColumns:r,editingView:i$1,tableViews:a}),ve=async()=>{if(!(!T||!P||x||f)){I(true);try{let _=Kl(d,s);await o?.({name:S,selectedColumns:d,layout:_}),t();}catch{console.warn("Failed to create view");}finally{I(false);}}},xe=async()=>{if(!i$1||f||x)return;let _=i$1.id;C(true);try{await l?.(_),t();}catch{console.warn("Failed to delete view");}finally{C(false);}};return e?jsxs(QC,{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(lg,{id:"draggable-dialog-title",onPointerDown:_=>m.start(_),style:{cursor:"move",flexShrink:0},children:jsxs(b$4,{children:[jsx(h,{children:jsx(c,{onClick:t,onPointerDown:_=>_.stopPropagation()})}),jsx(j$1,{title:i$1?"Edit Custom View":c$1("createCustomView")||"Create Custom View"}),jsx(i,{})]})}),jsxs($C,{children:[jsxs(UC,{onScroll:()=>{D();},children:[jsxs(GC,{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$1&&jsx(ZC,{onClick:xe,disabled:f||x,children:f?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$5,{name:"custom-template-name",label:"Template Name",value:S,onChange:_=>b(_),inputProps:{maxLength:20,autoComplete:"off",readOnly:true,"data-form-type":"other",onFocus:_=>_.currentTarget.removeAttribute("readonly")},required:true})}),jsx(vg,{selectedColumns:Mo(d),columnNames:Mo(d).map(_=>_.name),allSelected:g,someSelected:y,hoveredColumn:h$1,anchorEl:v,onReorder:k,onColumnToggle:N,onSubItemToggle:F,onSelectAll:Z,onResetToDefault:fe,onSubmenuEnter:A,onSubmenuLeave:D,onCancelClose:E})]}),jsx(qC,{}),jsx(XC,{children:jsx(JC,{variant:"contained",onClick:ve,disabled:!T||!P||x||f,title:T?void 0:`Name is required. Current: "${S}"`,children:x?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:i$1?"Saving...":"Creating..."})]}):i$1?"Update View":"Create View"})})]})]}):null}var Ds=p0;function u0({onViewChange:e,templates:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,tableMode:i="default",lang:l="en",isLoading:a,mainDefaultTemplate:s}){let{t:p$1}=useTranslation(),{defaultColumns:c,defaultTemplate:m,defaultTemplates:f,customViews:C$1,allTemplates:x,customTemplateCount:I}=zi({tableMode:i,templates:t,lang:l,mainDefaultTemplate:s}),{anchorEl:S,isCreateDialogOpen:b$1,editingView:d$1,selectedViewInfo:g,shouldUseCurrentState:y,currentViewColumns:T,initialColumnsForCreate:P,availableColumnsForCreate:h,handleViewButtonClick:v,handleCloseViewDropdown:A,handleSelectedViewInfo:D,handleOpenCreateDialog:E,handleOpenEditDialog:k,handleCloseCreateDialog:N,handleSaveView:F,handleDeleteView:Z}=$i({mode:i,onViewChange:e,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:c,defaultTemplate:m,allTemplates:x,customTemplateCount:I});return jsxs(Fragment,{children:[jsx(Uw,{onClickAway:A,children:jsxs(ki,{sx:{width:"32px"},"data-testid":"ViewsMenu",children:[jsx(p,{title:p$1("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"ViewsMenu_button",onClick:v,"aria-label":p$1("tableView")})}),jsx(Es,{open:!!S,anchorEl:S,onClose:A,setSelectedViewInfo:D,selectedViewInfo:g,onCreateCustomView:E,customViews:C$1,onEditCustomView:k,defaultColumns:c,defaultTemplate:m,defaultTemplates:f,customTemplateCount:I,isLoading:a})]})}),jsx(Ds,{open:b$1,onClose:N,availableColumns:h?.length?h:c,defaultColumns:c,onCreate:F,editingView:d$1,onDelete:Z,tableViews:y?P??T:void 0,mode:i})]})}var Rg=memo(u0);function Ms(e=[]){let[t,o]=useState(false),n=useMemo(()=>e.map(({code:r})=>r),[e]);return {isColumnPickerVisible:t,setIsColumnPickerVisible:o,timezoneCountryCodes:n}}function h0({tableMode:e,onToggle:t}){let o=Xa(e),n=Ya(e);return jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:n?Mh:Lh$1,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 Vg=memo(h0);function Wn({children:e,component:t="aside",...o}){return jsx(HC,{component:t,"data-testid":"ListHeaderToolbar",...o,children:e})}function qi({display:e,timezone:t,calendar:o,views:n,search:r,slots:i,reportsVisible:l,lang:a}){let{isColumnPickerVisible:s,setIsColumnPickerVisible:p,timezoneCountryCodes:c}=Ms(t?.segmentCountries),m=e?.variant==="acceptance",f=n?.tableMode??"default",C=useMemo(()=>n?.onSheetToggle?jsx(Vg,{tableMode:f,onToggle:n.onSheetToggle}):null,[f,n?.onSheetToggle]);return jsxs(Wn,{children:[i?.leading&&!s&&i.leading,!s&&jsxs(Fragment,{children:[r?.onChange&&jsx(b$6,{onSearchChange:r.onChange,placeholder:r.placeholder,defaultValue:r.defaultValue}),i?.filter,C&&!m&&C,i?.calendar??(o&&t&&jsx(a$2,{defaultDate:o.date,onDateChange:x=>{let[I,S]=x;I&&S&&o.onDateChange([I,S]);},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})),l&&i?.reports,C&&m&&C]}),n?.onViewChange&&(n.templates?jsx(Rg,{onViewChange:n.onViewChange,tableMode:f,lang:a,...n.templates}):jsx(Ps,{onViewChange:n.onViewChange,setIsViewVisible:p,tableViews:n.columns,setTableViews:n.setColumns,resetTableViews:n.onPresetReset,onTableViewOptionClick:n.onPresetOptionClick})),i?.trailing&&!s&&i.trailing]})}function P0({title:e,display:t,lang:o,reportsVisible:n,timezone:r,calendar:i,status:l,activeFilter:a,views:s,search:p,slots:c,children:m}){let f=Bc(useId(),"list-header"),C=useMemo(()=>jsx(qi,{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(Mi,{id:f,"data-testid":kC,children:[t?.maximized&&jsx(Li,{title:e,toolbar:C}),jsxs(WC,{as:"section",children:[jsx(Ri,{status:l,activeFilter:a,beforeStatus:c?.beforeStatus}),!t?.maximized&&C]}),m]})}var Wg=memo(P0);var Hg=styled$1(Gn,{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"}})),Og=styled$1(Gn)(({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})),_g=styled$1(Gn)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"2px","& img":{width:14,height:14}})),zg=styled$1(v0)(({theme:e})=>({marginTop:e.spacing(1),marginBottom:e.spacing(1),minWidth:193,"& .MuiPaper-root":{borderRadius:e.spacing(.5),"&>.MuiList-root":{padding:0}}})),$g=styled$1(j)(({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"}}),Rs=styled$1(Gn)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",backgroundColor:e.palette.common.white,borderTop:`1px solid ${e.palette.divider}`})),ks=styled$1(Tg)(({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}})),Vs=styled$1(Tg)(({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 Bs=createContext(null);function D0(){let e=useContext(Bs);if(!e)throw new Error("useFilterDropdown must be used inside a FilterDropdown");return e}function Gg({onConfirm:e,onCancel:t,isOkayButDisabled:o,children:n,isDisabled:r,icon:i,title:l,menuStyle:a,hideTitle:s=false,hideFooter:p=false,activeFiltersCount:c,onClearFilters:m,renderButton:f,onOpenChange:C,menuProps:x,...I}){let S=Bc(useId(),"filter-dropdown"),[b,d]=useState(null),g=!!b,{t:y}=useTranslation(),T=()=>{d(null),C?.(false);},P=E=>{if(!r){if(!g){d(E.currentTarget),C?.(true);return}T();}},h=()=>{g&&(t?.(),T());},v=()=>{e?.(),T();},A=typeof c=="number"&&c>0,D=E=>{E.stopPropagation(),m?.();};return jsx(Bs.Provider,{value:{onConfirm:v,onCancel:h,onClose:T},children:jsx(Uw,{onClickAway:h,children:jsxs(Gn,{id:S,"data-testid":"FilterDropdown",...I,children:[jsx(Hg,{className:"filter-button",isActive:g||A,onClick:P,sx:{...r&&{pointerEvents:"none",opacity:.5,...I.sx}},children:f??jsxs(Fragment,{children:[jsx(Gn,{component:"img",src:i??ak,alt:"filter"}),A&&jsxs(Fragment,{children:[jsx(Og,{children:c}),jsx(_g,{onClick:D,"aria-label":"clear filters",children:jsx(Gn,{component:"img",src:Gb,alt:"clear"})})]})]})}),jsxs(zg,{anchorEl:b,open:g,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{marginTop:"8px",marginBottom:"8px",width:193,...a},...x,children:[!s&&jsx($g,{component:"span",children:l??y("filterBy")}),n,!p&&jsxs(Rs,{children:[jsx(Vs,{onClick:h,children:y("cancel")}),jsx(ks,{disabled:o,onClick:v,children:y("okay")})]})]}),g&&jsx(B,{onClick:T})]})})})}var Yg=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),jg=styled$1(Gn)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Kg=styled$1(Gn)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),qg=styled$1(Gn)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"178px"}));function Hs({brand:e,merchantsIds:t,onChangeMerchant:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,anchorEl:i}){let[l,a]=useState(""),s=!!i,p=useCallback(b=>t.includes(b),[t]),c=(b,d)=>{if(b.stopPropagation(),p(d)){o?.(t.filter(y=>y!==d));return}let g=[...new Set([...t,d])];o?.(g);},m=b=>t.length===1&&t[0]===b&&n,f=b=>{a(b);},C=()=>{a("");},x=useMemo(()=>e.merchants??[],[e.merchants]),I=useMemo(()=>{if(!l?.trim())return x;let b=l.trim().toLowerCase();return x?.filter(d=>(d?.display_name??"").toLowerCase().includes(b)||(d?.legacy_id??"").toLowerCase().includes(b))},[l,x]),S=useMemo(()=>r?I:x,[I,x,r]);return jsxs(R,{open:s,anchorEl:i,placement:"right-start",children:[r&&x.length>1&&jsx(Gn,{sx:{p:"8px"},children:jsx(b$3,{fullWidth:true,placeholder:"Merchants",name:"merchants",value:l,onChange:b=>f(b.target.value),onClear:C})}),S?.map(b=>jsx(Yg,{isDisabled:m(b.legacy_id),isSelected:p(b.legacy_id),onClick:d=>{m(b.legacy_id)||c(d,b.legacy_id);},sx:{maxHeight:36,minHeight:36},children:jsxs(jg,{children:[jsx(qg,{component:"span",children:b.display_name}),jsx(Kg,{component:"span",children:b.legacy_id})]})},b?.legacy_id))]})}var Ji=Hs;var Zg=styled$1(Gn)(()=>({display:"flex",gap:"4px",alignItems:"center",flex:1,marginInlineEnd:"8px"}));function zs({brand:e,merchantsIds:t,isDisabled:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,renderBrandLogo:i,onChangeMerchant:l}){let[a,s]=useState(null),p=!!a,c=S=>{s(S.currentTarget);},m=()=>{s(null);},f=useMemo(()=>e.merchants?.filter(S=>t.includes(S.legacy_id)),[t,e.merchants]),C=useMemo(()=>f?.length===e.merchants?.length,[f?.length,e.merchants?.length]),x=useMemo(()=>!C&&f.length>0,[C,f]),I=S=>{if(S.stopPropagation(),C){l?.(t.filter(b=>!e.merchants.some(({legacy_id:d})=>b===d)));return}if(x){let b=[...new Set([...t,...f.map(({legacy_id:d})=>d)])];l?.(b);return}l?.([...t,...e.merchants.map(({legacy_id:b})=>b)]);};return jsxs(V,{isSelected:C,isIndeterminate:x,onMouseEnter:c,onMouseLeave:m,onClick:S=>{o||I(S);},isDisabled:o,sx:{maxHeight:35,minHeight:35,...p&&{boxShadow:"0px 0px 16px 0px #00000021"}},children:[jsxs(Zg,{children:[i?.(e.logo),jsx(j,{sx:{fontSize:"11px"},children:cc$1(e.name)})]}),e.merchants?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(Ji,{anchorEl:a,brand:e,merchantsIds:t,onChangeMerchant:l,atLeastOneMerchantSelected:n,showSearchInput:r})]})}var Qg=zs;function $s({brands:e,isLoading:t,onFilterChange:o,merchantsIds:n=[],atLeastOneMerchantSelected:r=false,showSearchInput:i=false,hideCheckbox:l=false,renderBrandLogo:a}){let[s,p]=useState(null),[c,m]=useState(""),f=!!s,{t:C}=useTranslation(),x=A=>{p(A.currentTarget);},I=()=>{p(null);},S=useMemo(()=>e.length?e.every(A=>A.merchants?.every(({legacy_id:D})=>n.includes(D))):false,[n,e,l]),b=useMemo(()=>!S&&n.length>0,[n,S]),d=useMemo(()=>e.filter(A=>A.merchants?.some(D=>n?.includes(D.legacy_id))).length,[e,n]),g=()=>{if(S&&!r){o?.([]);return}let A=e.flatMap(D=>D.merchants?.map(({legacy_id:E})=>E));o?.(A);},y=t||!e?.length,T=A=>{m(A);},P=()=>{m("");},h=useMemo(()=>{if(!c.trim())return e;let A=c.trim().toLowerCase();return e.filter(D=>cc$1(D.name)?.toLowerCase()?.includes(A)||D.merchants?.some(E=>E.legacy_id?.toLowerCase().includes(A)))},[c,e]),v=useMemo(()=>i?h:e,[e,h,i]);return jsxs(V,{isDisabled:y,isSelected:S,startAdornment:l?null:void 0,isIndeterminate:b,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...f&&{boxShadow:"0px 0px 16px 0px #00000021"},...y&&{pointerEvents:"none",opacity:.5,cursor:"default"}},onMouseEnter:x,onMouseLeave:I,onClick:g,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:C("merchant")}),e.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),e?.length===1?jsx(Ji,{anchorEl:s,brand:e[0],merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i}):jsxs(R,{open:f,anchorEl:s,placement:"right-start",children:[i&&e.length>1&&jsx(Gn,{sx:{p:"8px"},children:jsx(b$3,{id:"merchants-search-input",fullWidth:true,placeholder:"Brands",name:"brands",value:c,onChange:A=>T(A.target.value),onClear:P})}),v?.map(A=>jsx(Qg,{isDisabled:d===1&&r,brand:A,merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i,renderBrandLogo:a},A.id))]})]})}var ox=styled$1(Gn)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"164px"}));function q0({retailersIds:e=[],isLoading:t,retailers:o=[],onFilterChange:n,atLeastOneRetailerSelected:r=false,showSearchInput:i=false,hideCheckbox:l=false}){let[a,s]=useState(null),p=!!a,{t:c,i18n:m}=useTranslation(),[f,C]=useState(""),x=E=>{s(E.currentTarget);},I=()=>{s(null);},S=useCallback(E=>e?.includes(E),[e]),b=useMemo(()=>o.length?o.every(E=>S(E.id)):false,[o,S,l]),d=useMemo(()=>!b&&e.length>0,[e,b]),g=()=>{if(b&&!r){n?.([]);return}n?.(o.map(E=>E.id));},y=E=>e.length===1&&e[0]===E&&r,T=(E,k)=>{if(E.stopPropagation(),y(k))return;if(S(k)){n?.(e.filter(F=>F!==k));return}let N=[...new Set([...e,k])];n?.(N);},P=t||!o?.length,h=E=>{C(E);},v=()=>{C("");},A=useMemo(()=>f?.trim()?o?.filter(E=>(E?.brand?.name?.[m.language]??E?.brand?.name?.en??"").toLowerCase().includes(f.trim().toLowerCase())):o,[f,o,m.language]),D=useMemo(()=>i?A:o,[A,o,i]);return jsxs(V,{isDisabled:P,isSelected:b,startAdornment:l?null:void 0,isIndeterminate:d,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...p&&{boxShadow:"0px 0px 16px 0px #00000021"},...P&&{opacity:.5,pointerEvents:"none",cursor:"default"}},onMouseEnter:x,onMouseLeave:I,onClick:g,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:c("retailers")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsxs(R,{open:p,anchorEl:a,placement:"right-start",sx:{height:300,width:200,overflow:"auto"},children:[i&&jsx(Gn,{sx:{p:"8px"},children:jsx(b$3,{id:"retailers-search-field",fullWidth:true,placeholder:"Retailers",name:"retailers",value:f,onChange:E=>h(E.target.value),onClear:v})}),D?.map((E,k)=>jsx(V,{isSelected:S(E.id),isDisabled:t||y(E.id),onClick:N=>{T(N,E.id);},sx:{maxHeight:35,minHeight:35},children:jsx(ox,{children:E?.brand?.name?.[m.language]??E?.brand?.name?.en})},`key-${E?.id}-${k}`))]})]})}var ix=memo(q0);function e1({countriesIds:e=[],isLoading:t,countries:o=[],onFilterChange:n,atLeastOneCountrySelected:r=false,hideCheckbox:i=false}){let[l,a]=useState(null),s=!!l,{t:p}=useTranslation(),c=g=>{s||a(g.currentTarget);},m=()=>{s&&a(null);},f=useCallback(g=>e?.includes(g),[e]),C=useMemo(()=>o.length?o.every(g=>f(g)):false,[o,f]),x=useMemo(()=>!C&&e.length>0,[e,C]),I=()=>{if(!r){if(C){n?.([]);return}n?.(o);}},S=g=>e.length===1&&e[0]===g&&r,b=(g,y)=>{if(g.stopPropagation(),S(y))return;if(f(y)){n?.(e.filter(P=>P!==y));return}let T=[...new Set([...e,y])];n?.(T);},d=t||o?.length<=0||r;return jsxs(V,{isDisabled:d,isSelected:C,startAdornment:i?null:void 0,isIndeterminate:x,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:I,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("walletCountry")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:l,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((g,y)=>jsxs(V,{isSelected:f(g),isDisabled:t||S(g),onClick:T=>{b(T,g);},sx:{maxHeight:35,minHeight:35},children:[jsx(b$2,{countryCode:g}),jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:Na(g)})]},`key-${g}-${y}`))})]})}var sx=memo(e1);function i1({currenciesIds:e=[],isLoading:t,currencies:o=[],onFilterChange:n,atLeastOneCurrencySelected:r=false,hideCheckbox:i=false}){let[l,a]=useState(null),s=!!l,{t:p}=useTranslation(),c=g=>{s||a(g.currentTarget);},m=()=>{s&&a(null);},f=useCallback(g=>e?.includes(g),[e]),C=useMemo(()=>o.length?o.every(g=>f(g)):false,[o,f]),x=useMemo(()=>!C&&e.length>0,[e,C]),I=()=>{if(!r){if(C){n?.([]);return}n?.(o);}},S=g=>e.length===1&&e[0]===g&&r,b=(g,y)=>{if(g.stopPropagation(),S(y))return;if(f(y)){n?.(e.filter(P=>P!==y));return}let T=[...new Set([...e,y])];n?.(T);},d=t||o?.length<=0||r;return jsxs(V,{isDisabled:d,isSelected:C,startAdornment:i?null:void 0,isIndeterminate:x,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:I,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("currency")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:l,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((g,y)=>po[g]?.country?jsxs(V,{isSelected:f(g),isDisabled:t||S(g),onClick:P=>{b(P,g);},sx:{maxHeight:35,minHeight:35},children:[jsx(b$2,{countryCode:po[g].country})," ",jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:g})]},`key-${g}-${y}`):null)})]})}var mx=memo(i1);var a1=(r=>(r.BRAND="BRAND",r.COUNTRY="COUNTRY",r.ENTITY="ENTITY",r.MERCHANT="MERCHANT",r))(a1||{});var l1="/",Un=5,dx=(...e)=>e.join(l1),Us=e=>[e.label,e.id],ux=(e,t)=>{if(e.levelKey==="MERCHANT")return e.id.toLowerCase().includes(t)?e:null;let o=(e.children??[]).map(i=>ux(i,t)).filter(i=>i!==null);if(!o.length)return null;let{searchProps:n,...r}=e;return {...r,children:o,...o.length>=Un&&{searchProps:n}}},fx=(e,t,o)=>{let n=e.map(r=>{let i=r.entities??[],a=Array.from(new Set(i.map(s=>s.country).filter(Boolean))).map(s=>{let c=i.filter(m=>m.country===s).map(m=>{let C=(m.merchants??[]).map(x=>({id:x.legacy_id,label:x.display_name,levelKey:"MERCHANT",status:t.includes(x.legacy_id)?"CHECKED":"UNCHECKED",hintText:x.legacy_id}));return {id:dx(r.id,s,m.id),label:cc$1(m.legal_name,o)??m.id,levelKey:"ENTITY",children:C,header:"Merchants",...C.length>=Un&&{searchProps:{getValues:Us}}}});return {id:dx(r.id,s),label:Na(s)??s,levelKey:"COUNTRY",children:c,header:"Entities",iconComponent:jsx(b$2,{countryCode:s,width:14}),...c.length>=Un&&{searchProps:{getValues:Us}}}});return {id:r.id,label:cc$1(r.name,o)??r.id,levelKey:"BRAND",children:a,header:"Countries",icon:{fileId:r.logo??""},...a.length>=Un&&{searchProps:{getValues:Us}}}});return {levelKey:"BRAND",children:n,header:"Brands",...n.length>=Un&&{searchProps:{filterItem:(r,i)=>(typeof r.label=="string"?r.label.toLowerCase():"").includes(i)?r:ux(r,i)}}}};var u1=e=>{let{brands:t,isLoading:o,initialValue:n,onFilterChange:r,BrandLogoComponent:i,hideCheckbox:l}=e,[a,s]=useState(null),[p,c]=useState("UNCHECKED"),m=useRef(null),f=!!a,{t:C,i18n:x}=useTranslation(),I=useMemo(()=>fx(t,n,x.language),[t,n,x.language]),S=I.children??[],b=o||!S.length,d=useCallback(P=>{let h=P.filter(A=>A.status==="CHECKED"),v=P.filter(A=>A.status==="INDETERMINATE");return h.length===S.length?"CHECKED":v.length>0||h.length>0?"INDETERMINATE":"UNCHECKED"},[S]),g=useCallback(({selectedTree:P})=>{c(d(P));},[d]),y=useCallback(P=>{c(d(P));let h=b$9.filterNodesByLevelKey(P,"MERCHANT").map(({id:v})=>v);r?.(h);},[r,d]),T=useCallback(()=>{m.current?.toggleAll(p!=="CHECKED");},[p]);return jsxs(V,{startAdornment:l?null:void 0,isSelected:p==="CHECKED",isIndeterminate:p==="INDETERMINATE",isDisabled:b,onMouseEnter:P=>s(P.currentTarget),onMouseLeave:()=>s(null),onClick:T,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...f&&{boxShadow:"0px 0px 16px 0px #00000021"},...b&&{pointerEvents:"none",opacity:.5,cursor:"default"}},children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:C("merchant")}),t.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),!o&&jsx(c$2,{ref:m,placement:"right-start",anchorEl:a,exposeOnlySelectedTree:true,treeDefinition:I,onChange:y,onMounted:g,IconComponent:i})]})},gx=u1;var C1=gx;function xx({onPhoneChange:e,onCountryChange:t,selectedPhone:o,selectedCountry:n,countriesOptions:r,isCountriesLoading:i}){let l=Bc(useId(),"phone-filter");return jsx(b$a,{id:l,"data-testid":"ColumnFilterInputs_PhoneInput",phoneValue:o,onPhoneChange:a=>{e(a);},countryValue:n,onCountryChange:a=>{t(a?.countryId);},countries:r||[],isCountriesLoading:i||false,error:false,disabled:i,placeholder:"User Mobile",sx:{"&.MuiInputBase-root":{paddingLeft:"0px !important"}}})}var hx=(e,t)=>{let o=e||{},n={};return t?.forEach(({value:r})=>{let i=o?.[r];n[r]=i===void 0?"all":i;}),n};function Ix({anchorEl:e,options:t,apiKey:o="statuses",initialStatuses:n,onCloseDropdown:r,onClear:i,onConfirm:l}){let a=!!e,s=Bc(useId(),"status-filter"),{t:p}=useTranslation(),[c,m]=useState(()=>hx(n,t)),f=useRef(null),[C,x]=useState(null),[I,S]=useState(null),b=(v,A)=>{x(v.currentTarget),S(A);},d=useCallback(()=>{x(null),S(null);},[]),g$1=useCallback(v=>{r(v),d();},[d,r]),y=()=>{let v=Object.keys(c).reduce((D,E)=>{let k=c[E];return k!=="all"&&(D[E]=k),D},{});Object.values(c).every(D=>D==="all")?i([o]):l({[o]:v});},T=p$1(y,r),P=v=>{y(),r(v);},h=v=>{I&&m(A=>({...A,[I]:v}));};return jsx(ClickAwayListener,{onClickAway:v=>{v.stopPropagation(),r(v);},children:jsxs(Gn,{id:s,"data-testid":"StatusFilter",ref:f,tabIndex:-1,onKeyDown:T,children:[jsxs(R,{open:a,anchorEl:e,children:[jsx(a$5,{component:"span",children:p("filterBy")}),t.map(({value:v,label:A})=>jsxs(V,{onClick:D=>{x(D.currentTarget);},onMouseOver:D=>{b(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(Gn,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:A}),jsx(Gn,{component:"img",src:xb,width:16,height:12,sx:{marginLeft:"auto"}})]},v)),jsxs(b$b,{children:[jsx(d$2,{onClick:g$1,children:p("cancel")}),jsx(c$3,{onClick:P,children:p("okay")})]})]}),jsx(Popper,{open:!!C,anchorEl:C,placement:"right-start",onMouseLeave:d,children:jsx(Gn,{sx:{backgroundColor:"#fff",borderEndEndRadius:"8px",border:"1px solid #F2F2F2"},children:jsx(g,{options:[{value:"all",label:"All"},{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}],value:c[I||""],onOptionChange:h,sx:v=>({[`& .${a$6.item}:hover`]:{boxShadow:v.v2.elevation[200]}})})})})]})})}var T1=styled$1(j)(()=>({fontSize:"11px"})),bx=styled$1(Gn)(()=>({display:"flex",alignItems:"center",gap:"4px",width:"100%",paddingInline:"16px"})),Sx=styled$1(Gn)(({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}`})),Tx=styled$1(b)(()=>({minWidth:"auto",width:70})),wx=styled$1(b)(()=>({minWidth:"auto",width:70})),Px=styled$1(Gn)(()=>({display:"flex",flexDirection:"column",gap:"8px",marginBottom:"8px"})),js=styled$1(T1)(()=>({fontSize:"11px",fontWeight:500,color:"#8D8D94",padding:"8px 16px"})),vx=styled$1(Gn)(({theme:e})=>({borderBlock:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",gap:"2px",width:"100%"})),Ax=styled$1(Gn)(({theme:e})=>({...a(e),width:"auto",marginTop:"8px","&:focus":{outline:"none"}})),Ex=styled$1(js)(()=>({color:"#1F88D0",padding:"4px 24px",cursor:"pointer"})),Dx=styled$1(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 Lx({dateRange:e,onDateRangeChange:t,calendarMode:o,onCalendarModeChange:n,timezone:r,browserTimezone:i,defaultCountryTimezone:l,onTimezoneChange:a,timezoneCountriesCodes:s=[],onConfirm:p,onCloseDropdown:c}){let m=Bc(useId(),"date-filter"),{t:f}=useTranslation(),C=useRef(null),x=()=>p(e),I=p$1(x,c),S=y=>{t(y),requestAnimationFrame(()=>C.current?.focus());},b=y=>{x(),c(y);},d$1=useCallback(y=>n(y),[n]),g=y=>{if(!y)return "";let[T,P]=y,h=Mu(T).format("MMM D"),v=Mu(P).format("MMM D");return h===v?h:`${h} - ${v}`};return jsxs(Ax,{ref:C,tabIndex:-1,onKeyDown:I,id:m,"data-testid":"DateFilter",children:[jsxs(Px,{children:[jsx(vx,{children:jsx(js,{component:"span",children:f("filterBy")})}),jsx(bx,{children:jsx(a$2,{defaultDate:e||q(0),onDateChange:S,maxDateRange:365,mode:o,onCalendarModeSwitch:d$1,browserTimezone:i,defaultCountryTimezone:l,timezone:r,onChangeTimezone:a,timezoneCountriesCodes:s,mainSx:{width:"100%"},popperProps:{placement:"right-start"},renderCalendarButton:(y,T)=>jsxs(Dx,{variant:"secondary",size:"md",fullWidth:true,open:y,onClick:T,children:[jsx("span",{children:g(e)||"Date"}),jsx(d,{src:ek,alt:"selected",sx:{width:16,height:16}})]})},g(e))}),e&&jsx(Ex,{component:"span",onClick:()=>t(void 0),children:"Clear"})]}),jsxs(Sx,{children:[jsx(wx,{variant:"secondary",size:"md",onClick:c,children:f("cancel")}),jsx(Tx,{variant:"primary",size:"md",onClick:b,children:f("okay")})]})]})}var Rx=styled$1(Gn)(()=>({maxHeight:"210px",maxWidth:"177px",overflowY:"auto",padding:0})),kx=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},maxHeight:35,minHeight:35})),Vx=styled$1(Gn)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Bx=styled$1(Gn)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),Nx=styled$1(Gn)(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"120px"})),Wx=styled$1(R)(()=>({marginBottom:"8px"}));function Ox({anchorEl:e,onCloseDropdown:t,list:o,apiKey:n,placeholder:r,onConfirm:i,onClear:l,onClickItem:a,inputValue:s,onInputValueChange:p,selectedListItems:c}){let m=Bc(useId(),"list-column-filter"),{t:f}=useTranslation(),C=()=>i(),x=p$1(C,t),I=h=>{C(),t(h);},S=h=>{l?.(),t(h);},b=!!s.trim().length,d=()=>{b&&p("");},g=h=>{p(h);},y=useMemo(()=>b?o?.filter(h=>h.name.toLowerCase().includes(s.trim().toLowerCase())):o,[s,b,o]),T=b&&!y.length||!o.length,P=useMemo(()=>new Set(c),[c]);return jsxs(Wx,{id:m,"data-testid":"ListColumnFilter",open:!!e,anchorEl:e,onKeyDown:x,children:[jsx(a$5,{component:"span",children:f("filterBy")}),!!o?.length&&jsx(Box,{sx:{padding:"8px 16px"},children:jsx(b$3,{fullWidth:true,value:s,name:n,placeholder:r,onChange:h=>g(h.target.value),onClear:d})}),jsx(Rx,{children:T?jsx(Box,{sx:{p:1,textAlign:"center",fontSize:"11px"},children:"No data available"}):y?.map((h,v)=>jsx(kx,{isSelected:P.has(h?.id),onClick:()=>{a(h?.id);},children:jsxs(Vx,{children:[jsx(Nx,{children:h.name}),jsx(Bx,{component:"span",children:h.id})]})},`${h.id}-${v}`))}),jsxs(b$b,{children:[jsx(d$2,{onClick:S,children:f("cancel")}),jsx(c$3,{onClick:I,children:f("okay")})]})]})}var _x="os-shared-VerificationIcon",ia={root:`${_x}-root`,img:`${_x}-img`},zx=(a=>(a.Verified="verified",a.Reviewed="reviewed",a.Completed="completed",a.Incomplete="incomplete",a.Rejected="rejected",a.Closed="closed",a.Archived="archived",a))(zx||{});var aa={verified:Jj,reviewed:Hj,completed:Gj,incomplete:Ij,rejected:Kj,closed:Lj,archived:Mj},la={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var R1=2.3,$x=styled$1("span",{shouldForwardProp:e=>!["$variant","$bgColor","$size"].includes(e)})(({$variant:e="default",$bgColor:t,$size:o=10.5})=>{let n=Math.round(o*R1);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...e==="circle"&&{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:t||"#D9D9D929"}}});var Ux=forwardRef(({className:e,sx:t,icon:o,label:n,variant:r="default",size:i=10.5,width:l,height:a,...s},p$1)=>{let c=aa[o]||aa.incomplete,m=la[o]||la.incomplete,f=n===null?"":n||Ku(o),C=l??i,x=a??i,I=jsx($x,{ref:p$1,className:nc(ia.root,e),sx:t,"data-testid":"VerificationIcon",$variant:r,$bgColor:m,$size:i,...s,children:jsx("img",{className:ia.img,loading:"lazy",src:c,alt:f||o,width:C,height:x})});return n===null?I:jsx(p,{title:f,wrapperProps:{display:"inline-flex"},children:I})});Ux.displayName="VerificationIcon";var N1=memo(Ux);function z1({voidPercentage:e,capturePercentage:t,captureCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:l,isTextShown:a,remainingAmount:s,isSheetViewShown:p$1,selectionProps:c={}}){let m=Number(t)+Number(e)===100||s<=0,f=Bc(useId(),"capture-auto-icon"),C=useTheme(),{t:x}=useTranslation(),I=Ja$1(s||0),S=useCallback(T=>`Auto ${T} - ${l} ${I.integerAmount}.${I.decimalAmount}`,[l,I.decimalAmount,I.integerAmount]),b=useCallback(T=>{let P=T==="Capture"?r:i,{integerAmount:h,decimalAmount:v}=Ka(P,l);return `Partial ${T} - ${l} ${h}.${v}`},[r,i,l]),d=t>0?jsx(p,{title:b("Capture"),children:jsxs(Or,{isCapture:true,isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx($r,{src:vb$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(_r,{isCapture:true,percentage:t,children:[t,"% ",jsx(zr,{isCapture:true,percentage:Ur(t)})]}),o>1&&jsxs(z,{compact:true,color:"dark",children:[o,"x"]})]})]})}):n==="CAPTURED"&&!m?jsx(p,{title:S("Capture"),children:jsx(Qt,{children:jsx(Dt,{src:Jo.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:S("Capture"),children:jsx(Qt,{children:jsx(Dt,{src:Jo.CAPTURED?.icon,alt:"auto"})})}),g=t===100?jsx(p,{title:x("captured"),children:jsx(ld,{children:jsx(Dt,{src:ik,alt:"captured"})})}):d,y=useMemo(()=>p$1&&g?jsx(b$1,{copyTrigger:"press",copyText:x("captured"),children:x("captured")}):a&&g?jsx(id,{children:x("captured")}):g,[a,g,p$1,x]);return y&&jsx("div",{id:f,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:y})}var Yx=z1;function K1({voidPercentage:e,capturePercentage:t,voidCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:l,isTextShown:a,isSheetViewShown:s,selectionProps:p$1={},remainingAmount:c}){let m=Number(t)+Number(e)===100||c<=0,f=Bc(useId(),"void-auto-icon"),C=useTheme(),{t:x}=useTranslation(),I=Ja$1(c||0),S=useCallback(T=>`Auto ${T} - ${l} ${I.integerAmount}.${I.decimalAmount}`,[l,I.decimalAmount,I.integerAmount]),b=useCallback(T=>{let P=T==="Capture"?r:i,{integerAmount:h,decimalAmount:v}=Ka(P,l);return `Partial ${T} - ${l} ${h}.${v}`},[r,i,l]),d=e>0||i?jsx(p,{title:b("Void"),children:jsxs(Or,{isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:C.palette.common.white,border:`0.75px solid ${C.palette.grey[600]}1A`},variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx($r,{src:zk,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(_r,{percentage:e,children:[e,"% ",jsx(zr,{percentage:Ur(e)})]}),o>0&&jsxs(z,{compact:true,color:"neutral",children:[o,"x"]})]})]})}):n==="VOID"&&!m?jsx(p,{title:S("Void"),children:jsx(Qt,{children:jsx(Dt,{src:Jo.VOID?.icon,alt:"auto"})})}):null,g=e===100?jsx(p,{title:x("void"),children:jsx(Qt,{children:jsx(Dt,{src:zk,alt:"void"})})}):d,y=useMemo(()=>s&&g?jsx(b$1,{copyTrigger:"press",copyText:x("void"),children:x("void")}):a&&g?jsx(ad,{children:x("void")}):g,[a,g,s,x]);return y?jsx("div",{id:f,"data-testid":"VoidAutoIcon",style:{...!s&&{zIndex:11}},children:y}):null}var Kx=K1;var q1=Yx;var Q1=({authorizedStatus:e,isTextShown:t,iconStyles:o,tableMode:n,chipIndex:r=0,selectionProps:i={}})=>{let{t:l}=useTranslation(),a=useTheme(),s=l(wt(e));return Ya(n)?jsx(b$1,{copyTrigger:"press",copyText:s,children:s}):jsx(p,{title:s,children:t?jsx(H,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:a.palette.info.dark},children:s}):jsx(d,{src:f$2[e],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var qx=styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)})),Xx=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Xs=styled$1("img")(()=>({width:"10px",height:"10px"})),Zs=styled$1(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"})),Js=styled$1(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"}})),Zx=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Jx=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Qx={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},eh={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},th={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},oh={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Qs={fadeIn:{duration:.3},animate:{duration:.1}},nh={fadeIn:{opacity:1}},rh=styled$1(H)(()=>({width:"88px",height:"100%"})),ep=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.25),height:"100%"}));function qe({chargeStatus:e,gatewayTooltip:t,acquirerTooltip:o,chargeTooltip:n,errorCode:r,isTextShown:i,gatewayCode:l,acquirerCode:a,unCapturedStyles:s,iconStyles:p$1,iconWrapperStyles:c,gatewayIconWrapperStyles:m,gatewayContainerStyles:f,gateWayIconStyles:C,showBadge:x=true,isSheetViewShown:I=false,selectionProps:S={},chipIndex:b=0}){let d=e?b$c[e]:null,g=e?g$1[e]:null,y=useTheme(),{t:T}=useTranslation(),P=Bc(useId(),"charge-status-icon"),h=n&&jsx(Fragment,{children:jsx("div",{children:n})}),v=o&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o})]}),A=t&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:t})]}),D=e&&a$4[e]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:d?"50%":"",...c},children:jsx($,{src:a$4[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:d?"50%":"",width:"16px",height:"16px",...p$1}})});return I?jsxs(ep,{children:[jsxs(b$1,{copyTrigger:"press",copyText:T(wt(e)),children:[T(wt(e))," ",r]}),d&&jsxs(Fragment,{children:[l&&jsxs(b$1,{copyTrigger:"press",copyText:"Gateway",children:["Gateway ",l]}),a&&jsxs(b$1,{copyTrigger:"press",copyText:"Acquirer",children:["Acquirer ",a]})]})]}):i?jsxs(ep,{children:[jsx(p,{title:h,children:jsxs(rh,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark,borderColor:`${d?.color||g?.color||y.palette.info.dark}1A`},children:[T(wt(e))," ",r]})}),d&&jsxs(Fragment,{children:[l&&jsx(p,{title:A,children:jsxs(H,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark},children:["Gateway ",l]})}),a&&jsx(p,{title:v,children:jsxs(H,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark},children:["Acquirer ",a]})})]})]}):jsx(ye,{id:P,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...c},children:Ln$1?.includes(e||"")&&(h||v||A)?jsxs(Jx,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...x&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...s},children:[jsx(Zx,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:d?.background}},children:jsx(p,{title:h??T(wt(e)),children:jsxs(Fragment,{children:[D,jsx(Xx,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:oh,style:{...r&&{padding:"0 !important"}},children:jsx(qx,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:d?.color},transition:Qx,variants:nh,initial:{opacity:0},children:r})})]})})}),jsx(Js,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Qs,variants:eh,style:f,isVisible:!!A,children:A&&jsx(p,{title:A,children:jsx(Zs,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:d?.background,...m},children:jsx(Xs,{src:d?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:C})})})}),jsx(Js,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Qs,variants:th,style:f,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Zs,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:d?.background,...m},children:jsx(Xs,{src:d?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:C})})})})]}):jsx(p,{title:h??T(wt(e)),children:jsx(ye,{children:D})})})}var aP=()=>{let{t:e}=useTranslation(),t=Bc(useId(),"customer-initiated-icon");return jsx(p,{title:e("merchantInitiated"),children:jsx("img",{id:t,"data-testid":"merchantInitiatedIcon",src:wb$1,alt:"merchant",style:{width:"16px",height:"16px"}})})};var lP={G:"Global",R:"Regional",L:"Local"},kt=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?lP[e]:void 0,r=n||t?`${n||""} ${n&&t?"-":""} ${t?`Country - ${t}`:""}`:void 0;return o||!t?null:jsx(p,{title:r,children:jsx(b$2,{countryCode:t})})};var cP=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let i=Bc(useId(),"device-icon-chip");return jsxs(Gn,{id:i,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Ya(r)&&{height:"18px"}},children:[jsx(kt,{geographyVariant:e,isTextShown:t,countryCode:o}),jsx(c$1,{type:n,isTextShown:t,tableMode:r})]})};var uP=({isDisputeOpen:e,iconStyles:t})=>{let o=Bc(useId(),"dispute-icon");return jsx($,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:e?va:ua,alt:"dispute-icon",style:t})};var ph=styled$1(Gn,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...Ya(t)&&{height:"18px"},alignItems:"center"})),ch=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function op({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let i=Bc(useId(),"issuer-icon"),l=o?.slice(0,4),a=o?.slice(-4);return jsxs(ph,{id:i,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(kt,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(ch,{children:`${l||""} ${a||""}`})})]})}var hP=op;var SP=({payoutStatus:e$1="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:i=0,selectionProps:l={}})=>{let{t:a}=useTranslation(),s=Bc(useId(),"payout-icon"),p$1=a(wt(e$1)),c=o||p$1;return r?jsx(b$1,{copyTrigger:"press",copyText:p$1,children:p$1}):jsx(p,{title:c,children:t?jsx(Ti,{id:s,"data-testid":"StatusCell_PayoutStatusLabel",children:p$1}):jsx($,{id:s,src:e[e$1],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:n})})};var AP=({isTextShown:e,refundStatus:t="PENDING",refundTooltip:o="",refundCount:n,iconStyles:r,isSheetViewShown:i,chipIndex:l=0,selectionProps:a={}})=>{let{t:s}=useTranslation(),p$1=useTheme(),c=Bc(useId(),"refund-icon"),m=(n||0)>1,f=s(wt(t));if(i)return jsxs(b$1,{copyTrigger:"press",copyText:f,children:[f," ",m?`${n}x`:null]});let C=jsxs(bd,{"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(Ti,{id:c,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d$3[t].color,backgroundColor:d$3[t].backgroundColor,width:"90px"},children:jsxs(Qa,{whileInView:m?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[f," ",m?C:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:m?jsxs(Qa,{id:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(Id,{src:rk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),C]}):jsx($,{id:c,src:c$4[t],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:r})})},mh=AP;var EP=mh;var DP={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},de=e=>DP[e?.toLowerCase()||""]||e;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var dh=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(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 uh=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),fh=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("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 Ch=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function Oe({source:e,isTextShown:t,title:o,width:n,height:r,imgSx:i}){let{t:l}=useTranslation(),a=h$1(e);return jsx(p,{title:o,children:t?jsx(fh,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(uh,{"data-testid":"SourceCell_TextLabel","data-source":e,children:l(wt(e))})}):jsx(dh,{src:a,alt:e,width:n,height:r,onError:s=>{s.currentTarget.src=h$1("card");},sx:i})})}function WP({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=Bc(useId(),"source-icons"),{t:i}=useTranslation(),l=useCallback(()=>{let p=[],c=ec(e),m=e?.method,f=e?.scheme;return de(m)?.toLowerCase()===de(f)?.toLowerCase()?p.push(de(m),de(c)):p.push(de(m),de(c),de(f)),p},[e]),a=useMemo(()=>jsx(Oe,{source:n,isTextShown:o,title:i(wt(n))},n),[n,o,i]),s=useMemo(()=>l()?.filter(p=>!!p&&p!==n)?.map((p,c,m)=>{let f=e?.wallet===i("sv_wallet")?i("storedValueWallet"):i("passThruWallet"),C=c===m.length-1&&t?.last_four?`${i(wt(p))} - ${t?.last_four}`:i(wt(p));return jsx(Oe,{source:p,isTextShown:o,title:c===0&&p==="Wallet"?f:C},`${p}-${c}`)}),[l,e,t,o,i,n]);return jsxs(Box,{id:r,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[n&&a,s,t?.last_four&&jsxs(Ch,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var Yn={PROCESSED:Ug,FAILED:""};var yh=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Ih=styled("img")(()=>({width:"16px",height:"16px"})),bh=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Ci({status:e,isTextShown:t,isSheetViewShown:o}){let n=useTheme$1(),{t:r}=useTranslation(),i=Bc(useId(),"destination-icon"),l=r(wt(e));return o&&Yn[e]?jsx(b$1,{copyTrigger:"press",copyText:l,children:l}):t&&Yn[e]?jsx(yh,{id:i,"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:"#1F88D00D",color:e==="PROCESSED"?n.palette.info.dark:n.palette.common.black},children:l}):jsx(bh,{id:i,"data-testid":"DestinationIcon",className:"destination-status",children:e&&Yn[e]&&jsx(p,{title:r(wt(e)),children:jsx(Ih,{src:Yn[e],alt:"destination-icon"})})})}
|
|
2
|
-
export{uP as $,xT as $a,_i as $b,fd as A,Eb as Aa,Wi as Ab,ix as Ac,Ja as B,kb as Ba,Xl as Bb,sx as Bc,Kr as C,Vb as Ca,Fi as Cb,mx as Cc,sE as D,Fb as Da,hw as Db,a1 as Dc,eo as E,Ob as Ea,Mo as Eb,l1 as Ec,to as F,Ub as Fa,Ln as Fb,Un as Fc,Iy as G,Kb as Ga,Ql as Gb,dx as Gc,Ty as H,Qb as Ha,Rn as Hb,fx as Hc,vy as I,oS as Ia,es as Ib,C1 as Ic,My as J,aS as Ja,ts as Jb,xx as Jc,ky as K,hi as Ka,os as Kb,Ix as Kc,Ny as L,E2 as La,ns as Lb,Lx as Lc,an as M,Hu as Ma,se as Mb,Ox as Mc,ol as N,K2 as Na,rs as Nb,ia as Nc,fM as O,wS as Oa,is as Ob,zx as Oc,tI as P,AS as Pa,as as Pb,aa as Pc,aI as Q,LS as Qa,ls as Qb,la as Qc,kh as R,nf as Ra,Jl as Rb,N1 as Rc,Nh as S,WS as Sa,kn as Sb,Wh as T,gf as Ta,yw as Tb,Kx as U,ZS as Ua,ss as Ub,q1 as V,JS as Va,ps as Vb,Q1 as W,tT as Wa,cs as Wb,qe as X,rT as Xa,dg as Xb,aP as Y,bf as Ya,Hi as Yb,kt as Z,fT as Za,Oi as Zb,cP as _,gT as _a,Iw as _b,w as a,hP as aa,hT as ab,bw as ac,td as b,SP as ba,Wf as bb,ms as bc,Zo as c,EP as ca,Hf as cb,ds as cc,pt as d,de as da,Kf as db,us as dc,Uv as e,Oe as ea,tC as eb,ug as ec,od as f,WP as fa,RT as fb,Sw as fc,Gv as g,Ci as ga,FT as gb,Tw as gc,nd as h,cI as ha,zT as hb,ww as hc,rd as i,CI as ia,gC as ib,fs as ic,H as j,yI as ja,wC as jb,zi as jc,id as k,TI as ka,ZT as kb,$i as kc,ad as l,SL as la,fO as lb,Lo as lc,Fr as m,DI as ma,W as mb,bs as mc,Te as n,RI as na,Me as nb,Ts as nc,ye as o,FI as oa,Bi as ob,ws as oc,$ as p,hR as pa,fw as pb,Ps as pc,Hr as q,wR as qa,Kl as qb,Es as qc,ct as r,MR as ra,Cw as rb,Ds as rc,en as s,NR as sa,gw as sb,Wn as sc,pd as t,$R as ta,xw as tb,Wg as tc,ny as u,ib as ua,Ni as ub,Rs as uc,ay as v,sb as va,_t as vb,ks as vc,cy as w,nu as wa,Le as wb,Vs as wc,uy as x,iu as xa,pg as xb,D0 as xc,jr as y,wb as ya,Mn as yb,Gg as yc,ud as z,vb as za,ql as zb,$s as zc};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {f}from'./chunk-S27723NU.js';import {z}from'./chunk-CAVYK7HF.js';import {Bc,Ma,g}from'./chunk-Z2DUFVI5.js';import {zl,ja,Va,Pg,jl,_a,Ua,Yg,Xg,Zg,Wg,$g,Bb,Ab,Ak,ik,ib,vk,B,w as w$1,A,D,Uh,hk,u,Bk}from'./chunk-3M2GZVQW.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Button,Box,alpha,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w({isActive:t,disableHover:e}){let[n,g]=useState(false),l=useTheme(),r=()=>{e||g(true);},u=()=>{g(false);},C=t?l.palette.common.white:l.palette.grey[700],d=n?l.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:d,fillOpacity:"0.1",onMouseEnter:r,onMouseLeave:u}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:C})]})})}var zt=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),mt=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...zt(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),gt={active:mt,inActive:mt};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var ht=styled(f)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),Ct=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),ft=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),vt=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),It=styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),xt=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));var bt={inProgress:Bk,initiated:Bk,abandoned:u,cancelled:hk,reversed:Uh,reports:D,search:A,chevronDown:w$1,unAuthorized:B,unSettled:vk,unCaptured:ib,captured:ik,authorized:Ak,openFlag:Ab,closedFlag:Bb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Ua,deactivated:_a,destination:jl,destinationReversed:Pg,outstanding:Va,active:ja,inactive:zl};var Ut=memo(t=>{let{variant:e="inActive",badgeCount:n,icon:g$1,label:l,dropdownOptions:r,selectedStatus:u,onButtonBodyClick:C,iconMapper:d=bt,buttonSx:yt,...wt}=t,kt=Bc(useId(),"status-button"),[Lt,M]=useState(0),{t:R}=useTranslation(),P=useRef(null),[T,x]=useState(null),[a,V]=useState(u??r?.[0]?.status);useEffect(()=>{u!==void 0&&V(u);},[u]);let p=useMemo(()=>!!r?.length,[r]),f=!!T&&Lt>1,m=e==="active",H=useMemo(()=>m?"active":"inactive",[m]),h=useMemo(()=>a?r?.find(o=>o.status===a):null,[a,r]),Mt=useMemo(()=>{if(h?.icon)return jsx(xt,{variant:e,children:h.icon});let o=a&&d[a]?a:g$1;if(o&&d[o])return jsx(It,{icon:o,variant:e,src:d[o],alt:`${o}-icon`})},[h,a,d,g$1,e]),Rt=useMemo(()=>!n||Number.isNaN(Ma(n))?null:jsx(z,{color:H,children:g(Number(n))}),[n,H]),W=useMemo(()=>p?jsx(w,{isActive:m}):null,[p,m]);useEffect(()=>{m||(M(0),x(null));},[m]);let b=useCallback(()=>{x(null);},[]),A=useCallback(()=>{p&&x(f?null:P.current);},[p,f]),Pt=useCallback(o=>{o.stopPropagation(),t?.onClick?.(o),C?.(a||r?.[0]?.status||"all"),A(),M(B=>B+1);},[t,C,a,r,A]),E=useCallback(o=>B=>{o?.onClick?.(B),V(o.status),b();},[b]),Tt=useMemo(()=>r?.map(o=>({...o,onClick:E(o)}))||[],[r,E]),Vt=gt[e],Ht=useMemo(()=>h?.label||(a?R(a):l),[h,a,R,l]);return jsxs(Fragment,{children:[jsx(Vt,{id:kt,"data-testid":"StatusButton",...wt,ref:P,onClick:Pt,statusVariant:e,sx:{...p&&{paddingInlineEnd:"27px"},...yt},children:jsxs(vt,{children:[jsxs(ft,{variant:e,children:[Mt,Ht,Rt]}),W&&jsx(Ct,{children:W})]})}),f&&p&&jsx(ht,{open:f,onClose:b,anchorEl:T,menuItems:Tt})]})}),St=Ut;var ge=St;
|
|
2
|
-
export{w as a,ge as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f,v}from'./chunk-CAVYK7HF.js';import {Bc}from'./chunk-Z2DUFVI5.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=Bc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
|