@tap-payments/os-micro-frontend-shared 0.3.191-test.6 → 0.3.191-test.7
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-4DLBXUMP.js → chunk-4ZHJDL5H.js} +1 -1
- package/build/_chunks/{chunk-UTIRQY4E.js → chunk-5KC7SZNB.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-FAPDPYQ2.js → chunk-64ZJ3D36.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-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-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-PQUVJZ7P.js → chunk-GMFVNWC7.js} +1 -1
- package/build/_chunks/{chunk-43AY7J5C.js → chunk-GSZ5DK6X.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-DKGNG6AD.js → chunk-J6QTMBYJ.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-KRTNIV7B.js +2 -0
- package/build/_chunks/{chunk-NFTEYMEJ.js → chunk-M6HDCF36.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-QA3I46G4.js → chunk-QH5ZFUQJ.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-VRZN3NAW.js +1 -0
- 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-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-UARPH2NF.js → chunk-ZSL4Z5YV.js} +1 -1
- package/build/_chunks/{chunk-GI33FFFD.js → chunk-ZTCKQ4YE.js} +1 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c as c$2}from'./chunk-A5LEWQVP.js';import {r,a as a$2}from'./chunk-4DLBXUMP.js';import {c,d}from'./chunk-5DYTZMM6.js';import {a,c as c$1,d as d$1}from'./chunk-PQSELTNR.js';import {a as a$1,b}from'./chunk-G3LCY5M2.js';import'./chunk-WHXHVOBY.js';import {ta,dl,el,wi,Jk,A,Td,ve,ue as ue$1,sa,qa,ra}from'./chunk-YKKS24ES.js';import Gt,{memo,createContext,useState,useRef,useId,useMemo,useCallback,useEffect,useContext}from'react';import {styled,Popover,Input,Typography,Box}from'@mui/material';import C from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import Xt from'@mui/material/Box';import {useTranslation}from'react-i18next';import {styled as styled$1}from'@mui/material/styles';var R=37,de="32px",H=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var Kt=44,ce={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#956ea5","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:`calc(100% - ${Kt+R}px`,overflow:"auto"},Ye={...ce,background:"transparent","--w-rjv-line-color":"transparent"},Xe=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0})),Qe=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"}));styled(Input)(({theme:e})=>({border:`1px solid ${e.palette.grey[100]}`,borderRadius:"0.25rem",padding:"0.375rem",fontSize:"0.625rem",outline:"none",width:"100%",maxWidth:"150px",height:"1.5rem",backgroundColor:e.palette.background.paper,"&:focus":{border:`1px solid ${e.palette.info.dark}`}}));var ue=styled(Typography)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",padding:"0px 8px",justifyContent:"center",alignItems:"center",borderRadius:"37.5px",backgroundColor:"#fff"})),fe=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:t,isRequestShown:r,theme:o})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"0px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,...e&&{boxShadow:o.shadows[23]},...t&&{paddingTop:de,transition:"padding 0.3s ease-in-out",...r&&{width:"50%"}}})),me=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:R,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!t&&{left:0}})),ge=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),xe=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),Ue=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:t})=>({width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...t&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:t})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100vw":t,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${R}px)`:(t||H)-R+5,background:"transparent",position:"fixed",width:"100%"}));var Ze=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"})),et=styled("span")(()=>({color:"#032F62"})),tt=styled("span")(()=>({color:"#357fb9"}));function $({"data-copied":e,style:t,onClick:r},{keyName:o}){return o?jsxs(Qe,{style:t,onClick:n=>{r?.(n);},children:[jsx(AnimatePresence,{children:e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}function Ut({onClick:e,icon:t,label:r,disableAnimation:o,...n}){let[i,l]=Gt.useState(false),{t:p}=useTranslation();return jsxs(Xe,{...n,onClick:d=>{e?.(d),!o&&(l(true),setTimeout(()=>{l(false);},2e3));},children:[jsxs(Xt,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:t,alt:"icon"},"id-icon")})]}),r&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:p("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:r})})]})]})}var rt=memo(Ut);var B=rt;var it=styled$1("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),st=styled$1("button")(({theme:e,isActive:t})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),at=styled$1(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),lt=styled$1(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),ye={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},pt={...ye,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},dt=styled$1("button")(()=>({...pt,right:53})),ct=styled$1("button")(()=>({...pt,right:39})),ut=styled$1(motion.img)(()=>({...ye,right:24,width:10,height:10,cursor:"pointer"})),ft=styled$1(motion.img)(()=>({...ye,right:8,width:11,height:11,cursor:"default"})),we=styled$1("img")(()=>({width:10,height:10})),mt=styled$1("img")(()=>({width:12,height:12})),gt=styled$1("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function ro({value:e,onChange:t,currentIndex:r,totalCount:o,onPrev:n,onNext:i,onOpen:l,placeholder:p="Search..."}){let[s,d]=useState(false),g=useRef(null),m=e.trim().length>0,w=o>0,h=m,b=()=>{l?.(),d(true),requestAnimationFrame(()=>g.current?.focus());},S=()=>{t(""),d(false);};return jsxs(it,{children:[jsx(AnimatePresence,{children:s&&jsxs(at,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(lt,{ref:g,initial:false,animate:{paddingRight:h?"98px":"24px"},transition:{duration:.15},placeholder:p,value:e,onChange:u=>t(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.shiftKey?n():i()),u.key==="Escape"&&S();},onBlur:()=>{m||d(false);}}),h&&jsx(dt,{onClick:n,disabled:!w,title:"Previous match (Shift+Enter)",children:jsx(we,{src:dl,alt:"prev"})}),h&&jsx(ct,{onClick:i,disabled:!w,title:"Next match (Enter)",children:jsx(we,{src:el,alt:"next"})}),h&&jsx(ut,{src:wi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:S}),jsx(ft,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),h&&jsx(gt,{children:w?`${r+1}/${o}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!s&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(st,{isActive:false,onClick:b,title:"Search",children:jsx(mt,{src:A,alt:"search"})})})})]})}var z=memo(ro);function yt(e,t){let r=[],o=t.length,n=0,i=e.indexOf(t,n);for(;i!==-1;){let l=i+o;r.push([i,l]),n=l,i=e.indexOf(t,n);}return r}var io={padding:0,outline:"none"};function bt({text:e,queryLength:t,ranges:r,idPrefix:o}){let n=[],i=0;return r.forEach(([l,p],s)=>{l>i&&n.push(e.slice(i,l)),n.push(jsx("mark",{style:io,children:e.slice(l,l+t)},`${o}-${s}`)),i=p;}),i<e.length&&n.push(e.slice(i)),jsx(Fragment,{children:n})}function E({text:e,query:t}){let r=useId(),o=useMemo(()=>t.trim().toLowerCase(),[t]),n=useMemo(()=>{if(!o)return e;let i=e.toLowerCase(),l=yt(i,o);return l.length===0?e:jsx(bt,{text:e,queryLength:t.length,ranges:l,idPrefix:r})},[e,t.length,o,r]);return jsx(Fragment,{children:n})}function Q(e,t){return e.toLowerCase().includes(t)}function U(e){return e.trim().toLowerCase()}function Z(e){let t=U(e);return (r,{keyName:o})=>{if(!t||!o)return;let n=String(o);if(Q(n,t))return jsx(tt,{children:jsx(E,{text:String(o),query:e})})}}function ee(e){let t=U(e);return (r,{value:o})=>{if(!t)return;let n=String(o??"");if(Q(n,t))return jsxs(et,{children:['"',jsx(E,{text:String(o??""),query:e}),'"']})}}function fo({title:e,onClose:t,onMaximize:r,maximized:o=false,id:n,onMouseHover:i,onMouseLeave:l,onRequestClick:p,isRequestExpanded:s=false,showRequestIcon:d$2=false,isHovered:g=false}){return jsx(c,{id:n,maximized:o||false,children:jsx(d,{isHovered:true,onMouseEnter:i,onMouseLeave:l,isMaximized:o,title:e,icon:Td,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:o,onClick:r}),d$2&&jsx(d$1,{onClick:p,isExpanded:s,isHovered:g,children:"Request"})]})})})}var It=memo(fo);var be=It;var W=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJsonViewerEvents:()=>{},containerRef:{current:null}});var Jt=({list:e,events:t,onClose:r,isWindowMinimized:o,windowOrder:n})=>e?.length?jsx(Fragment,{children:e.map((i,l)=>jsx(q,{index:l,...t,...i,onClose:()=>{r(l);},isWindowMinimized:o,windowOrder:n},i.json.id))}):null;var wo=({children:e,containerRef:t})=>{let[r,o]=useState([]),[n,i]=useState(false),[l,p]=useState(1),s=useRef({}),d=useCallback(c=>{if(r.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(r.some(N=>N.json.id===c.json.id))return;let T=structuredClone(c.json),V=T.request_body,u={...c,json:T,requestJson:c.requestJson||V||void 0};delete u.json.request_body,o(N=>[...N,u]);},[r]),g=useCallback(c=>{o(T=>T.filter((V,u)=>c!==u));},[]),m=useCallback(c=>{i(c);},[]),w=useCallback(c=>{p(c);},[]),h=useCallback(c=>{s.current=c;},[]),b=useMemo(()=>({onJsonRequestOpen:()=>s.current.onJsonRequestOpen?.(),onJsonSearch:()=>s.current.onJsonSearch?.(),onJsonCopy:()=>s.current.onJsonCopy?.(),onJsonIdCopy:()=>s.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>s.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>s.current.onJsonNodesMaximize?.()}),[]),S=useMemo(()=>({jsonViewerList:r,handleJsonViewerDialogOpen:d,handleWindowMinimize:m,handleWindowOrder:w,registerJsonViewerEvents:h,containerRef:t}),[r,d,m,w,h,t]);return jsxs(W.Provider,{value:S,children:[e,jsx(Jt,{list:r,events:b,onClose:g,isWindowMinimized:n,windowOrder:l})]})};var Et="#FFE20B";function te(e,t){let[r,o]=useState(0),[n,i]=useState(0);useEffect(()=>{if(!t.trim()){i(0),o(0);return}let s=setTimeout(()=>{let d=e.current?.querySelectorAll("mark")??[];i(d.length),o(0);},50);return ()=>clearTimeout(s)},[t,e]),useEffect(()=>{if(!e.current||!t.trim())return;let s=Array.from(e.current.querySelectorAll("mark"));s.forEach((d,g)=>{let m=g===r;d.style.backgroundColor=m?Et:"transparent",d.style.outline=m?`1px solid ${Et}`:"none",d.style.borderRadius="2px";}),s[r]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[r,n,t,e]);let l=useCallback(()=>{n!==0&&o(s=>(s+1)%n);},[n]),p=useCallback(()=>{n!==0&&o(s=>(s-1+n)%n);},[n]);return {currentIndex:r,totalCount:n,goNext:l,goPrev:p}}function Ot(e,t){return e==null?String(e).includes(t):typeof e=="string"?e.toLowerCase().includes(t):typeof e=="number"||typeof e=="boolean"?String(e).includes(t):false}function Vt(e,t){if(Array.isArray(e)){let r=e.map(o=>Vt(o,t)).filter(o=>o!=null);return r.length>0?r:null}return typeof e=="object"&&e!==null?Mt(e,t):Ot(e,t)?e:null}function Mt(e,t){let r={};for(let[o,n]of Object.entries(e))if(o.toLowerCase().includes(t))r[o]=n;else if(typeof n=="object"&&n!==null){let i=Vt(n,t);i!==null&&(r[o]=i);}else Ot(n,t)&&(r[o]=n);return Object.keys(r).length>0?r:null}function Ce(e,t){return t.trim()?Mt(e,t.toLowerCase()):e}var L=400,ne=.5;function q(e){let{containerRef:t}=useContext(W),{height:r$1,width:o}=a$1(),[n,i]=useState(false);return jsx(r,{isOpen:true,onClose:e.onClose,containerRef:t,defaultWindowWidth:L,defaultWindowHeight:H,minHeight:300,windowZIndex:3,initialPosition:{x:o/2-L/4+e.index*20,y:r$1/2-H/2+e.index*30},windowProps:{mainAppOrder:e.windowOrder,mainAppIsMinimized:e.isWindowMinimized,overflow:"visible",titleBar:jsx(Co,{...e,isRequestShown:n,setIsRequestShown:i})},children:jsx(vo,{...e,isRequestShown:n})})}function Co({requestJson:e={},onClose:t,onJsonRequestOpen:r,isRequestShown:o,setIsRequestShown:n}){let{isMaximized:i,setIsMaximized:l,isToolbarAnimationDisabled:p,setIsToolbarAnimationDisabled:s,dimensions:d,updateSize:g}=useContext(a$2),{onMouseEnter:m,onMouseLeave:w,isHovered:h}=b(),b$1=d.width||L,S=Object.keys(e)?.length;return jsx(motion.div,{style:{...i&&{height:de,position:"fixed",zIndex:1e3}},animate:{width:o?b$1*2:b$1,...i&&{width:"100vw"},...!i&&{transform:`translateX(${o?-b$1:0}px)`}},transition:{duration:ne,...p&&{duration:0}},children:jsx(be,{title:o?"JSON Request & Response":"JSON Response",onClose:()=>t(),onMaximize:()=>{l(c=>!c),s(true),setTimeout(()=>{s(false);},ne*1e3);},isHovered:h,onMouseHover:m,onMouseLeave:w,maximized:i,id:"draggable-dialog-title",onRequestClick:()=>{n(c=>!c),s(false),o||(r?.(),g({width:L,height:H}));},isRequestExpanded:o,showRequestIcon:!!S})})}function vo({json:e,requestJson:t={},onJsonSearch:r,onJsonCopy:o,onJsonIdCopy:n,onJsonNodesMinimize:i,onJsonNodesMaximize:l,isRequestShown:p}){let{isMaximized:s,isToolbarAnimationDisabled:d,dimensions:g}=useContext(a$2),[m,w]=useState(false),[h,b]=useState(false),[S,c]=useState(true),[T,V]=useState(false),[u,N]=useState(""),[k,jt]=useState(""),Je=useRef(null),ke=useRef(null),F=te(Je,u),_=te(ke,k),qt=useMemo(()=>Object.keys(e)?.length,[e]),Pe=g.width||L,Be=v=>{setTimeout(()=>{navigator.clipboard.writeText(v||"").then(()=>{});},10);},Dt=useMemo(()=>Object.keys(t)?.length,[t]),Te=useMemo(()=>Ce(e,u),[e,u]),Ee=useMemo(()=>Ce(t,k),[t,k]);return jsx(Ze,{"data-testid":"JSONViewer",children:jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:s?`calc(100vh - ${R}px)`:(g.height||H)-R+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:p&&jsxs(motion.div,{initial:{left:s?"50vw":0,...s&&{position:"relative",left:"-50vw"}},animate:{left:s?"50vw":-Pe,...s&&{position:"relative",left:"0"},...!p&&{left:0}},exit:{left:s?"50vw":0,...s&&{position:"relative",left:"0"}},transition:{duration:ne,...d&&{duration:0}},ref:ke,style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:s?"100vh":"100%",overflowY:"auto",position:"absolute",width:s?"100vw":Pe,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{V(true),setTimeout(()=>{V(false);},2e3);},children:[jsxs(fe,{isMaximized:s,isScrollingRequest:T,sx:{background:"#E7E7E7B2"},isRequestShown:p,children:[jsx(xe,{children:jsx(ue,{variant:"subtitle1",children:"API Request"})}),jsxs(ge,{children:[jsx(z,{value:k,onChange:jt,onOpen:()=>r?.(),currentIndex:_.currentIndex,totalCount:_.totalCount,onPrev:_.goPrev,onNext:_.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{S?l?.():i?.(),c(v=>!v);},icon:S?ve:ue$1}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(t,null,2)).then(()=>{});},icon:sa}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),k.trim()&&Ee===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Ee??t,style:Ye,displayDataTypes:false,collapsed:k.trim()?void 0:S?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},enableClipboard:false,children:[jsx(C.String,{render:ee(k)}),jsx(C.KeyName,{render:Z(k)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(AnimatePresence,{children:p&&jsx(me,{sx:{flex:1,height:R,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:Dt})})})]})}),jsxs(Ue,{ref:Je,isMaximized:s,isRequestShown:p,style:{left:0,maxHeight:"100vw"},initial:{...s&&{width:"100vw",left:0}},animate:{...s&&{position:"absolute",left:p?"50vw":"0"}},transition:{duration:ne,...d&&{duration:0}},onScroll:()=>{b(true),setTimeout(()=>{b(false);},2e3);},children:[jsxs(fe,{isMaximized:s,isScrollingRequest:h,isRequestShown:p,children:[jsx(xe,{children:jsx(ue,{variant:"subtitle1",children:"API Response"})}),jsxs(ge,{children:[jsx(z,{value:u,onChange:N,onOpen:()=>r?.(),currentIndex:F.currentIndex,totalCount:F.totalCount,onPrev:F.goPrev,onNext:F.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{m?l?.():i?.(),w(v=>!v);},icon:m?ve:ue$1}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),u.trim()&&Te===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Te??e,style:ce,displayDataTypes:false,collapsed:u.trim()?void 0:m?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},children:[jsx(C.String,{render:ee(u)}),jsx(C.KeyName,{render:Z(u)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(me,{sx:{flex:1,height:R},children:jsx(c$2,{sx:{borderBottomLeftRadius:p?0:"12px",background:"#f8f9fb",flex:1},totalCount:qt})})]})]})})}var Ro=({isWindowMinimized:e,windowOrder:t,...r})=>{let{handleJsonViewerDialogOpen:o,handleWindowMinimize:n,handleWindowOrder:i,registerJsonViewerEvents:l}=useContext(W),p=useCallback(()=>{n(e);},[n,e]),s=useCallback(()=>{i(t);},[i,t]);return useEffect(()=>{s();},[s]),useEffect(()=>{p();},[p]),useEffect(()=>{l(r);},[l,r]),{handleJsonViewerDialogOpen:o}};var Ar=q;export{B as a,z as b,E as c,be as d,W as e,Jt as f,wo as g,te as h,Ro as i,Ar as j};
|
|
1
|
+
import {c as c$2}from'./chunk-KL42FXA6.js';import {r,a as a$2}from'./chunk-4ZHJDL5H.js';import {c,d}from'./chunk-4PNYP6ZK.js';import {a,c as c$1,d as d$1}from'./chunk-PQSELTNR.js';import {a as a$1,b}from'./chunk-G3LCY5M2.js';import'./chunk-WHXHVOBY.js';import {ta,dl,el,wi,Jk,A,Td,ve,ue as ue$1,sa,qa,ra}from'./chunk-YKKS24ES.js';import Gt,{memo,createContext,useState,useRef,useId,useMemo,useCallback,useEffect,useContext}from'react';import {styled,Popover,Input,Typography,Box}from'@mui/material';import C from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import Xt from'@mui/material/Box';import {useTranslation}from'react-i18next';import {styled as styled$1}from'@mui/material/styles';var R=37,de="32px",H=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var Kt=44,ce={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#956ea5","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:`calc(100% - ${Kt+R}px`,overflow:"auto"},Ye={...ce,background:"transparent","--w-rjv-line-color":"transparent"},Xe=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0})),Qe=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"}));styled(Input)(({theme:e})=>({border:`1px solid ${e.palette.grey[100]}`,borderRadius:"0.25rem",padding:"0.375rem",fontSize:"0.625rem",outline:"none",width:"100%",maxWidth:"150px",height:"1.5rem",backgroundColor:e.palette.background.paper,"&:focus":{border:`1px solid ${e.palette.info.dark}`}}));var ue=styled(Typography)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",padding:"0px 8px",justifyContent:"center",alignItems:"center",borderRadius:"37.5px",backgroundColor:"#fff"})),fe=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:t,isRequestShown:r,theme:o})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"0px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,...e&&{boxShadow:o.shadows[23]},...t&&{paddingTop:de,transition:"padding 0.3s ease-in-out",...r&&{width:"50%"}}})),me=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:R,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!t&&{left:0}})),ge=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),xe=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),Ue=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:t})=>({width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...t&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:t})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100vw":t,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${R}px)`:(t||H)-R+5,background:"transparent",position:"fixed",width:"100%"}));var Ze=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"})),et=styled("span")(()=>({color:"#032F62"})),tt=styled("span")(()=>({color:"#357fb9"}));function $({"data-copied":e,style:t,onClick:r},{keyName:o}){return o?jsxs(Qe,{style:t,onClick:n=>{r?.(n);},children:[jsx(AnimatePresence,{children:e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}function Ut({onClick:e,icon:t,label:r,disableAnimation:o,...n}){let[i,l]=Gt.useState(false),{t:p}=useTranslation();return jsxs(Xe,{...n,onClick:d=>{e?.(d),!o&&(l(true),setTimeout(()=>{l(false);},2e3));},children:[jsxs(Xt,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:t,alt:"icon"},"id-icon")})]}),r&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:p("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:r})})]})]})}var rt=memo(Ut);var B=rt;var it=styled$1("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),st=styled$1("button")(({theme:e,isActive:t})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),at=styled$1(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),lt=styled$1(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),ye={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},pt={...ye,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},dt=styled$1("button")(()=>({...pt,right:53})),ct=styled$1("button")(()=>({...pt,right:39})),ut=styled$1(motion.img)(()=>({...ye,right:24,width:10,height:10,cursor:"pointer"})),ft=styled$1(motion.img)(()=>({...ye,right:8,width:11,height:11,cursor:"default"})),we=styled$1("img")(()=>({width:10,height:10})),mt=styled$1("img")(()=>({width:12,height:12})),gt=styled$1("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function ro({value:e,onChange:t,currentIndex:r,totalCount:o,onPrev:n,onNext:i,onOpen:l,placeholder:p="Search..."}){let[s,d]=useState(false),g=useRef(null),m=e.trim().length>0,w=o>0,h=m,b=()=>{l?.(),d(true),requestAnimationFrame(()=>g.current?.focus());},S=()=>{t(""),d(false);};return jsxs(it,{children:[jsx(AnimatePresence,{children:s&&jsxs(at,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(lt,{ref:g,initial:false,animate:{paddingRight:h?"98px":"24px"},transition:{duration:.15},placeholder:p,value:e,onChange:u=>t(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.shiftKey?n():i()),u.key==="Escape"&&S();},onBlur:()=>{m||d(false);}}),h&&jsx(dt,{onClick:n,disabled:!w,title:"Previous match (Shift+Enter)",children:jsx(we,{src:dl,alt:"prev"})}),h&&jsx(ct,{onClick:i,disabled:!w,title:"Next match (Enter)",children:jsx(we,{src:el,alt:"next"})}),h&&jsx(ut,{src:wi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:S}),jsx(ft,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),h&&jsx(gt,{children:w?`${r+1}/${o}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!s&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(st,{isActive:false,onClick:b,title:"Search",children:jsx(mt,{src:A,alt:"search"})})})})]})}var z=memo(ro);function yt(e,t){let r=[],o=t.length,n=0,i=e.indexOf(t,n);for(;i!==-1;){let l=i+o;r.push([i,l]),n=l,i=e.indexOf(t,n);}return r}var io={padding:0,outline:"none"};function bt({text:e,queryLength:t,ranges:r,idPrefix:o}){let n=[],i=0;return r.forEach(([l,p],s)=>{l>i&&n.push(e.slice(i,l)),n.push(jsx("mark",{style:io,children:e.slice(l,l+t)},`${o}-${s}`)),i=p;}),i<e.length&&n.push(e.slice(i)),jsx(Fragment,{children:n})}function E({text:e,query:t}){let r=useId(),o=useMemo(()=>t.trim().toLowerCase(),[t]),n=useMemo(()=>{if(!o)return e;let i=e.toLowerCase(),l=yt(i,o);return l.length===0?e:jsx(bt,{text:e,queryLength:t.length,ranges:l,idPrefix:r})},[e,t.length,o,r]);return jsx(Fragment,{children:n})}function Q(e,t){return e.toLowerCase().includes(t)}function U(e){return e.trim().toLowerCase()}function Z(e){let t=U(e);return (r,{keyName:o})=>{if(!t||!o)return;let n=String(o);if(Q(n,t))return jsx(tt,{children:jsx(E,{text:String(o),query:e})})}}function ee(e){let t=U(e);return (r,{value:o})=>{if(!t)return;let n=String(o??"");if(Q(n,t))return jsxs(et,{children:['"',jsx(E,{text:String(o??""),query:e}),'"']})}}function fo({title:e,onClose:t,onMaximize:r,maximized:o=false,id:n,onMouseHover:i,onMouseLeave:l,onRequestClick:p,isRequestExpanded:s=false,showRequestIcon:d$2=false,isHovered:g=false}){return jsx(c,{id:n,maximized:o||false,children:jsx(d,{isHovered:true,onMouseEnter:i,onMouseLeave:l,isMaximized:o,title:e,icon:Td,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:o,onClick:r}),d$2&&jsx(d$1,{onClick:p,isExpanded:s,isHovered:g,children:"Request"})]})})})}var It=memo(fo);var be=It;var W=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJsonViewerEvents:()=>{},containerRef:{current:null}});var Jt=({list:e,events:t,onClose:r,isWindowMinimized:o,windowOrder:n})=>e?.length?jsx(Fragment,{children:e.map((i,l)=>jsx(q,{index:l,...t,...i,onClose:()=>{r(l);},isWindowMinimized:o,windowOrder:n},i.json.id))}):null;var wo=({children:e,containerRef:t})=>{let[r,o]=useState([]),[n,i]=useState(false),[l,p]=useState(1),s=useRef({}),d=useCallback(c=>{if(r.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(r.some(N=>N.json.id===c.json.id))return;let T=structuredClone(c.json),V=T.request_body,u={...c,json:T,requestJson:c.requestJson||V||void 0};delete u.json.request_body,o(N=>[...N,u]);},[r]),g=useCallback(c=>{o(T=>T.filter((V,u)=>c!==u));},[]),m=useCallback(c=>{i(c);},[]),w=useCallback(c=>{p(c);},[]),h=useCallback(c=>{s.current=c;},[]),b=useMemo(()=>({onJsonRequestOpen:()=>s.current.onJsonRequestOpen?.(),onJsonSearch:()=>s.current.onJsonSearch?.(),onJsonCopy:()=>s.current.onJsonCopy?.(),onJsonIdCopy:()=>s.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>s.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>s.current.onJsonNodesMaximize?.()}),[]),S=useMemo(()=>({jsonViewerList:r,handleJsonViewerDialogOpen:d,handleWindowMinimize:m,handleWindowOrder:w,registerJsonViewerEvents:h,containerRef:t}),[r,d,m,w,h,t]);return jsxs(W.Provider,{value:S,children:[e,jsx(Jt,{list:r,events:b,onClose:g,isWindowMinimized:n,windowOrder:l})]})};var Et="#FFE20B";function te(e,t){let[r,o]=useState(0),[n,i]=useState(0);useEffect(()=>{if(!t.trim()){i(0),o(0);return}let s=setTimeout(()=>{let d=e.current?.querySelectorAll("mark")??[];i(d.length),o(0);},50);return ()=>clearTimeout(s)},[t,e]),useEffect(()=>{if(!e.current||!t.trim())return;let s=Array.from(e.current.querySelectorAll("mark"));s.forEach((d,g)=>{let m=g===r;d.style.backgroundColor=m?Et:"transparent",d.style.outline=m?`1px solid ${Et}`:"none",d.style.borderRadius="2px";}),s[r]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[r,n,t,e]);let l=useCallback(()=>{n!==0&&o(s=>(s+1)%n);},[n]),p=useCallback(()=>{n!==0&&o(s=>(s-1+n)%n);},[n]);return {currentIndex:r,totalCount:n,goNext:l,goPrev:p}}function Ot(e,t){return e==null?String(e).includes(t):typeof e=="string"?e.toLowerCase().includes(t):typeof e=="number"||typeof e=="boolean"?String(e).includes(t):false}function Vt(e,t){if(Array.isArray(e)){let r=e.map(o=>Vt(o,t)).filter(o=>o!=null);return r.length>0?r:null}return typeof e=="object"&&e!==null?Mt(e,t):Ot(e,t)?e:null}function Mt(e,t){let r={};for(let[o,n]of Object.entries(e))if(o.toLowerCase().includes(t))r[o]=n;else if(typeof n=="object"&&n!==null){let i=Vt(n,t);i!==null&&(r[o]=i);}else Ot(n,t)&&(r[o]=n);return Object.keys(r).length>0?r:null}function Ce(e,t){return t.trim()?Mt(e,t.toLowerCase()):e}var L=400,ne=.5;function q(e){let{containerRef:t}=useContext(W),{height:r$1,width:o}=a$1(),[n,i]=useState(false);return jsx(r,{isOpen:true,onClose:e.onClose,containerRef:t,defaultWindowWidth:L,defaultWindowHeight:H,minHeight:300,windowZIndex:3,initialPosition:{x:o/2-L/4+e.index*20,y:r$1/2-H/2+e.index*30},windowProps:{mainAppOrder:e.windowOrder,mainAppIsMinimized:e.isWindowMinimized,overflow:"visible",titleBar:jsx(Co,{...e,isRequestShown:n,setIsRequestShown:i})},children:jsx(vo,{...e,isRequestShown:n})})}function Co({requestJson:e={},onClose:t,onJsonRequestOpen:r,isRequestShown:o,setIsRequestShown:n}){let{isMaximized:i,setIsMaximized:l,isToolbarAnimationDisabled:p,setIsToolbarAnimationDisabled:s,dimensions:d,updateSize:g}=useContext(a$2),{onMouseEnter:m,onMouseLeave:w,isHovered:h}=b(),b$1=d.width||L,S=Object.keys(e)?.length;return jsx(motion.div,{style:{...i&&{height:de,position:"fixed",zIndex:1e3}},animate:{width:o?b$1*2:b$1,...i&&{width:"100vw"},...!i&&{transform:`translateX(${o?-b$1:0}px)`}},transition:{duration:ne,...p&&{duration:0}},children:jsx(be,{title:o?"JSON Request & Response":"JSON Response",onClose:()=>t(),onMaximize:()=>{l(c=>!c),s(true),setTimeout(()=>{s(false);},ne*1e3);},isHovered:h,onMouseHover:m,onMouseLeave:w,maximized:i,id:"draggable-dialog-title",onRequestClick:()=>{n(c=>!c),s(false),o||(r?.(),g({width:L,height:H}));},isRequestExpanded:o,showRequestIcon:!!S})})}function vo({json:e,requestJson:t={},onJsonSearch:r,onJsonCopy:o,onJsonIdCopy:n,onJsonNodesMinimize:i,onJsonNodesMaximize:l,isRequestShown:p}){let{isMaximized:s,isToolbarAnimationDisabled:d,dimensions:g}=useContext(a$2),[m,w]=useState(false),[h,b]=useState(false),[S,c]=useState(true),[T,V]=useState(false),[u,N]=useState(""),[k,jt]=useState(""),Je=useRef(null),ke=useRef(null),F=te(Je,u),_=te(ke,k),qt=useMemo(()=>Object.keys(e)?.length,[e]),Pe=g.width||L,Be=v=>{setTimeout(()=>{navigator.clipboard.writeText(v||"").then(()=>{});},10);},Dt=useMemo(()=>Object.keys(t)?.length,[t]),Te=useMemo(()=>Ce(e,u),[e,u]),Ee=useMemo(()=>Ce(t,k),[t,k]);return jsx(Ze,{"data-testid":"JSONViewer",children:jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:s?`calc(100vh - ${R}px)`:(g.height||H)-R+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:p&&jsxs(motion.div,{initial:{left:s?"50vw":0,...s&&{position:"relative",left:"-50vw"}},animate:{left:s?"50vw":-Pe,...s&&{position:"relative",left:"0"},...!p&&{left:0}},exit:{left:s?"50vw":0,...s&&{position:"relative",left:"0"}},transition:{duration:ne,...d&&{duration:0}},ref:ke,style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:s?"100vh":"100%",overflowY:"auto",position:"absolute",width:s?"100vw":Pe,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{V(true),setTimeout(()=>{V(false);},2e3);},children:[jsxs(fe,{isMaximized:s,isScrollingRequest:T,sx:{background:"#E7E7E7B2"},isRequestShown:p,children:[jsx(xe,{children:jsx(ue,{variant:"subtitle1",children:"API Request"})}),jsxs(ge,{children:[jsx(z,{value:k,onChange:jt,onOpen:()=>r?.(),currentIndex:_.currentIndex,totalCount:_.totalCount,onPrev:_.goPrev,onNext:_.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{S?l?.():i?.(),c(v=>!v);},icon:S?ve:ue$1}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(t,null,2)).then(()=>{});},icon:sa}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),k.trim()&&Ee===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Ee??t,style:Ye,displayDataTypes:false,collapsed:k.trim()?void 0:S?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},enableClipboard:false,children:[jsx(C.String,{render:ee(k)}),jsx(C.KeyName,{render:Z(k)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(AnimatePresence,{children:p&&jsx(me,{sx:{flex:1,height:R,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:Dt})})})]})}),jsxs(Ue,{ref:Je,isMaximized:s,isRequestShown:p,style:{left:0,maxHeight:"100vw"},initial:{...s&&{width:"100vw",left:0}},animate:{...s&&{position:"absolute",left:p?"50vw":"0"}},transition:{duration:ne,...d&&{duration:0}},onScroll:()=>{b(true),setTimeout(()=>{b(false);},2e3);},children:[jsxs(fe,{isMaximized:s,isScrollingRequest:h,isRequestShown:p,children:[jsx(xe,{children:jsx(ue,{variant:"subtitle1",children:"API Response"})}),jsxs(ge,{children:[jsx(z,{value:u,onChange:N,onOpen:()=>r?.(),currentIndex:F.currentIndex,totalCount:F.totalCount,onPrev:F.goPrev,onNext:F.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{m?l?.():i?.(),w(v=>!v);},icon:m?ve:ue$1}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),u.trim()&&Te===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Te??e,style:ce,displayDataTypes:false,collapsed:u.trim()?void 0:m?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},children:[jsx(C.String,{render:ee(u)}),jsx(C.KeyName,{render:Z(u)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(me,{sx:{flex:1,height:R},children:jsx(c$2,{sx:{borderBottomLeftRadius:p?0:"12px",background:"#f8f9fb",flex:1},totalCount:qt})})]})]})})}var Ro=({isWindowMinimized:e,windowOrder:t,...r})=>{let{handleJsonViewerDialogOpen:o,handleWindowMinimize:n,handleWindowOrder:i,registerJsonViewerEvents:l}=useContext(W),p=useCallback(()=>{n(e);},[n,e]),s=useCallback(()=>{i(t);},[i,t]);return useEffect(()=>{s();},[s]),useEffect(()=>{p();},[p]),useEffect(()=>{l(r);},[l,r]),{handleJsonViewerDialogOpen:o}};var Ar=q;export{B as a,z as b,E as c,be as d,W as e,Jt as f,wo as g,te as h,Ro as i,Ar as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {t}from'./chunk-G3LCY5M2.js';import {j}from'./chunk-
|
|
1
|
+
import {t}from'./chunk-G3LCY5M2.js';import {j}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Oj}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var s=styled(r)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,background:"#FBFBFB",borderRadius:"8px",fontSize:"11px",display:"flex",flexDirection:"column",height:"233px",transform:"scale(1)"})),l=styled(r)(({theme:e})=>({padding:"8px 12px",borderBottom:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",height:39,flexShrink:0,overflow:"visible"})),c=styled(r)(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:600,textTransform:"capitalize"})),x=styled(r)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${e.palette.divider}`,height:40})),f=styled(j)(({theme:e})=>({color:e.v2.palette.base.black,fontSize:"11px",fontWeight:500,lineHeight:"13.2px"})),g=styled(r)(()=>({display:"flex",alignItems:"center",gap:"8px"})),I=styled(r)(()=>({display:"flex",alignItems:"center",gap:"4px"})),y=styled(r)(()=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,".list-item:last-of-type":{borderBottom:"none"}}));styled(r)(()=>({margin:"12px "}));function b({children:e,...t}){let i=yc(useId(),"widget");return jsx(s,{id:i,component:"article","data-testid":"Widget",...t,children:e})}var S=memo(b);function P({children:e,action:t,...i}){let d=yc(useId(),"widget-header");return jsxs(l,{id:d,"data-testid":"Widget_WidgetHeader",component:"header",...i,children:[jsx(c,{children:e}),t&&t]})}var T=memo(P);function k({allowShadow:e=true,children:t$1,...i}){let d=yc(useId(),"widget-list"),{onScrollHandler:u,showShadow:L}=t();return jsxs(y,{id:d,component:"ul","data-testid":"Widget_List",onScroll:u,...i,children:[t$1,L&&e&&jsx(r,{component:"img",src:Oj,sx:{width:"100%",position:"fixed",bottom:0,pointerEvents:"none",right:0,left:0}})]})}var A=memo(k);function G({children:e,icon:t,actions:i,...d}){return jsxs(x,{component:"li","data-testid":"Widget_ListItem",className:`list-item ${d.className}`,...d,children:[jsxs(g,{component:"aside",children:[t&&t,jsx(f,{noWrap:true,className:"content",children:e})]}),i&&jsx(I,{component:"aside",children:i})]})}var J=memo(G);var ue=S;export{T as a,A as b,J as c,ue as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-GTARVX4J.js';import {a}from'./chunk-54RTNLV2.js';import {r}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-GTARVX4J.js';import {a}from'./chunk-54RTNLV2.js';import {r}from'./chunk-TEJUDCOU.js';import {yc,Fa,Ga,Ea,h}from'./chunk-PLMJIRXJ.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-YKKS24ES.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-CDEAHMMR.js';import {p}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-CDEAHMMR.js';import {p}from'./chunk-TEJUDCOU.js';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var i=styled(a)(({theme:t})=>({color:t.palette.text.primary,"&.CustomVariant_text":{height:24},display:"inline-flex"}));var n=({title:t,slotProps:e={},children:l})=>{let{chip:h={},tooltip:a={}}=e,{sx:s,...c}=h;return jsx(p,{...a,title:t,children:jsx(i,{...c,sx:{height:24,display:"inline-flex",color:"text.primary",...s},children:l})})},C=n;export{C 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 {o,j as j$1,k,l,p as p$1}from'./chunk-GWW3QJ5D.js';import {a}from'./chunk-ZONDSLTR.js';import {a as a$3}from'./chunk-54RTNLV2.js';import {b}from'./chunk-AWNFVAW7.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 {r,p as p$1}from'./chunk-
|
|
1
|
+
import {r,p as p$1}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {j}from'./chunk-
|
|
1
|
+
import {j}from'./chunk-TEJUDCOU.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),s=styled(Button)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}}));export{d as a,l as b,c,s as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {kc,yc,ab,Zb,jc,zc,xa as xa$1}from'./chunk-PLMJIRXJ.js';import {forwardRef,memo,useId,createElement,useState,useCallback,useMemo,Children,useEffect,useRef}from'react';import pt from'@mui/material/Box';import rs,{circularProgressClasses}from'@mui/material/CircularProgress';import Ja from'@mui/material/ButtonBase';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import eo from'@mui/material/SvgIcon';import ds from'@mui/material/Checkbox';import cs from'@mui/material/FormControlLabel';import gs from'@mui/material/Switch';import vs from'@mui/material/Typography';import Ls from'@mui/material/Radio';import js from'@mui/material/Tooltip';import Qs from'@mui/material/Skeleton';import sn from'@mui/material/Avatar';import fn from'@mui/material/Divider';import bn from'@mui/material/Collapse';import {createPortal}from'react-dom';import zn from'@mui/material/Backdrop';import si,{SliderThumb}from'@mui/material/Slider';import Ci,{inputClasses}from'@mui/material/Input';import xi from'@mui/material/FormControl';import hi from'@mui/material/InputLabel';import $i from'@mui/material/InputBase';import Ri from'@mui/material/Accordion';import Di from'@mui/material/AccordionDetails';import Ai from'@mui/material/AccordionSummary';import Zi from'@mui/material/Popper';import _i from'@mui/material/Dialog';import qi from'@mui/material/DialogActions';import Ji from'@mui/material/DialogContent';import Qi from'@mui/material/DialogTitle';import {LazyLoadImage}from'react-lazy-load-image-component';import Pl from'@mui/material/Stack';var A="os-shared-Button",k={root:`${A}-root`,content:`${A}-content`,startIcon:`${A}-startIcon`,endIcon:`${A}-endIcon`,icon:`${A}-icon`,loading:`${A}-loading`,loadingSpinner:`${A}-loadingSpinner`},$o={sm:{height:24,paddingY:8,paddingX:16,fontSize:"10px"},md:{height:32,minWidth:79,paddingY:8,paddingX:24,fontSize:"13px",lineHeight:"16px"},lg:{height:40,paddingY:8,paddingX:32,fontSize:"12px"}},Mo={sm:{width:24,minWidth:24,height:24,padding:0},md:{width:32,minWidth:32,height:32,padding:0},lg:{width:38,minWidth:38,height:38,padding:0}},Lo={sm:12,md:12,lg:14};var zo=styled(Ja,{shouldForwardProp:e=>e!=="$variant"&&e!=="$size"&&e!=="$fullWidth"&&e!=="$isLoading"&&e!=="$hasIcon"&&e!=="$isIconOnly"})(({theme:e,$variant:o="primary",$size:t="md",$fullWidth:r,$isLoading:a,$hasIcon:s,$isIconOnly:i})=>{let n=e.v2.palette,{paddingX:p,paddingY:d,...c}=$o[t],u=Mo[t];return {display:"inline-flex",alignItems:"center",justifyContent:"center",gap:e.v2.spacing(6),borderRadius:e.v2.radius(4),lineHeight:"100%",whiteSpace:"nowrap",position:"relative",cursor:a?"not-allowed":"pointer",transition:"background-color 0.15s ease, opacity 0.15s ease",...c,padding:`${e.v2.spacing(d)} ${e.v2.spacing(p)}`,fontWeight:e.typography.fontWeightMedium,...r&&!i&&{width:"100%"},...s&&!r&&!i&&{width:"auto",minWidth:0},...o==="primary"&&{background:n.brand[500],color:n.base.white,"&.Mui-disabled":{opacity:1,background:n.interactive.primary.disabled,color:n.base.white}},...o==="secondary"&&{backgroundColor:n.base.white,color:n.grey[900],border:`1px solid ${n.grey[100]}`,"&.Mui-disabled":{opacity:1,color:n.foreground.disabled}},...o==="ghost"&&{padding:0,minWidth:0,backgroundColor:"transparent",color:n.foreground.brand,"&.Mui-disabled":{opacity:.5}},...o==="danger"&&{backgroundColor:n.status.danger.default,color:n.base.white,"&.Mui-disabled":{opacity:1,backgroundColor:alpha(n.status.danger.default,.14),color:n.base.white}},...i&&{boxSizing:"border-box",...u}}}),se=styled("span")(({theme:e})=>{let o=e.v2.spacing(16);return {display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,width:o,height:o}});var Do=forwardRef(({children:e,variant:o="primary",size:t="md",isLoading:r=false,startIcon:a,endIcon:s,icon:i,fullWidth:n=false,disabled:p,className:d,sx:c,...u},y)=>{let m=i!=null;return jsxs(zo,{ref:y,className:kc(k.root,d),$variant:o,$size:t,$fullWidth:n,$isLoading:r,$hasIcon:m||!!a||!!s||r,$isIconOnly:m,disabled:p||r,disableRipple:true,"data-testid":"Button",sx:c,...u,children:[jsx(pt,{component:"span",className:k.content,sx:{display:"inline-flex",alignItems:"center",gap:"inherit",visibility:r?"hidden":"visible"},children:m?jsx(se,{className:k.icon,children:i}):jsxs(Fragment,{children:[a&&jsx(se,{className:k.startIcon,children:a}),e,s&&jsx(se,{className:k.endIcon,children:s})]})}),r&&jsx(se,{className:k.loading,sx:{position:"absolute"},children:jsx(rs,{className:k.loadingSpinner,size:Lo[t],color:"inherit"})})]})});Do.displayName="Button";var Ao=memo(Do);var ss="os-shared-Icon",be={root:`${ss}-root`};var Eo=styled("img")(({theme:e})=>({width:e.v2.spacing(16),height:e.v2.spacing(16),verticalAlign:"middle",flexShrink:0}));var Wo=forwardRef(({className:e,sx:o,...t},r)=>jsx(Eo,{className:kc(be.root,e),sx:o,"data-testid":"Icon",...t,ref:r}));Wo.displayName="Icon";var Ho=memo(Wo);var Qe="os-shared-Checkbox",E={root:`${Qe}-root`,control:`${Qe}-control`,label:`${Qe}-label`};var Vo=({disabled:e,...o})=>{let{v2:t}=useTheme(),{brand:r,base:a,foreground:s}=t.palette;return jsxs(eo,{viewBox:"0 0 12 12",sx:{width:12,height:12},...o,children:[jsx("rect",{width:"12",height:"12",rx:"2.4",fill:e?s.disabled:r[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83391 3.74206C9.04243 3.9443 9.05652 4.28711 8.86537 4.50775L5.64586 8.22387C5.55146 8.33284 5.41909 8.39627 5.27942 8.39948C5.13975 8.40269 5.0049 8.3454 4.90612 8.24088L3.15002 6.38282C2.94999 6.17118 2.94999 5.82804 3.15002 5.61641C3.35004 5.40477 3.67435 5.40477 3.87437 5.61641L5.2522 7.07424L8.11024 3.77535C8.30138 3.55472 8.62538 3.53981 8.83391 3.74206Z",fill:a.white})]})},Oo=({disabled:e,...o})=>{let{v2:t}=useTheme(),{base:r,grey:a}=t.palette;return jsx(eo,{viewBox:"0 0 12 12",sx:{width:12,height:12},...o,children:jsx("rect",{x:"0.6",y:"0.6",width:"10.8",height:"10.8",rx:"1.8",fill:e?a[50]:r.white,stroke:e?a[200]:a[500],strokeWidth:"1.2"})})},Zo=({disabled:e,...o})=>{let{v2:t}=useTheme(),{brand:r,base:a,foreground:s}=t.palette;return jsxs(eo,{viewBox:"0 0 12 12",sx:{width:12,height:12},...o,children:[jsx("rect",{width:"12",height:"12",rx:"2.4",fill:e?s.disabled:r[500]}),jsx("rect",{x:"3",y:"5.4",width:"6",height:"1.2",rx:"0.5",fill:a.white})]})};var Uo=styled(ds)(({theme:e})=>({padding:e.v2.spacing(2),"&:hover":{backgroundColor:"transparent"}})),Yo=styled(cs)(({theme:e})=>{let{base:o,grey:t}=e.v2.palette;return {marginLeft:0,gap:e.v2.spacing(4),"& .MuiFormControlLabel-label":{fontSize:"11px",color:o.black},"& .MuiFormControlLabel-label.Mui-disabled":{color:t[500]}}});var Go=forwardRef(({label:e,labelPlacement:o="end",disabled:t,sx:r,className:a,...s},i)=>{let n=yc(useId(),"checkbox"),p=jsx(Uo,{id:n,ref:i,disableRipple:true,disabled:t,checkedIcon:jsx(Vo,{disabled:t}),icon:jsx(Oo,{disabled:t}),indeterminateIcon:jsx(Zo,{disabled:t}),"data-testid":"Checkbox",className:kc(e?E.control:E.root,e?void 0:a),sx:e?void 0:r,...s});return e?jsx(Yo,{className:kc(E.root,a),sx:r,control:p,label:e,labelPlacement:o,disabled:t,componentsProps:{typography:{className:E.label}}}):p});Go.displayName="Checkbox";var Xo=memo(Go);var ys="os-shared-Switch",Se={root:`${ys}-root`};var _o=styled(gs)(({theme:e,disabled:o})=>{let{base:t,grey:r,success:a}=e.v2.palette;return {width:28,height:16,padding:0,borderRadius:e.v2.radius(8),opacity:o?.5:1,overflow:"visible","& .MuiSwitch-switchBase":{padding:0,margin:e.v2.spacing(1),color:t.white,transitionDuration:"300ms","&:hover":{backgroundColor:"transparent"},"&.Mui-focusVisible":{outline:`2px solid ${r[400]}`,outlineOffset:2},"&.Mui-checked":{transform:"translateX(12px)",color:t.white,"& + .MuiSwitch-track":{backgroundColor:a[500],opacity:1,border:0}},"&.Mui-disabled":{color:t.white,"& + .MuiSwitch-track":{opacity:1},"& .MuiSwitch-thumb":{filter:"none"}},"&.Mui-checked.Mui-disabled":{color:t.white}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:14,height:14,color:t.white,backgroundColor:t.white,boxShadow:"none",filter:o?"none":"drop-shadow(0px 3px 0.5px rgba(0, 0, 0, 0.04)) drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.12))"},"& .MuiSwitch-track":{borderRadius:e.v2.radius(8),backgroundColor:"#D9D9D9",opacity:1,transition:e.transitions.create(["background-color"],{duration:300})}}});var qo=forwardRef(({className:e,sx:o,...t},r)=>jsx(_o,{ref:r,className:kc(Se.root,e),sx:o,"data-testid":"Switch",disableRipple:true,...t}));qo.displayName="Switch";var Jo=memo(qo);var Ss="os-shared-Typography",ve={root:`${Ss}-root`},Ne="body.default.regular";var ws=e=>e!=null&&typeof e=="object"&&"fontFamily"in e&&"fontSize"in e&&"fontWeight"in e;function ks(e,o){try{let t=o.split(".").reduce((r,a)=>{if(r==null||typeof r!="object")throw new TypeError(`Invalid typography textVariant: ${o}`);return r[a]},e);if(!ws(t))throw new TypeError(`Invalid typography textVariant: ${o}`);return t}catch(t){return console.warn(t),e.body.default.regular}}function Is(e,o,t){return o===void 0?t:typeof o=="number"?o:{light:e.fontWeightLight,regular:e.fontWeightRegular,medium:e.fontWeightMedium,semibold:e.fontWeightBold,bold:e.fontWeightBolder}[o]??t}var Qo=styled(vs,{shouldForwardProp:e=>e!=="$textVariant"&&e!=="$weight"})(({theme:e,$textVariant:o=Ne,$weight:t})=>{let{base:r}=e.v2.palette,a=ks(e.v2.typography.textVariants,o);return {color:r.black,...a,fontWeight:Is(e.v2.typography,t,a.fontWeight)}});var et=forwardRef(({textVariant:e=Ne,variant:o="subtitle2",weight:t,className:r,sx:a,...s},i)=>jsx(Qo,{ref:i,className:kc(ve.root,r),sx:a,"data-testid":"Typography",...s,variant:o,$textVariant:e,$weight:t}));et.displayName="Typography";var ot=memo(et);var $s="os-shared-RadioButton";var we={root:`${$s}-root`};var at=({disabled:e,...o})=>{let{v2:t}=useTheme(),{brand:r,base:a}=t.palette,s=e?"#BDC1CC":r[500];return jsxs(eo,{viewBox:"0 0 12 12",sx:{width:12,height:12,fill:"none"},...o,children:[jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"4.8",fill:s,stroke:s,strokeWidth:"1.2",style:{fill:s,stroke:s}}),jsx("circle",{cx:"6",cy:"6",r:"2.25",fill:a.white,style:{fill:a.white}})]})},st=({disabled:e,...o})=>{let{v2:t}=useTheme(),{base:r,grey:a}=t.palette,s=e?a[50]:r.white,i=e?a[200]:a[500];return jsx(eo,{viewBox:"0 0 12 12",sx:{width:12,height:12,fill:"none"},...o,children:jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"4.8",fill:s,stroke:i,strokeWidth:"1.2",style:{fill:s,stroke:i}})})};var nt=styled(Ls)(({theme:e})=>({padding:e.v2.spacing(2),"&:hover":{backgroundColor:"transparent"},"& .MuiSvgIcon-root":{fontSize:12,width:12,height:12}}));var it=forwardRef(({disabled:e,sx:o,className:t,...r},a)=>jsx(nt,{ref:a,disableRipple:true,disabled:e,checkedIcon:jsx(at,{disabled:e}),icon:jsx(st,{disabled:e}),"data-testid":"RadioButton",className:kc(we.root,t),sx:o,...r}));it.displayName="RadioButton";var lt=memo(it);var Ie="os-shared-CircularProgress",W={root:`${Ie}-root`,progress:`${Ie}-progress`,labelOverlay:`${Ie}-labelOverlay`,labelText:`${Ie}-labelText`};var dt=styled(rs)(({theme:e})=>{let{brand:o}=e.v2.palette;return {color:"#147DC5",background:alpha(o[500],.05),borderRadius:"50%",[`& .${circularProgressClasses.circle}`]:{strokeLinecap:"round"}}}),ct=styled(pt)(()=>({position:"relative",display:"inline-flex"})),mt=styled(pt)(()=>({top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"})),ft=styled(vs)(({theme:e})=>({fontSize:e.typography.fontSize,fontWeight:e.typography.fontWeightBolder??700,color:"#3B4152"}));var ut=forwardRef(({variant:e="indeterminate",hasLabel:o=true,value:t,className:r,sx:a,...s},i)=>{let n=e==="determinate"&&o;return jsxs(ct,{className:kc(W.root,r),sx:a,"data-testid":"CircularProgress",children:[jsx(dt,{ref:i,variant:e,value:t,className:W.progress,...s}),n&&jsx(mt,{className:W.labelOverlay,children:jsx(ft,{className:W.labelText,variant:"caption",color:"text.secondary",children:`${Math.round(t??0)}%`})})]})});ut.displayName="CircularProgress";var yt=memo(ut);var H="os-shared-Tooltip",b={popper:`${H}-popper`,tooltip:`${H}-tooltip`,arrow:`${H}-arrow`,content:`${H}-content`,title:`${H}-title`,supportingText:`${H}-supportingText`,wrapper:`${H}-wrapper`};var gt=styled(({className:e,...o})=>createElement(js,{...o,classes:{popper:kc(b.popper,e),tooltip:b.tooltip,arrow:b.arrow}}))(({theme:e})=>{let{base:o,grey:t}=e.v2.palette,r=o.white,a="var(--tooltip-border-width) solid var(--tooltip-border-color)";return {"--tooltip-border-color":"#3C373721","--tooltip-border-width":"1px",zIndex:999999,[`& .${b.arrow}`]:{color:r,"&:before":{backgroundColor:r,boxSizing:"border-box",border:a}},[`& .${b.tooltip}`]:{backgroundColor:r,color:t[700],boxShadow:e.v2.elevation[200],fontSize:12,fontWeight:400,lineHeight:1.2,padding:e.v2.spacing(6),borderRadius:e.v2.radius(8),border:a,maxWidth:320,wordBreak:"break-word"}}}),xt=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:e.v2.spacing(6),maxWidth:296,width:"100%"})),ht=styled("div",{shouldForwardProp:e=>e!=="$hasSupportingText"})(({theme:e,$hasSupportingText:o})=>{let{grey:t}=e.v2.palette;return {margin:0,fontSize:12,fontWeight:o?600:400,lineHeight:o?1:1.2,color:o?t[700]:alpha(t[700],.77),width:o?"100%":void 0}}),Ct=styled("div")(({theme:e})=>{let{grey:o}=e.v2.palette;return {margin:0,fontSize:11,fontWeight:400,lineHeight:"normal",color:o[500],width:"100%",whiteSpace:"pre-wrap"}});function Gs(e){return e!=null&&e!==false&&e!==""}function Xs(e){return !!e||e===0}function _s(e,o){let t=Gs(o);if(!Xs(e)&&!t)return null;let r=jsx(ht,{className:b.title,$hasSupportingText:t,children:e});return t?jsxs(xt,{className:b.content,children:[r,jsx(Ct,{className:b.supportingText,children:o})]}):r}function bt({className:e,title:o,supportingText:t,placement:r="top",children:a,wrapperProps:s,sx:i,...n}){let{className:p,...d}=s??{};return jsx(gt,{className:e,title:_s(o,t),placement:r,arrow:true,sx:i,...n,children:jsx(pt,{display:"flex",alignItems:"center","data-testid":"Tooltip",className:kc(b.wrapper,p),...d,children:a})})}bt.displayName="Tooltip";var St=memo(bt);var Js="os-shared-Skeleton",$e={root:`${Js}-root`};var vt=styled(Qs)(()=>({}));var Nt=forwardRef(({className:e,sx:o,variant:t="rounded",height:r=16,...a},s)=>jsx(vt,{ref:s,className:kc($e.root,e),sx:o,"data-testid":"Skeleton",variant:t,height:r,...a}));Nt.displayName="Skeleton";var wt=memo(Nt);var an="os-shared-Avatar",Me={root:`${an}-root`},Le="xs",Fe="teal",kt={teal:{from:"#31D5C8",to:"#1186C5"},green:{from:"#A2E9BD",to:"#44BB74"},cyan:{from:"#6BF6EB",to:"#32D6C9"},steel:{from:"#61AFC9",to:"#7FBFD4"},sage:{from:"#9DB7A4",to:"#7FBFD4"},gold:{from:"#D7B38C",to:"#FFE09F"},lime:{from:"#ADD6A2",to:"#FFDDB2"}},It={xs:{dimension:24,fontSize:"9px"},sm:{dimension:32,fontSize:"12px"},md:{dimension:40,fontSize:"15px"},lg:{dimension:48,fontSize:"17px"},xl:{dimension:56,fontSize:"20px"}};function ln(e){let{from:o,to:t}=kt[e];return `linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%), linear-gradient(135deg, ${o} 0%, ${t} 100%)`}var Bt=styled(sn,{shouldForwardProp:e=>!["$size","$color"].includes(e)})(({theme:e,$size:o=Le,$color:t=Fe})=>{let{dimension:r,fontSize:a}=It[o],{base:s}=e.v2.palette,i=ln(t);return {width:r,height:r,flexShrink:0,fontSize:a,fontWeight:e.typography.fontWeightMedium,lineHeight:"normal",color:s.white,background:i,backgroundColor:"transparent","&.MuiAvatar-colorDefault":{color:s.white,background:i,backgroundColor:"transparent"}}});var Tt=forwardRef(({className:e,sx:o,size:t=Le,color:r=Fe,...a},s)=>jsx(Bt,{ref:s,className:kc(Me.root,e),sx:o,"data-testid":"Avatar",...a,$size:t,$color:r,variant:"circular"}));Tt.displayName="Avatar";var Pt=memo(Tt);var mn="os-shared-Divider",ze={root:`${mn}-root`};function yn(e,o){let{grey:t,border:r}=o.v2.palette;return e==="subtle"?r.subtle:t[100]}var $t=styled(fn,{shouldForwardProp:e=>e!=="$type"})(({theme:e,$type:o="default",orientation:t="horizontal"})=>({borderColor:yn(o,e),...t==="vertical"?{borderBottomWidth:0,borderRightWidth:1}:{borderBottomWidth:1}}));var Mt=forwardRef(({className:e,sx:o,orientation:t="horizontal",type:r="default",...a},s)=>jsx($t,{ref:s,className:kc(ze.root,e),sx:o,"data-testid":"Divider",orientation:t,$type:r,...a}));Mt.displayName="Divider";var Lt=memo(Mt);var Cn="os-shared-Collapse",Re={root:`${Cn}-root`};var Ft=styled(bn)(()=>({}));var zt=forwardRef(({className:e,sx:o,children:t,unmountOnExit:r=true,timeout:a=300,...s},i)=>jsx(Ft,{ref:i,className:kc(Re.root,e),sx:o,"data-testid":"Collapse",unmountOnExit:r,timeout:a,...s,children:t}));zt.displayName="Collapse";var Rt=memo(zt);var kn="os-shared-Badge",De={root:`${kn}-root`},Ae="default",Dt={default:"#29b6f6",primary:"#1976d2",secondary:"#f50057",neutral:"#656565",gray:"#CFCFCF",orange:"#FFD503"};function Tn(e,o){let{base:t,grey:r,brand:a,success:s,warning:i,error:n,gradient:p}=o.v2.palette;if(e==="highlight")return p.brand;let d=Dt[e];return d||({inactive:r[100],active:alpha(t.black,.1),dark:a[500],red:n[500],success:s[500],warning:i[500],error:n[500]}[e]??t.white)}function Pn(e,o){let{base:t}=o.v2.palette;return e==="inactive"?t.black:(t.white)}var Et=styled("span",{shouldForwardProp:e=>!["$color","$compact","$round","$pointer"].includes(e)})(({theme:e,$color:o=Ae,$compact:t,$round:r,$pointer:a})=>{let s=Tn(o,e);return {paddingBlock:e.v2.spacing(2),paddingInline:t?"0.16056rem":r?"0.275rem":e.v2.spacing(4),borderRadius:t?e.v2.radius(4):r?e.v2.radius(16):e.v2.radius(48),background:s,color:Pn(o,e),fontSize:"8px",fontWeight:700,lineHeight:"10px",letterSpacing:0,overflow:"hidden",height:t?"12px":r?"16px":void 0,display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",cursor:a?"pointer":"auto"}});var Wt=forwardRef(({className:e,sx:o,color:t,state:r,compact:a,round:s,pointer:i,children:n,...p},d)=>{let c=t??r??Ae;return jsx(Et,{ref:d,className:kc(De.root,e),sx:o,"data-testid":"Badge",...p,$color:c,$compact:a,$round:s,$pointer:i,children:n})});Wt.displayName="Badge";var Ht=memo(Wt);var Fn="os-shared-Backdrop",Ee={root:`${Fn}-root`};var Vt=styled(zn,{shouldForwardProp:e=>e!=="$hasBlur"})(({theme:e,$hasBlur:o=false})=>{let t=o?e.v2.blur[6]:"none";return {zIndex:1,backgroundColor:alpha("#000",.3),backdropFilter:t,WebkitBackdropFilter:t}});var Ot=forwardRef(({className:e,sx:o,open:t=true,hasBlur:r=false,onClose:a,onClick:s,...i},n)=>{if(!t)return null;let p=d=>{a?.(),s?.(d);};return createPortal(jsx(Vt,{open:t,$hasBlur:r,ref:n,className:kc(Ee.root,e),sx:o,"data-testid":"Backdrop",onClick:p,...i}),document.body)});Ot.displayName="Backdrop";var Zt=memo(Ot);var We="os-shared-CopyButton",M={root:`${We}-root`,icon:`${We}-icon`,copyIcon:`${We}-copyIcon`,copiedIcon:`${We}-copiedIcon`};var Ut=e=>{let{v2:o}=useTheme(),{base:t}=o.palette;return jsx(eo,{sx:{height:12.6,width:13},...e,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.67 10.66 12.66",fill:"none",children:jsx("path",{d:"M11.3333 13.6978L11.3332 13.6979C11.1002 14.0479 10.7072 14.2582 10.2863 14.2582H5.83317C4.12559 14.2582 2.7415 12.8741 2.7415 11.1665V4.71338C2.7415 4.29279 2.95172 3.89983 3.30186 3.66641L3.5915 3.47331V11.1665C3.5915 12.4046 4.59508 13.4082 5.83317 13.4082H11.5264L11.3333 13.6978ZM4.40817 3.49984C4.40817 2.53467 5.20133 1.7415 6.1665 1.7415H11.4998C12.465 1.7415 13.2582 2.53467 13.2582 3.49984V10.8332C13.2582 11.7983 12.465 12.5915 11.4998 12.5915H6.1665C5.20133 12.5915 4.40817 11.7983 4.40817 10.8332V3.49984ZM11.4998 2.5915H6.1665C5.65901 2.5915 5.25817 2.99234 5.25817 3.49984V10.8332C5.25817 11.3407 5.65901 11.7415 6.1665 11.7415H11.4998C12.0073 11.7415 12.4082 11.3407 12.4082 10.8332V3.49984C12.4082 2.99234 12.0073 2.5915 11.4998 2.5915Z",fill:t.black,stroke:t.white,strokeWidth:"0.15"})})})},Yt=e=>{let{v2:o}=useTheme(),{success:t,base:r}=o.palette;return jsx(eo,{sx:{height:12.6,width:13},...e,children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"2 2 12.33 12.33",fill:"none",children:[jsx("path",{d:"M8.16646 2.00146C11.5718 2.00146 14.3315 4.76114 14.3315 8.16646C14.3315 11.5718 11.5718 14.3315 8.16646 14.3315C4.76114 14.3315 2.00146 11.5718 2.00146 8.16646C2.00146 4.76114 4.76114 2.00146 8.16646 2.00146Z",fill:t[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.984 5.89153C11.2107 6.10097 11.2247 6.45454 11.0152 6.68124L7.57351 10.4067C7.46772 10.5212 7.31891 10.5863 7.16302 10.5863C7.00713 10.5863 6.85832 10.5212 6.75253 10.4067L5.03167 8.54397C4.82222 8.31726 4.83622 7.9637 5.06293 7.75425C5.28963 7.54481 5.6432 7.55881 5.85264 7.78552L7.16302 9.20392L10.1943 5.92279C10.4037 5.69608 10.7573 5.68209 10.984 5.89153Z",fill:r.white})]})})};var Xt=styled("span")({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,flexShrink:0,cursor:"pointer",verticalAlign:"middle"}),ao=styled("span",{shouldForwardProp:e=>e!=="$visible"})(({$visible:e})=>({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:e?1:0,transition:"opacity 200ms ease"}));var _t=forwardRef(({className:e,sx:o,text:t,feedbackMs:r=2e3,icon:a=jsx(Ut,{}),onClick:s,...i},n)=>{let[p,d]=useState(false),c=u=>{u.stopPropagation(),ab(t),d(true),setTimeout(()=>d(false),r),s?.(u);};return jsxs(Xt,{ref:n,className:kc(M.root,e),sx:o,role:"button",tabIndex:0,"data-testid":"CopyButton",onClick:c,...i,children:[jsx(ao,{className:kc(M.icon,M.copyIcon),$visible:!p,children:a}),jsx(ao,{className:kc(M.icon,M.copiedIcon),$visible:p,children:jsx(Yt,{})})]})});_t.displayName="CopyButton";var qt=memo(_t);var so="os-shared-ProgressBar",_={root:`${so}-root`,fill:`${so}-fill`,text:`${so}-text`};var Qt=styled(pt,{shouldForwardProp:e=>!["$value","$isDecimal"].includes(e)})(({theme:e,$value:o,$isDecimal:t})=>{let{base:r}=e.v2.palette;return {width:`${o}%`,minWidth:o>=10?"28px":"24px",height:"18px",borderRadius:e.v2.radius(50),background:"linear-gradient(256deg, #147DC5 0%, #3DA6E1 100%)",display:"flex",alignItems:"center",justifyContent:o>10?"flex-end":"center",paddingInlineEnd:o>10?e.v2.spacing(2):e.v2.spacing(0),...o===0&&{background:alpha(r.black,26/255)},...t&&{minWidth:o>=10?"40px":"36px"}}}),er=styled(pt,{shouldForwardProp:e=>e!=="$value"})(({theme:e,$value:o})=>{let{base:t}=e.v2.palette;return {height:"14px",maxWidth:"36px",minWidth:"20px",background:alpha(t.black,26/255),borderRadius:e.v2.radius(50),display:"flex",alignItems:"center",justifyContent:"center",padding:0,...o===0&&{background:alpha(t.black,0)}}}),or=styled(vs,{shouldForwardProp:e=>e!=="$value"})(({theme:e,$value:o})=>{let{base:t,grey:r}=e.v2.palette;return {fontSize:"8px",fontWeight:e.typography.fontWeightBolder??700,color:t.white,padding:`${e.v2.spacing(2)} ${e.v2.spacing(4)}`,...o===0&&{color:alpha(r[500],.5)}}});var rr=forwardRef(({className:e,sx:o,value:t},r)=>{let a=!Number.isInteger(t);return jsx(Qt,{ref:r,className:kc(_.root,e),sx:o,"data-testid":"ProgressBar",$value:t,$isDecimal:a,children:jsx(er,{className:_.fill,$value:t,children:jsxs(or,{className:_.text,$value:t,variant:"caption",children:[Number(t.toFixed(2)),"%"]})})})});rr.displayName="ProgressBar";var ar=memo(rr);var Oe="os-shared-Chip",I={root:`${Oe}-root`,text:`${Oe}-text`,copyButton:`${Oe}-copyButton`,icon:`${Oe}-icon`},sr={text:{height:24,paddingBlock:4,paddingInline:8,borderRadius:48},circular:{height:24,width:24,padding:4,borderRadius:12},"pill-icon":{height:24,width:36,paddingBlock:4,paddingInline:6,borderRadius:12}};var lr=e=>{let{v2:o}=useTheme(),{base:t}=o.palette;return jsx(eo,{sx:{height:"10px"},...e,children:jsx("svg",{width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.924805 9.5C0.924805 10.7381 1.9289 11.7412 3.16699 11.7412H8.86035L8.66699 12.0312C8.43398 12.3812 8.04094 12.5917 7.62012 12.5918H3.16699C1.45941 12.5918 0.0751953 11.2076 0.0751953 9.5V3.04688C0.0751953 2.62628 0.28561 2.23342 0.635742 2L0.924805 1.80664V9.5ZM3.5 0.0751953H8.83301C9.79807 0.0751953 10.5916 0.867985 10.5918 1.83301V9.16699C10.5916 10.132 9.79807 10.9248 8.83301 10.9248H3.5C2.53494 10.9248 1.74139 10.132 1.74121 9.16699V1.83301C1.74139 0.867985 2.53494 0.0751953 3.5 0.0751953ZM3.5 0.924805C2.99261 0.924805 2.59197 1.32567 2.5918 1.83301V9.16699C2.59197 9.67433 2.99261 10.0752 3.5 10.0752H8.83301C9.3404 10.0752 9.74104 9.67433 9.74121 9.16699V1.83301C9.74104 1.32567 9.3404 0.924805 8.83301 0.924805H3.5Z",fill:t.black,stroke:t.white,strokeWidth:"0.15"})})})},pr=e=>{let{v2:o}=useTheme(),{success:t,base:r}=o.palette;return jsx(eo,{sx:{height:"10px"},...e,children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"2 2 12.33 12.33",fill:"none",children:[jsx("path",{d:"M8.16646 2.00146C11.5718 2.00146 14.3315 4.76114 14.3315 8.16646C14.3315 11.5718 11.5718 14.3315 8.16646 14.3315C4.76114 14.3315 2.00146 11.5718 2.00146 8.16646C2.00146 4.76114 4.76114 2.00146 8.16646 2.00146Z",fill:t[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.984 5.89153C11.2107 6.10097 11.2247 6.45454 11.0152 6.68124L7.57351 10.4067C7.46772 10.5212 7.31891 10.5863 7.16302 10.5863C7.00713 10.5863 6.85832 10.5212 6.75253 10.4067L5.03167 8.54397C4.82222 8.31726 4.83622 7.9637 5.06293 7.75425C5.28963 7.54481 5.6432 7.55881 5.85264 7.78552L7.16302 9.20392L10.1943 5.92279C10.4037 5.69608 10.7573 5.68209 10.984 5.89153Z",fill:r.white})]})})};function qn(e,o){let t=sr[e];return {height:t.height,..."width"in t&&{width:t.width,minWidth:t.width},..."padding"in t&&{padding:o.v2.spacing(t.padding)},..."paddingBlock"in t&&{paddingBlock:o.v2.spacing(t.paddingBlock)},..."paddingInline"in t&&{paddingInline:o.v2.spacing(t.paddingInline)},borderRadius:o.v2.radius(t.borderRadius)}}var cr=styled(pt,{shouldForwardProp:e=>!["$variant","$hasIcon","$hasCopy","$isSelected","$disableAnimation"].includes(e)})(({theme:e,$variant:o="text",$hasIcon:t,$hasCopy:r,$isSelected:a,$disableAnimation:s})=>{let{grey:i,base:n}=e.v2.palette;return {display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxSizing:"border-box",lineHeight:1,letterSpacing:0,whiteSpace:"nowrap",fontSize:11,fontWeight:e.typography.fontWeightRegular,color:n.black,border:`1px solid ${i[100]}`,backgroundColor:n.white,...qn(o,e),...o==="text"&&t&&{gap:e.v2.spacing(6),paddingInlineStart:e.v2.spacing(5),paddingInlineEnd:e.v2.spacing(8)},...r&&{gap:e.v2.spacing(4)},[`& .${I.icon}`]:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:14,height:14,overflow:"hidden","& img, & svg":{width:14,height:14,display:"block"}},...a&&{boxShadow:`${n.white} 7px 0px 8px 2px`},...s&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transition:"none !important",animation:"none !important",transform:"none !important"}}}}),io=styled(pt)({textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto"}),mr=styled("span",{shouldForwardProp:e=>e!=="$copied"})(({$copied:e})=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,flexShrink:0,cursor:"pointer",opacity:e?1:.6,transition:"opacity 150ms ease","&:hover":{opacity:1}})),lo=styled("span",{shouldForwardProp:e=>e!=="$visible"})(({$visible:e})=>({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:e?1:0,transition:"opacity 150ms ease"}));var ur=forwardRef(({className:e,sx:o,children:t,icon:r,variant:a="text",disabled:s=false,isSelected:i=false,copyText:n,unknownText:p="Unknown",disableAnimation:d=false,...c},u)=>{let[y,m]=useState(false),f=!!(t&&n),h=r!=null&&!f,x=useCallback(w=>{w.stopPropagation(),n&&(ab(n),m(true),setTimeout(()=>m(false),2e3));},[n]),N=useMemo(()=>h?jsx("span",{className:I.icon,children:r}):null,[h,r]),z=useMemo(()=>{if(t){let w=f&&typeof t=="string"?Zb(t):void 0;return jsx(io,{className:I.text,"data-is-arabic":w,children:t})}return h?null:jsx(io,{className:I.text,children:p})},[t,f,h,p]),R=useMemo(()=>f?jsxs(mr,{className:I.copyButton,role:"button",tabIndex:0,"aria-label":y?"copied":"copy","data-testid":"ChipCopyButton",$copied:y,onClick:x,children:[jsx(lo,{$visible:!y,children:jsx(lr,{})}),jsx(lo,{$visible:y,children:jsx(pr,{})})]}):null,[f,y,x]);return jsxs(cr,{ref:u,"data-testid":"Chip",className:kc(I.root,e,`CustomVariant_${a}`),sx:jc(s?{cursor:"not-allowed",opacity:.5}:{},o),$variant:a,$hasIcon:h,$hasCopy:f,$isSelected:i,$disableAnimation:d,...c,children:[N,z,R]})});ur.displayName="Chip";var yr=memo(ur);var co="os-shared-Slider",L={root:`${co}-root`,thumb:`${co}-thumb`,thumbIcon:`${co}-thumbIcon`};var gr=e=>{let{v2:o}=useTheme(),{grey:t}=o.palette;return jsx(eo,{sx:{width:"5px",height:"8px",pointerEvents:"none"},...e,children:jsxs("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M0.459961 0.460449L0.459961 6.59897",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"}),jsx("path",{d:"M2.44531 0.460388L2.44531 6.59891",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"}),jsx("path",{d:"M4.4375 0.460388L4.4375 6.59891",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"})]})})};var xr=styled(si)(({theme:e})=>{let{brand:o,base:t}=e.v2.palette,r=["0px 0px 1.25px 0px rgba(0, 0, 0, 0.1)","0px 1.25px 1.25px 0px rgba(0, 0, 0, 0.09)","0px 3.75px 2.5px 0px rgba(0, 0, 0, 0.05)","0px 7.5px 2.5px 0px rgba(0, 0, 0, 0.01)","0px 11.25px 3.75px 0px rgba(0, 0, 0, 0)"].join(", ");return {color:o[500],height:8,padding:0,"& .MuiSlider-rail":{backgroundColor:"#CFCFCF",opacity:1,left:0},"& .MuiSlider-thumb":{height:20,width:20,backgroundColor:t.white,border:"none",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:r,"&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:r}},[`& .${L.thumbIcon}`]:{width:"5px",height:"8px",pointerEvents:"none"}}});function ci({children:e,className:o,...t}){return jsxs(SliderThumb,{className:kc(L.thumb,o),...t,children:[e,jsx(gr,{className:L.thumbIcon})]})}var hr=forwardRef(({className:e,sx:o,value:t,min:r,max:a,step:s,disabled:i,onChange:n,slots:p,...d},c)=>{let u=useCallback((y,m)=>{n(m);},[n]);return jsx(xr,{ref:c,className:kc(L.root,e),sx:o,"data-testid":"Slider",value:t,min:r,max:a,step:s,disabled:i,onChange:u,...d,slots:{thumb:ci,...p}})});hr.displayName="Slider";var Cr=memo(hr);var v="os-shared-Input",g={root:`${v}-root`,label:`${v}-label`,input:`${v}-input`,loadingIcon:`${v}-loadingIcon`,validatedIcon:`${v}-validatedIcon`,hasLabel:`${v}-hasLabel`,sizeSm:`${v}-sizeSm`,sizeMd:`${v}-sizeMd`,disableFocusRing:`${v}-disableFocusRing`,hideArrows:`${v}-hideArrows`,hasTrailingIcon:`${v}-hasTrailingIcon`},T={sm:28,md:32,labelled:40};var vr=e=>{let{v2:o}=useTheme(),{success:t}=o.palette;return jsx(eo,{viewBox:"0 0 10 8",sx:{width:10,height:8},...e,children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:t[700]})})};var Nr=styled(Ci)(({theme:e})=>{let{base:o,grey:t}=e.v2.palette;return {height:T.md,padding:`0 ${e.v2.spacing(6)}`,paddingLeft:e.v2.spacing(8),border:"none",borderRadius:"inherit",fontSize:"11px",lineHeight:"1.3em",fontWeight:e.v2.typography.fontWeightMedium,color:o.black,backgroundColor:"transparent",display:"flex",alignItems:"center","&.Mui-disabled":{color:alpha(o.black,.6)},"& input":{padding:0},"& input::placeholder":{color:t[500],fontWeight:e.v2.typography.fontWeightRegular,opacity:1},"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus":{WebkitTextFillColor:o.black,caretColor:o.black,transition:"background-color 5000s ease-in-out 0s"},"&::before, &::after":{display:"none"},[`&:where(.${g.sizeSm})`]:{height:T.sm},[`&:where(.${g.sizeMd})`]:{height:T.md},[`&:where(.${g.hasTrailingIcon})`]:{paddingRight:e.v2.spacing(28)},[`&:where(.${g.hasLabel})`]:{height:T.labelled,padding:e.v2.spacing(6),paddingLeft:e.v2.spacing(8),paddingTop:e.v2.spacing(18),alignItems:"stretch",marginTop:0,"& input":{margin:"0px !important",padding:"0px !important",lineHeight:"130%"},"& input:focus::placeholder":{opacity:"1 !important"}},[`&:where(.${g.hideArrows})`]:{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}}}),wr=styled(hi)(({theme:e})=>{let{grey:o}=e.v2.palette;return {fontSize:"10px",lineHeight:"1em",color:`${o[500]} !important`,"&.Mui-disabled":{opacity:.7}}}),kr=styled(rs)(({theme:e})=>({position:"absolute",top:"30%",right:e.v2.spacing(8),color:e.v2.palette.grey[500]})),Ir=styled(pt)(({theme:e})=>({position:"absolute",top:"50%",right:e.v2.spacing(8),transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center"})),bi=`&:focus-within:where(:not(.${g.disableFocusRing})), &:where(.Mui-focused):where(:not(.${g.disableFocusRing}))`,Si="&:where(.Mui-warning):focus-within, &:where(.Mui-warning):where(.Mui-focused)",vi="&:where(.Mui-error):focus-within, &:where(.Mui-error):where(.Mui-focused)",Br=styled(xi)(({theme:e,disabled:o,fullWidth:t})=>{let{grey:r,base:a,brand:s,error:i,warning:n}=e.v2.palette;return {position:"relative",display:"flex",flexDirection:"column",width:t?"100%":"auto",height:T.md,margin:0,border:`1px solid ${o?"#FAFBFB":r[100]}`,borderRadius:e.v2.radius(4),backgroundColor:o?"#FAFBFB":a.white,transition:"border-color 0.15s ease, box-shadow 0.15s ease",[`&:where(.${g.sizeSm})`]:{height:T.sm},[`&:where(.${g.sizeMd})`]:{height:T.md},[`&:where(.${g.hasLabel})`]:{height:T.labelled},"&:where(.Mui-warning)":{borderColor:alpha(n[500],.15)},"&:where(.Mui-error)":{borderColor:alpha(i[500],.15)},"&:where(.Mui-disabled)":{borderColor:"#FAFBFB"},[bi]:{borderColor:s[500],boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`},[Si]:{borderColor:alpha(n[500],.15),boxShadow:"none"},[vi]:{borderColor:alpha(i[500],.15),boxShadow:"none"},"& .MuiFormLabel-asterisk":{color:i[500],fontSize:"10px",lineHeight:"1em",marginLeft:2},"& .MuiInputLabel-root":{position:"absolute",left:0,top:0,zIndex:1,pointerEvents:"none",padding:e.v2.spacing(8),fontSize:"10px",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"100%",transform:"translate(0, 6px) scale(1) !important",transformOrigin:"top left"},"& .MuiInputLabel-root.MuiInputLabel-shrink, & .MuiInputLabel-root.MuiFormLabel-filled, & .MuiInputLabel-root.Mui-focused":{transform:"translate(0, -2px) scale(0.95) !important",color:`${r[500]} !important`},"& .MuiInput-root":{flex:1,marginTop:"0 !important"}}});var Pr=forwardRef(({label:e,size:o="md",error:t=false,warning:r=false,disabled:a=false,fullWidth:s=false,placeholder:i,hideArrows:n=false,required:p,loading:d=false,validated:c=false,disableFocusRing:u=false,focused:y,type:m,id:f="Input",className:h,sx:x,value:N,defaultValue:z,onChange:R,endAdornment:w,onKeyDown:ge,onWheel:xe,...qe},D)=>{let $=!!e,Je=m==="number",ae=$&&d&&!a,wo=c&&!d&&!a,ko=ae||wo,he=o==="sm"?g.sizeSm:g.sizeMd,Ka=useCallback(C=>{typeof D=="function"?D(C):D&&(D.current=C);},[D]),Ua=useMemo(()=>kc(g.root,t&&"Mui-error",r&&"Mui-warning",a&&"Mui-disabled",$&&g.hasLabel,he,u&&g.disableFocusRing,y&&inputClasses.focused,h),[t,r,a,$,he,u,y,h]),Ya=useMemo(()=>kc(g.input,$&&g.hasLabel,he,n&&g.hideArrows,ko&&g.hasTrailingIcon),[$,he,n,ko]),Ga=C=>{let _a=C.metaKey||C.ctrlKey||C.altKey,qa=C.key.length===1;(["e","E","+","-"].includes(C.key)||xa$1()&&qa&&!_a&&!/^[0-9.]$/.test(C.key))&&C.preventDefault(),ge?.(C);},Xa=C=>{C.target instanceof HTMLElement&&C.target.blur(),xe?.(C);};return jsxs(Br,{className:Ua,sx:x,error:t,disabled:a,fullWidth:s,required:p,"data-testid":"Input",focused:y||void 0,children:[$&&jsx(wr,{className:g.label,htmlFor:f??void 0,required:p,shrink:y||void 0,children:e}),jsx(Nr,{id:f??void 0,inputRef:Ka,className:Ya,type:m,error:t,disabled:a,required:p,placeholder:i??void 0,"aria-invalid":t||void 0,disableUnderline:true,fullWidth:true,value:N,defaultValue:z,onChange:R,endAdornment:w,onKeyDown:Je?Ga:ge,onWheel:Je?Xa:xe,...qe}),ae&&jsx(kr,{className:g.loadingIcon,size:14.7,thickness:5}),wo&&jsx(Ir,{className:g.validatedIcon,children:jsx(vr,{})})]})});Pr.displayName="Input";var $r=memo(Pr);var mo="os-shared-Textarea",Q={root:`${mo}-root`,label:`${mo}-label`,textarea:`${mo}-textarea`},ee=3;var Mr=styled($i,{shouldForwardProp:e=>!["$error","$hasLabel","$minRows"].includes(e)})(({theme:e,$hasLabel:o=false,$minRows:t=ee})=>{let{base:r,grey:a}=e.v2.palette;return {border:"none",borderRadius:"inherit",padding:o?`${e.v2.spacing(32)} ${e.v2.spacing(8)} ${e.v2.spacing(8)}`:`${e.v2.spacing(8)} ${e.v2.spacing(12)}`,fontSize:"11px",fontWeight:e.typography.fontWeightMedium,lineHeight:"normal",color:r.black,backgroundColor:"transparent",alignItems:"flex-start",width:"100%",...o&&{marginTop:0},"&.Mui-disabled":{color:a[500]},"& textarea":{resize:"vertical",minHeight:o?void 0:`${Math.max(t*20,60)}px`,padding:0,margin:0},"& textarea::placeholder":{color:a[500],fontWeight:e.typography.fontWeightMedium,opacity:1},"& textarea:-webkit-autofill, & textarea:-webkit-autofill:hover, & textarea:-webkit-autofill:focus":{WebkitTextFillColor:r.black,caretColor:r.black,transition:"background-color 5000s ease-in-out 0s"},"&::before, &::after":{display:"none"}}}),Lr=styled(hi)(({theme:e})=>{let{grey:o}=e.v2.palette;return {fontSize:"10px",fontWeight:e.typography.fontWeightMedium,color:`${o[500]} !important`}}),Fr=styled(xi,{shouldForwardProp:e=>!["$hasLabel","$minRows"].includes(e)})(({theme:e,disabled:o,error:t,fullWidth:r,$hasLabel:a=false,$minRows:s=ee})=>{let{grey:i,base:n,error:p}=e.v2.palette,d=t?p[500]:i[100];return {position:"relative",display:"flex",flexDirection:"column",width:r?"100%":"auto",minHeight:a?96+(s-ee)*20:void 0,margin:0,border:`1px solid ${d}`,borderRadius:e.v2.radius(4),backgroundColor:o?i[100]:n.white,transition:"border-color 0.15s ease","&:focus-within":{borderColor:t?p[500]:i[50]},"& .MuiFormLabel-asterisk":{color:p[500]},"& .MuiInputLabel-root":{position:"absolute",left:0,top:0,zIndex:1,pointerEvents:"none",display:"flex",alignItems:"flex-start",gap:e.v2.spacing(2),padding:e.v2.spacing(8),fontSize:"10px",fontWeight:e.typography.fontWeightMedium,lineHeight:"100%",transform:"none !important",transformOrigin:"top left",color:`${i[500]} !important`},"& .MuiInputBase-root":{flex:1,marginTop:"0 !important"}}});var Rr=forwardRef(({label:e,error:o=false,disabled:t=false,fullWidth:r=false,placeholder:a,minRows:s=ee,maxRows:i,id:n,className:p,sx:d,required:c,...u},y)=>{let m=!!e;return jsxs(Fr,{className:kc(Q.root,p),sx:d,error:o,disabled:t,fullWidth:r,required:c,variant:"standard","data-testid":"Textarea",$hasLabel:m,$minRows:s,children:[m&&jsx(Lr,{className:Q.label,htmlFor:n,shrink:true,disableAnimation:true,required:c,children:e}),jsx(Mr,{id:n,inputRef:y,className:Q.textarea,multiline:true,minRows:s,maxRows:i,disabled:t,required:c,placeholder:a??void 0,"aria-invalid":o||void 0,fullWidth:true,$error:o,$hasLabel:m,$minRows:s,...u})]})});Rr.displayName="Textarea";var Dr=memo(Rr);var O="os-shared-Accordion",B={root:`${O}-root`,summary:`${O}-summary`,content:`${O}-content`,labelStartAdornment:`${O}-labelStartAdornment`,labelContent:`${O}-labelContent`,labelEndAdornment:`${O}-labelEndAdornment`,expandIcon:`${O}-expandIcon`};var Er=()=>{let{v2:e}=useTheme(),{base:o}=e.palette;return jsx("svg",{width:"9",height:"5",viewBox:"0 0 9 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.0501709 0.427246C0.0493864 0.478467 0.0592757 0.529176 0.0784912 0.57666C0.0976579 0.623937 0.125505 0.667471 0.161499 0.703613L3.82556 4.47803C3.86116 4.51465 3.90353 4.54403 3.95056 4.56396C3.99773 4.58391 4.04876 4.59422 4.09998 4.59424C4.15123 4.59424 4.20218 4.58392 4.24939 4.56396C4.29655 4.54401 4.33969 4.51476 4.37537 4.47803L8.03845 0.703613C8.07407 0.667816 8.10232 0.625348 8.12146 0.578613C8.14069 0.531638 8.15017 0.480932 8.14978 0.430176C8.14935 0.379519 8.13942 0.329298 8.11951 0.282715C8.09956 0.236042 8.06999 0.19405 8.03357 0.158691C7.99716 0.123349 7.95384 0.0952198 7.90662 0.0766602C7.8595 0.0582058 7.80878 0.0491929 7.75818 0.050293C7.70763 0.0514427 7.65792 0.0629948 7.61169 0.0834961C7.56537 0.104067 7.52346 0.13358 7.48865 0.17041L4.09998 3.65967L0.711304 0.17041C0.65912 0.115154 0.592066 0.0759001 0.517944 0.059082C0.443585 0.0422622 0.365385 0.0481013 0.294312 0.0756836C0.22324 0.103266 0.162075 0.15178 0.11853 0.214355C0.0750125 0.276905 0.05135 0.351058 0.0501709 0.427246Z",fill:o.black,stroke:o.black,strokeWidth:"0.1"})})};var Hr=styled(Ri)(({theme:e,square:o})=>{let{grey:t,base:r}=e.v2.palette;return {overflow:"hidden",border:`1px solid ${t[100]}`,...!o&&{borderRadius:e.v2.radius(8)},margin:0,background:r.white,"&:before":{content:"unset"},"&.Mui-expanded":{margin:0},"&.Mui-disabled":{opacity:.5,pointerEvents:"none"}}}),Vr=styled(Ai)(({theme:e})=>({background:"#fbfbfb",minHeight:"40px",height:"40px",padding:e.v2.spacing(10),"&.Mui-expanded":{minHeight:"40px",height:"40px"},"& .MuiAccordionSummary-content":{margin:0,display:"flex",flexDirection:"row",alignItems:"center",flexGrow:1,minWidth:0,gap:e.v2.spacing(10)},"& .MuiAccordionSummary-expandIconWrapper":{marginLeft:e.v2.spacing(8)}})),Or=styled(Di)(({theme:e})=>{let{grey:o}=e.v2.palette;return {padding:0,borderTop:`1px solid ${o[100]}`}}),Zr=styled(pt)({display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:"rotate(0deg)"}),jr=styled(pt)({minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});var Yr=forwardRef(({expanded:e,defaultExpanded:o=false,onChange:t,label:r,content:a,labelStartAdornment:s,labelEndAdornment:i,slotProps:n={},disabled:p=false,expandIcon:d,className:c,sx:u,...y},m)=>{let f=e!==void 0,[h,x]=useState(o),N=f?e:h,z=(Je,ae)=>{f||x(ae),t?.(ae);},{showArrow:R=true,...w}=n.label??{},{className:ge,sx:xe,...qe}=n.root??{},D=d??(R?jsx(Zr,{component:"span",className:B.expandIcon,children:jsx(Er,{})}):null),$=jsxs(Fragment,{children:[s!=null&&jsx(pt,{component:"span",className:B.labelStartAdornment,...n.labelStartAdornment,sx:jc({flexShrink:0},n.labelStartAdornment?.sx),children:s}),jsx(jr,{component:"span",className:B.labelContent,...n.labelContent,sx:n.labelContent?.sx,children:r}),i!=null&&jsx(pt,{component:"span",className:B.labelEndAdornment,...n.labelEndAdornment,sx:jc({flexShrink:0,marginLeft:"auto"},n.labelEndAdornment?.sx),children:i})]});return jsxs(Hr,{ref:m,"data-testid":"Accordion",disabled:p,expanded:N,onChange:z,className:kc(B.root,c,ge),sx:jc(u??{},xe),...qe,...y,children:[jsx(Vr,{className:B.summary,expandIcon:D,"aria-expanded":N,...w,children:$}),jsx(Or,{className:B.content,...n.content,children:a})]})});Yr.displayName="Accordion";var Gr=memo(Yr);var Xr="os-shared-Menu",de={popper:`${Xr}-popper`,panel:`${Xr}-panel`};var qr=styled(Zi)({}),Jr=styled(pt,{shouldForwardProp:e=>e!=="$showShadow"})(({theme:e,$showShadow:o})=>{let{grey:t,base:r}=e.v2.palette;return {borderRadius:e.v2.radius(4),background:r.white,width:"max-content",cursor:"pointer",boxShadow:e.v2.elevation[200],display:"flex",flexDirection:"column",overflowY:"auto",maxHeight:"432px","&:focus":{outline:"none"},".menu-item + .menu-item":{borderTop:`1px solid ${t[100]}`},"&::after":{content:o?'""':"none",width:"100%",height:"34px",position:"sticky",bottom:0,pointerEvents:"none",background:`linear-gradient(180deg, rgba(255,255,255,0) 0%, ${r.white} 100%)`}}});var ea=forwardRef(({open:e,anchorEl:o,children:t,placement:r,popperSx:a,panelProps:s,className:i,sx:n,...p},d)=>{let[c,u]=useState(false),m=useMemo(()=>Children.count(t),[t])>12&&c,{onScroll:f,className:h,sx:x,...N}=s??{},z=useCallback(w=>{u((w.currentTarget.scrollTop??0)>0),f?.(w);},[f]),R=kc(de.panel,h,"MuiPopper-dropdown");return jsx(qr,{ref:d,className:kc(de.popper,i),"data-testid":"Menu",open:e,anchorEl:o,placement:r??"bottom-start",sx:a,...p,children:jsx(Jr,{$showShadow:m,onScroll:z,className:R,sx:jc(n??{},x),...N,children:t})})});ea.displayName="Menu";var oa=memo(ea);var ce="os-shared-Dialog",F={root:`${ce}-root`,title:`${ce}-title`,divider:`${ce}-divider`,content:`${ce}-content`,actions:`${ce}-actions`};var ta=styled(_i,{shouldForwardProp:e=>e!=="$hasBlurBackdrop"})(({theme:e,$hasBlurBackdrop:o})=>{let{base:t}=e.v2.palette,r=o?e.v2.blur[6]:"none";return {"& .MuiDialog-paper":{backgroundColor:t.white,boxShadow:"0px 0px 16px 0px rgba(0, 0, 0, 0.11)",borderRadius:e.v2.radius(8)},"& .MuiModal-backdrop":{background:alpha("#000",.2),...o&&{backdropFilter:r,WebkitBackdropFilter:r}}}}),ra=styled(Qi)(({theme:e})=>{let{base:o}=e.v2.palette;return {padding:`${e.v2.spacing(16)} ${e.v2.spacing(16)} ${e.v2.spacing(12)}`,fontSize:"13px",fontWeight:e.typography.fontWeightBolder,lineHeight:"normal",color:o.black,whiteSpace:"nowrap"}}),aa=styled("hr")(({theme:e})=>{let{grey:o}=e.v2.palette;return {display:"block",border:"none",borderTop:`1px solid ${o[100]}`,margin:0,width:"100%",flexShrink:0}}),sa=styled(Ji,{shouldForwardProp:e=>e!=="$hasHeading"})(({theme:e,$hasHeading:o})=>{let{grey:t}=e.v2.palette;return {padding:`${o?e.v2.spacing(12):e.v2.spacing(16)} ${e.v2.spacing(16)} ${e.v2.spacing(16)}`,fontSize:"12px",fontWeight:e.typography.fontWeightMedium,lineHeight:"normal",color:t[500]}}),na=styled(qi)(({theme:e})=>({padding:`0 ${e.v2.spacing(16)} ${e.v2.spacing(16)}`,gap:e.v2.spacing(8),justifyContent:"flex-end","& > :not(style) ~ :not(style)":{marginLeft:0}}));var la=forwardRef(({heading:e,actions:o,children:t,onClose:r,open:a,hasBlurBackdrop:s,className:i,sx:n,...p},d)=>jsxs(ta,{ref:d,"data-testid":"Dialog",open:a,onClose:r,$hasBlurBackdrop:s,className:kc(F.root,i),sx:n,...p,children:[e?jsxs(Fragment,{children:[jsx(ra,{className:F.title,children:e}),jsx(aa,{"aria-hidden":true,className:F.divider})]}):null,t!=null?jsx(sa,{className:F.content,$hasHeading:!!e,children:t}):null,o?jsx(na,{className:F.actions,children:o}):null]}));la.displayName="Dialog";var pa=memo(la);var uo="os-shared-MenuItem",j={root:`${uo}-root`,indicator:`${uo}-indicator`,disabled:`${uo}-disabled`},K={unchecked:"unchecked",checked:"checked",indeterminate:"indeterminate"};var ca=()=>{let{v2:e}=useTheme(),{brand:o,base:t}=e.palette;return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"0.6",y:"0.6",width:"10.8",height:"10.8",rx:"2.4",fill:o[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83391 3.74245C9.04243 3.94469 9.05652 4.2875 8.86537 4.50814L5.64586 8.22426C5.55146 8.33322 5.41909 8.39666 5.27942 8.39987C5.13975 8.40308 5.0049 8.34579 4.90612 8.24127L3.15002 6.38321C2.94999 6.17157 2.94999 5.82843 3.15002 5.61679C3.35004 5.40516 3.67435 5.40516 3.87437 5.61679L5.2522 7.07463L8.11024 3.77574C8.30138 3.55511 8.62538 3.5402 8.83391 3.74245Z",fill:t.white})]})},ma=()=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("rect",{x:"1.19998",y:"1.19998",width:"9.6",height:"9.6",rx:"1.8",fill:"#FAFBFB",stroke:"#D2D5D8",strokeWidth:"1.2"})}),fa=()=>{let{v2:e}=useTheme(),{brand:o}=e.palette;return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"2.4",fill:o[500],stroke:o[500],strokeWidth:"1.2"}),jsx("rect",{x:"3",y:"5.4",width:"6",height:"1.2",rx:"0.5",fill:"#FAFBFB"})]})};var ga=styled(pt,{shouldForwardProp:e=>e!=="$isDisabled"})(({theme:e,$isDisabled:o=false})=>{let{base:t}=e.v2.palette;return {padding:e.v2.spacing(8),position:"relative",display:"flex",alignItems:"center",gap:e.v2.spacing(8),textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:e.typography.subtitle1.fontSize,opacity:o?.5:1,color:t.black}}),yo=styled("span")({width:14,height:14,flexShrink:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center","& svg":{display:"block"}});function il(e,o){return o?K.indeterminate:e?K.checked:K.unchecked}var ll={[K.unchecked]:ma,[K.checked]:ca,[K.indeterminate]:fa};function pl(e,o,t){if(e===null)return null;if(e!==void 0)return jsx(yo,{className:j.indicator,"aria-hidden":true,children:e});let r=il(o,t),a=ll[r];return jsx(yo,{className:j.indicator,"aria-hidden":true,children:jsx(a,{})})}var xa=forwardRef(({isSelected:e=false,isDisabled:o=false,isIndeterminate:t=false,startAdornment:r,onClick:a,children:s,className:i,sx:n,...p},d)=>{let c=kc(j.root,"menu-item",o&&j.disabled,i);return jsxs(ga,{ref:d,"data-testid":"MenuItem",className:c,sx:n,onClick:o?void 0:a,$isDisabled:o,...p,children:[pl(r,e,t),s]})});xa.displayName="MenuItem";var ha=memo(xa);var Ca="os-shared-ToggleButtons",fe={root:`${Ca}-root`,button:`${Ca}-button`},xo={sm:"sm",md:"md"},ue=xo.sm,ho={sm:{buttonHeight:20,minWidth:20,fontSize:8,containerRadius:3,iconSlot:11},md:{buttonHeight:28,minWidth:28,fontSize:11,containerRadius:4,iconSlot:14}};function cl(e,o){let{palette:t,elevation:r}=e.v2;return o?{backgroundColor:t.background.primary,boxShadow:r[100],color:t.foreground.primary}:{backgroundColor:"transparent",boxShadow:"none",color:t.foreground.secondary}}var va=styled(pt,{shouldForwardProp:e=>e!=="$size"})(({theme:e,$size:o=ue})=>{let t=ho[o];return {backgroundColor:e.v2.palette.background.secondary,display:"inline-flex",alignItems:"center",padding:e.v2.spacing(2),borderRadius:e.v2.radius(t.containerRadius)}}),Na=styled(pt,{shouldForwardProp:e=>e!=="$isActive"&&e!=="$size"})(({theme:e,$isActive:o=false,$size:t=ue})=>{let r=ho[t];return {boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,height:r.buttonHeight,width:"auto",minWidth:r.minWidth,borderRadius:e.v2.radius(2),fontSize:r.fontSize,fontWeight:e.typography.fontWeightMedium,lineHeight:1,letterSpacing:0,whiteSpace:"nowrap",cursor:"pointer",transition:"background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease",...cl(e,o),"& img, & svg":{width:r.iconSlot,height:r.iconSlot,display:"block"}}});function ka({options:e,activeKey:o,onChange:t,size:r=ue,containerProps:a,buttonProps:s,id:i,className:n,sx:p},d){let{className:c,sx:u,...y}=a??{},m=kc(fe.root,n,c);return jsx(va,{ref:d,id:i,"data-testid":"ToggleButtons",className:m,$size:r,sx:jc(p??{},u),...y,children:e.map(f=>jsx(Na,{className:fe.button,$isActive:o===f.key,$size:r,onClick:()=>t(f.key),...s,children:f.content},f.key))})}var ul=forwardRef(ka);ka.displayName="ToggleButtons";var Ia=memo(ul);var yl="os-shared-LazyImage",Ue={root:`${yl}-root`},Ye={opacity:()=>import('react-lazy-load-image-component/src/effects/opacity.css'),blur:()=>import('react-lazy-load-image-component/src/effects/blur.css'),"black-and-white":()=>import('react-lazy-load-image-component/src/effects/black-and-white.css')};var Ba=styled(pt)({display:"inline-flex",justifyContent:"center",alignItems:"center"});function Ge(e){return e!=null&&e in Ye}var Nl=LazyLoadImage,Pa=forwardRef(({effect:e,wrapperProps:o,id:t,className:r,sx:a,placeholderSrc:s,...i},n)=>{let[p,d]=useState(Ge(e));if(useEffect(()=>{if(!Ge(e)){d(false);return}d(true),Ye[e]().finally(()=>{d(false);});},[e]),p)return null;let{className:c,sx:u,style:y,...m}=o??{},f=Ge(e)||!!s||y!=null;return jsx(Ba,{component:"span",...m,className:kc(Ue.root,c??r),sx:u!=null?jc(a??{},u):a,children:jsx(Nl,{...i,ref:n,effect:e,placeholderSrc:s,id:t,"data-testid":"LazyImage",wrapperProps:f?{style:{display:"flex",justifyContent:"center",alignItems:"center",...y}}:void 0})})});Pa.displayName="LazyImage";var $a=memo(Pa);var Co="os-shared-FieldFeedback",te={root:`${Co}-root`,icon:`${Co}-icon`,message:`${Co}-message`};var Ma=({severity:e="error",...o})=>{let t=useTheme(),{warning:r,error:a}=t.v2.palette,s=e==="warning"?r[500]:a[500];return jsx(eo,{sx:{width:12,height:12},...o,children:jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:s})})})},La=e=>{let{v2:o}=useTheme(),{success:t}=o.palette;return jsx(eo,{sx:{width:12,height:12},...e,children:jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:t[700]})})})},Fa=e=>{let{v2:o}=useTheme(),{base:t}=o.palette;return jsx(eo,{sx:{width:12,height:12},...e,children:jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:t.black,strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})})})};function Xe(e,o){let t=o??"error",{brand:r,success:a,error:s,status:i}=e.v2.palette;switch(t){case "warning":return {borderColor:i.warning.subtle,backgroundColor:i.warning.subtle,textColor:i.warning.default};case "success":return {borderColor:alpha(a[700],.15),backgroundColor:alpha(a[700],.15),textColor:a[700]};case "info":return {borderColor:alpha(r[500],.12),backgroundColor:alpha(r[500],.12),textColor:r[500]};case "error":return {borderColor:alpha(s[500],.15),backgroundColor:alpha(s[500],.15),textColor:s[500]};default:return t}}var za=styled("div",{shouldForwardProp:e=>e!=="$feedbackType"})(({theme:e,$feedbackType:o})=>{let{backgroundColor:t,textColor:r}=Xe(e,o);return {display:"flex",alignItems:"flex-start",gap:e.v2.spacing(4),minHeight:"32px",padding:`${e.v2.spacing(8)} ${e.v2.spacing(12)}`,background:t,color:r,borderRadius:`0 0 ${e.v2.radius(4)} ${e.v2.radius(4)}`}}),Ra=styled("div",{shouldForwardProp:e=>e!=="$feedbackType"})(({theme:e,$feedbackType:o})=>{let{textColor:t}=Xe(e,o);return {fontSize:"10px",lineHeight:"16px",display:"block",color:t,wordBreak:"break-word"}}),Da=styled("span")({width:12,height:12,flexShrink:0,marginTop:"2px",display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}});function Il(e){switch(e){case "success":return jsx(La,{});case "info":return jsx(Fa,{});case "error":case "warning":return jsx(Ma,{severity:e})}}var Aa=forwardRef(({type:e="error",message:o,icon:t,className:r,sx:a},s)=>{if(!zc(o))return null;let i=e;return jsxs(za,{ref:s,"data-testid":"FieldFeedback",className:kc(te.root,r),sx:a,$feedbackType:i,children:[t??jsx(Da,{className:te.icon,children:Il(i)}),jsx(Ra,{className:te.message,$feedbackType:i,children:o})]})});Aa.displayName="FieldFeedback";var Ea=memo(Aa);var Tl="os-shared-ScrollLoader",_e={root:`${Tl}-root`};var Wa=styled(Pl)({overflow:"auto",height:"100%",maxHeight:"100%"});function No(e,o=50){return e.scrollHeight-(e.scrollTop+e.clientHeight)<=o}var Za=forwardRef(({loadMoreItems:e,hasMore:o,isLoading:t=false,isFetchingNextPage:r,children:a,className:s,sx:i,id:n,...p},d)=>{let[c,u]=useState(false),y=useRef(e),m=useRef(null);y.current=e;let f=useCallback(()=>{o&&!r&&y.current();},[o,r]),h=useCallback(()=>{let x=m.current;x&&No(x)&&f();},[f]);return useEffect(()=>{let x=m.current;if(x)return x.addEventListener("scroll",h),()=>x.removeEventListener("scroll",h)},[h]),useEffect(()=>{let x=m.current;if(!x||t||c)return;let N=window.setTimeout(()=>{u(true),No(x)&&f();},1e3);return ()=>window.clearTimeout(N)},[t,f,c]),jsx(Wa,{ref:x=>{m.current=x,typeof d=="function"?d(x):d&&(d.current=x);},id:n,"data-testid":"ScrollLoader",className:kc(_e.root,s),sx:i,...p,children:a})});Za.displayName="ScrollLoader";var ja=memo(Za);
|
|
2
|
+
export{te as $,Ee as A,Zt as B,M as C,qt as D,_ as E,ar as F,I as G,yr as H,L as I,Cr as J,g as K,$r as L,Q as M,Dr as N,B as O,Gr as P,de as Q,oa as R,F as S,pa as T,j as U,ha as V,fe as W,xo as X,Ia as Y,Ue as Z,$a as _,k as a,Xe as aa,Ao as b,Ea as ba,be as c,_e as ca,Ho as d,ja as da,E as e,Xo as f,Se as g,Jo as h,ve as i,ot as j,we as k,lt as l,W as m,yt as n,b as o,St as p,$e as q,wt as r,Me as s,Pt as t,ze as u,Lt as v,Re as w,Rt as x,De as y,Ht as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-XHGBX3FD.js';import {z}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Rh}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=yc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Rh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {k,l}from'./chunk-
|
|
1
|
+
import {k,l}from'./chunk-TEJUDCOU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {memo,useId,useMemo}from'react';import E from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import F from'@mui/material/FormControlLabel';import {FormControl,FormLabel,Stack}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(F,{shouldForwardProp:o=>!["size","showHoverEffects","labelSx"].includes(o)})(({size:o="small",showHoverEffects:a=true,labelSx:r})=>({margin:"0",width:"100%",cursor:"pointer",padding:o==="small"?"7.5px 16px 7.5px 8px":o==="medium"?"9px 16px 9px 10px":"11px 16px 11px 12px",maxHeight:o==="small"?"35px":o==="medium"?"40px":"45px",...a&&{"&:hover":{boxShadow:"0px 0px 16px 0px #00000021",borderLeft:"1px solid transparent"}},"& .MuiFormControlLabel-label":{fontSize:o==="small"?"11px":o==="medium"?"13px":"15px",fontWeight:"500",color:"#20232B",width:"100%",cursor:"pointer",...r},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:"#1F88D0"}}}));function B({option:o,size:a="small",customLabelRenderer:r,labelPosition:m="end",showHoverEffects:i=true,customRadioProps:s,labelSx:n,icon:l$1,...d}){let p=r?r(o):o.label,u=useMemo(()=>l$1?jsxs(Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[p,jsx("img",{alt:"icon",...l$1})]}):p,[l$1,p]);return jsx(h,{value:o.value,control:jsx(l,{...s,...o.customProps}),label:u,disabled:o.disabled,size:a,labelPlacement:m,showHoverEffects:i,labelSx:n,...d})}function R({options:o,onOptionChange:a,size:r="small",customLabelRenderer:m,layout:i="vertical",spacing:s=0,labelPosition:n="end",showHoverEffects:l=true,customRadioProps:d,labelSx:p,onChange:u,title:c,sx:S,...v}){let w=e=>{let x=e.target.value;a?.(x),u?.(e,x);},P=yc(useId(),"radio-group");return jsxs(FormControl,{id:P,"data-testid":"RadioGroup",children:[typeof c=="string"?jsx(FormLabel,{children:c}):c,jsx(E,{onChange:w,sx:{display:"flex",flexDirection:i==="horizontal"?"row":"column",gap:s,...S},...v,children:o.map(e=>jsx(B,{icon:e.icon,option:e,size:r,customLabelRenderer:m,labelPosition:n,showHoverEffects:l,customRadioProps:d,labelSx:p},e.value))})]})}R.displayName="RadioGroup";var D=memo(R);export{D as a};
|