@tap-payments/os-micro-frontend-shared 0.3.140 → 0.3.141-test.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/build/_chunks/{chunk-6UPDM2WE.js → chunk-26X2QDIZ.js} +1 -1
  2. package/build/_chunks/{chunk-SOXST4T3.js → chunk-2A6TDC47.js} +1 -1
  3. package/build/_chunks/{chunk-TYPM2WYP.js → chunk-2DNDTLLZ.js} +1 -1
  4. package/build/_chunks/{chunk-RJO7TCTU.js → chunk-2EP66PGZ.js} +1 -1
  5. package/build/_chunks/{chunk-PBMQM3P4.js → chunk-3DEK3VMQ.js} +1 -1
  6. package/build/_chunks/{chunk-X76LM2CC.js → chunk-3N5EFV6R.js} +1 -1
  7. package/build/_chunks/chunk-3SDLWU5F.js +1 -0
  8. package/build/_chunks/{chunk-XDF5N4MY.js → chunk-42QLPMZV.js} +1 -1
  9. package/build/_chunks/chunk-44NSVGTZ.js +2 -0
  10. package/build/_chunks/{chunk-4O6B4TJT.js → chunk-4BUA2QQL.js} +1 -1
  11. package/build/_chunks/{chunk-7TSAQQ6X.js → chunk-4FCNPLZG.js} +1 -1
  12. package/build/_chunks/{chunk-D5YSUEGQ.js → chunk-4HFCDGS2.js} +1 -1
  13. package/build/_chunks/{chunk-UM23ZVS4.js → chunk-4NDUFOET.js} +1 -1
  14. package/build/_chunks/{chunk-OCAA7Q56.js → chunk-4WVB6I3B.js} +1 -1
  15. package/build/_chunks/{chunk-YD22TNQC.js → chunk-6DB5DCD6.js} +1 -1
  16. package/build/_chunks/{chunk-ZZUSTQRD.js → chunk-6GTP4QNX.js} +1 -1
  17. package/build/_chunks/{chunk-27PEAXSC.js → chunk-76AKRFM2.js} +1 -1
  18. package/build/_chunks/chunk-76GSE55B.js +1 -0
  19. package/build/_chunks/{chunk-C63DP3JW.js → chunk-7FNYYT7E.js} +1 -1
  20. package/build/_chunks/{chunk-JYK67QST.js → chunk-7KJNUQN2.js} +1 -1
  21. package/build/_chunks/chunk-7WBGX4G2.js +1 -0
  22. package/build/_chunks/chunk-A4OGYKRA.js +1 -0
  23. package/build/_chunks/{chunk-AFMSDBMP.js → chunk-ANRTTYBC.js} +1 -1
  24. package/build/_chunks/{chunk-Q4VBWEYF.js → chunk-ANSCJOPD.js} +1 -1
  25. package/build/_chunks/{chunk-O475D763.js → chunk-AWXSWEQK.js} +1 -1
  26. package/build/_chunks/{chunk-PS6BDSMF.js → chunk-BYXHDBRH.js} +1 -1
  27. package/build/_chunks/{chunk-CJCMW3WE.js → chunk-C4WGRJO5.js} +1 -1
  28. package/build/_chunks/{chunk-M6ZEZZWU.js → chunk-CJ45PDXI.js} +1 -1
  29. package/build/_chunks/{chunk-2WH2W6XU.js → chunk-CO26NRJZ.js} +1 -1
  30. package/build/_chunks/{chunk-GZ5QEWHN.js → chunk-CVRYGTK4.js} +1 -1
  31. package/build/_chunks/chunk-D3SBM7BQ.js +1 -0
  32. package/build/_chunks/{chunk-QNIQVNVB.js → chunk-DOFDGBYH.js} +1 -1
  33. package/build/_chunks/{chunk-KGRLMTLG.js → chunk-DPEMZNEQ.js} +1 -1
  34. package/build/_chunks/{chunk-GLYU6JBK.js → chunk-E2PNATKN.js} +1 -1
  35. package/build/_chunks/{chunk-RSGOF4ZP.js → chunk-EFOU275F.js} +1 -1
  36. package/build/_chunks/{chunk-XJ5VI4DZ.js → chunk-ERRJ4BP4.js} +1 -1
  37. package/build/_chunks/chunk-FDQQZEKM.js +2 -0
  38. package/build/_chunks/{chunk-KB5U6UNE.js → chunk-GCZCHR4N.js} +1 -1
  39. package/build/_chunks/{chunk-R7CQRIWR.js → chunk-GK5XYLI6.js} +1 -1
  40. package/build/_chunks/{chunk-E6NI5QPD.js → chunk-GYUHGXEU.js} +1 -1
  41. package/build/_chunks/{chunk-PWTJCPZV.js → chunk-HMO7CF5S.js} +1 -1
  42. package/build/_chunks/{chunk-BYI3MI3T.js → chunk-HSOVSX6F.js} +1 -1
  43. package/build/_chunks/{chunk-4K5SHVMO.js → chunk-ICEV6PDC.js} +1 -1
  44. package/build/_chunks/{chunk-ILUYYGQX.js → chunk-IDZ5WXGH.js} +1 -1
  45. package/build/_chunks/{chunk-JVGLQVAO.js → chunk-IJD4D5CR.js} +1 -1
  46. package/build/_chunks/{chunk-6EGML2YS.js → chunk-IKVZEKSV.js} +1 -1
  47. package/build/_chunks/{chunk-OP3KS45Z.js → chunk-IPLWIKCP.js} +1 -1
  48. package/build/_chunks/{chunk-4EC5BXN5.js → chunk-IPRSP76J.js} +1 -1
  49. package/build/_chunks/{chunk-DY2GU5YF.js → chunk-JOTP742F.js} +1 -1
  50. package/build/_chunks/{chunk-Z33JRY6D.js → chunk-JT4EGYXG.js} +1 -1
  51. package/build/_chunks/chunk-JZBCAV3A.js +1 -0
  52. package/build/_chunks/{chunk-UCLIFC75.js → chunk-KAUGR7FX.js} +1 -1
  53. package/build/_chunks/{chunk-4W3DKEZ5.js → chunk-KIKOTBBS.js} +1 -1
  54. package/build/_chunks/{chunk-FEWA6JK6.js → chunk-KN67TZOP.js} +1 -1
  55. package/build/_chunks/{chunk-HQHSHQX6.js → chunk-LM2B4ZZN.js} +1 -1
  56. package/build/_chunks/{chunk-JGMTLSTD.js → chunk-LX4UJQPK.js} +1 -1
  57. package/build/_chunks/{chunk-LXDQO3QN.js → chunk-LYMFBQ3K.js} +1 -1
  58. package/build/_chunks/{chunk-AO3TIZWU.js → chunk-MD4RPGPC.js} +1 -1
  59. package/build/_chunks/{chunk-KND7IMY3.js → chunk-MNGTWMNE.js} +1 -1
  60. package/build/_chunks/{chunk-YPGWSHOT.js → chunk-MQP3RGOO.js} +1 -1
  61. package/build/_chunks/chunk-MRUJOFZG.js +1 -0
  62. package/build/_chunks/{chunk-M6I6JO45.js → chunk-MZZHNXFY.js} +1 -1
  63. package/build/_chunks/{chunk-JQCJIDQ4.js → chunk-NDDWP2W2.js} +1 -1
  64. package/build/_chunks/{chunk-6U7EJHUF.js → chunk-OKMGLRQH.js} +1 -1
  65. package/build/_chunks/{chunk-SGDOIQUE.js → chunk-OZCB4LRC.js} +1 -1
  66. package/build/_chunks/{chunk-4E3GQAEV.js → chunk-P4Y6N3FP.js} +1 -1
  67. package/build/_chunks/{chunk-HIS4FWVF.js → chunk-PGUR5Q2O.js} +1 -1
  68. package/build/_chunks/{chunk-BNLDICQZ.js → chunk-PJEL3HPC.js} +1 -1
  69. package/build/_chunks/{chunk-PP6VXDK5.js → chunk-PTEY6JXB.js} +1 -1
  70. package/build/_chunks/{chunk-MSDW6ZF5.js → chunk-PU5P3CN7.js} +1 -1
  71. package/build/_chunks/{chunk-NWZ5GMZE.js → chunk-Q5EV6TG2.js} +1 -1
  72. package/build/_chunks/{chunk-LQ7Y4QFG.js → chunk-Q6IEHGQD.js} +1 -1
  73. package/build/_chunks/{chunk-66ARGWP3.js → chunk-QBA6HFPM.js} +1 -1
  74. package/build/_chunks/{chunk-E72L4ZPZ.js → chunk-QEZJT5RA.js} +1 -1
  75. package/build/_chunks/{chunk-ELY5NPD2.js → chunk-R7C3A4DY.js} +1 -1
  76. package/build/_chunks/{chunk-4ZHKYAPE.js → chunk-RAXGZLYL.js} +1 -1
  77. package/build/_chunks/{chunk-X7FCRXJT.js → chunk-RDFP7UOB.js} +1 -1
  78. package/build/_chunks/{chunk-YNXTCKWE.js → chunk-RKI6YGH3.js} +1 -1
  79. package/build/_chunks/{chunk-SAKH62QT.js → chunk-RTTJS2GK.js} +1 -1
  80. package/build/_chunks/{chunk-MKGIB6QH.js → chunk-SK7JK4ZQ.js} +1 -1
  81. package/build/_chunks/{chunk-B52ODJPT.js → chunk-SKODAEHC.js} +1 -1
  82. package/build/_chunks/{chunk-EMCP5C5Z.js → chunk-SM2ES6ON.js} +1 -1
  83. package/build/_chunks/chunk-TCCSCXO3.js +15 -0
  84. package/build/_chunks/{chunk-XLBSXVLI.js → chunk-U4DABUQZ.js} +1 -1
  85. package/build/_chunks/{chunk-62LNYFD7.js → chunk-U7JURV4R.js} +1 -1
  86. package/build/_chunks/{chunk-ARKBRYDY.js → chunk-UFMYC3MD.js} +1 -1
  87. package/build/_chunks/{chunk-A2XBZDNA.js → chunk-UFOWAL4X.js} +1 -1
  88. package/build/_chunks/{chunk-CVNAIZE7.js → chunk-UU7B4YVX.js} +1 -1
  89. package/build/_chunks/{chunk-US277TBU.js → chunk-VBDAG35Q.js} +1 -1
  90. package/build/_chunks/{chunk-VCEXKZLV.js → chunk-VFVEJSY6.js} +1 -1
  91. package/build/_chunks/{chunk-R7JOBHPA.js → chunk-VFW4ZTZO.js} +1 -1
  92. package/build/_chunks/{chunk-6ENECW22.js → chunk-VQ5JQ5KI.js} +1 -1
  93. package/build/_chunks/{chunk-TWNWCQ5K.js → chunk-VUW3QQTI.js} +1 -1
  94. package/build/_chunks/{chunk-7TR2MF6I.js → chunk-VZLSGUYL.js} +1 -1
  95. package/build/_chunks/{chunk-3G2C5Y2A.js → chunk-WI5EN5Y4.js} +1 -1
  96. package/build/_chunks/{chunk-LPUD53T5.js → chunk-WQZQGDP6.js} +1 -1
  97. package/build/_chunks/{chunk-4ZIKTG6Z.js → chunk-WRLD3NRV.js} +1 -1
  98. package/build/_chunks/{chunk-5UYOKES2.js → chunk-X7FUGT4C.js} +1 -1
  99. package/build/_chunks/{chunk-K4ASYA5P.js → chunk-XIMGDQEW.js} +1 -1
  100. package/build/_chunks/{chunk-CIV3P5GB.js → chunk-XMRZMDYD.js} +1 -1
  101. package/build/_chunks/{chunk-LVBP2HUK.js → chunk-Y3SMTVVZ.js} +1 -1
  102. package/build/_chunks/{chunk-GHOCZXVJ.js → chunk-YZIEMRA4.js} +1 -1
  103. package/build/_chunks/{chunk-CIJEAB6O.js → chunk-ZU7KFHTY.js} +1 -1
  104. package/build/_chunks/{chunk-BDIEMNAU.js → chunk-ZYKVUPVB.js} +1 -1
  105. package/build/components/AccountDropdown/index.js +1 -1
  106. package/build/components/ActionMenu/index.js +1 -1
  107. package/build/components/ActionsDropdownMenu/index.js +1 -1
  108. package/build/components/ActiveFilterChip/index.js +1 -1
  109. package/build/components/ActivityAreaChart/index.js +1 -1
  110. package/build/components/Amount/index.js +1 -1
  111. package/build/components/AmountConversionFilter/index.js +1 -1
  112. package/build/components/AmountInput/index.js +1 -1
  113. package/build/components/AmountSlider/index.js +1 -1
  114. package/build/components/AmountStatusChip/index.js +1 -1
  115. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  116. package/build/components/AppServices/index.js +1 -1
  117. package/build/components/AppServicesBar/index.js +1 -1
  118. package/build/components/AppWindowWrapper/index.js +1 -1
  119. package/build/components/AuthenticationTypeChip/index.js +1 -1
  120. package/build/components/Autocomplete/index.js +1 -1
  121. package/build/components/BetaBanner/index.js +1 -1
  122. package/build/components/BrandLogo/index.js +1 -1
  123. package/build/components/Button/index.js +1 -1
  124. package/build/components/Calender/index.js +1 -1
  125. package/build/components/CardEmptyState/index.js +1 -1
  126. package/build/components/Chip/index.js +1 -1
  127. package/build/components/ChipStack/index.js +1 -1
  128. package/build/components/CircularProgressWithLabel/index.js +1 -1
  129. package/build/components/Collapse/index.js +1 -1
  130. package/build/components/ColorPicker/index.js +1 -1
  131. package/build/components/ColumnViews/index.js +1 -1
  132. package/build/components/ConfirmDialog/index.js +1 -1
  133. package/build/components/CopyImage/index.js +1 -1
  134. package/build/components/CountryFilter/index.js +1 -1
  135. package/build/components/CountryFlag/index.js +1 -1
  136. package/build/components/CurrencyAmount/index.js +1 -1
  137. package/build/components/CurrencyFilter/index.js +1 -1
  138. package/build/components/CurrencySymbol/index.js +1 -1
  139. package/build/components/CustomBackdrop/index.js +1 -1
  140. package/build/components/Customer/index.js +1 -1
  141. package/build/components/DateFilter/index.js +1 -1
  142. package/build/components/DeviceIcon/index.js +1 -1
  143. package/build/components/Dialog/index.js +1 -1
  144. package/build/components/Discount/index.js +1 -1
  145. package/build/components/DisplayAmount/index.js +1 -1
  146. package/build/components/Dropdown2/index.js +1 -1
  147. package/build/components/DropdownButton/index.js +1 -1
  148. package/build/components/DropdownMenu/index.js +1 -1
  149. package/build/components/DropdownMenu/styles.d.ts +3 -1
  150. package/build/components/Error/index.js +1 -1
  151. package/build/components/ErrorToast/index.js +1 -1
  152. package/build/components/ExpandableSideBar/index.js +1 -1
  153. package/build/components/FieldFeedback/index.js +1 -1
  154. package/build/components/FileInputPreview/index.js +1 -1
  155. package/build/components/FilePreview/index.js +1 -1
  156. package/build/components/FileUpload/index.js +1 -1
  157. package/build/components/FileUploader/index.js +1 -1
  158. package/build/components/FilterDropdown/index.js +1 -1
  159. package/build/components/Filters/index.js +1 -1
  160. package/build/components/FlippingCard/index.js +1 -1
  161. package/build/components/HeatMap/index.js +1 -1
  162. package/build/components/IOSSwitch/index.js +1 -1
  163. package/build/components/Icon/index.js +1 -1
  164. package/build/components/IconWithBadge/index.js +1 -1
  165. package/build/components/Input/index.js +1 -1
  166. package/build/components/InputBase/index.js +1 -1
  167. package/build/components/InputNumber/index.js +1 -1
  168. package/build/components/Inputs/index.js +1 -1
  169. package/build/components/JSONViewer/index.js +1 -1
  170. package/build/components/LanguageDropdown/index.js +1 -1
  171. package/build/components/LazyImage/index.js +1 -1
  172. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  173. package/build/components/ListColumnFilter/index.js +1 -1
  174. package/build/components/ListHeader/index.js +1 -1
  175. package/build/components/ListLayout/index.js +1 -1
  176. package/build/components/Loader/index.js +1 -1
  177. package/build/components/MFWidgetLoader/index.js +1 -1
  178. package/build/components/MaskedText/index.js +1 -1
  179. package/build/components/Menu/index.js +1 -1
  180. package/build/components/MenuItem/index.js +1 -1
  181. package/build/components/MenuItem/style.d.ts +3 -1
  182. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  183. package/build/components/MerchantLogo/index.js +1 -1
  184. package/build/components/MerchantsDropdown/index.js +1 -1
  185. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  186. package/build/components/MultiSelectWithSearch/index.js +1 -1
  187. package/build/components/MultiSelectWithSearch/style.d.ts +3 -1
  188. package/build/components/NestedDropdown/index.js +1 -1
  189. package/build/components/NestedDropdown/styles.d.ts +3 -1
  190. package/build/components/NoInternet/index.js +1 -1
  191. package/build/components/OpenFileInNewTab/index.js +1 -1
  192. package/build/components/PartnersFilter/index.js +1 -1
  193. package/build/components/PaymentSourceFilter/index.js +1 -1
  194. package/build/components/PhoneFilter/index.js +1 -1
  195. package/build/components/ProgressBar/index.js +1 -1
  196. package/build/components/ProgressRing/index.js +1 -1
  197. package/build/components/RFH/Inputs/MultiSelect/style.d.ts +6 -2
  198. package/build/components/RFH/index.js +1 -1
  199. package/build/components/RadioButton/index.js +1 -1
  200. package/build/components/RadioGroup/index.js +1 -1
  201. package/build/components/RangeCalender/index.js +1 -1
  202. package/build/components/RatingCount/index.js +1 -1
  203. package/build/components/ReceiptsViewer/index.js +1 -1
  204. package/build/components/ReferenceTypeFilter/index.js +1 -1
  205. package/build/components/ResizableHeightInput/index.js +1 -1
  206. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  207. package/build/components/SalesChannelFilter/index.js +1 -1
  208. package/build/components/ScrollLoader/index.js +1 -1
  209. package/build/components/SearchButton/index.js +1 -1
  210. package/build/components/SearchListInput/index.js +1 -1
  211. package/build/components/SelectDropdown/index.js +1 -1
  212. package/build/components/SelectWithSearch/index.js +1 -1
  213. package/build/components/SelectWithSearch/style.d.ts +3 -1
  214. package/build/components/Skeleton/index.js +1 -1
  215. package/build/components/Slider/index.js +1 -1
  216. package/build/components/StatusBar/index.js +1 -1
  217. package/build/components/StatusButton/index.js +1 -1
  218. package/build/components/StatusChip/index.js +1 -1
  219. package/build/components/StatusChipWithCopy/index.js +1 -1
  220. package/build/components/StatusFilter/index.js +1 -1
  221. package/build/components/StatusGroupChips/index.js +1 -1
  222. package/build/components/StatusIcons/index.js +1 -1
  223. package/build/components/StatusLabel/index.js +1 -1
  224. package/build/components/TableCells/index.js +1 -1
  225. package/build/components/TableReports/index.js +1 -1
  226. package/build/components/Timepicker/index.js +1 -1
  227. package/build/components/Toaster/index.js +1 -1
  228. package/build/components/ToggleButtons/index.js +1 -1
  229. package/build/components/ToggleView/index.js +1 -1
  230. package/build/components/Toolbar/index.js +1 -1
  231. package/build/components/ToolbarIcon/index.js +1 -1
  232. package/build/components/TooltipChip/index.js +1 -1
  233. package/build/components/TreeDropdown/TreeNodeItem/style.d.ts +3 -1
  234. package/build/components/TreeDropdown/index.js +1 -1
  235. package/build/components/VAT/index.js +1 -1
  236. package/build/components/VerificationIcon/index.js +1 -1
  237. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  238. package/build/components/VirtualTables/components/style.d.ts +3 -1
  239. package/build/components/VirtualTables/index.js +1 -1
  240. package/build/components/Widget/index.js +1 -1
  241. package/build/components/Window/index.js +1 -1
  242. package/build/components/WindowAppIcon/index.js +1 -1
  243. package/build/components/WindowBackdrop/index.js +1 -1
  244. package/build/components/WindowSideBar/index.js +1 -1
  245. package/build/components/index.d.ts +1 -1
  246. package/build/components/index.js +1 -1
  247. package/build/components/primitives/Checkbox/icons.d.ts +16 -3
  248. package/build/components/primitives/index.js +1 -1
  249. package/build/constants/apps.d.ts +3 -3
  250. package/build/constants/index.js +1 -1
  251. package/build/hooks/index.js +1 -1
  252. package/build/index.js +1 -1
  253. package/build/utils/index.js +1 -1
  254. package/package.json +2 -2
  255. package/build/_chunks/chunk-2CEKJ5CQ.js +0 -15
  256. package/build/_chunks/chunk-45CYP6PH.js +0 -1
  257. package/build/_chunks/chunk-7XW6UI6M.js +0 -1
  258. package/build/_chunks/chunk-BMTPSQUO.js +0 -1
  259. package/build/_chunks/chunk-F7QNJNVP.js +0 -2
  260. package/build/_chunks/chunk-FOVILX35.js +0 -1
  261. package/build/_chunks/chunk-JWG5IWOL.js +0 -2
  262. package/build/_chunks/chunk-KCMHA4GC.js +0 -2
  263. package/build/_chunks/chunk-MS6YCJBR.js +0 -1
  264. package/build/_chunks/chunk-U2G5UBPN.js +0 -1
  265. package/build/_chunks/chunk-YXQ6636I.js +0 -1
  266. package/build/components/Checkbox/Checkbox.d.ts +0 -8
  267. package/build/components/Checkbox/icons.d.ts +0 -10
  268. package/build/components/Checkbox/index.d.ts +0 -2
  269. package/build/components/Checkbox/index.js +0 -1
