@tap-payments/os-micro-frontend-shared 0.3.191-test.6 → 0.3.191-test.8
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-TDFRCU4Z.js → chunk-3JASUZQS.js} +1 -1
- package/build/_chunks/{chunk-FQSIXRBP.js → chunk-3OFER46M.js} +1 -1
- package/build/_chunks/{chunk-AWKFBAKE.js → chunk-4DLVL6ER.js} +1 -1
- package/build/_chunks/{chunk-BA6X4Y2F.js → chunk-4LNKPE2U.js} +1 -1
- package/build/_chunks/{chunk-5DYTZMM6.js → chunk-4PNYP6ZK.js} +1 -1
- package/build/_chunks/{chunk-QNXMZVEN.js → chunk-5SBMHWJH.js} +1 -1
- package/build/_chunks/{chunk-3OGYLOMB.js → chunk-5SQLQID3.js} +1 -1
- package/build/_chunks/{chunk-QV4HZ5LX.js → chunk-5X5HCL6Y.js} +1 -1
- package/build/_chunks/{chunk-AAYT5TGN.js → chunk-7GZ3JZHZ.js} +1 -1
- package/build/_chunks/{chunk-NMXZ5LI3.js → chunk-A26NSTSO.js} +1 -1
- package/build/_chunks/chunk-AAJ2ZDP5.js +1 -0
- package/build/_chunks/{chunk-4DB4CG7F.js → chunk-AJVRMVWR.js} +1 -1
- package/build/_chunks/{chunk-5OT5VPEY.js → chunk-AVSV5B7B.js} +1 -1
- package/build/_chunks/{chunk-YEFZIPDH.js → chunk-BFIDIEB6.js} +1 -1
- package/build/_chunks/{chunk-XBSDBN7W.js → chunk-CCSW3K5W.js} +1 -1
- package/build/_chunks/chunk-ERFXYFJB.js +1 -0
- package/build/_chunks/{chunk-UTIRQY4E.js → chunk-ETVR65EP.js} +1 -1
- package/build/_chunks/chunk-EWTIAAVG.js +1 -0
- package/build/_chunks/{chunk-Y5VWDP7M.js → chunk-FB27EACE.js} +1 -1
- package/build/_chunks/{chunk-73EJMO2J.js → chunk-FYJUXOIU.js} +1 -1
- package/build/_chunks/{chunk-3STREV2B.js → chunk-G3HAZ3SB.js} +1 -1
- package/build/_chunks/{chunk-MIU4TWTI.js → chunk-GHXFPNIG.js} +1 -1
- package/build/_chunks/{chunk-65ZPCFIZ.js → chunk-GIMAPS4I.js} +1 -1
- package/build/_chunks/{chunk-UARPH2NF.js → chunk-GJFMJDVC.js} +1 -1
- package/build/_chunks/{chunk-PQUVJZ7P.js → chunk-GMFVNWC7.js} +1 -1
- package/build/_chunks/{chunk-43AY7J5C.js → chunk-GSZ5DK6X.js} +1 -1
- package/build/_chunks/{chunk-QA3I46G4.js → chunk-GVRLCEAN.js} +1 -1
- package/build/_chunks/{chunk-LKV5X523.js → chunk-GWW3QJ5D.js} +1 -1
- package/build/_chunks/{chunk-S7ASXGQK.js → chunk-HZHFGJUA.js} +1 -1
- package/build/_chunks/{chunk-PDE4TL7U.js → chunk-JEI7QGL2.js} +1 -1
- package/build/_chunks/{chunk-A5LEWQVP.js → chunk-KL42FXA6.js} +1 -1
- package/build/_chunks/chunk-KLBGMJ42.js +1 -0
- package/build/_chunks/{chunk-NFTEYMEJ.js → chunk-KXKMEBL3.js} +1 -1
- package/build/_chunks/{chunk-4DLBXUMP.js → chunk-LTPDQQSK.js} +1 -1
- package/build/_chunks/{chunk-3RLONVW4.js → chunk-NNQZF4RL.js} +1 -1
- package/build/_chunks/{chunk-T55OLJGK.js → chunk-OQDLMEN2.js} +1 -1
- package/build/_chunks/{chunk-6HKQOLC7.js → chunk-PS5EGW7S.js} +1 -1
- package/build/_chunks/{chunk-XQWLBXKK.js → chunk-RCCOZP4I.js} +1 -1
- package/build/_chunks/{chunk-2Q3PJJYL.js → chunk-SETLLN6D.js} +1 -1
- package/build/_chunks/chunk-TEJUDCOU.js +2 -0
- package/build/_chunks/{chunk-AG3X4PT2.js → chunk-ULWL222G.js} +1 -1
- package/build/_chunks/{chunk-YRXPE2TW.js → chunk-URBZLU7H.js} +1 -1
- package/build/_chunks/{chunk-OQAQIKV6.js → chunk-VX3PNSHR.js} +1 -1
- package/build/_chunks/{chunk-RXIB3IUK.js → chunk-VY77NFH5.js} +1 -1
- package/build/_chunks/{chunk-FAPDPYQ2.js → chunk-WIGVQGFY.js} +1 -1
- package/build/_chunks/{chunk-XEITCT3F.js → chunk-X65FFDC2.js} +1 -1
- package/build/_chunks/{chunk-EIVZELFB.js → chunk-XHGBX3FD.js} +1 -1
- package/build/_chunks/{chunk-ERZHGCXS.js → chunk-XPZPUS32.js} +1 -1
- package/build/_chunks/{chunk-FNUZTVXA.js → chunk-YHJSM657.js} +1 -1
- package/build/_chunks/{chunk-PX3MXCDO.js → chunk-YLDV4ZDJ.js} +1 -1
- package/build/_chunks/{chunk-YU6DGIMI.js → chunk-YZTY5OZD.js} +1 -1
- package/build/_chunks/{chunk-DKGNG6AD.js → chunk-ZQRN53LT.js} +1 -1
- package/build/_chunks/{chunk-GI33FFFD.js → chunk-ZTCKQ4YE.js} +1 -1
- package/build/_chunks/chunk-ZTGRLZKC.js +2 -0
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/PhoneInput/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RHFInput/RHFInput.d.ts +2 -2
- package/build/components/RHFInput/index.js +1 -1
- package/build/components/RHFPhoneInput/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchInput/SearchInput.d.ts +4 -0
- package/build/components/SearchInput/constants.d.ts +10 -0
- package/build/components/SearchInput/icons.d.ts +4 -0
- package/build/components/SearchInput/index.d.ts +4 -0
- package/build/components/SearchInput/index.js +1 -0
- package/build/components/SearchInput/style.d.ts +10 -0
- package/build/components/SearchInput/type.d.ts +10 -0
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/SelectWithSearch/type.d.ts +2 -2
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TextInput/TextInput.d.ts +4 -0
- package/build/components/TextInput/constants.d.ts +9 -0
- package/build/components/TextInput/index.d.ts +4 -0
- package/build/components/TextInput/index.js +1 -0
- package/build/components/{FeedbackInput → TextInput}/style.d.ts +4 -2
- package/build/components/{FeedbackInput → TextInput}/type.d.ts +3 -8
- package/build/components/TextInput/utils.d.ts +5 -0
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/WindowAppIcon/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.d.ts +2 -1
- package/build/components/index.js +1 -1
- package/build/components/primitives/Input/constants.d.ts +0 -6
- package/build/components/primitives/Input/icons.d.ts +0 -2
- package/build/components/primitives/Input/style.d.ts +0 -15
- package/build/components/primitives/Input/type.d.ts +0 -7
- package/build/components/primitives/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/build/_chunks/chunk-B4PQ66NH.js +0 -1
- package/build/_chunks/chunk-D42PSZX5.js +0 -1
- package/build/_chunks/chunk-IYIESMUP.js +0 -1
- package/build/_chunks/chunk-NVBSCBXM.js +0 -1
- package/build/_chunks/chunk-PYGHWPNZ.js +0 -2
- package/build/_chunks/chunk-Q2RCK3CY.js +0 -2
- package/build/_chunks/chunk-SFINGGWJ.js +0 -1
- package/build/components/FeedbackInput/FeedbackInput.d.ts +0 -4
- package/build/components/FeedbackInput/constants.d.ts +0 -9
- package/build/components/FeedbackInput/index.d.ts +0 -4
- package/build/components/FeedbackInput/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-3JASUZQS.js';import {a,b,c as c$2}from'./chunk-KL42FXA6.js';import {a as a$1}from'./chunk-4QONVXGE.js';import {s,c as c$1}from'./chunk-G3LCY5M2.js';import {L,e,f,R,V,j as j$1,x}from'./chunk-TEJUDCOU.js';import {Sa as Sa$1,Rb,mb,gc,hc,ic,Ob,Qb as Qb$1,Pb,rc,Ta,Xa as Xa$1,na,e as e$1,ma}from'./chunk-PLMJIRXJ.js';import {w}from'./chunk-WHXHVOBY.js';import {ni as ni$1,ti,ck,vi,Ra as Ra$1,Da,Ea as Ea$1,Fa,Sh,ai,$h,wi as wi$1,A as A$1,F}from'./chunk-YKKS24ES.js';import ze,{memo,createContext,useContext,useRef,useCallback,useEffect,useState,useMemo,createElement,Fragment as Fragment$1}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import Nl from'memoize-one';import $l from'react-virtualized-auto-sizer';import Ul from'react-window-infinite-loader';import Ce from'@mui/material/Box';import oa from'@mui/material/Popper';import Ni from'@mui/material/InputAdornment';import $i from'lodash/values';import {useTranslation}from'react-i18next';import Yr from'@mui/material/Button';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {TableCell,Button,styled as styled$1,Box}from'@mui/material';import Ea from'@mui/material/TableRow';import {motion}from'framer-motion';import {VariableSizeList,areEqual}from'react-window';import Ma from'@mui/material/TableHead';import el from'lodash/uniqueId';import Xa from'@mui/material/Skeleton';import ja from'@mui/material/TableCell';import {createPortal}from'react-dom';var ht="188px";var $r=e=>({backgroundColor:e.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",width:ht,marginTop:"10px",boxShadow:e.shadows[3]}),Ur=styled(Ce)(({theme:e})=>({color:e.palette.grey[700],fontSize:"11px",fontWeight:500,padding:"8px 16px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`})),Xr=styled(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),Kr=styled(Ce)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),jr=styled(Yr)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),qr=styled(Ce)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));var Jr=styled(Ce)(({theme:e})=>({background:e.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),xt=styled(Ce)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),Ct=styled(Yr)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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}})),St=styled(Yr)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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"}}));function Xi({onCloseDropdown:e,filter:{options:t=[],onConfirm:o,data:r,isOnlyOneFilter:n,onClearFilterFields:a,wrapperSx:l,sx:s$1}}){let[i,p]=useState({});useEffect(()=>{p((t||[]).reduce((S,{apiKey:g})=>({...S,[g]:r?.[g]??""}),{}));},[]);let{t:d}=useTranslation(),u=()=>{o?.(i);},c=s(u,e),I=S=>{u(),e(S);},m=S=>{e(S);},h=()=>{a?.(),p(t.reduce((S,{apiKey:g})=>({...S,[g]:""}),{}));},f=S=>i[S]!==void 0&&i[S].length>0,T=S=>i[S]!==void 0&&i[S].length?i[S]:"",b=S=>{f(S)&&p({...i,[S]:""});},C=useMemo(()=>$i(i).some(S=>!!S),[i]),x$1=useCallback(S=>t.find(g=>g.apiKey===S),[t]),w=useCallback((S,g)=>{let R=i?.[S]!==void 0&&i?.[S]!==""&&i?.[S]!==null,V=Object.entries(i).some(([y,L])=>!!L&&(x$1(y)?.filterGroup!==g||!g));return n&&!R&&V},[t,i,n]);return jsxs(Ce,{component:"article","data-testid":"ColumnFilterInputs",sx:S=>({...$r(S),...Object.assign({},...[s$1].flat().filter(g=>g&&typeof g=="object"))}),onKeyDown:c,children:[jsx(Ur,{component:"header","data-testid":"ColumnFilterInputs_title",children:d("filterBy")}),jsx(Kr,{"data-testid":"ColumnFilterInputs_inputs",component:"main",sx:l,children:t.map(({placeholder:S,apiKey:g,isDisabled:R,filterGroup:V,render:y})=>jsx(Fragment$1,{children:y?y():jsx(Xr,{className:"input","data-testid":"ColumnFilterInputs_InputStyled",name:g,placeholder:S,onChange:L=>{p({...i,[g]:L.target.value});},disabled:R||w(g,V),value:T(g),inputProps:{autoComplete:"off","data-testid":"ColumnFilterInputs_input"},endAdornment:jsx(Ni,{position:"end",children:jsx(Ce,{component:"img","data-testid":"ColumnFilterInputs_icon","data-icon":f(g)?"close":"search",src:f(g)?wi$1:A$1,alt:"search",className:"icon",sx:{cursor:f(g)?"pointer":"default"},onClick:()=>{b(g);}})})})},g))}),jsx(x,{in:C,component:"section","data-testid":"ColumnFilterInputs_Collapse",sx:{borderTop:"0"},children:jsx(qr,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(jr,{type:"button",onClick:h,"data-testid":"ColumnFilterInputs_ClearButton",children:d("clear")})})}),jsxs(xt,{component:"footer","data-testid":"ColumnFilterInputs_footer",children:[jsx(St,{type:"button",onClick:m,"data-testid":"ColumnFilterInputs_CancelButton",children:d("cancel")}),jsx(Ct,{type:"button",onClick:I,"data-testid":"ColumnFilterInputs_OkayButton",children:d("okay")})]})]})}var tn=Xi;var yt=tn;function Ji({onCloseDropdown:e,filter:t,styles:o,header:r,searchable:n}){let[a,l]=useState([]),{t:s$1}=useTranslation(),i=useRef([]),p=t?.options?.map(b=>b.value).join(",")??"";useEffect(()=>{let b=x=>{let w=t?.data?.[t.apiKey]??[];if(Array.isArray(w)&&w.length)return new Set(w).has(x)},C=x=>x.map(({placeholder:w,value:E,isSelected:S,icon:g,options:R})=>{let V;if(n){let y=i.current.find(L=>L.apiKey===E);V=y!==void 0?y.isSelected??false:(S||b(E)||R?.every(({value:L})=>b(L)))??false;}else V=(S||b(E)||R?.every(({value:y})=>b(y)))??false;return {...w&&{label:w},name:E,selected:V,...g&&{icon:g},...R?.length&&{menuItems:C(R)}}});t.options&&l(C(t.options));},[t?.data,p,n]);let d=()=>{i.current=[];},u=b=>{d(),e(b);},c$1=()=>{if(n){let b=new Set(t?.data?.[t.apiKey]??[]);i.current.forEach(({apiKey:C,options:x,isSelected:w})=>{x?x.forEach(({apiKey:E,isSelected:S})=>{S?b.add(E):b.delete(E);}):w?b.add(C):b.delete(C);}),t?.onConfirm?.({[t.apiKey]:[...b]});}else {let b=i.current.reduce((C,{options:x,apiKey:w,isSelected:E})=>{if(x){let S=x.filter(({isSelected:g})=>g);S.length&&C.push(...S.map(({apiKey:g})=>g));}else E&&C.push(w);return C},[]);i.current.length&&t?.onConfirm?.({[t.apiKey]:[...new Set(b)]});}d();},I=s(c$1,e),m=b=>{c$1(),e(b);},h=b=>{let C=w=>w.map(({name:E,selected:S,menuItems:g,label:R})=>({...R&&{placeholder:R},apiKey:E,isSelected:S,...g?.length&&{options:C(g)}})),x=C(b);if(n){let w=new Set(x.map(E=>E.apiKey));i.current=[...i.current.filter(E=>!w.has(E.apiKey)),...x];}else i.current=x;},f=o?.maxWidth??ht,T={maxWidth:f,width:`min(${f}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:s$1("filterBy")||"Filter by",menuItems:a,style:o,menuSx:T,sx:[b=>({...T,marginTop:"10px",textAlign:"left",boxShadow:b.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(t.sx)?t.sx:[t.sx]).filter(Boolean)],updatedList:h,header:r,onKeyDown:I,footer:jsxs(xt,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(St,{onClick:u,children:s$1("cancel")},"nested-dropdown-cancel"),jsx(Ct,{onClick:m,children:s$1("okay")},"nested-dropdown-ok")]})})}var on=memo(Ji);var Tt=on;function ra(e){let{anchorEl:t,setAnchorEl:o,onClose:r,isFilterApplied:n,disabled:a}=e,l=u=>{u.stopPropagation(),o(null),r?.(u);},s=useRef(null),i=!!t;useEffect(()=>{i&&requestAnimationFrame(()=>s.current?.focus());},[i]);let p=useMemo(()=>e.type==="list"?[e.apiKey]:(e?.options||[])?.map(({apiKey:u})=>u),[e]),d=useMemo(()=>{if(e.type==="list")return jsx(Tt,{onCloseDropdown:l,filter:e});if(e.type==="inputs")return jsx(yt,{onCloseDropdown:l,filter:e});if(e.type==="custom"){let u={anchorEl:t,setAnchorEl:o,onCloseDropdown:l};return e.render(u)}return null},[i,e,l]);return jsxs(Fragment,{children:[n?jsxs(Jr,{children:[jsx(Ce,{component:"img","data-testid":"ColumnFilter_whiteFilterIcon",src:vi,alt:"filter-icon",sx:{marginInlineEnd:"2px",height:6}}),jsx(Ce,{component:"img","data-testid":"ColumnFilter_closeIcon",src:Ra$1,alt:"close-icon",onClick:u=>{u.stopPropagation(),o(null),e.onClear(p);}})]}):jsx(Ce,{component:"img","data-testid":"ColumnFilter_columnIcon",src:Da,alt:"column-icon",sx:{marginTop:"2px",userSelect:"none",opacity:a?.5:1}}),i&&jsx(a$1,{onClick:l}),jsx(oa,{open:i,anchorEl:t,placement:"bottom-start",children:jsx("div",{ref:s,tabIndex:-1,style:{outline:"none"},children:d})})]})}var an=memo(ra);var qe=an;var ao=styled("img")(()=>({width:"13.3px",height:"13.3px"})),sn=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer"}));function la({onColumnSort:e,columnsSorting:t,columnId:o,onClick:r}){let[n,a]=useState(null),l=!!n,s=d=>{d.stopPropagation(),a(d.currentTarget),r?.(d);},i=d=>{d.stopPropagation(),a(null),r?.(d);},p=(d,u,c)=>{d&&(e?.({[d]:u}),i(c));};return jsxs(Fragment,{children:[jsx(sn,{onClick:s,src:Da,alt:"column-icon","data-id":o,sx:{userSelect:"none",marginTop:"2px"}}),l&&jsx(a$1,{onClick:i}),jsxs(R,{anchorEl:n,open:l,children:[jsxs(V,{isSelected:t?.[n?.dataset.id||""]==="asc",onClick:d=>{p(n?.dataset.id,"asc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="asc"&&{boxShadow:d.shadows[10]}}),children:[jsx(ao,{src:Ea$1,alt:"sort-icon"}),jsx(j$1,{sx:{fontSize:"0.6875rem"},children:"Sort A-Z"})]}),jsxs(V,{isSelected:t?.[n?.dataset.id||""]==="desc",onClick:d=>{p(n?.dataset.id,"desc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="desc"&&{boxShadow:d.shadows[10]}}),children:[jsx(ao,{src:Fa,alt:"sort-icon"}),jsx(j$1,{sx:{fontSize:"0.6875rem"},children:"Sort Z-A"})]})]})]})}var dn=memo(la);var Rt=dn;var mn=ze.forwardRef(({children:e,...t},o)=>jsxs(Fragment,{children:[jsx(Ce,{"data-testid":"VirtualScrollInner",className:"VirtualScrollInner",style:{position:"sticky",top:0},children:e}),jsx("div",{ref:o,...t})]}));mn.displayName="VirtualScrollInner";var lo=mn;var It=createContext(null);var so=({children:e,value:t})=>jsx(It.Provider,{value:t,children:e});var un=ze.forwardRef(({onScroll:e,children:t,...o},r)=>{let n=useContext(It);return jsx("div",{className:"VirtualScrollOuter",onScroll:n,ref:r,...o,children:t})});un.displayName="VirtualScrollOuter";var po=un;function Sa({setBackdropVisibility:e,clearBackdropVisibilityTimeout:t}){let o=useRef(void 0);return useEffect(()=>()=>{clearTimeout(o.current);},[]),{handleBackDropVisibility:()=>{e(true);},clearBackdropVisibility:()=>{o.current=setTimeout(()=>{e(false);},t||2e3);},clearTimer:()=>{clearTimeout(o.current);}}}var cn=Sa;var Ra=ze.forwardRef(({itemData:e,children:t,setBackdropVisibility:o,scrollToIndex:r,listRef:n,onScroll:a,clearBackdropVisibilityTimeout:l,...s},i)=>{let{handleBackDropVisibility:p,clearBackdropVisibility:d,clearTimer:u}=cn({setBackdropVisibility:o,clearBackdropVisibilityTimeout:l}),c=useRef(0),I=useRef(void 0),m=useRef(false),h=useRef(null),f=i||n||h,T=useCallback(()=>(u(),I.current!==void 0&&f.current?(m.current=false,c.current=I.current,I.current=void 0,p(),f.current?.scrollTo?.(c.current),true):(d(),false)),[d,u,p,f]),b=ze.useCallback(w=>{I.current=w.currentTarget.scrollTop,m.current||(m.current=true,T());},[T]);useEffect(()=>{(r||0)>=0&&!Number.isNaN(r)&&r!==void 0&&f.current?.scrollTo&&f.current?.scrollToItem(r,"center");},[r,f]);let C=ze.useMemo(()=>({...e,renderedScrollTopRef:c}),[e]),x=ze.useCallback(w=>{a?.(w),m.current=T();},[T,a]);return jsx(so,{value:b,children:jsx(VariableSizeList,{ref:f,"data-testid":"VirtualScrollList",itemData:C,outerElementType:po,innerElementType:lo,...s,onScroll:x,children:t})})}),mo=Ra;var A=styled(Ce,{shouldForwardProp:e=>!["showNoDataView","compact","fixedHeight"].includes(e)})(({showNoDataView:e,compact:t,fixedHeight:o})=>({display:"flex",flexDirection:"column",height:o?`${o}px`:t?"auto":"100%",width:"100%",minWidth:e?"unset":"fit-content",overflow:"hidden",overflowX:e?"hidden":"auto",margin:"0px",...t&&{flex:"0 0 auto"}})),ce=styled(Ce,{shouldForwardProp:e=>e!=="hidePadding"})(({theme:e,hidePadding:t})=>({flex:"1 1 auto",backgroundColor:e.palette.grey[300],paddingBottom:t?0:a})),De=styled(Ce)(({theme:e})=>({backgroundColor:e.palette.background.default})),Se=styled(TableCell,{shouldForwardProp:e=>!["isLast","isFirst","isSheetView","isSelected","$hasFilter","$isFilterDisabled"].includes(e)})(({theme:e,isLast:t,isFirst:o,isSheetView:r,$hasFilter:n,$isFilterDisabled:a})=>({paddingBlock:"0",paddingInline:"0.3875rem !important",paddingLeft:o?"0 !important":"0.3875rem !important",paddingRight:t?"0 !important":"0.3875rem !important",color:r?e.palette.text.primary:e.palette.grey[700],fontSize:r?e.typography.subtitle1.fontSize:e.typography.caption.fontSize,height:"100%",fontWeight:r?400:e.typography.fontWeightRegular,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"flex",alignItems:"center",...n&&{cursor:"pointer"},...a&&{cursor:"not-allowed"},...r&&{borderRight:t?"1px solid transparent":`1px solid ${e.palette.divider}`,paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",position:"relative",borderTop:"1px solid transparent",borderLeft:"1px solid transparent",overflow:"hidden !important","&:before":{content:'""',borderRight:t?"none":"1px solid transparent",position:"absolute",top:0,right:0,left:0,bottom:0,pointerEvents:"none"}}})),Vt=styled("button",{shouldForwardProp:e=>!["$hasFilter"].includes(e)})(({theme:e,$hasFilter:t,disabled:o})=>({zIndex:1,display:"flex",gap:e.spacing(.5),alignItems:"center",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",backgroundColor:"transparent",border:"none",...t&&{cursor:"pointer"},...o&&{cursor:"not-allowed"},padding:0,margin:0,color:"inherit",fontSize:"inherit",fontWeight:"inherit",boxSizing:"border-box",":disabled":{cursor:"not-allowed"}})),Fe=styled(mo,{shouldForwardProp:e=>!["areTotalRowsNotFillingHeight","isSheetView"].includes(e)})(({theme:e,areTotalRowsNotFillingHeight:t,isSheetView:o})=>({backgroundColor:t?"transparent":"#F6F8FACC",...o&&{backgroundColor:e.palette.common.white}})),Lt=styled(Ea,{shouldForwardProp:e=>!["showShadowHighlight","showLoadedStyle","isSheetView","isSelected","isChecked","adjacentBelow","adjacentAbove"].includes(e)})(({theme:e$1,showShadowHighlight:t,showLoadedStyle:o,isSheetView:r,isChecked:n,adjacentBelow:a,adjacentAbove:l})=>({display:"flex",borderBottom:`1px solid ${e$1?.palette.divider}`,position:"relative",height:"100%",width:"100%",...!r&&{paddingInline:"32px",...a&&{borderBottom:"none",clipPath:"inset(-20px -20px 0px -20px)","&::before":{content:'""',position:"absolute",bottom:0,left:"32px",right:"32px",height:"1px",backgroundColor:e$1.palette.divider,zIndex:1}},...l&&{clipPath:"inset(0px -20px -20px -20px)"},...a&&l&&{clipPath:"inset(0px -20px 0px -20px)"},"&:hover":{boxShadow:e$1.shadows[12],zIndex:1,[`.${e.root}`]:{visibility:"visible"},".payment-sources-container":{backgroundColor:e$1?.palette.common.white},".geography-box":{visibility:"visible"},".payout-status":{visibility:"visible !important"},"&:hover:after":{opacity:1}},"&::after":{content:"''",opacity:0,minHeight:"100%",background:e$1.palette.info.dark,width:"3px",position:"absolute",left:0},...n&&{boxShadow:e$1.shadows[12],zIndex:1,"&:after":{opacity:1},[`.${e.root}`]:{visibility:"visible"}},...o&&{backgroundColor:`${e$1.palette.info.dark}08 !important`},...t&&{boxShadow:e$1.shadows[12],zIndex:1,"&::after":{content:"''",opacity:1,minHeight:"100%",background:e$1.palette.info.dark,width:"3px",position:"absolute",left:0}}}})),te=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"&&e!=="scrollable"})(({theme:e,showNoDataView:t,scrollable:o})=>({position:"relative",backgroundColor:e.palette.background.default,height:"100%",overflowX:t?"hidden":"auto",display:"flex",flexDirection:"column","&:hover":{scrollbarWidth:o?"auto":"none"},"&::-webkit-scrollbar":{display:"block",height:"13px"},"&::-webkit-scrollbar-track":{background:"white",border:"1px solid #F2F2F2"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#DADCDF",borderRadius:"32px",border:"3px solid transparent",backgroundClip:"content-box",minHeight:"20px"}})),uo=styled(motion.img)(()=>({width:"24px",height:"24px",position:"relative",zIndex:2})),kt=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%"})),bn=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%",paddingInline:"28px",borderRadius:"8px",marginBottom:"16px !important",overflowY:"hidden"})),hn=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"})(({showNoDataView:e})=>({position:"relative",height:"100%",overflowX:e?"hidden":"auto",paddingBottom:0,display:"flex",flexDirection:"column"})),vt=styled(f,{shouldForwardProp:e=>!["isRow"].includes(e)})(({isRow:e})=>({position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",padding:0,...e&&{visibility:"hidden"}}));var Va=e=>{let{filter:t,totalCount:o,isFilterEnabled:r}=e,n=useMemo(()=>t?.options?.reduce((i,{apiKey:p})=>({...i,[p]:t?.data?.[p]}),{})||{},[t]),a=useMemo(()=>{let i=t,p=i?.data?.[i.apiKey];return Array.isArray(p)?p:[]},[t]),l=useMemo(()=>Object.values(n||{}).some(i=>typeof i=="string"||Array.isArray(i)?i.length>0:i!=null)||a.length>0,[n,a]);return {isFilterApplied:l,filterDisabled:!l&&o===0&&!r}},Ge=Va;function gn({column:{header:e,id:t,align:o,headerStyle:r,sortable:n,filter:a,width:l,order:s},isFirst:i,isLast:p,isSheetView:d,onColumnSort:u,columnsSorting:c,totalCount:I,isFilterEnabled:m}){let[h,f]=useState(null),T=useRef(null),b=!!a,{isFilterApplied:C,filterDisabled:x}=Ge({filter:a,totalCount:I,isFilterEnabled:m});return jsx(Se,{"data-id":t,component:"div","data-testid":"VirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":l,"data-column-width-used":l,"data-column-align":o,"data-column-order":s,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!n,"data-column-filterable":b,isFirst:i,isLast:p,ref:T,$hasFilter:b,$isFilterDisabled:x&&b,sx:E=>({paddingInline:"0.6875rem",paddingLeft:i?"0":"0.6875rem",paddingRight:p?"0":"0.6875rem",display:"flex",gap:E.spacing(.5),alignItems:"center",justifyContent:ic[o??"left"],width:l,textAlign:o,overflow:"unset",fontWeight:600,...r}),isSheetView:d,children:jsxs(Vt,{disabled:x,$hasFilter:b,onClick:()=>{f(T.current);},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"TableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx("span",{style:{textOverflow:"ellipsis",width:"80%",overflow:"hidden"},"data-testid":"VirtualTable_TableHeader_StyledCell_header_text",children:e})}),a&&jsx(qe,{...a,anchorEl:h,setAnchorEl:f,isFilterApplied:C,disabled:x}),n&&jsx(Rt,{onColumnSort:u,columnsSorting:c,columnId:t})]})})}var fo=gn;var Cn=styled(Ma,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto",cursor:"auto"})),Sn=styled(Ea,{shouldForwardProp:e=>e!=="isSheetView"})(({theme:e,isSheetView:t})=>({display:"flex",justifyContent:"flex-start",width:"100%",minWidth:"fit-content",position:"relative",paddingInline:"32px",paddingBlock:"16px",...t&&{height:"28px",borderBottom:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.primary.light,paddingInline:0,paddingBlock:0}}));function Ba({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s,selection:i,selectableCount:p=0,getSelectableKeys:d}){let u=i&&i.ids.length>0,c=i&&p>0&&i.ids.length===p,I=useCallback(()=>{i&&i.setIds(c?[]:d?.()??[]);},[i,c,d]);return jsx(Cn,{component:"nav","data-testid":"VirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsxs(Sn,{component:"section","data-testid":"VirtualTable_TableHeader_StyledMUITableRow",isSheetView:a,children:[u&&jsx(vt,{size:"small",checked:c,indeterminate:u&&!c,onChange:I,onClick:m=>m.stopPropagation()}),e.map((m,h)=>jsx(fo,{column:m,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s},`${m.id}-${h}`))]})})}var yn=memo(Ba);var ho=yn;var Na=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="height"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flex:1,position:"sticky",left:0,background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",margin:0,minHeight:"55px"})),go=styled("p")(({theme:e})=>({fontSize:"0.75rem",fontWeight:600,color:alpha(e.palette.common.black,.2)}));function $a({height:e,sandboxMode:t,...o}){let{t:r}=useTranslation();return jsx(Na,{component:"section","data-testid":"TableLastItem",...o,height:e,sandboxMode:t,children:jsx(go,{children:r("allRecordsHaveBeenSuccessfullyLoaded")})})}var xo=$a;var Ya=styled(Xa)(({theme:e})=>({backgroundColor:e.palette.grey[100],borderRadius:"64px",minWidth:"20px"}));function Ja({columns:e,style:t,index:o,animationType:r}){return jsx(Ea,{sx:{...t,display:"flex",borderBottom:"1px solid #e3e8ee","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((n,a)=>jsx(ja,{sx:{width:n.width||`${100/e.length}%`||"20%",paddingInline:"0.6875rem"},component:"div",children:jsx(Ya,{variant:"rectangular",animation:r})},`${n.id}-${a}`))},o)}var So=memo(Ja,areEqual);var tl=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ol({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n}){let a=n||Sa$1(t,r);return a=a>0?a:5,jsx(tl,{isLoaded:t,"data-testid":"TableLoading",children:[...Array(a)].map(()=>jsx(So,{columns:e,animationType:o},`i-${el("TableLoadingRow_")}`))})}var yo=memo(ol);var Pn=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),Vn=styled(Ce,{shouldForwardProp:e=>e!=="shouldMinimizeWidth"})(({shouldMinimizeWidth:e})=>({width:e?"9rem":"15rem",display:"flex",flexDirection:"column",alignItems:"center"})),Ln=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1.125rem",color:e.palette.text?.primary,padding:0,margin:0})),kn=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,opacity:.5,padding:0,marginTop:3,textAlign:"center"})),vn=styled("img")(()=>({width:"2rem",height:"2rem"})),Wn=styled(Button)(({theme:e})=>({padding:" 0.625rem 1rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.5rem",backgroundColor:alpha(e.palette.info.dark,.1),borderRadius:"0.25rem",color:e.palette.info.dark,"&:hover":{backgroundColor:alpha(e.palette.info.dark,.1),color:e.palette.info.dark},width:"6rem",height:"1.8rem",marginTop:"1.5rem"})),Mn=styled("p")(({theme:e})=>({color:e.palette.info.dark,fontSize:"0.8rem",fontWeight:600,textTransform:"none"}));function il({triggerDataRefetch:e,heading:t,message:o,shouldMinimizeWidth:r,sandboxMode:n,hideIcon:a,hideTryAgain:l,...s}){let{t:i}=useTranslation();return jsx(Pn,{sandboxMode:n,...s,children:jsxs(Vn,{shouldMinimizeWidth:r,children:[!a&&jsx(vn,{src:F,alt:"info icon"}),jsx(Ln,{children:i(t)}),jsx(kn,{children:i(o)}),!l&&jsx(Wn,{variant:"contained",onClick:()=>{e();},children:jsx(Mn,{children:i("tryAgain")})})]})})}var oe=il;var Wt=oe;var Dn=styled$1("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0})),Fn=styled$1("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,marginTop:3,opacity:.5})),Hn=styled$1(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),To=styled$1("img")(()=>({width:"2rem",height:"2rem"}));function Bn({sandboxMode:e,heading:t,message:o,...r}){let{t:n}=useTranslation();return jsxs(Hn,{component:"section","data-testid":"EmptyList",sandboxMode:e,...r,children:[jsx(To,{src:Sh,alt:"empty container"}),jsx(Dn,{children:n(t)}),jsx(Fn,{children:n(o)})]})}Bn.displayName="EmptyList";var Dt=memo(Bn);var zn=Dt;var ul=e=>{let{isTimeoutError:t,tableError:o,triggerDataRefetch:r,sandboxMode:n,tableEmpty:a,error:l}=e;if(t)return jsx(Wt,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:r,sandboxMode:n});let s=l;if(o){let{formatted:i,message:p,code:d}=Rb({error:s,fallbackMessage:"connectionErrorMsg"}),u=mb()&&d===w;return jsx(Wt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u?p:i,triggerDataRefetch:r,sandboxMode:n,hideIcon:u,hideTryAgain:u})}if(a){let{formatted:i}=Rb({error:s,fallbackMessage:"tryAdjustingTheDateOrFilters"});return jsx(zn,{sandboxMode:n,heading:"nothingFound",message:i})}return jsx(Wt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:r,sandboxMode:n})},Ro=memo(ul);function _n({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){return n?jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(yo,{"data-testid":"VirtualTable_TableLoading",columns:a,isLoading:true})}):jsx(Ro,{isTimeoutError:o,tableEmpty:t,tableError:r,sandboxMode:s?.sandboxMode,error:e,triggerDataRefetch:l})}_n.displayName="TableNoData";var Je=memo(_n);function Po(){return jsx(motion.div,{initial:{width:0},animate:{width:"fit-content",transition:{duration:.5}},exit:{width:0},style:{paddingInline:"11px",paddingBlock:"5px",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.10), 0px 1px 1px 0px rgba(0, 0, 0, 0.09), 0px 2px 1px 0px rgba(0, 0, 0, 0.05), 0px 4px 2px 0px rgba(0, 0, 0, 0.01), 0px 7px 2px 0px rgba(0, 0, 0, 0.00)",borderRadius:"24px",overflow:"hidden",display:"inline-block",whiteSpace:"nowrap"},children:jsxs(motion.span,{style:{color:"#8F9195",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",gap:"10px"},children:[jsx(motion.span,{children:"!"}),jsx(motion.span,{children:"Error while loading"})]})})}function Cl({row:e,columns:t,index:o,rowProps:r,isSheetView:n,selectedCell:a=null,selectedColumn:l=null,selectedRow:s=null,selectedChip:i=null,onCellClick:p,isLastRow:d=false,onChipClick:u,selection:c,hasAdjacentCheckedAbove:I,hasAdjacentCheckedBelow:m}){let h=c?e[c.selector]:void 0,f=c&&c.ids.includes(h),T=c?.isDisabled?.(e),b=ze.useCallback(()=>{!c||T||c.setIds(f?c.ids.filter(g=>g!==h):[...c.ids,h]);},[c?.setIds,c?.ids,f,T,h]),C=ze.useCallback((g,R)=>(V,y)=>{u?.(o,g,V,y,R);},[u,o]),x=ze.useCallback((g,R,V)=>{let{render:y,format:L,selector:P}=g;if(!g?.id||!e)return null;let k=P?P({row:e,index:o,value:e[g?.id]}):e[g?.id],v=L?L({value:k,row:e,index:o}):k;return y?y({row:e,column:g,index:o,value:e[g?.id],selectionProps:{onClick:C(V,g.pinned),rowIndex:R,colIndex:V,selectedId:i}}):jsx(Fragment,{children:v})},[e,o,i,C]),w=a!==null||l!==null||s!==null,E=ze.useCallback((g,R)=>V=>{p?.(o,g,V,R);},[p,o]),S=useMemo(()=>{let g=t[0]?.id,R=t[t.length-1]?.id,V=s===o;return jsx(Fragment,{children:t.map((y,L)=>{if(!y?.id)return null;let P=`${y.pinned??"default"}-${o}-${L}`,k=`${y.pinned??"default"}-${L}`,v=w&&a===P,M=w&&l===k,F=gc({isSelected:w&&(v||M||V),isCellSelected:v,isColumnSelected:M,isRowSelected:V,isLastRow:d}),N=y.id===g,q=y.id===R,W=y.pinned?N:N&&y.pinned!=="start",_=y.pinned?q:q&&y.pinned!=="end",U=V&&w?hc({effectiveFirst:W,isPinnedStart:y.pinned==="start",isPinnedEnd:y.pinned==="end"}):{},B=y.pinned==="start"&&W;return jsx(Se,{component:"div","data-testid":"TableRow_TableCell","data-column-id":y.id,"data-column-width":y.width,"data-column-width-used":y.width,"data-column-align":y.align,"data-column-order":y.order,"data-column-header":typeof y.header=="string"?y.header:"component","data-column-sortable":!!y.sortable,"data-column-filterable":!!y.filter,isFirst:W,isLast:_,onClick:E(L,y.pinned),sx:{width:y.width,minWidth:y.width,textAlign:y.align,justifyContent:ic[B?"center":y.align??"left"],cursor:p?"pointer":"default",...F,...U,...y.cellStyle},isSheetView:n,isSelected:v,children:n?jsx(Box,{sx:{position:"relative",zIndex:1,width:"100%"},children:x(y,o,L)}):jsx(Fragment,{children:x(y,o,L)})},`${y.id}-${L}`)})})},[t,e,o,a,l,s,w,p,d,i,n,x,E]);return createElement(Lt,{"data-testid":"TableRow",onClick:r?.onRowClick,showShadowHighlight:r?.showShadowHighlight,showLoadedStyle:r?.showLoadedStyle,component:"article",...r,key:o,isSheetView:n,isChecked:f,adjacentAbove:I,adjacentBelow:m},c&&jsx(vt,{isRow:true,size:"small",checked:f,onChange:b,disabled:T}),S)}var Lo=memo(Cl,areEqual);var Vl=styled(Xa)(()=>({backgroundColor:"#F4F4F4",borderRadius:"64px",width:"100%",minWidth:"20px"}));function Ll({columns:e,style:t,index:o,animationType:r,rowIndex:n=0,useTableBackground:a=false}){let l=useTheme();return jsx(Ea,{sx:{...t,display:"flex",borderBottom:"1px solid #F2F2F2",minHeight:"28px",height:"28px",alignItems:"center",backgroundColor:a?l.palette.background.default:"transparent","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((s,i)=>{let p=i===e.length-1,d=i===0,u=s.pinned==="start",c=d&&u;return jsx(ja,{sx:{width:s.width||`${100/e.length}%`||"20%",paddingBlock:"0",paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",borderRight:p?"none":"1px solid #F2F2F2",borderLeft:d?"1px solid #F2F2F2":"none",height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",whiteSpace:"nowrap",overflow:"hidden"},component:"div",children:c&&s.render?s.render({index:n,row:{},column:s,value:n+1}):jsx(Vl,{variant:"rectangular",animation:r,height:16})},`${s.id}-${i}`)})},o)}var Ze=memo(Ll,areEqual);var Wl=ze.memo(({isLoadingRow:e,isSheetView:t,columns:o,currentRowCount:r})=>{let{t:n}=useTranslation();return e?t&&o?.length?jsx(Fragment,{children:Array.from({length:3},(a,l)=>jsx(Ze,{columns:o,animationType:"wave",rowIndex:(r||0)+l,useTableBackground:true},`loading-row-${l}`))}):jsxs(Box,{"data-testid":"ListItemWrapper_lastRowContent_isLoadingRow",sx:{height:t?"100%":"24px",width:"24px",borderRadius:"50%",background:"transparent",position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},children:[jsx(uo,{sx:{position:"absolute"},src:ni$1}),jsx(uo,{sx:{position:"absolute",padding:"3px"},src:ti,alt:"tableLoadingSpinnerIcon",className:"spinner-loader",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})]}):jsx(go,{"data-testid":"ListItemWrapper_lastRowContent",children:n("allRecordsHaveBeenSuccessfullyLoaded")})}),Ml=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},Dl=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"&&e!=="isSheetView"})(({theme:e,isSheetView:t})=>({height:t?28:"100%",backgroundColor:e.palette.background.default}));function Fl({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,columns:a,isLoading:l,scrollToIndex:s,newLoadedRowsEndIndex:i,isError:p,areAllRowsLoaded:d,isSheetView:u,isPinned:c=false,isLoadMoreLoading:I=false,...m}}){let h=r.length-1,{hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:T}=ze.useMemo(()=>{let R=m.selection;if(!R)return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let V=r[e]?.[R.selector];if(!R.ids.includes(V))return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let L=e>0?r[e-1]?.[R.selector]:void 0,P=e<h?r[e+1]?.[R.selector]:void 0;return {hasAdjacentCheckedAbove:L!==void 0&&R.ids.includes(L),hasAdjacentCheckedBelow:P!==void 0&&R.ids.includes(P)}},[m.selection?.ids,m.selection?.selector,r,e,h]),b=r[e],C=l&&e===h+1,x=e<=i,w=ze.useCallback(()=>Ml(b,n?.onRowClick),[b,n?.onRowClick]),E=ze.useMemo(()=>({showShadowHighlight:s===e,showLoadedStyle:x,...n,onClick:w}),[s,e,x,n,w]),S=ze.useCallback(R=>jsx(Box,{sx:{minHeight:28,height:"100%",width:"100%"},children:p?jsx(Po,{}):R}),[p]),g=ze.useMemo(()=>{let R=jsx(Wl,{isSheetView:u,isLoadingRow:C,columns:a,currentRowCount:r.length}),V=C||d&&e===h+1;return c&&V?u&&C&&a&&a.length>0?S(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},backgroundColor:"#F6F8FACC"}}):V?u&&C&&a&&a.length>0?S(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},display:"flex",justifyContent:"center",alignItems:"center"},children:jsx(Box,{sx:{backgroundColor:"#F6F8FACC",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:p?jsx(Po,{}):R})}):jsx(Lo,{index:e,row:b,columns:a,rowProps:E,isSheetView:u,isLastRow:e===r.length-1,isFirstRow:e===0,isLoading:l,isLoadMoreLoading:I,hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:T,...m},`row-${e}`)},[m,e,b,a,E,u,C,p,d,h,c,r.length,S,I]);return jsx("div",{"data-testid":"ListItemWrapper",style:{...t,top:Number(t.top)-(o?.current??0),willChange:"top"},children:jsx(Dl,{"data-testid":"ListItemWrapper_StyledItemWrapper",isSheetView:u,children:g})})}var zt=Fl;var Xl=Nl((e,t,o,r,n,a,l,s,i,p,d)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,isSheetView:p,selection:d}));function Kl({columns:e,rows:t,threshold:o=200,showHeader:r,headerProps:n,rowProps:a,footerProps:l,isLoading:s,error:i,columnsSorting:p,onColumnSort:d,loadMoreItems:u,isFetchingNextPage:c,triggerDataRefetch:I,scrollToIndex:m,areAllRowsLoaded:h=false,tableBodyStyles:f,tableMode:T,tableTitle:b$1,onStartDrag:C,isSheetView:x=false,isMinimized:w,footerComponent:E,customNoDataComponent:S,defaultSkeleton:g=false,selection:R,isFilterEnabled:V}){let y=useTheme(),L=z=>{C?.(z);},P=c$1({value:c,delay:1e3}),[k,v]=useState(false),[M,D]=useState("INITIAL_KEY");useEffect(()=>{let z=`${l?.maximized}-${w}`,Z=requestAnimationFrame(()=>D(z));return ()=>cancelAnimationFrame(Z)},[l?.maximized,w]);let F=Ob(i),N=s??true,q=!s&&t.length===0&&F&&!Qb$1(i),W=!s&&t.length===0,_=Pb(i),U=t.length-1,B=useMemo(()=>rc(e,s??false,g),[e,s,g]),H=useMemo(()=>B.filter(z=>!z.hidden),[B]),ne=useMemo(()=>H.sort((z,Z)=>(z?.order??1e6)-(Z?.order??1e6)),[H]),Ne=useMemo(()=>R?R.isDisabled?t.filter(z=>!R.isDisabled(z)).length:t.length:0,[t,R?.isDisabled]),jt=useCallback(()=>R?(R.isDisabled?t.filter(Z=>!R.isDisabled(Z)):t).map(Z=>Z[R.selector]):[],[t,R?.isDisabled,R?.selector]),G=Ta(t.length)&&!N,ie=P||h&&!G?t.length+1:t.length,$e=Xl(ne,P,t,a,m,U,l?.totalCount??0,F,h&&!G,x,R),ae=x?28:57,he=useRef(null);useEffect(()=>{he.current&&typeof he.current.resetAfterIndex=="function"&&he.current.resetAfterIndex(0,true);},[x,ae]);let qt=useMemo(()=>{let z=ge=>{v(ge);};return jsx(Ul,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:ge=>ge!==U,itemCount:ie,loadMoreItems:async()=>{h||await u?.();},threshold:o,children:({onItemsRendered:ge,ref:Gt})=>jsx($l,{ref:Gt,"data-testid":"VirtualTable_AutoSizer",children:({height:nt,width:it})=>jsx(Fe,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:$e,height:G?ie*ae:nt||0,width:it||0,itemCount:ie,itemSize:()=>ae,onItemsRendered:ge,setBackdropVisibility:z,areTotalRowsNotFillingHeight:G,scrollToIndex:m,overscanCount:5,isSheetView:x,listRef:he,style:{paddingBottom:"13px"},children:zt})},M)})},[U,u,o,h,G,ie,ae,x,$e,m,M]),X=N||q||W||_;return jsxs(Fragment,{children:[jsx(kt,{children:jsxs(te,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":b$1,"data-direction":y.direction,"data-are-all-rows-loaded":!!h,"data-is-fetching-next-page":!!c,"data-scroll-to-index":m,"data-is-loading":!!s,"data-is-error":!!F,"data-is-error-timeout":!!_,"data-table-mode":T,height:"100%",dir:y.direction,showNoDataView:X,scrollable:true,children:[jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:X,compact:!X&&G,sx:{...f},children:[r&&jsx(ho,{"data-testid":"VirtualTable_TableHeader",columnsSorting:p,onColumnSort:d,columns:ne,headerProps:n,showBackDrop:k,isSheetView:x,totalCount:l?.totalCount??0,selection:R,selectableCount:Ne,getSelectableKeys:jt,isFilterEnabled:V}),X?S||jsx(Je,{error:i,tableEmpty:W,isTimeoutError:_,tableError:q,tableLoading:N,orderedColumns:ne,triggerDataRefetch:I,footerProps:l}):jsx(A,{"data-testid":"VirtualTable_TableWrapper",fixedHeight:G?ie*ae:void 0,sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"VirtualTable_StyledBox",hidePadding:true,className:"list-wrapper",children:qt})})]}),!X&&G&&!c&&jsx(xo,{height:(ie+1)*ae,sandboxMode:l?.sandboxMode,"data-testid":"VirtualTable_TableLastItem"})]})}),l&&jsx(b,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:k,onPointerDown:L,selectedCount:R?.ids.length,...l}),E]})}var jl=memo(Kl);function Ql({style:e,index:t,cardLoadingComponent:o}){return jsx(Ea,{sx:{...e,display:"flex",padding:0,"&:hover":{backgroundColor:"transparent !important"}},component:"div",children:jsx(ja,{sx:{padding:0,flex:1},component:"div",children:o})},t)}var Wo=memo(Ql,areEqual);var rs=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ns({isLoaded:e=false,isLoading:t=false,rowsCount:o,cardLoadingComponent:r}){let n=o||Sa$1(e,t);return n=n>0?n:5,jsx(rs,{isLoaded:e,"data-testid":"TableLoadingWithCard",children:[...Array(n)].map(()=>jsx(Wo,{cardLoadingComponent:r},`i-${el("TableLoadingRow_")}`))})}var Mo=memo(ns);function Un({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,triggerDataRefetch:a,footerProps:l,cardLoadingComponent:s,noDataComponent:i}){let p;if(n)p=jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(Mo,{"data-testid":"VirtualTable_TableLoading",isLoading:true,cardLoadingComponent:s})});else if(o)p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});else if(r){let d=e,{formatted:u}=Rb({error:d,fallbackMessage:"connectionErrorMsg"});p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u,triggerDataRefetch:a,sandboxMode:l?.sandboxMode});}else t?p=i:p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});return p}Un.displayName="TableNoDataWithCard";var Do=memo(Un);function ss({row:e,index:t,rowProps:o,renderCardComponent:r}){return createElement(Lt,{"data-testid":"TableRow",onClick:o?.onRowClick,showShadowHighlight:o?.showShadowHighlight,showLoadedStyle:o?.showLoadedStyle,component:"article",...o,key:t},r&&jsx(r,{...e}))}var Fo=memo(ss,areEqual);var us=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},cs=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"})(({theme:e})=>({backgroundColor:e.palette.background.default,height:"100%"}));function fs({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,isLoading:a,scrollToIndex:l,newLoadedRowsEndIndex:s,areAllRowsLoaded:i,renderCardComponent:p}}){let d=r.length-1,u=r[e],c=a&&e===d+1,I=e<=s,m=ze.useCallback(us(u,n?.onRowClick),[u,n?.onRowClick]),h=ze.useMemo(()=>({showShadowHighlight:l===e,showLoadedStyle:I,...n,onClick:m}),[l,e,I,n,m,c,i,d]),f=ze.useMemo(()=>jsx(Fo,{index:e,row:u,renderCardComponent:p,rowProps:h},`row-${e}`),[e,u,h]);return jsx("div",{"data-testid":"ListCardWrapper",style:{...t,top:Number(t.top)-o.current,willChange:"top"},children:jsx(cs,{"data-testid":"ListCardWrapper_StyledItemWrapper",children:f})})}var zo=fs;var ws=Nl((e,t,o,r,n,a,l,s,i)=>({isLoading:e,rows:t,rowProps:o,scrollToIndex:r,totalCount:a,lastItemIndex:n,isError:l,areAllRowsLoaded:s,renderCardComponent:i}));function Rs({rows:e,threshold:t=200,rowProps:o,footerProps:r,rowHeight:n=57,isLoading:a,error:l,tableHeader:s,loadMoreItems:i,isFetchingNextPage:p,triggerDataRefetch:d,scrollToIndex:u,areAllRowsLoaded:c=false,tableBodyStyles:I,tableMode:m,tableTitle:h,renderCardComponent:f,cardLoadingComponent:T,tableHeight:b,tableHeaderHeight:C,noDataComponent:x,onStartDrag:w}){let E=useTheme(),S=_=>{w?.(_);},g=c$1({value:p,delay:1e3}),[R,V]=useState(false),y=Ob(l),L=a??true,P=!a&&e.length===0&&y&&!Qb$1(l),k=!a&&e.length===0,v=Pb(l),M=e.length-1,D=Ta(e.length)&&!L,F=g||c&&!D?e.length+1:e.length,N=ws(g,e,o,u,M,r?.totalCount??0,y,c&&!D,f),q=useMemo(()=>{let _=B=>{V(B);};return jsx(Ul,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:B=>B!==M,itemCount:F,loadMoreItems:async()=>{c||await i?.();},threshold:t,children:({onItemsRendered:B,ref:H})=>jsx(Ce,{sx:{height:`${b-(C??0)}px`},id:"auto-sizer-wrapper",children:jsx($l,{ref:H,"data-testid":"VirtualTable_AutoSizer",children:({height:ne,width:Ne})=>jsx(Fe,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:N,height:ne||0,width:Ne||0,itemCount:F,itemSize:()=>n,onItemsRendered:B,setBackdropVisibility:_,areTotalRowsNotFillingHeight:D,scrollToIndex:u,overscanCount:5,children:zo})})})})},[l,a,M,i,n,e,o,P,L,t,g,c,D,F]),W=L||P||k||v;return jsxs(Fragment,{children:[jsx(kt,{children:jsx(hn,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":h,"data-direction":E.direction,"data-are-all-rows-loaded":!!c,"data-is-fetching-next-page":!!p,"data-scroll-to-index":u,"data-is-loading":!!a,"data-is-error":!!y,"data-is-error-timeout":!!v,"data-table-mode":m,dir:E.direction,showNoDataView:W,sx:{height:`${b}px !important`},children:jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:W,sx:{...I},children:[s,W?jsx(Do,{error:l,tableEmpty:k,isTimeoutError:v,tableError:P,tableLoading:L,triggerDataRefetch:d,footerProps:r,cardLoadingComponent:T,noDataComponent:x}):q]})})}),jsx(c$2,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:R,onPointerDown:S,sx:{marginTop:"-37px"},...r})]})}var Is=memo(Rs);var Qb=styled("img")(()=>({width:"13.3px",height:"13.3px"})),eh=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer",marginTop:"2px"})),Kn=styled("span")(({theme:e})=>({color:e.palette.text.primary,textOverflow:"ellipsis",width:"80%",overflow:"hidden",fontSize:"12px",fontWeight:600})),jn=styled("div")(()=>({width:"16px",height:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"2px",padding:"2px",transition:"all 0.2s ease"})),qn=styled(Ma,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto"})),Gn=styled(Ea)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%",minWidth:"fit-content",height:"28px",backgroundColor:e.palette.primary.light})),_o=styled("div")({display:"flex",width:"100%",height:"100%",overflow:"hidden",borderRadius:"12px"}),Yn=styled("div")(({theme:e})=>({width:"auto",zIndex:10,flex:"0 0 auto",minWidth:0,display:"flex",flexDirection:"column",position:"relative",backgroundColor:e.palette.primary.light,borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",overflow:"hidden"})),Jn=styled(Yn)({boxShadow:"4px 0px 24px 0px #00000014",borderLeft:"1px solid #F2F2F2",borderRight:"none",borderTopLeftRadius:"12px",borderBottomLeftRadius:"12px"}),Zn=styled(Yn)({boxShadow:"-4px 0px 24px 0px #00000014",borderRight:"1px solid #F2F2F2",borderLeft:"none",borderTopRightRadius:"12px",borderBottomRightRadius:"12px"}),_t=styled("div",{shouldForwardProp:e=>e!=="hasPinnedStart"&&e!=="hasPinnedEnd"})(({hasPinnedStart:e,hasPinnedEnd:t})=>({flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",borderLeft:e?"none":"1px solid #F2F2F2",borderRight:t?"none":"1px solid #F2F2F2",position:"relative",scrollbarWidth:"auto",overflow:"hidden",borderTopLeftRadius:e?"0":"12px",borderBottomLeftRadius:e?"0":"12px",borderTopRightRadius:t?"0":"12px",borderBottomRightRadius:t?"0":"12px"})),_e=styled("div")({flexShrink:0,height:"auto",overflow:"auto"});var Ao=(e,t,o)=>{let[r,n]=useState(()=>{let m=t?e.filter(f=>f.pinned==="start").map(f=>f.id):[],h=e.filter(f=>f.isDefaultPinned&&f.pinned!=="end").map(f=>f.id);return Array.from(new Set([...h,...m]))}),[a,l]=useState(()=>{let m=e.filter(b=>b.isDefaultPinned&&b.pinned==="end").map(b=>b.id);if(!t)return m;let h=e.filter(b=>b.pinned==="end").map(b=>b.id),f=e.filter(b=>!b.hidden),T=f[f.length-1];return h.length===0&&T&&!T.pinned&&!T.isDefaultPinned?[T.id]:h}),s=useCallback((m,h="start")=>{if(!t)return;let f=[...r],T=[...a];h==="unpin"?(f=f.filter(C=>C!==m),T=T.filter(C=>C!==m)):h==="start"?(f=[...f.filter(C=>C!==m),m],T=T.filter(C=>C!==m)):h==="end"&&(T=[...T.filter(C=>C!==m),m],f=f.filter(C=>C!==m)),n(f),l(T);let b=f.includes(m)||T.includes(m);o?.(m,b);},[r,a,o,t]),i=useMemo(()=>e.filter(m=>!m.hidden),[e]),{pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u}=useMemo(()=>{let m=i.filter(x=>r.includes(x.id)),h=i.filter(x=>a.includes(x.id)),f=i.filter(x=>!r.includes(x.id)&&!a.includes(x.id)),T=m.sort((x,w)=>(x?.order??1e6)-(w?.order??1e6)),b=h.sort((x,w)=>(x?.order??1e6)-(w?.order??1e6)),C=f.sort((x,w)=>(x?.order??1e6)-(w?.order??1e6));return {pinnedStartColumnsData:T,pinnedEndColumnsData:b,unpinnedColumnsData:C}},[i,r,a]),c=useMemo(()=>[...p,...u,...d],[p,u,d]),I=useMemo(()=>{let m=c[c.length-1];return m?m.id:null},[c]);return {pinnedStartColumns:r,pinnedEndColumns:a,handleColumnPin:s,pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u,orderedColumns:c,lastColumnId:I}};var Oo=()=>{let e=useRef(null),t=useRef(null),o=useRef(null),r=useRef(false),n=useCallback(({scrollOffset:a},l)=>{r.current||(r.current=true,l!=="start"&&e.current&&e.current.scrollTo(a),l!=="end"&&o.current&&o.current.scrollTo(a),l!=="scrollable"&&t.current&&t.current.scrollTo(a),requestAnimationFrame(()=>{r.current=false;}));},[]);return {pinnedStartVirtualListRef:e,scrollableVirtualListRef:t,pinnedEndVirtualListRef:o,handleScroll:n}};var No=()=>{let[e,t]=useState(null),[o,r]=useState(null),[n,a]=useState(null),[l,s]=useState(null),[i,p]=useState(false),d=useCallback((m,h,f,T,b)=>{f.stopPropagation();let C=`${b??"default"}-${m}-${h}-${T}`,x=`${b??"default"}-${m}-${h}`;if(n===C){a(null),t(null);return}a(C),t(x),s(null);},[n,a,t,s]),u=useCallback((m,h,f,T)=>{if(f.stopPropagation(),T==="start"&&h===0){s(C=>C===m?null:m),t(null),r(null),a(null);return}let b=`${T??"default"}-${m}-${h}`;t(C=>C===b?null:b),r(null),a(null),s(null);},[l]),c=useCallback((m,h,f)=>{h.stopPropagation();let T=`${f??"default"}-${m}`;r(b=>b===T?null:T),t(null),a(null),s(null);},[]),I=useCallback(()=>{t(null),r(null),a(null),s(null);},[]);return {selectedCell:e,selectedColumn:o,selectedRow:l,showBackDrop:i,selectedChip:n,setShowBackdrop:p,handleChipClick:d,handleCellClick:u,handleColumnClick:c,resetSelection:I}};var vs=e=>e!==null&&"isAxiosError"in e&&e.isAxiosError===true,$o=({rows:e,isLoading:t,error:o,isFetchingNextPage:r,areAllRowsLoaded:n})=>{let a=c$1({value:r,delay:1e3}),l=useMemo(()=>{let i=Ob(o||null),p=t??true,d=o&&vs(o)?o:null,u=!t&&e.length===0&&i&&!Qb$1(d),c=!t&&e.length===0,I=Pb(d);return {isError:i,tableLoading:p,tableError:u,tableEmpty:c,hasTimeoutError:I,showNoDataView:p||u||c||I}},[e.length,t,o]),s=useMemo(()=>{let i=e.length-1,p=Ta(e.length)&&!l.tableLoading,d=(a??false)||n?e.length+1:e.length;return {lastItemIndex:i,areTotalRowsNotFillingHeight:p,itemsCount:d}},[e.length,l.tableLoading,a,n]);return {...l,...s,isDelayedFetchingNextPage:a??false}};var Ms=Nl((e,t,o,r,n,a,l,s,i,p,d,u,c,I,m,h,f,T)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,limit:l,newLoadedRowsEndIndex:a,isSheetView:true,isPinned:p,selectedCell:d,selectedColumn:u,selectedRow:c,selectedChip:I,onCellClick:m,onChipClick:h,containerHeight:f,rowHeight:T})),Uo=({rowHeight:e,areAllRowsLoaded:t,rows:o,isDelayedFetchingNextPage:r,rowProps:n,scrollToIndex:a,footerProps:l,isError:s,selectedCell:i,selectedColumn:p,selectedRow:d,selectedChip:u,handleCellClick:c,handleChipClick:I})=>{let m=useCallback((b,C)=>{if(t&&b===o.length){let w=o.length*e,E=C-w,S=e*2;return Math.max(E,S)}return e},[t,o.length,e]),h=useMemo(()=>[r,o,n,a,o.length-1,l?.totalCount??0,s,t],[r,o,n,a,l?.totalCount,s,t]),f=useMemo(()=>[i,p,d,u,c,I],[i,p,d,u,c,I]),T=useCallback((b,C,x)=>Ms(b,...h,C,...f,x,e),[h,f,e]);return {getItemSize:m,getItemDataForContainer:T}};var Ds=(e,t)=>{let o=useMemo(()=>e.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[e]),r=useMemo(()=>t.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[t]);return {pinnedStartColumnsWidth:o,pinnedEndColumnsWidth:r}};var Xo=({tableContainerRef:e,showHeader:t,isResizing:o})=>{let[r,n]=useState({top:0,height:0});return useEffect(()=>{let a=()=>{if(e.current){let l=e.current.getBoundingClientRect(),s=t?28:0;n({top:l.top+s,height:l.height-s});}};if(a(),o){let l=()=>a();return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[o,t,e]),r};var ni=styled("div",{shouldForwardProp:e=>e!=="isResizing"&&e!=="isLast"})(({isLast:e})=>({position:"absolute",top:0,right:e?-10:-11,width:20,height:"100%",backgroundColor:"transparent",zIndex:100001,display:"flex",alignItems:"center",justifyContent:"center"})),ii=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="height"&&e!=="top"})(({isVisible:e,x:t,height:o,top:r})=>({position:"fixed",left:t,top:r,width:1,height:`calc(${o}px - 14px)`,backgroundColor:"#1F88D0",zIndex:9999,pointerEvents:"none",opacity:e?1:0,transition:"opacity 0.1s ease","&::before":{content:'""',position:"absolute",left:-1,top:0,width:1,height:"100%"}})),$t=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="y"&&e!=="offsetX"})(({isVisible:e,x:t,y:o,offsetX:r=0})=>({position:"fixed",left:t+r-8,top:o,width:20,height:16,backgroundImage:`url(${ck})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",zIndex:1e5,pointerEvents:"none",display:e?"block":"none",transform:"translate(-50%, -50%)"}));function As({columnId:e,onStartResize:t,isResizing:o,isLast:r=false}){let[n,a]=useState(false),[l,s]=useState({x:0,y:0}),i=useRef(null),p=useCallback(()=>{let m=i.current?.getBoundingClientRect();m&&s({x:m.right,y:m.top+m.height/2});},[]),d=useCallback(()=>{o||(a(true),p());},[o,p]),u=useCallback(()=>{!o&&n&&p();},[o,n,p]),c=useCallback(()=>{a(false);},[]);return jsxs(Fragment,{children:[jsx(ni,{ref:i,isResizing:o,isLast:r,onMouseDown:m=>{m.stopPropagation(),m.preventDefault(),a(false),t(m,e);},onMouseEnter:d,onMouseMove:u,onMouseLeave:c,"data-testid":`column-resize-handle-${e}`}),createPortal(jsx($t,{isVisible:n&&!o,x:l.x,y:l.y,offsetX:-2}),document.body)]})}var jo=memo(As);function Xs({isVisible:e,indicatorX:t,indicatorHeight:o,indicatorTop:r,iconX:n,iconY:a}){return e?createPortal(jsxs(Fragment,{children:[jsx(ii,{isVisible:e,x:t,height:o,top:r,"data-testid":"column-resize-indicator"}),jsx($t,{isVisible:e,x:n,y:a,offsetX:8,"data-testid":"floating-resize-icon"})]}),document.body):null}var qo=memo(Xs);var qs=e=>{if(!e||typeof e!="object")return false;let t=e;return "width"in t&&e$1(t.width)},Gs=e=>!e||typeof e!="object"?false:Object.values(e).every(qs),Ys=e=>!e||typeof e!="object"?false:Object.values(e).every(Gs),di=e=>!e||typeof e!="object"?false:Object.values(e).every(Ys),pi=()=>{try{let e=na();if(!e)return {};let t=e;return di(t)?t:(console.warn("Invalid column settings in localStorage"),{})}catch(e){return console.warn("Failed to get sheetview columns:",e),{}}},Js=e=>{if(!di(e))return console.warn("Invalid data structure for sheetview columns"),false;try{return ma(e),!0}catch(t){return console.warn("Failed to save sheetview columns:",t),false}},mi=(e,t,o,r)=>{if(!Xa$1(e)||!Xa$1(t)||!Xa$1(o))return r;try{return pi()[e]?.[t]?.[o]?.width??r}catch(n){return console.warn("Failed to get column width:",n),r}},ui=(e,t,o,r)=>{if(!Xa$1(e)||!Xa$1(t)||!Xa$1(o)||!e$1(r))return console.warn("Invalid parameters for setColumnWidth"),false;try{let n=pi();return n[e]||(n[e]={}),n[e][t]||(n[e][t]={}),n[e][t][o]?n[e][t][o].width=r:n[e][t][o]={width:r},Js(n)}catch(n){return console.warn("Failed to set column width:",n),false}};var Te={MIN_WIDTH:25,MAX_WIDTH:1500,DEFAULT_WIDTH:100};var ci=e=>{if(typeof e=="string"){let t=parseInt(e,10);return isNaN(t)?Te.DEFAULT_WIDTH:t}return e||Te.DEFAULT_WIDTH},Go=e=>Math.max(Te.MIN_WIDTH,Math.min(Te.MAX_WIDTH,e)),j=e=>{let t=String(e.id);return e.tableViewId?`${t}_${e.tableViewId}`:t},Yo=(e,t)=>e.map(o=>{let r=j(o);return {...o,width:t[r]||o.width}}),fi=(e,t)=>{e.current&&(document.removeEventListener("mousemove",e.current),e.current=void 0),t.current&&(document.removeEventListener("mouseup",t.current),t.current=void 0),document.body.style.cursor="",document.body.style.userSelect="";},Zs=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=i.current-o,u=Go(t+d);l(c=>({...c,columnWidths:{...c.columnWidths,[e]:u},isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),r&&n&&(ui(r,n,String(e),u)||console.warn(`Failed to persist column width for ${e}`)),a?.(e,u),p.stopPropagation(),p.preventDefault(),s();}catch(d){console.error("Error in mouse up handler:",d),s();}},bi=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=p.clientX;if(r?.current){let c=r.current.getBoundingClientRect(),I=c.left,m=c.right;a==="start"&&n===1&&(m=m-38),d=Math.max(I,Math.min(m,p.clientX));}l&&(l.current=d);let u=d;if(s&&i){let c=s.current-i.current+Te.MIN_WIDTH;d<c&&(u=c);}e(c=>({...c,resizeIndicatorX:u})),t({x:u,y:o.current});}catch(d){console.error("Error in mouse move handler:",d);}},hi=(e,t)=>e[t]||Te.DEFAULT_WIDTH,gi=(e,t,o,r,n,a,l)=>(s,i,p)=>d=>{Zs(s,i,p,e,t,o,r,n,l)(d),setTimeout(()=>{a.current=false;},0);};var Jo=({columns:e,onColumnResize:t,handleColumnClick:o,windowId:r,serviceCode:n,tableContainerRef:a})=>{let l=useMemo(()=>e.reduce((P,k)=>{let v=j(k),M=ci(k.width),D=M;if(r&&n)try{D=mi(r,n,v,M)??M;}catch(F){console.warn(`Failed to load stored width for column ${v}:`,F),D=M;}return P[v]=Go(D),P},{}),[r,n]),[{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d},u]=useState(()=>({columnWidths:l,isResizing:false,resizingColumn:null,startX:0,startWidth:0,resizeIndicatorX:0})),[c,I]=useState({x:0,y:0}),m=useRef(false),h=useRef(0),f=useRef(0),T=useRef(0),b=useRef(0),C=useRef(),x=useRef();useEffect(()=>{u(P=>{let k=new Set(Object.keys(P.columnWidths)),v=new Set(Object.keys(l));return k.size!==v.size?{...P,columnWidths:l}:Array.from(v).some(D=>!k.has(D)||P.columnWidths[D]!==l[D])?{...P,columnWidths:l}:P});},[]);let w=useCallback(P=>hi(s,P),[s]),E=useCallback(()=>{fi(C,x);},[]),S=useCallback((P,k,v)=>gi(r,n,t,u,E,m,f)(P,k,v),[r,n,t,E]),g=useCallback((P,k)=>bi(u,I,h,a,P,k,f,T,b),[a]),R=useCallback((P,k)=>{P.preventDefault(),P.stopPropagation();try{let v=w(k),M=P.clientX,D=e.find(H=>j(H)===k),F=D?e.filter(H=>H.pinned===D.pinned).findIndex(H=>j(H)===k):void 0,N=D?.pinned,W=P.currentTarget.closest('[data-testid="SheetViewVirtualTable_TableHeader_StyledCell"]'),_=P.clientY;if(W){let H=W.getBoundingClientRect();_=H.top+H.height/2;}u(H=>({...H,isResizing:!0,resizingColumn:k,startX:M,startWidth:v,resizeIndicatorX:M,resizingColumnIndex:F,resizingColumnPinned:N})),h.current=_,f.current=M,T.current=M,b.current=v,I({x:M,y:_}),m.current=!0;let U=g(F,N),B=S(k,v,M);C.current=U,x.current=B,document.addEventListener("mousemove",U),document.addEventListener("mouseup",B),document.body.style.cursor="none",document.body.style.userSelect="none";}catch(v){console.error("Error starting resize:",v),E();}},[w,g,S,E,e]),V=useCallback(()=>{try{u(P=>({...P,isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),m.current=!1,E();}catch(P){console.error("Error stopping resize:",P),E();}},[E]),y=useCallback(()=>m.current,[]),L=useCallback((P,k,v)=>{y()||o(P,k,v);},[o,y]);return useEffect(()=>E,[E]),{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d,cursorPosition:c,getColumnWidth:w,startResize:R,stopResize:V,isCurrentlyResizing:y,handleColumnClick:L}};var Zo=({pinnedStartColumnsData:e,pinnedEndColumnsData:t,columnWidths:o})=>{let r=useMemo(()=>e.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[e,o]),n=useMemo(()=>t.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[t,o]),a=useMemo(()=>e.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[e,o]),l=useMemo(()=>t.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[t,o]);return {pinnedStartColumnsWidth:r,pinnedEndColumnsWidth:n,pinnedStartColumnsDataWithWidths:a,pinnedEndColumnsDataWithWidths:l}};var id=styled("section")(({isLoaded:e=false,isPinned:t=false})=>({overflow:"hidden",paddingInline:e&&!t?"32px":"0px",backgroundColor:e&&!t?"rgba(255, 255, 255, 0.60)":"none",filter:e&&!t?"blur(8px)":"none",marginTop:e&&!t?"1rem":"0",height:"100%",maxHeight:"100%"}));function ad({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n=13,isPinned:a=false}){let[l,s]=useState(()=>n||Math.min(Sa$1(t,r),15));return useEffect(()=>{if(n){s(n);return}let i=()=>{let u=document.querySelector('[data-testid="SheetViewTableLoading"]');if(!u)return Math.min(Sa$1(t,r),25);let c=u.parentElement?.clientHeight||0,I=28,h=c-40;if(h<=0)return Math.min(Sa$1(t,r),25);let f=Math.floor(h/I);return Math.max(3,Math.min(f+2,25))},p=i();s(p);let d=()=>{let u=i();s(u);};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[t,r,n]),jsx(id,{isLoaded:t,isPinned:a,"data-testid":"SheetViewTableLoading",children:[...Array(l)].map((i,p)=>jsx(Ze,{columns:e,animationType:o,rowIndex:p,useTableBackground:!a},`i-${el("SheetViewTableLoadingRow_")}`))})}var le=memo(ad);function yi({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){let i;if(n)i=jsx(De,{"data-testid":"SheetViewVirtualTable_SolidBackground",children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:a,isLoading:true,isPinned:false})});else if(o)i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});else if(r){let p=e,{formatted:d}=Rb({error:p,fallbackMessage:"connectionErrorMsg"});i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:d,triggerDataRefetch:l,sandboxMode:s?.sandboxMode});}else if(t){let p=e,{formatted:d}=Rb({error:p,fallbackMessage:"tryAdjustingTheDateOrFilters"});i=jsx(Dt,{sandboxMode:s?.sandboxMode,heading:"nothingFound",message:d});}else i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});return i}yi.displayName="SheetViewTableNoData";var sd=memo(yi);function bd({column:{header:e,id:t,tableViewId:o,align:r,headerStyle:n,sortable:a,filter:l,pinnable:s,width:i,order:p,pinned:d},colIndex:u,isFirst:c,isLast:I,isSelected:m,isDefaultPinned:h,onColumnSort:f,columnsSorting:T,onColumnPin:b,isPinnable:C,lastColumnId:x,onColumnClick:w,pinnedColumns:E,onStartResize:S,isResizing:g=false,resizingColumn:R=null}){let V=j({id:t,tableViewId:o}),[y,L]=useState(null),P=useRef(null),{isFilterApplied:k}=Ge({filter:l}),v=useCallback(W=>E?.includes(W),[E]),M=useMemo(()=>v(t),[t,v]),D=W=>{v(W)?b?.(W,"unpin"):W===x?b?.(W,"end"):b?.(W,"start");},F=()=>{L(P.current);};return jsxs(Se,{"data-id":t,component:"div","data-testid":"SheetViewVirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":i,"data-column-width-used":i,"data-column-align":r,"data-column-order":p,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!a,"data-column-filterable":!!l,"data-column-pinned":M,isFirst:c,isLast:I,isSheetView:true,ref:P,onClick:W=>{W.target===W.currentTarget&&w?.(u,W,d);},sx:W=>({display:"flex",gap:W.spacing(.5),alignItems:"center",justifyContent:r==="right"?"flex-end":"flex-start",width:i,textAlign:r,overflow:"visible !important",cursor:"pointer",boxSizing:"border-box",border:"0.5px solid transparent",borderColor:m?"#1F88D0":"#F2F2F2",borderBottom:m?"0.5px solid transparent":"0.5px solid #F2F2F2",backgroundColor:m?"#F2F2F2":"#FCFCFC",minHeight:"28px",position:"relative","&:before":{content:'""',borderBottom:"none",position:"absolute",top:0,right:0,left:0,bottom:0},...n}),children:[jsxs(Vt,{onClick:W=>{W.stopPropagation(),F();},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"SheetViewTableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx(Kn,{"data-testid":"SheetViewVirtualTable_TableHeader_StyledCell_header_text",children:e})}),l&&jsx(qe,{...l,anchorEl:y,setAnchorEl:L,isFilterApplied:k}),a&&jsx(Rt,{columnId:t,onColumnSort:f,columnsSorting:T,onClick:W=>{w?.(u,W,d);}}),C&&s&&!h&&!I&&jsx(jn,{onClick:W=>{W.stopPropagation(),D(t);},title:M?"Unpin column":"Pin column",children:jsx("img",{src:M?ai:$h,alt:"pin-icon"})})]}),S&&d!=="end"&&jsx(jo,{columnId:V,onStartResize:S,isResizing:g,isLast:I})]})}var wi=memo(bd);function gd({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,pinnedColumns:a=[],onColumnPin:l,isPinnable:s=false,lastColumnId:i,selectedColumn:p=null,onColumnClick:d,onStartResize:u,isResizing:c=false,resizingColumn:I=null}){return jsx(qn,{component:"nav","data-testid":"SheetViewVirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsx(Gn,{component:"section","data-testid":"SheetViewVirtualTable_TableHeader_StyledMUITableRow",children:e.map((m,h)=>{let f=`${m.pinned??"default"}-${h}`;return jsx(wi,{column:m,colIndex:h,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,isDefaultPinned:!!m.isDefaultPinned,isSelected:p===f,onColumnSort:r,columnsSorting:n,pinnedColumns:a,onColumnPin:l,isPinnable:s,lastColumnId:i,onColumnClick:d,onStartResize:u,isResizing:c,resizingColumn:I},`${m.id}-${h}`)})})})}var se=memo(gd);function yd({columnsData:e,itemCount:t,lastItemIndex:o,areAllRowsLoaded:r,loadMoreItems:n,threshold:a,getItemSize:l,getItemData:s,isPinned:i,fixedWidth:p,scrollToIndex:d,areTotalRowsNotFillingHeight:u,clearBackdropVisibilityTimeout:c,onScroll:I,setBackdropVisibility:m,listRef:h,overscanCount:f=40}){return jsx(Ul,{isItemLoaded:b=>b!==o,itemCount:t,loadMoreItems:async()=>{r||await n?.();},threshold:a,children:({onItemsRendered:b,ref:C})=>jsx($l,{ref:C,children:({height:x,width:w})=>{let E=g=>l(g,x),S=s(e,i,x);return jsx(Fe,{listRef:h,height:x,width:p||w,itemCount:t,itemSize:E,itemData:S,onItemsRendered:b,overscanCount:f,setBackdropVisibility:m,scrollToIndex:d,areTotalRowsNotFillingHeight:u,useIsScrolling:true,onScroll:I,clearBackdropVisibilityTimeout:c,style:{overflowX:i?"hidden":"auto",paddingBottom:i?"25px":"13px",backgroundColor:i?"transparent":"#F6F8FACC"},children:zt})}})})}var tr=memo(yd);function Rd({position:e,columnsData:t,columnsWidth:o,pinnedColumnsList:r,showHeader:n,columnsSorting:a,onColumnSort:l,headerProps:s,showBackDrop:i,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:I,hasPinnedStart:m,hasPinnedEnd:h,tableTitle:f,areAllRowsLoaded:T,isFetchingNextPage:b,scrollToIndex:C,isLoading:x,isError:w,hasTimeoutError:E,tableMode:S,showNoDataView:g,tableLoading:R,createVirtualTableContainer:V,onStartResize:y,isResizing:L,resizingColumn:P}){let k=useTheme();if(t.length===0)return null;let v=e==="start"?Jn:Zn,M=e==="start"?"pinnedStart":"pinnedEnd";return jsx(v,{children:jsxs(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":f,"data-direction":k.direction,"data-are-all-rows-loaded":!!T,"data-is-fetching-next-page":!!b,"data-scroll-to-index":C,"data-is-loading":!!x,"data-is-error":!!w,"data-is-error-timeout":!!E,"data-table-mode":S,height:"100%",dir:k.direction,showNoDataView:g,children:[n&&jsx(se,{"data-testid":"SheetViewVirtualTable_PinnedTableHeader",columnsSorting:a,onColumnSort:l,columns:t,headerProps:s,showBackDrop:i,pinnedColumns:r,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:I,tablePosition:e==="start"?"pinnedStart":"pinnedEnd",hasPinnedStart:m,hasPinnedEnd:h,onStartResize:y,isResizing:L,resizingColumn:P}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content",overflowX:"hidden"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_PinnedStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":`SheetViewVirtualTable_PinnedTableLoading_${e}`,columns:t,isLoading:true,isPinned:true}):V(t,M,true,o)})})]})})}var Oe=memo(Rd);function Vd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:I,onColumnClick:m,tableTitle:h,areAllRowsLoaded:f,isFetchingNextPage:T,scrollToIndex:b,isLoading:C,isError:x,hasTimeoutError:w,tableMode:E,showNoDataView:S,tableBodyStyles:g,tableLoading:R,createVirtualTableContainer:V,onStartResize:y,isResizing:L,resizingColumn:P}){let k=useTheme();return jsx(_t,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":h,"data-direction":k.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!T,"data-scroll-to-index":b,"data-is-loading":!!C,"data-is-error":!!x,"data-is-error-timeout":!!w,"data-table-mode":E,height:"100%",dir:k.direction,showNoDataView:S,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:S,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_UnpinnedTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:I,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t,onStartResize:y,isResizing:L,resizingColumn:P})}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_ScrollableStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false}):V(o,"scrollable",false)})})]})})})}var or=memo(Vd);function Wd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:I,onColumnClick:m,tableTitle:h,areAllRowsLoaded:f,isFetchingNextPage:T,scrollToIndex:b,isLoading:C,isError:x,hasTimeoutError:w,tableMode:E,showNoDataView:S,tableBodyStyles:g}){let R=useTheme();return jsx(_t,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox_Loading","data-title":h,"data-direction":R.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!T,"data-scroll-to-index":b,"data-is-loading":!!C,"data-is-error":!!x,"data-is-error-timeout":!!w,"data-table-mode":E,height:"100%",dir:R.direction,showNoDataView:S,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_LoadingTableWrapper",showNoDataView:S,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:I,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t})}),jsx(A,{"data-testid":"VirtualTable_LoadingTableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_LoadingStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false})})})]})})})}var rr=memo(Wd);function Hd({tableLoading:e,tableError:t,tableEmpty:o,hasTimeoutError:r,orderedColumns:n,showHeader:a,columnsSorting:l,onColumnSort:s,headerProps:i,showBackDrop:p,onColumnPin:d,lastColumnId:u,selectedColumn:c,onColumnClick:I,tableTitle:m,areAllRowsLoaded:h,isFetchingNextPage:f,scrollToIndex:T,isLoading:b,isError:C,tableMode:x,tableBodyStyles:w,error:E,triggerDataRefetch:S,footerProps:g,customNoDataComponent:R}){let V=useTheme(),y=e||t||o||r;return jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":m,"data-direction":V.direction,"data-are-all-rows-loaded":!!h,"data-is-fetching-next-page":!!f,"data-scroll-to-index":T,"data-is-loading":!!b,"data-is-error":!!C,"data-is-error-timeout":!!r,"data-table-mode":x,height:"100%",dir:V.direction,showNoDataView:y,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:y,sx:w,children:[a&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:l,onColumnSort:s,columns:n,headerProps:i,showBackDrop:p,pinnedColumns:[],onColumnPin:d,isPinnable:false,lastColumnId:u,selectedColumn:c,onColumnClick:I})}),R||jsx(Je,{error:E||null,tableEmpty:o,isTimeoutError:r,tableError:t,tableLoading:e,orderedColumns:n,triggerDataRefetch:S||(()=>Promise.resolve()),footerProps:g})]})})}var nr=memo(Hd);function Od({columns:e,rows:t,threshold:o=20,showHeader:r,headerProps:n,rowProps:a,footerProps:l,rowHeight:s=28,isLoading:i,error:p,columnsSorting:d,onColumnSort:u,loadMoreItems:c,isFetchingNextPage:I,triggerDataRefetch:m,scrollToIndex:h,areAllRowsLoaded:f=false,tableBodyStyles:T,tableTitle:b$1,onStartDrag:C,onColumnPin:x,clearBackdropVisibilityTimeout:w=100,isPinnable:E=false,tableMode:S,overscanCount:g,windowId:R,serviceCode:V,customNoDataComponent:y,defaultSkeleton:L=true}){let P=useMemo(()=>rc(e,i??false,L),[e,i,L]),{selectedCell:k,selectedColumn:v,selectedRow:M,showBackDrop:D,setShowBackdrop:F,handleCellClick:N,handleColumnClick:q,handleChipClick:W,selectedChip:_}=No(),U=useRef(null),B=useRef(null),{isError:H,tableLoading:ne,tableError:Ne,tableEmpty:jt,hasTimeoutError:G,showNoDataView:ie,lastItemIndex:$e,areTotalRowsNotFillingHeight:ae,itemsCount:he,isDelayedFetchingNextPage:qt}=$o({rows:t,isLoading:i,error:p,isFetchingNextPage:I,areAllRowsLoaded:f}),{pinnedStartColumns:X,pinnedEndColumns:z,handleColumnPin:Z,pinnedStartColumnsData:ge,pinnedEndColumnsData:Gt,unpinnedColumnsData:nt,orderedColumns:it,lastColumnId:Ii}=Ao(P,E,x),{pinnedStartVirtualListRef:at,scrollableVirtualListRef:lt,pinnedEndVirtualListRef:st,handleScroll:lr}=Oo();useEffect(()=>{at.current?.resetAfterIndex(0),lt.current?.resetAfterIndex(0),st.current?.resetAfterIndex(0);},[t.length,at,lt,st]);let{columnWidths:Ue,isResizing:Yt,resizingColumn:Ei,resizeIndicatorX:Pi,cursorPosition:sr,startResize:Vi,handleColumnClick:Li}=Jo({columns:P,handleColumnClick:q,windowId:R,serviceCode:V,tableContainerRef:B}),dr=Xo({tableContainerRef:U,showHeader:r??false,isResizing:Yt}),{pinnedStartColumnsWidth:pr,pinnedEndColumnsWidth:mr,pinnedStartColumnsDataWithWidths:Q,pinnedEndColumnsDataWithWidths:ee}=Zo({pinnedStartColumnsData:ge,pinnedEndColumnsData:Gt,columnWidths:Ue}),ur=useMemo(()=>Yo(nt,Ue),[nt,Ue]),ki=useMemo(()=>Yo(it,Ue),[it,Ue]),{getItemSize:cr,getItemDataForContainer:fr}=Uo({rowHeight:s,areAllRowsLoaded:f,rows:t,isDelayedFetchingNextPage:qt,rowProps:a,scrollToIndex:h,footerProps:l,isError:H,selectedCell:k,selectedColumn:v,selectedRow:M,selectedChip:_,handleCellClick:N,handleChipClick:W}),vi=Jt=>{C?.(Jt);},Xe=useCallback((Jt,dt,Wi=false,Mi)=>jsx(tr,{columnsData:Jt,itemCount:he,lastItemIndex:$e,areAllRowsLoaded:f,loadMoreItems:c,threshold:o,getItemSize:cr,getItemData:fr,isPinned:Wi,fixedWidth:Mi,scrollToIndex:h,areTotalRowsNotFillingHeight:ae,clearBackdropVisibilityTimeout:w,onScroll:Di=>{lr(Di,dt==="pinnedStart"?"start":dt==="pinnedEnd"?"end":"scrollable");},setBackdropVisibility:F,listRef:dt==="pinnedStart"?at:dt==="pinnedEnd"?st:lt,overscanCount:g}),[he,$e,f,c,o,cr,fr,h,ae,w,lr,F,at,st,lt,g]),br={showHeader:r,columnsSorting:d,onColumnSort:u,headerProps:n,showBackDrop:D,onColumnPin:Z,isPinnable:E,lastColumnId:Ii,selectedColumn:v,onColumnClick:Li,tableTitle:b$1,areAllRowsLoaded:f,isFetchingNextPage:I,scrollToIndex:h,isLoading:i,isError:H,tableMode:S,showNoDataView:ie,tableBodyStyles:T,onStartResize:Vi,isResizing:Yt,resizingColumn:Ei},Pe={...br,hasTimeoutError:G,tableLoading:ne};return jsxs(Fragment,{children:[jsx(bn,{ref:U,children:ie?ne?jsxs(_o,{ref:B,children:[Q.length>0&&jsx(Oe,{position:"start",columnsData:Q,columnsWidth:pr,pinnedColumnsList:X,hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(rr,{hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,unpinnedColumnsData:ur,pinnedStartColumns:X,pinnedEndColumns:z,...Pe}),ee.length>0&&jsx(Oe,{position:"end",columnsData:ee,columnsWidth:mr,pinnedColumnsList:[...X,...z],hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,createVirtualTableContainer:Xe,...Pe})]}):jsx(nr,{tableLoading:ne,tableError:Ne,tableEmpty:jt,hasTimeoutError:G,orderedColumns:ki,error:p,triggerDataRefetch:m,footerProps:l,customNoDataComponent:y,...br}):jsxs(_o,{ref:B,children:[Q.length>0&&jsx(Oe,{position:"start",columnsData:Q,columnsWidth:pr,pinnedColumnsList:X,hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(or,{hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,unpinnedColumnsData:ur,pinnedStartColumns:X,pinnedEndColumns:z,createVirtualTableContainer:Xe,...Pe}),ee.length>0&&jsx(Oe,{position:"end",columnsData:ee,columnsWidth:mr,pinnedColumnsList:[...X,...z],hasPinnedStart:Q.length>0,hasPinnedEnd:ee.length>0,createVirtualTableContainer:Xe,...Pe})]})}),jsx(b,{"data-testid":"SheetViewVirtualTable_TableFooter",showSeparator:true,showBackDrop:D,onPointerDown:vi,...l}),jsx(qo,{isVisible:Yt,indicatorX:Pi,indicatorHeight:dr.height,indicatorTop:dr.top,iconX:sr.x,iconY:sr.y})]})}var Nd=memo(Od);export{Nd as $,zo as A,Is as B,Qb as C,eh as D,Kn as E,jn as F,qn as G,Gn as H,_o as I,Jn as J,Zn as K,_t as L,_e as M,Ao as N,Oo as O,No as P,$o as Q,Uo as R,Ds as S,Xo as T,le as U,sd as V,se as W,Oe as X,or as Y,rr as Z,nr as _,$r as a,yt as b,Tt as c,qe as d,lo as e,po as f,mo as g,Se as h,Ge as i,ho as j,xo as k,So as l,yo as m,To as n,Ro as o,Je as p,Po as q,Lo as r,Ze as s,Wl as t,Dl as u,jl as v,Wo as w,Mo as x,Do as y,Fo as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j}from'./chunk-
|
|
1
|
+
import {j}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Kj,Oe,Eb}from'./chunk-YKKS24ES.js';import {useId,useCallback}from'react';import P from'@mui/material/Box';import A from'@mui/material/Stack';import {Box}from'@mui/material';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var I=styled(Box,{shouldForwardProp:t=>t!=="disabled"})(({theme:t,disabled:a})=>({width:"100%",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"flex-start",background:t.palette.grey[400],gap:"8px",cursor:a?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...a&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}})),w=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:t.palette.text.primary,cursor:"pointer",gap:"8px"})),s=styled("span")(({theme:t})=>({fontWeight:500,color:t.palette.text.primary,cursor:"pointer",fontSize:"9px"})),c=styled(Box)(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"4px",color:t.palette.text.primary})),b=styled(Box)(({theme:t})=>({color:alpha(t.palette.text.primary,.3),fontSize:"8px",fontWeight:500})),F=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:"8px",background:t.palette.common.white,borderRadius:"4px",border:`1px solid ${t.palette.divider}`})),U=styled(j)(()=>({color:"#FF3D00",fontSize:"8px",fontWeight:500})),k=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16}));var H=({getRootProps:t,getInputProps:a,open:S,onChangeFiles:B,processFiles:m,disabled:i,errorMessage:l,onResetError:d,maxFileSize:M,preventDuplicates:T,label:v="Click to upload",hintText:E,sx:j})=>{let z=yc(useId(),"file-uploader"),x=a(),D=useCallback(p=>{p.stopPropagation(),d?.(p);},[d]);return jsxs(I,{id:z,"data-testid":"FileUploader_root",...t(),sx:j,disabled:i,onClick:i?void 0:S,children:[jsx("input",{"data-slot":"input",...x,onChange:p=>{if(x.onChange?.(p),!m)return;let f=m(Array.from(p.target.files||[]));(f.length>0||!T)&&B?.(f);},disabled:i}),jsxs(w,{"data-slot":"content",flex:1,children:[jsx(F,{"data-slot":"icon-wrapper",children:jsx(P,{component:"img",src:l?Kj:Oe,width:16,height:16})}),l?jsxs(A,{direction:"row",alignItems:"center",flex:1,children:[jsxs(c,{flex:1,children:[jsx(U,{children:l}),jsx(s,{children:"Click to upload again"})]}),d&&jsx(k,{component:"button","data-slot":"close-icon-wrapper",onClick:D,children:jsx(P,{component:"img",src:Eb,width:10,height:10})})]}):jsxs(c,{children:[jsx(s,{children:v}),jsx(b,{children:E||`PDF, JPG or PNG files up to ${M}`})]})]})]})},W=H;var ot=W;export{ot as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j as j$1,L,R as R$1}from'./chunk-
|
|
1
|
+
import {j as j$1,L,R as R$1}from'./chunk-TEJUDCOU.js';import {yc,Ka}from'./chunk-PLMJIRXJ.js';import {dl,el}from'./chunk-YKKS24ES.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var S=styled(g)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),z=styled(j$1,{shouldForwardProp:r=>r!=="open"&&r!=="size"})(({theme:r,open:o,size:i})=>{let{base:a,grey:p,brand:b}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:a.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:i==="large"?32:24,width:i==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:b[500]}}}),f=styled(g)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),F=styled(j$1,{shouldForwardProp:r=>r!=="selected"})(({theme:r,selected:o})=>{let{base:i,grey:a,brand:p}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:i.white,border:`1px solid ${a[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),$=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),j=styled(g)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(g)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),H=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px"},height:32,width:32}));var _=r=>r===0?12:r<=12?r:r-12,ue=r=>r>=12?"PM":"AM",R=()=>new Date().getMinutes(),N=()=>{let r=new Date().getHours();return _(r)},ce=(r,o)=>o==="AM"&&r===12?0:o==="PM"&&r!==12?r+12:r;var G=["AM","PM"],x=12,h=59;function O({onChange:r,defaultTime:o,enableRealTimeChange:i,size:a="large"}){let p=yc(useId(),"time-picker"),[b,I]=useState(null),[u,U]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[c,y]=useState(o?.hour??N()),[l,C]=useState(o?.minute??R()),v=!!b;useEffect(()=>{i&&r?.({hour:c,minute:l,period:u});},[c,l,u,i]);let q=e=>{I(e.currentTarget);},J=()=>{I(null),r?.({hour:c,minute:l,period:u});},K=e=>{U(e);},s=e=>e<10?`0${e}`:e.toString(),Q=e=>{let m=Ka(s(Number(e.target.value)));if(m>12){e.preventDefault();return}y(m);},D=()=>{y(e=>e===12?1:e+1);},E=()=>{y(e=>e===1?12:e-1);},V=e=>{let m=Ka(s(Number(e.target.value)));if(m>59){e.preventDefault();return}C(m);},X=()=>{C(e=>e===59?(D(),0):e+1);},Y=()=>{C(e=>e===0?(E(),59):e-1);};return jsx(te,{onClickAway:J,children:jsxs(g,{id:p,"data-testid":"TimePicker",children:[jsx(z,{size:a,open:v,onClick:q,children:`${s(c)}:${s(l)}${u.toLowerCase()}`}),jsx(R$1,{open:v,anchorEl:b,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(S,{children:[jsxs(j,{children:[jsxs(k,{children:[jsx(f,{onClick:D,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{type:"number",hideArrows:true,disableFocusRing:true,value:s(c),onChange:Q}),jsx(f,{onClick:E,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j$1,{children:":"}),jsxs(k,{children:[jsx(f,{onClick:X,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{type:"number",hideArrows:true,disableFocusRing:true,value:s(l),onChange:V}),jsx(f,{onClick:Y,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx($,{children:G.map(e=>jsx(F,{onClick:()=>{K(e);},selected:u===e,children:e},e))})]})})]})})}var ve=O;export{_ as a,ue as b,R as c,N as d,ce as e,G as f,x as g,h,O as i,ve as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-4QONVXGE.js';import {L,aa,ba}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-4QONVXGE.js';import {L,aa,ba}from'./chunk-TEJUDCOU.js';import {Ac}from'./chunk-PLMJIRXJ.js';import {Cb,A}from'./chunk-YKKS24ES.js';import se,{memo,useState,useEffect}from'react';import O from'@mui/material/Box';import ie from'@mui/material/InputAdornment';import pe from'@mui/material/Skeleton';import {styled,Popper,Box,ClickAwayListener}from'@mui/material';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var _=styled("button")(({theme:e,disabled:o})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:o?"default":"pointer",opacity:o?.5:1})),N=styled(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),H=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),q=styled("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),z=styled(L)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),D=styled(Box)(()=>({color:"red !important"}));function G({isLoading:e,countries:o,value:i,onCountryChange:m,required:P,disabled:y}){let[p,c]=useState(),[h,g]=useState(null),[a$1,s]=useState([]),[v,w]=useState(""),d=!!h&&!y,k=t=>{t.stopPropagation(),g(t.currentTarget);},l=()=>{g(null);},f=t=>{m?.(t),c(t),l(),s(o);},x=t=>{let n=t.target.value.toString()??"";if(w(n),!n){s(o);return}let te=o.filter(R=>R.idd_prefix.toString().startsWith(n)||R.iso2.toLowerCase().startsWith(n.toLowerCase()));s(te);};return useEffect(()=>{i&&c(i);},[i?.countryId]),useEffect(()=>{o.length&&s(o);},[o.length]),jsxs(O,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(_,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:k,disabled:e||y,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(pe,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[p&&jsxs(Fragment,{children:[jsx("img",{src:p.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${p?.idd_prefix}`})]}),P&&jsx(D,{component:"span",children:"*"}),jsx(O,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...d&&{transform:"rotate(180deg)"}}})]})}),d&&jsx(a,{onClick:l,sx:{zIndex:9999}}),d&&jsx(ClickAwayListener,{onClickAway:l,children:jsxs(N,{id:"CountriesList_CountriesWrapper",open:d,anchorEl:h,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",children:[jsx(z,{type:"number",endAdornment:jsx(ie,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:x,hideArrows:true,disableFocusRing:true,"data-testid":"CountriesList_InputStyled",value:v}),jsx(H,{"data-testid":"CountriesList_CountriesListStyled",children:a$1.map(t=>{let n=p?.countryId===t.countryId;return jsxs(q,{onClick:()=>{f(t);},sx:{backgroundColor:n?"#F9F9F9":"transparent",color:n?"#000":"#8D8D94"},children:[jsx("img",{src:t.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`)})})]})})]})}G.displayName="CountriesList";var J=memo(G);var F=J;var Q=styled$1(O,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:o,hasFeedback:i})=>{let{borderColor:m}=aa(e,o);return {border:`1px solid ${o?m:e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:i?"4px 4px 0 0":"4px",borderBottom:i?"none":void 0,height:"40px"}}),U=styled$1(L)(({error:e})=>({flexGrow:1,maxWidth:"100%",border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),X=styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Y=styled$1(O)(()=>({flex:1}));function j({phoneValue:e,hasError:o,countries:i,isCountriesLoading:m,countryValue:P,onCountryChange:y,onPhoneChange:p,helperText:c,required:h,disabled:g,feedback:a,id:s="PhoneInput",...v},w){let d=n=>{p?.(n.target.value);},k=n=>{y?.(n);},l=a?.message??c,{isProvided:f,isVisible:x,type:t}=Ac(a,{message:l});return jsxs(Y,{"data-testid":"PhoneInput",children:[jsxs(Q,{"data-testid":"PhoneInput_MobileWrapper",feedbackType:t,hasFeedback:x,children:[jsx(F,{isLoading:m,countries:i,value:P,onCountryChange:k,required:h,disabled:g}),jsx(U,{id:s,type:"number",value:e,"data-testid":"PhoneInput_InputNumberStyled",ref:w,disableFocusRing:true,inputProps:{autoComplete:"off"},error:o&&!f,disabled:g,...v,onChange:d,hideArrows:true})]}),jsx(ba,{type:a?.type,message:l,icon:a?.icon}),!x&&!f?jsx(X,{children:c}):null]})}j.displayName="PhoneInput";var ee=se.forwardRef(j);export{F as a,ee as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-A26NSTSO.js';import {a,e,c,b,d}from'./chunk-HZHFGJUA.js';import {a as a$4}from'./chunk-2DC5PMER.js';import {a as a$1}from'./chunk-VWIY6RR5.js';import {a as a$2,b as b$1}from'./chunk-MUR4ILTY.js';import {f,aa,j,P,O,h,ba}from'./chunk-TEJUDCOU.js';import {yc,Ac}from'./chunk-PLMJIRXJ.js';import {Pc,A}from'./chunk-YKKS24ES.js';import*as Kt from'react';import Kt__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {FormProvider,useFormContext,Controller,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import ne from'@mui/material/Box';import Qt from'@mui/material/Button';import Xt from'@mui/material/Input';import Ke from'@mui/material/ListSubheader';import je from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import oo from'@mui/material/Popper';import no from'@mui/material/TextField';function Yt({onSubmit:e,methods:t,children:o}){let n=yc(useId(),"default-form");return jsx(FormProvider,{...t,children:jsx("form",{id:n,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:o})})}var Jt=Kt__default.memo(Yt);var eo=keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(-90deg);
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-CCSW3K5W.js';import {yc}from'./chunk-PLMJIRXJ.js';import {wi}from'./chunk-YKKS24ES.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:wi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {b}from'./chunk-ERFXYFJB.js';import {a}from'./chunk-A26NSTSO.js';import {j,f}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Pc}from'./chunk-YKKS24ES.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var me=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),xe=styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200})),fe=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),Se=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),ge=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ce=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(j)(({selected:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...e&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:a,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...a},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var _=oe;function pe({options:e,onChangeOption:a$1,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b$1={}}=V,[y,w]=useState(null),[n,x]=useState(""),K=useCallback(()=>{m!==void 0?m():a$1(null);},[m,a$1]),f=!!y,Q=t=>{u||w(f?null:t.currentTarget);},S=()=>{w(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(_,{onClick:()=>{n&&x("");},role:"button"}),W=useMemo(()=>n?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(n.toLowerCase())||j?.includes(n.toLowerCase())}):e,[e,n]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:y,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(b,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:n,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...n&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&n&&jsx(g,{selected:false,...b$1,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b$1,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?a$1(null):a$1(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Pc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Re=H;export{me as a,xe as b,fe as c,D as d,Se as e,F as f,ge as g,Ce as h,g as i,Re as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-G3HAZ3SB.js';import {useFormContext,Controller}from'react-hook-form';import {jsx}from'react/jsx-runtime';function p({phoneName:h,countries:s,countryName:n,helperText:a,isCountriesLoading:P,disabled:i,feedback:l,id:m="RHFPhoneInput",...I}){let{control:c,watch:d,setValue:y}=useFormContext(),C=d(n),f=o=>{y(n,o);};return jsx(Controller,{name:h,control:c,render:({field:{onChange:o,value:F},fieldState:e})=>jsx(b,{id:m,...I,phoneValue:F,countries:s,hasError:!!e.error,helperText:a??e.error?.message,feedback:l,onPhoneChange:R=>{o(R);},disabled:i,countryValue:C,onCountryChange:f,isCountriesLoading:P})})}p.displayName="RHFPhoneInput";var u=p;var w=u;export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-CCSW3K5W.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,b as b$1,g,a as a$2,e,d,c as c$1}from'./chunk-DGAX7HUY.js';import {a as a$4}from'./chunk-FQSIXRBP.js';import {a as a$1}from'./chunk-2DC5PMER.js';import {c}from'./chunk-PX3MXCDO.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-LKV5X523.js';import {a as a$3}from'./chunk-54RTNLV2.js';import {b}from'./chunk-AWNFVAW7.js';import {p,z}from'./chunk-PYGHWPNZ.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-PLMJIRXJ.js';import {s}from'./chunk-WHXHVOBY.js';import {T,yi,Ai,zi,xi,Ei,ch,Vg,bh,Rj,Sj,tb,gk,jk,Ak,hk,ub,va,ua,sk,h,Ug}from'./chunk-YKKS24ES.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p$1=useTheme(),{t:a$2}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Vg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a=useMemo(()=>p$1.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:hk},CAPTURED:{icon:gk}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p$1,currency:a,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:tb,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(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:jk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p$1,currency:a,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:Ak,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(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Ak,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$2,gatewayCode:a,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$2[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p$1,{src:a$2[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a&&jsx(p,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a]})}),n&&jsx(p,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(p,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(p,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:ub,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(p,{title:l,children:jsx(a$3,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?va:ua,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$2,chipIndex:a=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$2)return jsxs(b,{chipIndex:a,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"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:[r,"x"]});return t?jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:sk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Ug,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
1
|
+
import {f,b as b$1,g,a as a$2,e,d,c as c$1}from'./chunk-DGAX7HUY.js';import {a as a$4}from'./chunk-3OFER46M.js';import {a as a$1}from'./chunk-2DC5PMER.js';import {c}from'./chunk-YLDV4ZDJ.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-GWW3QJ5D.js';import {b}from'./chunk-AWNFVAW7.js';import {a as a$3}from'./chunk-54RTNLV2.js';import {p,z}from'./chunk-TEJUDCOU.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-PLMJIRXJ.js';import {s}from'./chunk-WHXHVOBY.js';import {T,yi,Ai,zi,xi,Ei,ch,Vg,bh,Rj,Sj,tb,gk,jk,Ak,hk,ub,va,ua,sk,h,Ug}from'./chunk-YKKS24ES.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p$1=useTheme(),{t:a$2}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Vg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a=useMemo(()=>p$1.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:hk},CAPTURED:{icon:gk}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p$1,currency:a,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:tb,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(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:jk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p$1,currency:a,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:Ak,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(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Ak,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$2,gatewayCode:a,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$2[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p$1,{src:a$2[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a&&jsx(p,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a]})}),n&&jsx(p,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(p,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(p,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:ub,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(p,{title:l,children:jsx(a$3,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?va:ua,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$2,chipIndex:a=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$2)return jsxs(b,{chipIndex:a,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"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:[r,"x"]});return t?jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:sk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Ug,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {t}from'./chunk-
|
|
1
|
+
import {t}from'./chunk-TEJUDCOU.js';import {yc,dc}from'./chunk-PLMJIRXJ.js';import {forwardRef,useId,memo}from'react';import {styled}from'@mui/material/styles';import c from'@mui/material/TableCell';import {jsx}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material';import {motion}from'framer-motion';var a=styled(c,{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 b=forwardRef(({children:e,...o},r)=>{let s=yc(useId(),"table-cell");return jsx(a,{id:s,component:"div","data-testid":"TableCell",...o,ref:r,children:e})}),l=memo(b);var A=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:o})=>({display:"flex",width:"17px",height:"12px",backgroundColor:o?dc(e.palette)[o]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),F=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),$=styled$1(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),z=styled$1("img")(()=>({width:"12px",height:"12px"})),G=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:o})=>({...o&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:o?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),L=styled$1("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})),O=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),V=styled$1(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),d=styled$1("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}`})),E=styled$1(d)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),H=styled$1(d)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),M=styled$1(l)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Z=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),q=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),D=styled$1("img")(()=>({width:"36px",height:"24px"})),J=styled$1("div")(({percentage:e,isCapture:o,theme:r})=>({background:`conic-gradient(${o?r.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?r.palette.info.dark:"#656565"}`}));export{l as a,A as b,F as c,$ as d,z as e,G as f,L as g,O as h,V as i,d as j,E as k,H as l,M as m,Z as n,q as o,D as p,J as q};
|