@@ -1 +1 @@
1
- import {b}from'./chunk-OCAA7Q56.js';import {yc}from'./chunk-PBMQM3P4.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var r=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexDirection:"row"})),i=styled(b)(()=>({padding:"0.75px 12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"}));var x=({chips:t,containerSx:a,defaultChipSx:n,...l})=>{let u=yc(useId(),"status-group-chips");return !t||t.length===0?null:jsx(r,{id:u,"data-testid":"StatusGroupChips",sx:a,...l,children:t.map(({key:d,content:C,sx:f,...m})=>jsx(i,{sx:{...n,...f},...m,children:C},d))})},y=x;export{y as a};
1
+ import {b}from'./chunk-4WVB6I3B.js';import {yc}from'./chunk-3DEK3VMQ.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var r=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexDirection:"row"})),i=styled(b)(()=>({padding:"0.75px 12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"}));var x=({chips:t,containerSx:a,defaultChipSx:n,...l})=>{let u=yc(useId(),"status-group-chips");return !t||t.length===0?null:jsx(r,{id:u,"data-testid":"StatusGroupChips",sx:a,...l,children:t.map(({key:d,content:C,sx:f,...m})=>jsx(i,{sx:{...n,...f},...m,children:C},d))})},y=x;export{y as a};
@@ -1 +1 @@
1
- import {yc}from'./chunk-PBMQM3P4.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=yc(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
1
+ import {yc}from'./chunk-3DEK3VMQ.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=yc(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
@@ -1 +1 @@
1
- import {yc}from'./chunk-PBMQM3P4.js';import {Mc}from'./chunk-7567D5HA.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var e=styled(d)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function l({error:r,...i}){let n=yc(useId(),"error");return jsxs(e,{...i,id:n,"data-testid":"Error",children:[jsx("img",{src:Mc,alt:"w"}),r]})}var p=memo(l);var k=p;export{k as a};
1
+ import {yc}from'./chunk-3DEK3VMQ.js';import {Mc}from'./chunk-7567D5HA.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var e=styled(d)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function l({error:r,...i}){let n=yc(useId(),"error");return jsxs(e,{...i,id:n,"data-testid":"Error",children:[jsx("img",{src:Mc,alt:"w"}),r]})}var p=memo(l);var k=p;export{k as a};
@@ -1 +1 @@
1
- import {yc}from'./chunk-PBMQM3P4.js';import {memo,useId}from'react';import {styled,CircularProgress}from'@mui/material';import {jsx}from'react/jsx-runtime';var o=styled(CircularProgress)(()=>({width:"24px !important",height:"24px !important",padding:"5px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:"rgba(0, 0, 0, 0.62)"}}));function t(i){let p=yc(useId(),"loader");return jsx(o,{id:p,"data-testid":"Loader",...i})}t.displayName="Loader";var e=memo(t);var P=e;export{P as a};
1
+ import {yc}from'./chunk-3DEK3VMQ.js';import {memo,useId}from'react';import {styled,CircularProgress}from'@mui/material';import {jsx}from'react/jsx-runtime';var o=styled(CircularProgress)(()=>({width:"24px !important",height:"24px !important",padding:"5px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:"rgba(0, 0, 0, 0.62)"}}));function t(i){let p=yc(useId(),"loader");return jsx(o,{id:p,"data-testid":"Loader",...i})}t.displayName="Loader";var e=memo(t);var P=e;export{P as a};
@@ -1 +1 @@
1
- import {n,i,U as U$1,S as S$1,p as p$1,V,R as R$1,Q,P as P$1,O as O$1,N as N$1,M as M$1,x as x$1,C as C$1,L as L$1,G,H,F as F$1,J,E,D as D$1,A as A$1,K,B,y as y$1,I as I$1,z,q,r,Ha,fa,ea,ga}from'./chunk-YPGWSHOT.js';import {Ve as Ve$1}from'./chunk-7567D5HA.js';import Ve from'lodash/orderBy';import Se from'lodash/get';import u from'dayjs';import Ke from'dayjs/plugin/relativeTime';import je from'dayjs/plugin/timezone';import Je from'dayjs/plugin/utc';import qe from'dayjs/plugin/calendar';import Xe from'dayjs/plugin/isToday';import Ze from'dayjs/plugin/isYesterday';import ot from'axios';import rt from'lodash/forOwn';import Pe from'color';import Ue from'lodash/capitalize';import Re from'lodash/startCase';import Ye from'dompurify';function Ft({list:e,sortBy:t,orders:r}){return t?.length&&r?.length?Ve(e,t,r):e}var $t=(e=[],t)=>e.length?e.sort((r,n)=>Se(r,t).localeCompare(Se(n,t))):[];function Ut(e){return (e||[]).filter(t=>!!t)}var kt=(e,t)=>[...new Map(e.map(r=>[r[t],r])).values()];var Yt=e=>typeof e=="number"&&!isNaN(e)&&isFinite(e)&&e>0;function Bt(e){if(!e)return "";let t=e%10,r=e%100;return `${e}${r>9&&r<14?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}`}var Ge=Intl.NumberFormat("en-US");function zt(e){return Ge.format(e)}var He=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(e==null)return 0;let t=String(e).trim();if(t==="")return 0;let r=t.includes(",")&&!t.includes(".")?t.replace(/,/g,"."):t.replace(/,/g,""),n=Number(r);return Number.isFinite(n)?n:0},Vt=e=>He(e),Gt=(e,t)=>t?e.toFixed(t):e.toString();function y(e,t=2){return e.toString().padStart(t,"0")}var Ht=e=>`0.${"0".repeat(e)}`;u.extend(Xe);u.extend(Ze);u.extend(Je);u.extend(je);u.extend(Ke);u.extend(qe);var h=e=>{if(typeof e=="number")return e;let t=e?.split("UTC")[1]?.split(":")[0];return e?.includes("UTC")||(t=e?.split(":")[0]),e?Number(t):0},nr=(e=0)=>{let t=e<0?"-":"+",r=Math.abs(e).toString().padStart(2,"0");return `UTC${t}${r}:00`},or=(e=6)=>{let t=Number.isFinite(e)&&e>=0?e:0,r=u(),n=r.subtract(t,"day").startOf("day"),o=r.endOf("day");return [n.toDate(),o.toDate()]},sr=e=>{let t=new Date(e),r=t.getTimezoneOffset(),n=t.getTime()-r*6e4,s=new Date(n).toISOString();return u(s).valueOf()},ir=(e,t=S$1.KW)=>{if(!e)return;let r=new Date(e),n=r.getTimezoneOffset(),s=h(t)*60-n,i=r.getTime()+s*6e4,l=new Date(i).toISOString();return u(l).valueOf()},ar=(e,t=0)=>e?u(e).utc(true).subtract(t,"hour").valueOf():void 0,cr=e=>{let t=new Date(e),r=t.getTimezoneOffset(),n=t.getTime()+r*6e4;return new Date(n)},lr=(e,{currentTimezone:t,targetTimezone:r})=>{if(!e)return "";let n=new Date(e);if(Number.isNaN(n.getTime()))return "";if(!t||!r)return n;let o=h(t),s=h(r),i=new Date().getTimezoneOffset()/-60,a=s-o-i,l=n.getTime()+a*6e4*60;return new Date(l)},ur=e=>Array.from({length:e??31},(t,r)=>r+1).map(t=>({id:t,label:t})),dr=e=>Array.from({length:e??12},(t,r)=>r+1).map(t=>({id:t,label:t})),De=({length:e=10,startYear:t,direction:r="future"}={})=>{let n=new Date().getFullYear(),o=t!==void 0?n-t+1:e,s=t!==void 0||r==="past"?-1:1;return Array.from({length:o},(i,a)=>{let l=n+s*a;return {id:l,label:l}})},C=(e,t,r,n,o=true)=>{if(!e)return "";let s=new Date(e);if(Number.isNaN(s.getTime()))return "";let i=new Date,a=u(e).isSame(i,"year"),l={sameDay:`[Today]${o?", h:mma":""}`,nextDay:`[Tomorrow]${o?", h:mma":""}`,lastDay:`[Yesterday]${o?", h:mma":""}`,sameElse:`MMM DD, YYYY${o?", h:mma":""}`,lastWeek:`MMM DD, YYYY${o?", h:mma":""}`,nextWeek:`MMM DD, YYYY${o?", h:mma":""}`};if(a&&(l={sameDay:`[Today]${o?", h:mma":""}`,nextDay:`[Tomorrow]${o?", h:mma":""}`,lastDay:`[Yesterday]${o?", h:mma":""}`,sameElse:`MMM DD${o?", h:mma":""}`,lastWeek:`MMM DD${o?", h:mma":""}`,nextWeek:`MMM DD${o?", h:mma":""}`}),!r&&!n)return u(s).calendar(null,t||l);let d=h(r),m=h(n)-d;return n||(m=Math.abs(m)),u(s).utcOffset(m).calendar(null,t||l)},mr=(e,t="YYYY-MM-DD")=>{let r=new Date(e);return Number.isNaN(r.getTime())?"":u(e).format(t)},pr=e=>u(e).endOf("day").toDate().valueOf();function gr(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?`${y(t)}:${y(r)}:${y(n)}`:`${y(r)}:${y(n)}`}function be(e,t,r="seconds"){let n={seconds:1,minutes:60,hours:3600,days:86400};return (Date.now()-e)/1e3<t*n[r]}var fr=e=>{let t=Date.now(),r=Math.floor((t-e)/1e3),n=Math.floor(r/60);return be(e,60,"seconds")?"just now":be(e,60,"minutes")?`${n} min${n===1?"":"s"} ago`:"1 hour ago"},xr=e=>u(e).isToday(),yr=e=>u(e).isYesterday(),Qe=1970,Tr=()=>De({startYear:Qe}),hr=(e=10)=>De({length:e,direction:"past"});function Cr(e,t){if(!e)return null;let r=u(e);if(!r.isValid())return null;try{return new Date(r.tz(t).format("YYYY-MM-DDTHH:mm:ss.SSS"))}catch{return null}}var b=["sun","mon","tue","wed","thur","fri","sat"];function Sr(e="sun"){let t=b.indexOf(e.toLowerCase());return t===-1?(console.error(`${e} is not a valid day`),b):[...b.slice(t),...b.slice(0,t)]}var br=e=>{if(e==null)return;let t=u(e);return t.isValid()?t.valueOf():void 0};var Ee=e=>{let r=e.reduce((n,o)=>{let s=o.entities?.find(i=>i.default);return s&&n.push({entityId:s.id,country:o}),n},[])[0]?.country||e[0];return e.find(n=>n.id===r?.id)};var we=(e,t,r)=>{let n=e.find(a=>a.id===t)??{},o=r.find(a=>a.id===t)??{},s=o.countries.length===1?n.countries.find(a=>a.id===o.countries?.[0].id):Ee(n?.countries),i=s?.entities?.find(a=>a.default);return {...n,defaultCountry:s,defaultEntity:i}},et=({merchantsIds:e,options:t})=>!e||!e?.length?{}:{business:{merchant:e,...t}},tt=e=>["payment_facilitator_14po8231419aIsi1fN7F385"].includes(e),Ar=({segmentCode:e,segmentId:t,segmentTypeCode:r,merchantsIds:n=[],options:o={}})=>{let s="PSP"===r?e:r;return tt(t)?et({merchantsIds:n,options:o}):s==="PAYMENT_TECHNOLOGY"?{payment_provider:{technology:{orchestrator:[t],...o}}}:s==="PAYMENT_GATEWAY"||s==="PAYMENT_GATEWAY_PROVIDER"?{payment_provider:{technology:{gateway:[t],...o}}}:s==="PAYMENT_FACILITATOR"?{payment_provider:{institution:{facilitator:[t],...o}}}:s==="PAYMENT_ACQUIRER"?{payment_provider:{institution:{acquirer:[t],...o}}}:s==="PLATFORM"?{platform:[t],...o}:s==="DEVELOPMENT"?{development_agency:[t],...o}:{}};var Ae="Test_Fixed_Secret_Key",A="tap-dashboard-navigation-data",_e="tap-dashboard-user-data",_="tap-dashboard-user-jwt",O="tap-dashboard-report",I="tap-dashboard-calender-timezone",N="tap-dashboard-calender-timezone-history",L="tap-dashboard-global-table-mode",Oe="sheetview_columns",P="dock-preview-windows",w="views";function Lr(){localStorage.setItem(Ae,p$1);}function Ie(){return localStorage.getItem(Ae)}function Pr(e){localStorage.setItem(A,JSON.stringify(e));}function Mr(){try{let e=localStorage.getItem(A);if(!e)return null;let t=JSON.parse(e);return rt(t,r=>{r?.forEach(n=>{n.payload&&n.payload.dateRange&&(n.payload.dateRange=n.payload.dateRange.map(o=>new Date(o)));});})}catch{return null}}function Rr(){localStorage.removeItem(A);}var vr=e=>{localStorage.setItem(_,e);},M=()=>localStorage.getItem(_),Fr=()=>{localStorage.removeItem(_);},$r=e=>{localStorage.setItem(_e,JSON.stringify(e));},R=()=>{let e=localStorage.getItem(_e);if(!e)return null;try{return JSON.parse(e)}catch{return null}},Ur=()=>{let e=R();return e?we(e?.segments,e?.active_segment_id,e?.active_segments):null},kr=()=>{let e=R();return e?e?.active_segments.find(t=>t.id===e.active_segment_id):null},nt=()=>{let e=M();if(!e)return true;try{let[,t]=e.split(".");if(!t)return !0;let r=t.replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"="),{exp:o}=JSON.parse(atob(n));return typeof o!="number"?!0:Date.now()>=o*1e3}catch{return true}},Wr=()=>!nt()&&!!R(),Yr=(e,t)=>{localStorage.setItem(`${O}-${e}`,t);},Br=e=>localStorage.getItem(`${O}-${e}`),zr=e=>{localStorage.removeItem(`${O}-${e}`);},Vr=e=>{localStorage.setItem(I,JSON.stringify(e));},Gr=e=>{localStorage.setItem(N,JSON.stringify(e));},Hr=()=>{try{let e=localStorage.getItem(I);return e?JSON.parse(e):null}catch{return null}},Kr=()=>{try{let e=localStorage.getItem(N);return e?JSON.parse(e):null}catch{return null}},jr=()=>{localStorage.removeItem(I);},Jr=()=>{localStorage.removeItem(N);},qr=e=>{localStorage.setItem(L,e);},Xr=()=>localStorage.getItem(L)||"default",Zr=()=>{localStorage.removeItem(L);},Qr=e=>localStorage.setItem(Oe,JSON.stringify(e)),en=()=>JSON.parse(localStorage.getItem(Oe)||"{}"),tn=e=>{try{localStorage.setItem(P,JSON.stringify(e));}catch(t){console.warn("Failed to save preview cache:",t);}},rn=()=>{try{let e=localStorage.getItem(P);return e?JSON.parse(e):[]}catch{return []}},nn=()=>{try{localStorage.removeItem(P);}catch(e){console.warn("Failed to remove preview storage:",e);}},on=(e,t,r)=>{try{return JSON.parse(localStorage.getItem(w)??"{}")?.[e]?.[t]?.[r]?.selectedViewId??null}catch{return null}},sn=(e,t,r,n)=>{try{let o=JSON.parse(localStorage.getItem(w)??"{}");localStorage.setItem(w,JSON.stringify({...o,[e]:{...o[e],[t]:{...o[e]?.[t],[r]:{...o[e]?.[t]?.[r],selectedViewId:n}}}}));}catch{return null}},Ne=()=>{localStorage.clear();};var st={headers:{"Content-Type":"application/json",Accept:"application/json"}},v=ot.create({baseURL:n,headers:{...st}}),it=["users/switch-segment","users/update-segment"];v.interceptors.request.use(e=>new Promise(t=>{let r=false;if(it.includes(e.url??"")){t(e);return}let n=s=>{let i=s.data;if(i==="network_request_waiting"){r=true;return}i==="resume_network_request"&&(r=false);};window.addEventListener("message",n);let o=setInterval(()=>{r||(t(e),clearInterval(o),window.removeEventListener("message",n));},0);}));v.interceptors.request.use(e=>{e.headers.Authorization=M();let t=Ie();return t&&!e.headers["x-test-secret"]&&(e.headers["x-test-secret"]=t),e});v.interceptors.response.use(e=>e,e=>(e.response?.data?.force_logout&&(Ne(),window.location.href="/login"),Promise.reject(e)));function mn(e){let{sandboxMode:t,fixedSecretKey:r,applicationId:n,serviceId:o,functionId:s,userFunctionId:i,segmentId:a,...l}=e??{};return {...l,live_mode:t?"false":"true",...!!r&&{"x-test-secret":r},...!!n&&{application_id:n},...!!o&&{service_id:o},...!!s&&{function_id:s},...!!i&&{user_function_id:i}}}function gn(e){let r=(e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"")).toLowerCase();if(r.includes("edg"))return "edge";if(r.includes("opr")||r.includes("opera"))return "opera";if(r.includes("chrome")&&!r.includes("edg")&&!r.includes("opr"))return "chrome";if(r.includes("safari")&&!r.includes("chrome"))return "safari";if(r.includes("firefox"))return "firefox";if(r.includes("msie")||r.includes("trident"))return "ie";if(r.includes("tor"))return "tor";if(r.includes("uc"))return "uc";if(r.includes("yandex"))return "yandex"}var fn=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xn=e=>{let t=e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"");if(!t)return;let r=t.toLowerCase();if(/ipad|tablet|playbook|silk|(android(?!.*mobile))/.test(r))return "TABLET";if(/mobile|iphone|ipod|android.*mobile|blackberry|iemobile|opera mini|windows phone/.test(r))return "MOBILE";if(/desktop|laptop|macintosh|windows|linux|unix|freebsd|openbsd|netbsd|chromeos|solaris|beos|os/.test(r))return "DESKTOP"};function Cn(){let e=["#D6D6D6","#BFF192","#E4EE92","#FDFCAB","#FFE78E","#FFCE6B","#FFBC8C","#FF947C","#C88FA3","#B988C9","#9A8BBB","#89B6FF","#ACD4E1","#ADBABE","#C0DAAA","#D5DA91","#EAE7A2","#DFCE9C","#C9A997","#858585","#000000"];return e[Math.trunc(Math.random()*e.length)]}function Sn(){let e=["linear-gradient(135deg, #31D5C8 0%, #1186C5 100%)","linear-gradient(135deg, #A2E9BD 0%, #44BB74 100%)","linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), linear-gradient(135deg, #6BF6EB 0%, #32D6C9 100%)","linear-gradient(135deg, #61AFC9 0%, #7FBFD4 100%)","linear-gradient(135deg, #9DB7A4 0%, #7FBFD4 100%)","linear-gradient(135deg, #D7B38C 0%, #FFE09F 100%)","linear-gradient(135deg, #ADD6A2 0%, #FFDDB2 100%)"];return e[Math.trunc(Math.random()*e.length)]}var Le={r:0,g:0,b:0,alpha:1},bn=e=>{try{let t=Pe(e).rgb(),{r,g:n,b:o,alpha:s=1}=t.object();return {value:{r,g:n,b:o,alpha:s},stringified:`rgba(${r},${n},${o},${s})`}}catch(t){console.error(t),console.warn(`Invalid hex color: "${e}". Falling back to black.`);let{r,g:n,b:o,alpha:s}=Le;return {value:Le,stringified:`rgba(${r},${n},${o},${s})`}}},Dn=e=>Pe(e).hexa();var An={fx:"Foreign Exchange",dcc:"Dynamic Currency Conversion"},Me={BHD:3,KWD:3,JOD:3,OMR:3},F=new Map,_n=(e,t)=>{if(Number.isNaN(e))return "0";try{return F.has(t)||F.set(t,new Intl.NumberFormat("en-US",{currency:t,minimumFractionDigits:Me[t]?3:2})),F.get(t).format(e)}catch(r){return console.error(r),"0"}},at=e=>e%1===0,ct=e=>e%.1===0,lt=e=>Math.abs(e*10%1)===.1,On=(e,t)=>{let r=Me[t],n=e.toString();return Number.isInteger(e)&&at(e)?n=e.toFixed(r?3:2):lt(e)?n=`${n}${r?"00":"0"}`:ct(e)&&(n=`${n}${r?"00":"0"}`),n};function ut(e,t=2){let r=parseFloat(e.toString());if(isNaN(r)){let[a,l]=0 .toFixed(t).split("."),d=`${a}.${l}`;return {integerAmount:a,decimalAmount:l,fullAmount:d}}let n=r.toFixed(t),[o,s]=n.split("."),i=parseInt(o).toLocaleString();return {integerAmount:i,decimalAmount:s,fullAmount:`${i}.${s}`}}function In(e=0,t=""){return ut(e,V[t]?.decimals??2)}function Ln(e){let t=e.request.currency,r=e.select.currency,n=e.merchant.currency,o=r!==n&&r===t&&t&&n&&r,s=r!==t&&t&&n&&r,i=o?"fx":void 0;i=s?"dcc":i;let a=o?e.merchant:void 0;return a=s?e.request:a,{type:i,shownAmount:a}}var Pn=e=>typeof e=="number"?e:Number(e.replace(/,/g,""));var dt=new Intl.DisplayNames(["en"],{type:"region"});function Rn(e){try{return dt.of(e)}catch(t){console.error(t?.response?.data?.error?.message);}}function vn(e){return e==="SA"}var S=e=>C(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD",lastWeek:"MMM DD",nextWeek:"MMM DD"}),kn=(e,t)=>{if(!e)return "";let r=new Date,n=u(e).isSame(r,"year");return t?C(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow at] h:mm A",lastDay:"[Yesterday at] h:mm A",sameElse:"[on] MMM DD [at] h:mm A",lastWeek:"[on] MMM DD [at] h:mm A",nextWeek:"[on] MMM DD [at] h:mm A"}):n?C(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD",lastWeek:"[on] MMM DD",nextWeek:"[on] MMM DD"}):C(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD, YYYY",lastWeek:"[on] MMM DD, YYYY",nextWeek:"[on] MMM DD, YYYY"})},Wn=e=>{let t=e?.payout,r=e?.settlement;if(!e)return {tooltip:[],status:void 0};if(!["PAID_OUT","SETTLED"].includes(e?.status||""))return {tooltip:[...r?.scheduled?[{left:"settlement_scheduled",right:`${S(r?.scheduled)}`}]:[],...t?.scheduled?[{left:"payment_scheduled",right:`${S(t?.scheduled)}`}]:[]],status:"PENDING"};if(e?.status==="PAID_OUT"){let n=t?.activities.find(o=>o.status==="PAID_OUT");return {tooltip:[{left:"paidOut",right:`${S(n?.date)}`}],status:"PAID_OUT"}}if(e?.status==="SETTLED"){let n=r?.activities.find(o=>o.status==="SETTLED");return {tooltip:[{left:"settled",right:`${S(n?.date)}`},...t?.scheduled?[{left:"payment_scheduled",right:`${S(t?.scheduled)}`}]:[]],status:"SETTLED"}}};var zn=(e,t)=>{let{isFirst:r,isLast:n}=t||{};return `${(e+0)/898*100}%`},Vn=({table:e,cellID:t,tableMode:r})=>{switch(e){case "charge":return z[t][r];case "refund":return I$1[t][r];case "authorization":return y$1[t][r];case "intents":return B[t][r];case "topups":return K[t][r];case "destinations":return A$1[t][r];case "leads":return D$1[t][r];case "orders":return E[t][r];case "tokens":return J[t][r];case "payouts":return F$1[t][r];case "protectCharges":return H[t][r];case "protectAuthorizations":return G[t][r];case "wallet":return L$1[t][r];case "invoices":return C$1[t][r];case "authentications":return x$1[t][r];case "walletDetails":return M$1[t][r];case "walletStatement":return N$1[t][r];case "merchants":return O$1[t][r];case "terminals":return P$1[t][r];case "orchestrationTerminals":return Q[t][r];case "orchestrationRouting":return R$1[t][r];default:return "100px"}},Gn=(e,t)=>{let r,n=window.innerHeight-24-264;return e?r=window.innerHeight/1.7:t?r=n-100:r=n-20,Math.floor(r/(e||t?52:70))},pt=()=>{let e=window.innerHeight*.82/1.24-57;return Math.floor(e/70)},Hn=e=>{let t=pt();return e<t+1},Kn=e=>e==="default",jn=e=>e==="sheet",Jn=()=>({charge:{prefixes:["chg_","payout_","settlement_","terminal_"],accessor:e=>[e.id,e.capture?.charge?.map(t=>t.id),e.charge?.id,e.transactions?.map(t=>t.id),e.charge_id],label:"Charge",appCode:i.acceptance.code,serviceCode:i.acceptance.services.charges.code,icon:"capture"},authorize:{prefixes:["auth_"],keys:["id","authorize.id","source.id","charge.source.id"],label:"Authorization",appCode:i.acceptance.code,serviceCode:i.acceptance.services.authorization.code,icon:"capture"},intents:{prefixes:["intent_"],keys:[],label:"Intents",appCode:i.acceptance.code,serviceCode:i.acceptance.services.intents.code,icon:"capture"},refunds:{prefixes:["re_","payout_"],accessor:e=>[e?.refunds?.refund?.map(t=>t.id),e?.id,...e?.refunds?.length?[e?.refunds?.map(t=>t.id)]:[]],label:"Refunds",appCode:i.acceptance.code,serviceCode:i.acceptance.services.refunds.code,icon:"refund"},authentication:{prefixes:["auth_payer_"],keys:["authentication.id"],label:"Authentication",appCode:i.authentication.code,serviceCode:i.authentication.services.authentication.code,icon:"capture"},order:{prefixes:["order_","ord_"],keys:["order.id"],label:"Order",appCode:i.order.code,serviceCode:i.order.services.orders.code,icon:"capture"},chargeFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:i.protect.code,serviceCode:i.protect.services.chargesFlags.code,icon:"flag"},authorizationFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:i.protect.code,serviceCode:i.protect.services.authorizationsFlags.code,icon:"flag"},token:{prefixes:["tok_"],keys:["source.id"],label:"Token",appCode:i.tokens.code,serviceCode:i.tokens.services.tokens.code,icon:"capture"},destination:{prefixes:["trf_","payout_"],accessor:e=>[e?.destinations?.destination?.map(t=>t?.transfer?.id),e?.id],label:"Destination",appCode:i.acceptance.code,serviceCode:i.acceptance.services.destinations.code,icon:"destination"},payout:{prefixes:["payout_"],keys:["balance.payout.id"],label:"Payout",appCode:i.payouts.code,serviceCode:i.payouts.services.payouts.code,icon:"capture"},settlement:{prefixes:["settlement_"],keys:["settlement.id"],label:"Settlement",appCode:i.acceptance.code,serviceCode:i.acceptance.services.settlements.code,icon:"capture"},intent:{prefixes:["intent_"],keys:["intent.id"],label:"Intent",appCode:i.acceptance.code,serviceCode:i.acceptance.services.intents.code,icon:"capture"},topup:{prefixes:["topup_"],keys:["topup.id"],label:"Topup",appCode:i.acceptance.code,serviceCode:i.acceptance.services.topups.code,icon:"capture"}});var Qn=e=>typeof e=="string"&&e.trim().length>0,U=(e,t)=>{if(!t)return e;let r=e.indexOf(t);return e.substring(r+t.length)},$=new Map,k=(e,t)=>($.has(t)||$.set(t,new RegExp(t,"gi")),e.match($.get(t))?.length??0),eo=e=>e.reduce((t,r)=>(t.push(r[0]),t),[]),to=()=>crypto?.randomUUID?.()||Math.random().toString(36).substring(2,15),ro=e=>{if(navigator.clipboard)navigator.clipboard.writeText(e);else {let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove();}},no=e=>typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),oo=e=>{let[t]=e.split("%");return parseFloat(t)||0},so=e=>`\u2022\u2022\u2022 ${e.slice(-4)}`,io=(e,t=/_/g,r=" ")=>{let n=e.replace(t,r);return Re(n)},ao=e=>Ue(Re(e));var lo=(e,t)=>!e?.last_four||!t?"":`${t?.toLowerCase()} - ${e?.last_four}`,uo=(e,t)=>!t||!e?"":`${e?.toLowerCase()||"ID"} \u2022 ${t?.slice(-4)}`;function po({unCapturedCode:e,unCapturedMessage:t,acquirerCode:r,acquirerMessage:n,gatewayCode:o,gatewayMessage:s}){let i=e&&t&&`${e} - ${t}`,a=r&&n&&`${r} - ${n}`,l=o&&s&&`${o} - ${s}`;return {unCapturedTooltip:i,acquirerTooltip:a,gatewayTooltip:l}}function fo(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var W=e=>e==null||e==="";function xo(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>Array.isArray(t)?t.length>0&&t?.some(r=>!W(r)):typeof t=="object"?Object.values(t||{}).some(r=>!W(r)):!W(t)))}var ho=()=>q===r.TAPSTERS_FRONTEND;var So=e=>e.replace(/[^0-9]/g,"");function wo({rowData:e,prefixes:t,keys:r=[],accessor:n}){let o=!!n;return (o?n?.(e):r)?.filter(Boolean)?.reduce((a,l)=>{let d=o?l:Se(e,l);return typeof d=="string"&&t?.some(g=>d.includes(g)&&k(U(d,g),"_")===0)&&a.push(d),Array.isArray(d)&&d.length>0&&d.every(g=>typeof g=="string"&&t?.some(m=>g.includes(m)&&k(U(g,m),"_")===0))&&a.push(...d),a},[])}var _o=450,Oo=600;var Io=3;var No=20,xt=(r=>(r.Index="index",r.Date="date",r))(xt||{}),Lo={name:"index",label:"",selected:true,menuItems:void 0,order:0,pinned:"start",isDefaultPinned:true,pinnable:true},Po={name:"date",label:"Date",selected:true,menuItems:void 0,order:1,pinned:"start",isDefaultPinned:true,pinnable:true},Mo={date:"Date",index:"Index"},Ro={sheet:["sheet"],default:["advanced","default"],text:["text"]},vo={sheet:"Advanced",default:"Sheet",text:"text"},yt={id:"default",label:"Default"},Fo={id:"custom",label:"Custom view"},$o=[yt];function Yo(e,t,r){return e.filter(n=>{let o=n?.id?.toString(),s=t.find(m=>{let Be=m.code?.toLowerCase()===o?.toLowerCase(),ze=m.name?.toLowerCase()===o?.toLowerCase();return (Be||ze)&&m.selected}),i=!!n.tableViewId&&(s?.menuItems?.length||0)>0,a=s?.menuItems?.find(m=>m.name?.toLowerCase()===n.tableViewId?.toString()?.toLowerCase())?.selected,l=!!s&&(a||!i),g=["actions","action_icon",...r?["index","date"]:[]].includes(o?.toLowerCase()??"");return !!(l||g)})}function Bo(e,t){if(t.toLowerCase()==="index")return 0;let r=e.findIndex(o=>o.code?.toLowerCase()===t?.toLowerCase()),n=e[r];return r>=0?n?.sort_order??r:999}function zo(e,t,r){return e?.find(n=>{let o=n.code?.toLowerCase()===t.toLowerCase(),s=n.name?.toLowerCase()===t.toLowerCase();return o||s})?.menuItems?.find(n=>n.name?.toLowerCase()===r.toLowerCase()&&n.selected)?.selected||false}function Vo(e,t){return e?.filter(r=>!!r.name?.[0]?.text)?.map(r=>({code:r.code,label:x(r.name,t),name:x(r.name,t)||"",selected:r?.selected!==false,sort_order:r.sort_order,menuItems:r.fields?.map(n=>n.parameters?.filter(o=>!!o.code)?.map(o=>({code:o.code,label:Re(o.code),name:`${o.code}`,selected:o?.selected!==false})))?.flat()?.filter(n=>!!n.name)}))||[]}function Go(e){return e.map(t=>({...t.code?{code:t.code}:{},name:[{text:t.name,lang:"en"}],selected:t.selected,sort_order:1,sorting:"descending",fields:t.menuItems?.map(r=>({code:r.name,type:"single",parameters:[{parameter:r.name,code:r.name,selected:r.selected}]}))||[]}))}var Ho=({columnsView:e,columnsIds:t,selected:r})=>{let n=new Set(t.map(s=>s?.toLowerCase())),o=s=>({...s,selected:r,fields:s.fields?.map(i=>({...i,parameters:i.parameters?.map(a=>({...a,selected:r}))??[]}))});return e.map(s=>n.has(s.code?.toLowerCase()??"")||n.has(s.name?.[0]?.text?.toLowerCase()??"")?o(s):s)};function jo(e){return {fullPhone:e?.number?`${e?.country_code||""} ${e?.number}`:"",code:e?.country_code||"",number:e?.number||""}}var ve=(e,t)=>{let r=e.type==="url"?e.url:window.URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=r,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),e.type==="content"&&window.URL.revokeObjectURL(r);},qo=(e,t)=>ve({type:"content",content:e},t),Xo=(e,t)=>ve({type:"url",url:e},t);var ht=e=>!!(e?.isAxiosError&&!e?.response),Qo=(e,t="")=>e?.response?.data?.error?.message?.trim()||t,es=e=>!!e,Ct=e=>(e?.code==="ECONNABORTED"||e?.message?.toLowerCase().includes("timeout"))??false,ts=e=>!!(e?.response?.status===404||e?.response?.status===400&&e?.response?.data?.error?.message?.toLowerCase().includes("not found")),D=({code:e,message:t})=>e?`${t} - ${e}`:t,rs=({error:e,fallbackMessage:t})=>{if(ht(e)){let n=t??"networkError";return {code:null,message:n,formatted:D({code:null,message:n})}}if(Ct(e)){let n=t??"yourRequestOutPleaseTryAgain";return {code:null,message:n,formatted:D({code:null,message:n})}}if(e?.response&&typeof e.response.data=="object"&&"error"in e.response.data){let{code:n,message:o}=e.response.data.error;return {code:n,message:o,formatted:D({code:n,message:o})}}let r=t??"somethingWentWrong";return {code:null,message:r,formatted:D({code:null,message:r})}};var os=(e,t)=>e.find(r=>r.code===t),ss=(e,t)=>e.find(r=>r.code===t);var cs=()=>["passport","national_id","iqamah","civil_id"].map(e=>({id:e,label:Re(e)}));function us(e,t=2){let n=e??0;if(!n)return "0 kb";let o=n/1024;return o>1024?`${(o/1024).toFixed(t)} mb`:`${o.toFixed(t)} kb`}function ds(e){return e?.file?.size!==void 0&&e?.file?.name!==void 0}var gs=e=>{let t=e?.split(".").pop()?.toLowerCase()??"";return Ha[t]??Ve$1},fs=(e,t,r)=>`${e}-${t}-${r}`;var ys=e=>e?/[\u0600-\u06FF]/g.test(e):false;function Ts(e,t="en"){return (e||[]).find(r=>(r?.lang||r?.locale)===t)||e?.[0]}var x=(e,t="en")=>(e||[]).find(r=>r?.lang===t)?.text,hs=(e,t="en")=>(e||[]).find(r=>r?.lang===t);var Ss=e=>{let t=e?.wallet==="SV Wallet"?"walletStoredValue":"walletPassThru";return e?.type==="Wallet"?t:e?.type},bt={AMERICAN_EXPRESS:"AMEX"},Fe=e=>bt[e.toUpperCase()]??e.toUpperCase(),bs=(e,t)=>!!e&&!!t&&Fe(e)===Fe(t);var Es=e=>({Local:e.success.light,Regional:e.info.light,Global:e.warning.light});var _s=(e,t)=>{if(t==null)return "";let r=fa[e];return e===ea.COUNT?t===1?r:`${r}s`:r};var p={primary:"#1F88D0",background:"white",border:"#F2F2F2",transparent:"transparent"},f={thin:"0.5px",thick:"1px",none:"0px"},$e={minHeight:"28px",fullHeight:"100%"},Is=({isSelected:e,isCellSelected:t,isColumnSelected:r,isRowSelected:n,isLastRow:o})=>e?n?Dt():t&&!r?Et():r?wt(o):{}:{},Dt=()=>({backgroundColor:p.background,color:p.primary}),Et=()=>({border:`${f.thin} solid ${p.primary}`,backgroundColor:p.background,color:p.primary,borderRadius:"2px"}),wt=e=>{let t=At(),r=_t(e);return {borderWidth:t,borderStyle:"solid",borderColor:p.primary,borderBottom:r,height:$e.fullHeight,minHeight:$e.minHeight,display:"flex",alignItems:"center"}},At=()=>{let{none:e,thin:t}=f;return `${e} ${t} ${t} ${t}`},_t=e=>e?`${f.thick} solid ${p.primary}`:`${f.thin} solid ${p.border}`,Ns=({effectiveFirst:e,isPinnedStart:t,isPinnedEnd:r})=>({borderTop:`${f.thin} solid ${p.primary}`,borderBottom:`${f.thin} solid ${p.primary}`,borderRight:`${f.thin} solid ${r?p.primary:"none"}`,borderLeft:`${f.thin} solid ${t&&e?p.primary:"transparent"}`}),Ls={left:"flex-start",center:"center",right:"flex-end"};function Ps(e,t){return t==null?e:[e,...Array.isArray(t)?t:[t]]}function Ms(...e){return e.filter(Boolean).join(" ")||void 0}var Fs=e=>U$1.find(t=>t.countryCode===e)??U$1[0],$s=e=>U$1.find(t=>t.timezone===e)??U$1[0];function zs(e){return {name:"Payment Methods",type:"payment_methods",options:e?.map(t=>({name:Ue(Re(x(t?.name))),type:t?.code,icon:ga[t.code]??ga.CARD,options:t.payment_methods?.map(r=>({name:x(r.name),type:r.code}))}))}}function Vs(e=[]){return {name:"Payment Schemes",type:"payment_scheme",options:e.filter(t=>t.code).map(t=>({name:Ue(Re(x(t?.name))),type:t?.code}))}}var We=["120px","180px","100px","150px","200px","140px","160px","110px","190px","130px"],Ot={id:"index",header:"",width:"34px",order:0,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},It={id:"date",header:"",width:"120px",order:1,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},Nt={id:"action_icon",header:"",width:"36px",order:We.length+3,hidden:false,sortable:false,pinned:"end",pinnable:true,isDefaultPinned:true},Lt=(e=We)=>{let t=e.map((r,n)=>({id:`skeleton-col-${n}`,header:"",width:r,order:n+2,hidden:false,sortable:false,pinnable:false}));return [Ot,It,...t,Nt]},Hs=(e,t,r)=>r&&t?Lt():[...e];var js=(e,t)=>e.map(r=>{let n=Object.entries(t);if(!r.default||!r.layout?.length||!n.length)return r;let o=new Map(n.map(([i,a])=>[i.toLowerCase(),a])),s=r.layout.map(i=>({...i,columns:i.columns?.map(a=>{let l=a.code?.toLowerCase();if(!l||!o.has(l))return a;let d=o.get(l)??false;return {...a,default:d,fields:a.fields?.map(g=>({...g,default:d}))}})}));return {...r,layout:s}});var Xs=(e,t)=>t.some(r=>!!e[r]),Zs=(e,t,r)=>t?e:e.map(n=>{if(r.hiddenFilterColumnIds.includes(n.id)){let{filter:s,...i}=n,a=n.id,l=typeof i.header=="function"?Re(a):i.header;return {...i,header:l}}let{hiddenFilterOptionKeys:o}=r;if(o&&n.filter&&"options"in n.filter&&n.filter.options){let s=n.filter.options,i=s.filter(a=>!a.apiKey||!o.includes(a.apiKey));if(i.length!==s.length)return {...n,filter:{...n.filter,options:i}}}return n});typeof window<"u"&&Ye.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer");});var Mt={USE_PROFILES:{html:true},ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|[^a-z]|[-a-z.+]+(?:[^-a-z.+:]|$))/i,WHOLE_DOCUMENT:true},ti=e=>typeof window>"u"?"":String(Ye.sanitize(e||"",Mt));var ni=e=>window?.__TAPOS_NEWRELIC_TRACKING_EVENTS__?.trackFeatureEvent?.(e),oi=e=>e.toISOString();function ii(e,t){let r=e.replace(/:/g,"");return t?`${t}-${r}`:r}export{Wr as $,to as $a,x as $b,gr as A,Sn as Aa,Fo as Ab,be as B,bn as Ba,$o as Bb,fr as C,Dn as Ca,Yo as Cb,xr as D,An as Da,Bo as Db,yr as E,Me as Ea,zo as Eb,Tr as F,_n as Fa,Vo as Fb,hr as G,On as Ga,Go as Gb,Cr as H,ut as Ha,Ho as Hb,Sr as I,In as Ia,jo as Ib,br as J,Ln as Ja,ve as Jb,we as K,Pn as Ka,qo as Kb,et as L,Rn as La,Xo as Lb,tt as M,vn as Ma,ht as Mb,Ar as N,S as Na,Qo as Nb,Lr as O,kn as Oa,es as Ob,Ie as P,Wn as Pa,Ct as Pb,Pr as Q,zn as Qa,ts as Qb,Mr as R,Vn as Ra,rs as Rb,Rr as S,Gn as Sa,os as Sb,vr as T,Hn as Ta,ss as Tb,M as U,Kn as Ua,cs as Ub,Fr as V,jn as Va,us as Vb,$r as W,Jn as Wa,ds as Wb,R as X,Qn as Xa,gs as Xb,Ur as Y,U as Ya,fs as Yb,kr as Z,k as Za,ys as Zb,nt as _,eo as _a,Ts as _b,Ft as a,Yr as aa,ro as ab,hs as ac,$t as b,Br as ba,no as bb,Ss as bc,Ut as c,zr as ca,oo as cb,bs as cc,kt as d,Vr as da,so as db,Es as dc,Yt as e,Gr as ea,io as eb,_s as ec,Bt as f,Hr as fa,ao as fb,p as fc,zt as g,Kr as ga,lo as gb,Is as gc,He as h,jr as ha,uo as hb,Ns as hc,Vt as i,Jr as ia,po as ib,Ls as ic,Gt as j,qr as ja,fo as jb,Ps as jc,y as k,Xr as ka,W as kb,Ms as kc,Ht as l,Zr as la,xo as lb,Fs as lc,h as m,Qr as ma,ho as mb,$s as mc,nr as n,en as na,So as nb,zs as nc,or as o,tn as oa,wo as ob,Vs as oc,sr as p,rn as pa,_o as pb,We as pc,ir as q,nn as qa,Oo as qb,Lt as qc,ar as r,on as ra,Io as rb,Hs as rc,cr as s,sn as sa,No as sb,js as sc,lr as t,Ne as ta,xt as tb,Xs as tc,ur as u,v as ua,Lo as ub,Zs as uc,dr as v,mn as va,Po as vb,ti as vc,De as w,gn as wa,Mo as wb,ni as wc,C as x,fn as xa,Ro as xb,oi as xc,mr as y,xn as ya,vo as yb,ii as yc,pr as z,Cn as za,yt as zb};
1
+ import {n,i,U as U$1,S as S$1,p as p$1,V,R as R$1,Q,P as P$1,O as O$1,N as N$1,M as M$1,x as x$1,C as C$1,L as L$1,G,H,F as F$1,J,E,D as D$1,A as A$1,K,B,y as y$1,I as I$1,z,q,r,Ha,fa,ea,ga}from'./chunk-MQP3RGOO.js';import {Ve as Ve$1}from'./chunk-7567D5HA.js';import Ve from'lodash/orderBy';import Se from'lodash/get';import u from'dayjs';import Ke from'dayjs/plugin/relativeTime';import je from'dayjs/plugin/timezone';import Je from'dayjs/plugin/utc';import qe from'dayjs/plugin/calendar';import Xe from'dayjs/plugin/isToday';import Ze from'dayjs/plugin/isYesterday';import ot from'axios';import rt from'lodash/forOwn';import Pe from'color';import Ue from'lodash/capitalize';import Re from'lodash/startCase';import Ye from'dompurify';function Ft({list:e,sortBy:t,orders:r}){return t?.length&&r?.length?Ve(e,t,r):e}var $t=(e=[],t)=>e.length?e.sort((r,n)=>Se(r,t).localeCompare(Se(n,t))):[];function Ut(e){return (e||[]).filter(t=>!!t)}var kt=(e,t)=>[...new Map(e.map(r=>[r[t],r])).values()];var Yt=e=>typeof e=="number"&&!isNaN(e)&&isFinite(e)&&e>0;function Bt(e){if(!e)return "";let t=e%10,r=e%100;return `${e}${r>9&&r<14?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}`}var Ge=Intl.NumberFormat("en-US");function zt(e){return Ge.format(e)}var He=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(e==null)return 0;let t=String(e).trim();if(t==="")return 0;let r=t.includes(",")&&!t.includes(".")?t.replace(/,/g,"."):t.replace(/,/g,""),n=Number(r);return Number.isFinite(n)?n:0},Vt=e=>He(e),Gt=(e,t)=>t?e.toFixed(t):e.toString();function y(e,t=2){return e.toString().padStart(t,"0")}var Ht=e=>`0.${"0".repeat(e)}`;u.extend(Xe);u.extend(Ze);u.extend(Je);u.extend(je);u.extend(Ke);u.extend(qe);var h=e=>{if(typeof e=="number")return e;let t=e?.split("UTC")[1]?.split(":")[0];return e?.includes("UTC")||(t=e?.split(":")[0]),e?Number(t):0},nr=(e=0)=>{let t=e<0?"-":"+",r=Math.abs(e).toString().padStart(2,"0");return `UTC${t}${r}:00`},or=(e=6)=>{let t=Number.isFinite(e)&&e>=0?e:0,r=u(),n=r.subtract(t,"day").startOf("day"),o=r.endOf("day");return [n.toDate(),o.toDate()]},sr=e=>{let t=new Date(e),r=t.getTimezoneOffset(),n=t.getTime()-r*6e4,s=new Date(n).toISOString();return u(s).valueOf()},ir=(e,t=S$1.KW)=>{if(!e)return;let r=new Date(e),n=r.getTimezoneOffset(),s=h(t)*60-n,i=r.getTime()+s*6e4,l=new Date(i).toISOString();return u(l).valueOf()},ar=(e,t=0)=>e?u(e).utc(true).subtract(t,"hour").valueOf():void 0,cr=e=>{let t=new Date(e),r=t.getTimezoneOffset(),n=t.getTime()+r*6e4;return new Date(n)},lr=(e,{currentTimezone:t,targetTimezone:r})=>{if(!e)return "";let n=new Date(e);if(Number.isNaN(n.getTime()))return "";if(!t||!r)return n;let o=h(t),s=h(r),i=new Date().getTimezoneOffset()/-60,a=s-o-i,l=n.getTime()+a*6e4*60;return new Date(l)},ur=e=>Array.from({length:e??31},(t,r)=>r+1).map(t=>({id:t,label:t})),dr=e=>Array.from({length:e??12},(t,r)=>r+1).map(t=>({id:t,label:t})),De=({length:e=10,startYear:t,direction:r="future"}={})=>{let n=new Date().getFullYear(),o=t!==void 0?n-t+1:e,s=t!==void 0||r==="past"?-1:1;return Array.from({length:o},(i,a)=>{let l=n+s*a;return {id:l,label:l}})},C=(e,t,r,n,o=true)=>{if(!e)return "";let s=new Date(e);if(Number.isNaN(s.getTime()))return "";let i=new Date,a=u(e).isSame(i,"year"),l={sameDay:`[Today]${o?", h:mma":""}`,nextDay:`[Tomorrow]${o?", h:mma":""}`,lastDay:`[Yesterday]${o?", h:mma":""}`,sameElse:`MMM DD, YYYY${o?", h:mma":""}`,lastWeek:`MMM DD, YYYY${o?", h:mma":""}`,nextWeek:`MMM DD, YYYY${o?", h:mma":""}`};if(a&&(l={sameDay:`[Today]${o?", h:mma":""}`,nextDay:`[Tomorrow]${o?", h:mma":""}`,lastDay:`[Yesterday]${o?", h:mma":""}`,sameElse:`MMM DD${o?", h:mma":""}`,lastWeek:`MMM DD${o?", h:mma":""}`,nextWeek:`MMM DD${o?", h:mma":""}`}),!r&&!n)return u(s).calendar(null,t||l);let d=h(r),m=h(n)-d;return n||(m=Math.abs(m)),u(s).utcOffset(m).calendar(null,t||l)},mr=(e,t="YYYY-MM-DD")=>{let r=new Date(e);return Number.isNaN(r.getTime())?"":u(e).format(t)},pr=e=>u(e).endOf("day").toDate().valueOf();function gr(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?`${y(t)}:${y(r)}:${y(n)}`:`${y(r)}:${y(n)}`}function be(e,t,r="seconds"){let n={seconds:1,minutes:60,hours:3600,days:86400};return (Date.now()-e)/1e3<t*n[r]}var fr=e=>{let t=Date.now(),r=Math.floor((t-e)/1e3),n=Math.floor(r/60);return be(e,60,"seconds")?"just now":be(e,60,"minutes")?`${n} min${n===1?"":"s"} ago`:"1 hour ago"},xr=e=>u(e).isToday(),yr=e=>u(e).isYesterday(),Qe=1970,Tr=()=>De({startYear:Qe}),hr=(e=10)=>De({length:e,direction:"past"});function Cr(e,t){if(!e)return null;let r=u(e);if(!r.isValid())return null;try{return new Date(r.tz(t).format("YYYY-MM-DDTHH:mm:ss.SSS"))}catch{return null}}var b=["sun","mon","tue","wed","thur","fri","sat"];function Sr(e="sun"){let t=b.indexOf(e.toLowerCase());return t===-1?(console.error(`${e} is not a valid day`),b):[...b.slice(t),...b.slice(0,t)]}var br=e=>{if(e==null)return;let t=u(e);return t.isValid()?t.valueOf():void 0};var Ee=e=>{let r=e.reduce((n,o)=>{let s=o.entities?.find(i=>i.default);return s&&n.push({entityId:s.id,country:o}),n},[])[0]?.country||e[0];return e.find(n=>n.id===r?.id)};var we=(e,t,r)=>{let n=e.find(a=>a.id===t)??{},o=r.find(a=>a.id===t)??{},s=o.countries.length===1?n.countries.find(a=>a.id===o.countries?.[0].id):Ee(n?.countries),i=s?.entities?.find(a=>a.default);return {...n,defaultCountry:s,defaultEntity:i}},et=({merchantsIds:e,options:t})=>!e||!e?.length?{}:{business:{merchant:e,...t}},tt=e=>["payment_facilitator_14po8231419aIsi1fN7F385"].includes(e),Ar=({segmentCode:e,segmentId:t,segmentTypeCode:r,merchantsIds:n=[],options:o={}})=>{let s="PSP"===r?e:r;return tt(t)?et({merchantsIds:n,options:o}):s==="PAYMENT_TECHNOLOGY"?{payment_provider:{technology:{orchestrator:[t],...o}}}:s==="PAYMENT_GATEWAY"||s==="PAYMENT_GATEWAY_PROVIDER"?{payment_provider:{technology:{gateway:[t],...o}}}:s==="PAYMENT_FACILITATOR"?{payment_provider:{institution:{facilitator:[t],...o}}}:s==="PAYMENT_ACQUIRER"?{payment_provider:{institution:{acquirer:[t],...o}}}:s==="PLATFORM"?{platform:[t],...o}:s==="DEVELOPMENT"?{development_agency:[t],...o}:{}};var Ae="Test_Fixed_Secret_Key",A="tap-dashboard-navigation-data",_e="tap-dashboard-user-data",_="tap-dashboard-user-jwt",O="tap-dashboard-report",I="tap-dashboard-calender-timezone",N="tap-dashboard-calender-timezone-history",L="tap-dashboard-global-table-mode",Oe="sheetview_columns",P="dock-preview-windows",w="views";function Lr(){localStorage.setItem(Ae,p$1);}function Ie(){return localStorage.getItem(Ae)}function Pr(e){localStorage.setItem(A,JSON.stringify(e));}function Mr(){try{let e=localStorage.getItem(A);if(!e)return null;let t=JSON.parse(e);return rt(t,r=>{r?.forEach(n=>{n.payload&&n.payload.dateRange&&(n.payload.dateRange=n.payload.dateRange.map(o=>new Date(o)));});})}catch{return null}}function Rr(){localStorage.removeItem(A);}var vr=e=>{localStorage.setItem(_,e);},M=()=>localStorage.getItem(_),Fr=()=>{localStorage.removeItem(_);},$r=e=>{localStorage.setItem(_e,JSON.stringify(e));},R=()=>{let e=localStorage.getItem(_e);if(!e)return null;try{return JSON.parse(e)}catch{return null}},Ur=()=>{let e=R();return e?we(e?.segments,e?.active_segment_id,e?.active_segments):null},kr=()=>{let e=R();return e?e?.active_segments.find(t=>t.id===e.active_segment_id):null},nt=()=>{let e=M();if(!e)return true;try{let[,t]=e.split(".");if(!t)return !0;let r=t.replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"="),{exp:o}=JSON.parse(atob(n));return typeof o!="number"?!0:Date.now()>=o*1e3}catch{return true}},Wr=()=>!nt()&&!!R(),Yr=(e,t)=>{localStorage.setItem(`${O}-${e}`,t);},Br=e=>localStorage.getItem(`${O}-${e}`),zr=e=>{localStorage.removeItem(`${O}-${e}`);},Vr=e=>{localStorage.setItem(I,JSON.stringify(e));},Gr=e=>{localStorage.setItem(N,JSON.stringify(e));},Hr=()=>{try{let e=localStorage.getItem(I);return e?JSON.parse(e):null}catch{return null}},Kr=()=>{try{let e=localStorage.getItem(N);return e?JSON.parse(e):null}catch{return null}},jr=()=>{localStorage.removeItem(I);},Jr=()=>{localStorage.removeItem(N);},qr=e=>{localStorage.setItem(L,e);},Xr=()=>localStorage.getItem(L)||"default",Zr=()=>{localStorage.removeItem(L);},Qr=e=>localStorage.setItem(Oe,JSON.stringify(e)),en=()=>JSON.parse(localStorage.getItem(Oe)||"{}"),tn=e=>{try{localStorage.setItem(P,JSON.stringify(e));}catch(t){console.warn("Failed to save preview cache:",t);}},rn=()=>{try{let e=localStorage.getItem(P);return e?JSON.parse(e):[]}catch{return []}},nn=()=>{try{localStorage.removeItem(P);}catch(e){console.warn("Failed to remove preview storage:",e);}},on=(e,t,r)=>{try{return JSON.parse(localStorage.getItem(w)??"{}")?.[e]?.[t]?.[r]?.selectedViewId??null}catch{return null}},sn=(e,t,r,n)=>{try{let o=JSON.parse(localStorage.getItem(w)??"{}");localStorage.setItem(w,JSON.stringify({...o,[e]:{...o[e],[t]:{...o[e]?.[t],[r]:{...o[e]?.[t]?.[r],selectedViewId:n}}}}));}catch{return null}},Ne=()=>{localStorage.clear();};var st={headers:{"Content-Type":"application/json",Accept:"application/json"}},v=ot.create({baseURL:n,headers:{...st}}),it=["users/switch-segment","users/update-segment"];v.interceptors.request.use(e=>new Promise(t=>{let r=false;if(it.includes(e.url??"")){t(e);return}let n=s=>{let i=s.data;if(i==="network_request_waiting"){r=true;return}i==="resume_network_request"&&(r=false);};window.addEventListener("message",n);let o=setInterval(()=>{r||(t(e),clearInterval(o),window.removeEventListener("message",n));},0);}));v.interceptors.request.use(e=>{e.headers.Authorization=M();let t=Ie();return t&&!e.headers["x-test-secret"]&&(e.headers["x-test-secret"]=t),e});v.interceptors.response.use(e=>e,e=>(e.response?.data?.force_logout&&(Ne(),window.location.href="/login"),Promise.reject(e)));function mn(e){let{sandboxMode:t,fixedSecretKey:r,applicationId:n,serviceId:o,functionId:s,userFunctionId:i,segmentId:a,...l}=e??{};return {...l,live_mode:t?"false":"true",...!!r&&{"x-test-secret":r},...!!n&&{application_id:n},...!!o&&{service_id:o},...!!s&&{function_id:s},...!!i&&{user_function_id:i}}}function gn(e){let r=(e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"")).toLowerCase();if(r.includes("edg"))return "edge";if(r.includes("opr")||r.includes("opera"))return "opera";if(r.includes("chrome")&&!r.includes("edg")&&!r.includes("opr"))return "chrome";if(r.includes("safari")&&!r.includes("chrome"))return "safari";if(r.includes("firefox"))return "firefox";if(r.includes("msie")||r.includes("trident"))return "ie";if(r.includes("tor"))return "tor";if(r.includes("uc"))return "uc";if(r.includes("yandex"))return "yandex"}var fn=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xn=e=>{let t=e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"");if(!t)return;let r=t.toLowerCase();if(/ipad|tablet|playbook|silk|(android(?!.*mobile))/.test(r))return "TABLET";if(/mobile|iphone|ipod|android.*mobile|blackberry|iemobile|opera mini|windows phone/.test(r))return "MOBILE";if(/desktop|laptop|macintosh|windows|linux|unix|freebsd|openbsd|netbsd|chromeos|solaris|beos|os/.test(r))return "DESKTOP"};function Cn(){let e=["#D6D6D6","#BFF192","#E4EE92","#FDFCAB","#FFE78E","#FFCE6B","#FFBC8C","#FF947C","#C88FA3","#B988C9","#9A8BBB","#89B6FF","#ACD4E1","#ADBABE","#C0DAAA","#D5DA91","#EAE7A2","#DFCE9C","#C9A997","#858585","#000000"];return e[Math.trunc(Math.random()*e.length)]}function Sn(){let e=["linear-gradient(135deg, #31D5C8 0%, #1186C5 100%)","linear-gradient(135deg, #A2E9BD 0%, #44BB74 100%)","linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), linear-gradient(135deg, #6BF6EB 0%, #32D6C9 100%)","linear-gradient(135deg, #61AFC9 0%, #7FBFD4 100%)","linear-gradient(135deg, #9DB7A4 0%, #7FBFD4 100%)","linear-gradient(135deg, #D7B38C 0%, #FFE09F 100%)","linear-gradient(135deg, #ADD6A2 0%, #FFDDB2 100%)"];return e[Math.trunc(Math.random()*e.length)]}var Le={r:0,g:0,b:0,alpha:1},bn=e=>{try{let t=Pe(e).rgb(),{r,g:n,b:o,alpha:s=1}=t.object();return {value:{r,g:n,b:o,alpha:s},stringified:`rgba(${r},${n},${o},${s})`}}catch(t){console.error(t),console.warn(`Invalid hex color: "${e}". Falling back to black.`);let{r,g:n,b:o,alpha:s}=Le;return {value:Le,stringified:`rgba(${r},${n},${o},${s})`}}},Dn=e=>Pe(e).hexa();var An={fx:"Foreign Exchange",dcc:"Dynamic Currency Conversion"},Me={BHD:3,KWD:3,JOD:3,OMR:3},F=new Map,_n=(e,t)=>{if(Number.isNaN(e))return "0";try{return F.has(t)||F.set(t,new Intl.NumberFormat("en-US",{currency:t,minimumFractionDigits:Me[t]?3:2})),F.get(t).format(e)}catch(r){return console.error(r),"0"}},at=e=>e%1===0,ct=e=>e%.1===0,lt=e=>Math.abs(e*10%1)===.1,On=(e,t)=>{let r=Me[t],n=e.toString();return Number.isInteger(e)&&at(e)?n=e.toFixed(r?3:2):lt(e)?n=`${n}${r?"00":"0"}`:ct(e)&&(n=`${n}${r?"00":"0"}`),n};function ut(e,t=2){let r=parseFloat(e.toString());if(isNaN(r)){let[a,l]=0 .toFixed(t).split("."),d=`${a}.${l}`;return {integerAmount:a,decimalAmount:l,fullAmount:d}}let n=r.toFixed(t),[o,s]=n.split("."),i=parseInt(o).toLocaleString();return {integerAmount:i,decimalAmount:s,fullAmount:`${i}.${s}`}}function In(e=0,t=""){return ut(e,V[t]?.decimals??2)}function Ln(e){let t=e.request.currency,r=e.select.currency,n=e.merchant.currency,o=r!==n&&r===t&&t&&n&&r,s=r!==t&&t&&n&&r,i=o?"fx":void 0;i=s?"dcc":i;let a=o?e.merchant:void 0;return a=s?e.request:a,{type:i,shownAmount:a}}var Pn=e=>typeof e=="number"?e:Number(e.replace(/,/g,""));var dt=new Intl.DisplayNames(["en"],{type:"region"});function Rn(e){try{return dt.of(e)}catch(t){console.error(t?.response?.data?.error?.message);}}function vn(e){return e==="SA"}var S=e=>C(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD",lastWeek:"MMM DD",nextWeek:"MMM DD"}),kn=(e,t)=>{if(!e)return "";let r=new Date,n=u(e).isSame(r,"year");return t?C(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow at] h:mm A",lastDay:"[Yesterday at] h:mm A",sameElse:"[on] MMM DD [at] h:mm A",lastWeek:"[on] MMM DD [at] h:mm A",nextWeek:"[on] MMM DD [at] h:mm A"}):n?C(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD",lastWeek:"[on] MMM DD",nextWeek:"[on] MMM DD"}):C(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD, YYYY",lastWeek:"[on] MMM DD, YYYY",nextWeek:"[on] MMM DD, YYYY"})},Wn=e=>{let t=e?.payout,r=e?.settlement;if(!e)return {tooltip:[],status:void 0};if(!["PAID_OUT","SETTLED"].includes(e?.status||""))return {tooltip:[...r?.scheduled?[{left:"settlement_scheduled",right:`${S(r?.scheduled)}`}]:[],...t?.scheduled?[{left:"payment_scheduled",right:`${S(t?.scheduled)}`}]:[]],status:"PENDING"};if(e?.status==="PAID_OUT"){let n=t?.activities.find(o=>o.status==="PAID_OUT");return {tooltip:[{left:"paidOut",right:`${S(n?.date)}`}],status:"PAID_OUT"}}if(e?.status==="SETTLED"){let n=r?.activities.find(o=>o.status==="SETTLED");return {tooltip:[{left:"settled",right:`${S(n?.date)}`},...t?.scheduled?[{left:"payment_scheduled",right:`${S(t?.scheduled)}`}]:[]],status:"SETTLED"}}};var zn=(e,t)=>{let{isFirst:r,isLast:n}=t||{};return `${(e+0)/898*100}%`},Vn=({table:e,cellID:t,tableMode:r})=>{switch(e){case "charge":return z[t][r];case "refund":return I$1[t][r];case "authorization":return y$1[t][r];case "intents":return B[t][r];case "topups":return K[t][r];case "destinations":return A$1[t][r];case "leads":return D$1[t][r];case "orders":return E[t][r];case "tokens":return J[t][r];case "payouts":return F$1[t][r];case "protectCharges":return H[t][r];case "protectAuthorizations":return G[t][r];case "wallet":return L$1[t][r];case "invoices":return C$1[t][r];case "authentications":return x$1[t][r];case "walletDetails":return M$1[t][r];case "walletStatement":return N$1[t][r];case "merchants":return O$1[t][r];case "terminals":return P$1[t][r];case "orchestrationTerminals":return Q[t][r];case "orchestrationRouting":return R$1[t][r];default:return "100px"}},Gn=(e,t)=>{let r,n=window.innerHeight-24-264;return e?r=window.innerHeight/1.7:t?r=n-100:r=n-20,Math.floor(r/(e||t?52:70))},pt=()=>{let e=window.innerHeight*.82/1.24-57;return Math.floor(e/70)},Hn=e=>{let t=pt();return e<t+1},Kn=e=>e==="default",jn=e=>e==="sheet",Jn=()=>({charge:{prefixes:["chg_","payout_","settlement_","terminal_"],accessor:e=>[e.id,e.capture?.charge?.map(t=>t.id),e.charge?.id,e.transactions?.map(t=>t.id),e.charge_id],label:"Charge",appCode:i.acceptance.code,serviceCode:i.acceptance.services.charges.code,icon:"capture"},authorize:{prefixes:["auth_"],keys:["id","authorize.id","source.id","charge.source.id"],label:"Authorization",appCode:i.acceptance.code,serviceCode:i.acceptance.services.authorization.code,icon:"capture"},intents:{prefixes:["intent_"],keys:[],label:"Intents",appCode:i.acceptance.code,serviceCode:i.acceptance.services.intents.code,icon:"capture"},refunds:{prefixes:["re_","payout_"],accessor:e=>[e?.refunds?.refund?.map(t=>t.id),e?.id,...e?.refunds?.length?[e?.refunds?.map(t=>t.id)]:[]],label:"Refunds",appCode:i.acceptance.code,serviceCode:i.acceptance.services.refunds.code,icon:"refund"},authentication:{prefixes:["auth_payer_"],keys:["authentication.id"],label:"Authentication",appCode:i.authentication.code,serviceCode:i.authentication.services.authentication.code,icon:"capture"},order:{prefixes:["order_","ord_"],keys:["order.id"],label:"Order",appCode:i.order.code,serviceCode:i.order.services.orders.code,icon:"capture"},chargeFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:i.protect.code,serviceCode:i.protect.services.chargesFlags.code,icon:"flag"},authorizationFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:i.protect.code,serviceCode:i.protect.services.authorizationsFlags.code,icon:"flag"},token:{prefixes:["tok_"],keys:["source.id"],label:"Token",appCode:i.tokens.code,serviceCode:i.tokens.services.tokens.code,icon:"capture"},destination:{prefixes:["trf_","payout_"],accessor:e=>[e?.destinations?.destination?.map(t=>t?.transfer?.id),e?.id],label:"Destination",appCode:i.acceptance.code,serviceCode:i.acceptance.services.destinations.code,icon:"destination"},payout:{prefixes:["payout_"],keys:["balance.payout.id"],label:"Payout",appCode:i.payouts.code,serviceCode:i.payouts.services.payouts.code,icon:"capture"},settlement:{prefixes:["settlement_"],keys:["settlement.id"],label:"Settlement",appCode:i.acceptance.code,serviceCode:i.acceptance.services.settlements.code,icon:"capture"},intent:{prefixes:["intent_"],keys:["intent.id"],label:"Intent",appCode:i.acceptance.code,serviceCode:i.acceptance.services.intents.code,icon:"capture"},topup:{prefixes:["topup_"],keys:["topup.id"],label:"Topup",appCode:i.acceptance.code,serviceCode:i.acceptance.services.topups.code,icon:"capture"}});var Qn=e=>typeof e=="string"&&e.trim().length>0,U=(e,t)=>{if(!t)return e;let r=e.indexOf(t);return e.substring(r+t.length)},$=new Map,k=(e,t)=>($.has(t)||$.set(t,new RegExp(t,"gi")),e.match($.get(t))?.length??0),eo=e=>e.reduce((t,r)=>(t.push(r[0]),t),[]),to=()=>crypto?.randomUUID?.()||Math.random().toString(36).substring(2,15),ro=e=>{if(navigator.clipboard)navigator.clipboard.writeText(e);else {let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove();}},no=e=>typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),oo=e=>{let[t]=e.split("%");return parseFloat(t)||0},so=e=>`\u2022\u2022\u2022 ${e.slice(-4)}`,io=(e,t=/_/g,r=" ")=>{let n=e.replace(t,r);return Re(n)},ao=e=>Ue(Re(e));var lo=(e,t)=>!e?.last_four||!t?"":`${t?.toLowerCase()} - ${e?.last_four}`,uo=(e,t)=>!t||!e?"":`${e?.toLowerCase()||"ID"} \u2022 ${t?.slice(-4)}`;function po({unCapturedCode:e,unCapturedMessage:t,acquirerCode:r,acquirerMessage:n,gatewayCode:o,gatewayMessage:s}){let i=e&&t&&`${e} - ${t}`,a=r&&n&&`${r} - ${n}`,l=o&&s&&`${o} - ${s}`;return {unCapturedTooltip:i,acquirerTooltip:a,gatewayTooltip:l}}function fo(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var W=e=>e==null||e==="";function xo(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>Array.isArray(t)?t.length>0&&t?.some(r=>!W(r)):typeof t=="object"?Object.values(t||{}).some(r=>!W(r)):!W(t)))}var ho=()=>q===r.TAPSTERS_FRONTEND;var So=e=>e.replace(/[^0-9]/g,"");function wo({rowData:e,prefixes:t,keys:r=[],accessor:n}){let o=!!n;return (o?n?.(e):r)?.filter(Boolean)?.reduce((a,l)=>{let d=o?l:Se(e,l);return typeof d=="string"&&t?.some(g=>d.includes(g)&&k(U(d,g),"_")===0)&&a.push(d),Array.isArray(d)&&d.length>0&&d.every(g=>typeof g=="string"&&t?.some(m=>g.includes(m)&&k(U(g,m),"_")===0))&&a.push(...d),a},[])}var _o=450,Oo=600;var Io=3;var No=20,xt=(r=>(r.Index="index",r.Date="date",r))(xt||{}),Lo={name:"index",label:"",selected:true,menuItems:void 0,order:0,pinned:"start",isDefaultPinned:true,pinnable:true},Po={name:"date",label:"Date",selected:true,menuItems:void 0,order:1,pinned:"start",isDefaultPinned:true,pinnable:true},Mo={date:"Date",index:"Index"},Ro={sheet:["sheet"],default:["advanced","default"],text:["text"]},vo={sheet:"Advanced",default:"Sheet",text:"text"},yt={id:"default",label:"Default"},Fo={id:"custom",label:"Custom view"},$o=[yt];function Yo(e,t,r){return e.filter(n=>{let o=n?.id?.toString(),s=t.find(m=>{let Be=m.code?.toLowerCase()===o?.toLowerCase(),ze=m.name?.toLowerCase()===o?.toLowerCase();return (Be||ze)&&m.selected}),i=!!n.tableViewId&&(s?.menuItems?.length||0)>0,a=s?.menuItems?.find(m=>m.name?.toLowerCase()===n.tableViewId?.toString()?.toLowerCase())?.selected,l=!!s&&(a||!i),g=["actions","action_icon",...r?["index","date"]:[]].includes(o?.toLowerCase()??"");return !!(l||g)})}function Bo(e,t){if(t.toLowerCase()==="index")return 0;let r=e.findIndex(o=>o.code?.toLowerCase()===t?.toLowerCase()),n=e[r];return r>=0?n?.sort_order??r:999}function zo(e,t,r){return e?.find(n=>{let o=n.code?.toLowerCase()===t.toLowerCase(),s=n.name?.toLowerCase()===t.toLowerCase();return o||s})?.menuItems?.find(n=>n.name?.toLowerCase()===r.toLowerCase()&&n.selected)?.selected||false}function Vo(e,t){return e?.filter(r=>!!r.name?.[0]?.text)?.map(r=>({code:r.code,label:x(r.name,t),name:x(r.name,t)||"",selected:r?.selected!==false,sort_order:r.sort_order,menuItems:r.fields?.map(n=>n.parameters?.filter(o=>!!o.code)?.map(o=>({code:o.code,label:Re(o.code),name:`${o.code}`,selected:o?.selected!==false})))?.flat()?.filter(n=>!!n.name)}))||[]}function Go(e){return e.map(t=>({...t.code?{code:t.code}:{},name:[{text:t.name,lang:"en"}],selected:t.selected,sort_order:1,sorting:"descending",fields:t.menuItems?.map(r=>({code:r.name,type:"single",parameters:[{parameter:r.name,code:r.name,selected:r.selected}]}))||[]}))}var Ho=({columnsView:e,columnsIds:t,selected:r})=>{let n=new Set(t.map(s=>s?.toLowerCase())),o=s=>({...s,selected:r,fields:s.fields?.map(i=>({...i,parameters:i.parameters?.map(a=>({...a,selected:r}))??[]}))});return e.map(s=>n.has(s.code?.toLowerCase()??"")||n.has(s.name?.[0]?.text?.toLowerCase()??"")?o(s):s)};function jo(e){return {fullPhone:e?.number?`${e?.country_code||""} ${e?.number}`:"",code:e?.country_code||"",number:e?.number||""}}var ve=(e,t)=>{let r=e.type==="url"?e.url:window.URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=r,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),e.type==="content"&&window.URL.revokeObjectURL(r);},qo=(e,t)=>ve({type:"content",content:e},t),Xo=(e,t)=>ve({type:"url",url:e},t);var ht=e=>!!(e?.isAxiosError&&!e?.response),Qo=(e,t="")=>e?.response?.data?.error?.message?.trim()||t,es=e=>!!e,Ct=e=>(e?.code==="ECONNABORTED"||e?.message?.toLowerCase().includes("timeout"))??false,ts=e=>!!(e?.response?.status===404||e?.response?.status===400&&e?.response?.data?.error?.message?.toLowerCase().includes("not found")),D=({code:e,message:t})=>e?`${t} - ${e}`:t,rs=({error:e,fallbackMessage:t})=>{if(ht(e)){let n=t??"networkError";return {code:null,message:n,formatted:D({code:null,message:n})}}if(Ct(e)){let n=t??"yourRequestOutPleaseTryAgain";return {code:null,message:n,formatted:D({code:null,message:n})}}if(e?.response&&typeof e.response.data=="object"&&"error"in e.response.data){let{code:n,message:o}=e.response.data.error;return {code:n,message:o,formatted:D({code:n,message:o})}}let r=t??"somethingWentWrong";return {code:null,message:r,formatted:D({code:null,message:r})}};var os=(e,t)=>e.find(r=>r.code===t),ss=(e,t)=>e.find(r=>r.code===t);var cs=()=>["passport","national_id","iqamah","civil_id"].map(e=>({id:e,label:Re(e)}));function us(e,t=2){let n=e??0;if(!n)return "0 kb";let o=n/1024;return o>1024?`${(o/1024).toFixed(t)} mb`:`${o.toFixed(t)} kb`}function ds(e){return e?.file?.size!==void 0&&e?.file?.name!==void 0}var gs=e=>{let t=e?.split(".").pop()?.toLowerCase()??"";return Ha[t]??Ve$1},fs=(e,t,r)=>`${e}-${t}-${r}`;var ys=e=>e?/[\u0600-\u06FF]/g.test(e):false;function Ts(e,t="en"){return (e||[]).find(r=>(r?.lang||r?.locale)===t)||e?.[0]}var x=(e,t="en")=>(e||[]).find(r=>r?.lang===t)?.text,hs=(e,t="en")=>(e||[]).find(r=>r?.lang===t);var Ss=e=>{let t=e?.wallet==="SV Wallet"?"walletStoredValue":"walletPassThru";return e?.type==="Wallet"?t:e?.type},bt={AMERICAN_EXPRESS:"AMEX"},Fe=e=>bt[e.toUpperCase()]??e.toUpperCase(),bs=(e,t)=>!!e&&!!t&&Fe(e)===Fe(t);var Es=e=>({Local:e.success.light,Regional:e.info.light,Global:e.warning.light});var _s=(e,t)=>{if(t==null)return "";let r=fa[e];return e===ea.COUNT?t===1?r:`${r}s`:r};var p={primary:"#1F88D0",background:"white",border:"#F2F2F2",transparent:"transparent"},f={thin:"0.5px",thick:"1px",none:"0px"},$e={minHeight:"28px",fullHeight:"100%"},Is=({isSelected:e,isCellSelected:t,isColumnSelected:r,isRowSelected:n,isLastRow:o})=>e?n?Dt():t&&!r?Et():r?wt(o):{}:{},Dt=()=>({backgroundColor:p.background,color:p.primary}),Et=()=>({border:`${f.thin} solid ${p.primary}`,backgroundColor:p.background,color:p.primary,borderRadius:"2px"}),wt=e=>{let t=At(),r=_t(e);return {borderWidth:t,borderStyle:"solid",borderColor:p.primary,borderBottom:r,height:$e.fullHeight,minHeight:$e.minHeight,display:"flex",alignItems:"center"}},At=()=>{let{none:e,thin:t}=f;return `${e} ${t} ${t} ${t}`},_t=e=>e?`${f.thick} solid ${p.primary}`:`${f.thin} solid ${p.border}`,Ns=({effectiveFirst:e,isPinnedStart:t,isPinnedEnd:r})=>({borderTop:`${f.thin} solid ${p.primary}`,borderBottom:`${f.thin} solid ${p.primary}`,borderRight:`${f.thin} solid ${r?p.primary:"none"}`,borderLeft:`${f.thin} solid ${t&&e?p.primary:"transparent"}`}),Ls={left:"flex-start",center:"center",right:"flex-end"};function Ps(e,t){return t==null?e:[e,...Array.isArray(t)?t:[t]]}function Ms(...e){return e.filter(Boolean).join(" ")||void 0}var Fs=e=>U$1.find(t=>t.countryCode===e)??U$1[0],$s=e=>U$1.find(t=>t.timezone===e)??U$1[0];function zs(e){return {name:"Payment Methods",type:"payment_methods",options:e?.map(t=>({name:Ue(Re(x(t?.name))),type:t?.code,icon:ga[t.code]??ga.CARD,options:t.payment_methods?.map(r=>({name:x(r.name),type:r.code}))}))}}function Vs(e=[]){return {name:"Payment Schemes",type:"payment_scheme",options:e.filter(t=>t.code).map(t=>({name:Ue(Re(x(t?.name))),type:t?.code}))}}var We=["120px","180px","100px","150px","200px","140px","160px","110px","190px","130px"],Ot={id:"index",header:"",width:"34px",order:0,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},It={id:"date",header:"",width:"120px",order:1,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},Nt={id:"action_icon",header:"",width:"36px",order:We.length+3,hidden:false,sortable:false,pinned:"end",pinnable:true,isDefaultPinned:true},Lt=(e=We)=>{let t=e.map((r,n)=>({id:`skeleton-col-${n}`,header:"",width:r,order:n+2,hidden:false,sortable:false,pinnable:false}));return [Ot,It,...t,Nt]},Hs=(e,t,r)=>r&&t?Lt():[...e];var js=(e,t)=>e.map(r=>{let n=Object.entries(t);if(!r.default||!r.layout?.length||!n.length)return r;let o=new Map(n.map(([i,a])=>[i.toLowerCase(),a])),s=r.layout.map(i=>({...i,columns:i.columns?.map(a=>{let l=a.code?.toLowerCase();if(!l||!o.has(l))return a;let d=o.get(l)??false;return {...a,default:d,fields:a.fields?.map(g=>({...g,default:d}))}})}));return {...r,layout:s}});var Xs=(e,t)=>t.some(r=>!!e[r]),Zs=(e,t,r)=>t?e:e.map(n=>{if(r.hiddenFilterColumnIds.includes(n.id)){let{filter:s,...i}=n,a=n.id,l=typeof i.header=="function"?Re(a):i.header;return {...i,header:l}}let{hiddenFilterOptionKeys:o}=r;if(o&&n.filter&&"options"in n.filter&&n.filter.options){let s=n.filter.options,i=s.filter(a=>!a.apiKey||!o.includes(a.apiKey));if(i.length!==s.length)return {...n,filter:{...n.filter,options:i}}}return n});typeof window<"u"&&Ye.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer");});var Mt={USE_PROFILES:{html:true},ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|[^a-z]|[-a-z.+]+(?:[^-a-z.+:]|$))/i,WHOLE_DOCUMENT:true},ti=e=>typeof window>"u"?"":String(Ye.sanitize(e||"",Mt));var ni=e=>window?.__TAPOS_NEWRELIC_TRACKING_EVENTS__?.trackFeatureEvent?.(e),oi=e=>e.toISOString();function ii(e,t){let r=e.replace(/:/g,"");return t?`${t}-${r}`:r}export{Wr as $,to as $a,x as $b,gr as A,Sn as Aa,Fo as Ab,be as B,bn as Ba,$o as Bb,fr as C,Dn as Ca,Yo as Cb,xr as D,An as Da,Bo as Db,yr as E,Me as Ea,zo as Eb,Tr as F,_n as Fa,Vo as Fb,hr as G,On as Ga,Go as Gb,Cr as H,ut as Ha,Ho as Hb,Sr as I,In as Ia,jo as Ib,br as J,Ln as Ja,ve as Jb,we as K,Pn as Ka,qo as Kb,et as L,Rn as La,Xo as Lb,tt as M,vn as Ma,ht as Mb,Ar as N,S as Na,Qo as Nb,Lr as O,kn as Oa,es as Ob,Ie as P,Wn as Pa,Ct as Pb,Pr as Q,zn as Qa,ts as Qb,Mr as R,Vn as Ra,rs as Rb,Rr as S,Gn as Sa,os as Sb,vr as T,Hn as Ta,ss as Tb,M as U,Kn as Ua,cs as Ub,Fr as V,jn as Va,us as Vb,$r as W,Jn as Wa,ds as Wb,R as X,Qn as Xa,gs as Xb,Ur as Y,U as Ya,fs as Yb,kr as Z,k as Za,ys as Zb,nt as _,eo as _a,Ts as _b,Ft as a,Yr as aa,ro as ab,hs as ac,$t as b,Br as ba,no as bb,Ss as bc,Ut as c,zr as ca,oo as cb,bs as cc,kt as d,Vr as da,so as db,Es as dc,Yt as e,Gr as ea,io as eb,_s as ec,Bt as f,Hr as fa,ao as fb,p as fc,zt as g,Kr as ga,lo as gb,Is as gc,He as h,jr as ha,uo as hb,Ns as hc,Vt as i,Jr as ia,po as ib,Ls as ic,Gt as j,qr as ja,fo as jb,Ps as jc,y as k,Xr as ka,W as kb,Ms as kc,Ht as l,Zr as la,xo as lb,Fs as lc,h as m,Qr as ma,ho as mb,$s as mc,nr as n,en as na,So as nb,zs as nc,or as o,tn as oa,wo as ob,Vs as oc,sr as p,rn as pa,_o as pb,We as pc,ir as q,nn as qa,Oo as qb,Lt as qc,ar as r,on as ra,Io as rb,Hs as rc,cr as s,sn as sa,No as sb,js as sc,lr as t,Ne as ta,xt as tb,Xs as tc,ur as u,v as ua,Lo as ub,Zs as uc,dr as v,mn as va,Po as vb,ti as vc,De as w,gn as wa,Mo as wb,ni as wc,C as x,fn as xa,Ro as xb,oi as xc,mr as y,xn as ya,vo as yb,ii as yc,pr as z,Cn as za,yt as zb};
@@ -1 +1 @@
1
- import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-MH6HYUUQ.js';import {a as a$5}from'./chunk-MKGIB6QH.js';import {a as a$2}from'./chunk-GLYU6JBK.js';import {c}from'./chunk-LQ7Y4QFG.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-ZZUSTQRD.js';import {a}from'./chunk-KHM5KW53.js';import {b}from'./chunk-OCAA7Q56.js';import {z}from'./chunk-JWG5IWOL.js';import {a as a$4}from'./chunk-HQHSHQX6.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-PBMQM3P4.js';import {s}from'./chunk-YPGWSHOT.js';import {T,si,ui,ti,ri,yi,Yg,Pg,Xg,Lj,Mj,tb,ak,dk,uk,bk,ub,va,ua,mk,h,Og}from'./chunk-7567D5HA.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:ri,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:ti,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:ui,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:si,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=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&&lt[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("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$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:yi,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:Mj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Lj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Xg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Pg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:Yg,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=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$1=useMemo(()=>p.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$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}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:bk},CAPTURED:{icon:ak}};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,currency:a$1,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$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{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(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:dk,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,currency:a$1,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$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{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:uk,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(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:uk,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={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{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$1,gatewayCode:a$1,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$3[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,{src:a$3[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$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{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$1&&jsx(a,{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$1]})}),n&&jsx(a,{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(a,{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(a,{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(a,{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(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{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(a,{title:l,children:jsx(a$4,{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,{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=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${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$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{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$1,chipIndex:a$1=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$1)return jsxs(b,{chipIndex:a$1,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(a,{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(a,{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:mk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{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}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}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:Og,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=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(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.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(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$3,e,d,c as c$1}from'./chunk-MH6HYUUQ.js';import {a as a$5}from'./chunk-SK7JK4ZQ.js';import {a as a$2}from'./chunk-E2PNATKN.js';import {c}from'./chunk-Q6IEHGQD.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-6GTP4QNX.js';import {a}from'./chunk-KHM5KW53.js';import {z}from'./chunk-44NSVGTZ.js';import {a as a$4}from'./chunk-LM2B4ZZN.js';import {b}from'./chunk-4WVB6I3B.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-3DEK3VMQ.js';import {s}from'./chunk-MQP3RGOO.js';import {T,si,ui,ti,ri,yi,Yg,Pg,Xg,Lj,Mj,tb,ak,dk,uk,bk,ub,va,ua,mk,h,Og}from'./chunk-7567D5HA.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:ri,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:ti,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:ui,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:si,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=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&&lt[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("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$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:yi,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:Mj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Lj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Xg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Pg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:Yg,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=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$1=useMemo(()=>p.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$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}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:bk},CAPTURED:{icon:ak}};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,currency:a$1,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$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{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(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:dk,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,currency:a$1,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$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{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:uk,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(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:uk,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={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{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$1,gatewayCode:a$1,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$3[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,{src:a$3[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$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{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$1&&jsx(a,{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$1]})}),n&&jsx(a,{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(a,{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(a,{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(a,{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(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{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(a,{title:l,children:jsx(a$4,{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,{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=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${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$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{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$1,chipIndex:a$1=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$1)return jsxs(b,{chipIndex:a$1,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(a,{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(a,{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:mk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{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}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}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:Og,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=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(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.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(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};
@@ -0,0 +1 @@
1
+ import {a as a$3}from'./chunk-E2PNATKN.js';import {a as a$1}from'./chunk-A4OGYKRA.js';import {a as a$2}from'./chunk-PTEY6JXB.js';import {f}from'./chunk-44NSVGTZ.js';import {a}from'./chunk-GNY2VGGW.js';import {vb,Eb,A,Cb,Pc}from'./chunk-7567D5HA.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a$1,{onMouseEnter:n=>{e.options?.length>0&&a(n.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a$1,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null);return jsxs(a$1,{onMouseEnter:l=>{e.options?.length>0&&a(l.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a$1,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$3,{src:s?Eb:A,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Cb,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,y)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),y===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$2,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:y=>{y.stopPropagation(),y.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$3,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$3,{src:Eb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var st=j;export{X as a,J as b,Q as c,st as d};
@@ -1 +1 @@
1
- import {b}from'./chunk-A2XBZDNA.js';import {yc}from'./chunk-PBMQM3P4.js';import {qi}from'./chunk-7567D5HA.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:qi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
1
+ import {b}from'./chunk-UFOWAL4X.js';import {yc}from'./chunk-3DEK3VMQ.js';import {qi}from'./chunk-7567D5HA.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:qi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};