@abtnode/blocklet-services 1.16.42-beta-20250408-050422-92c8eef3 → 1.16.42-beta-20250409-161010-b0a88c5c

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 (199) hide show
  1. package/api/index.js +1 -1
  2. package/api/routes/user-session.js +2 -2
  3. package/api/routes/user.js +36 -0
  4. package/api/services/auth/connect/destroy-myself.js +64 -0
  5. package/api/services/auth/index.js +2 -0
  6. package/api/services/auth/session.js +36 -16
  7. package/dist/assets/{ArrowDropDown-WXsjNpSB.js → ArrowDropDown-CDjPVis_.js} +1 -1
  8. package/dist/assets/{CheckCircle-D7CrWlJ6.js → CheckCircle-BHD7aj9l.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DeulnkX8.js → ChevronLeft-CUdxcGLW.js} +1 -1
  10. package/dist/assets/{ChevronRight-CACHNf5Y.js → ChevronRight-Bol9kSyE.js} +1 -1
  11. package/dist/assets/{Community-BKnwgGcO.js → Community-Ds1NG5Zj.js} +1 -1
  12. package/dist/assets/{DeleteOutline-DT1G93_1.js → DeleteOutline-BiIEYa8g.js} +1 -1
  13. package/dist/assets/{Done-D9sjuoNQ.js → Done-kAy_Y9ti.js} +1 -1
  14. package/dist/assets/{Download-CBzqKt6X.js → Download-COul5Jpx.js} +1 -1
  15. package/dist/assets/{EditIcon-Bww8_WRx.js → EditIcon-Bt91o1l6.js} +1 -1
  16. package/dist/assets/{Email-C6-GXQIV.js → Email-C7SKOpM8.js} +1 -1
  17. package/dist/assets/{Error-l_WxG8z-.js → Error-xVtnHALO.js} +1 -1
  18. package/dist/assets/{ExpandLess-uIJAqSZm.js → ExpandLess-CW9G6ynD.js} +1 -1
  19. package/dist/assets/{Google-BchHLUIl.js → Google-D98Bf-5Y.js} +1 -1
  20. package/dist/assets/{Holiday-BSfwdA-4.js → Holiday-Dfj3kBBI.js} +1 -1
  21. package/dist/assets/{InfoOutlined-DFTm-vVr.js → InfoOutlined-jnMrCCfZ.js} +1 -1
  22. package/dist/assets/{Launch-DQCS90NS.js → Launch-DFNlDQlk.js} +1 -1
  23. package/dist/assets/{LaunchOutlined-DttrDnYo.js → LaunchOutlined-yZsgpXar.js} +1 -1
  24. package/dist/assets/{Location-CT1S5M1P.js → Location--4ueDivQ.js} +1 -1
  25. package/dist/assets/{LockIcon-kY343jXt.js → LockIcon-B84lMZao.js} +1 -1
  26. package/dist/assets/{Meeting-PVrGyQbK.js → Meeting-CVVnP-bH.js} +1 -1
  27. package/dist/assets/{MoreHoriz-BD8SroCJ.js → MoreHoriz-BqdKN70-.js} +1 -1
  28. package/dist/assets/{OffSick-DD3oLLQu.js → OffSick-C_2x7yDI.js} +1 -1
  29. package/dist/assets/{Phone-BcpEH3XZ.js → Phone-CaKOX2Yu.js} +1 -1
  30. package/dist/assets/{PlayArrow-BEUAi9Bt.js → PlayArrow-CXtQLadK.js} +1 -1
  31. package/dist/assets/{QuestionMarkCircle-BHP2onYz.js → QuestionMarkCircle-5K6WR8Pc.js} +1 -1
  32. package/dist/assets/{ServerLogo-Bi89KNz4.js → ServerLogo-C4P-qXGV.js} +1 -1
  33. package/dist/assets/{Timezone-Ce85fX7w.js → Timezone-Bgwxnj29.js} +1 -1
  34. package/dist/assets/{TuneOutlined-CzDTcEdK.js → TuneOutlined-EaV8HxdX.js} +1 -1
  35. package/dist/assets/{ViewList-6gwww-su.js → ViewList-BPuXZDcI.js} +1 -1
  36. package/dist/assets/{WorkingRemotely-DfgJTsRm.js → WorkingRemotely-Dm2BOs5c.js} +1 -1
  37. package/dist/assets/{access-control-Bp6fLweq.js → access-control-CuKW2kRZ.js} +1 -1
  38. package/dist/assets/{actions-C9vqEgMU.js → actions-DqeM3yie.js} +1 -1
  39. package/dist/assets/{add-component-core-e0A2r7mm.js → add-component-core-DXPSI3Ti.js} +23 -22
  40. package/dist/assets/add-resource-S3Z1zjbJ.js +1 -0
  41. package/dist/assets/{addon-BNDsoean.js → addon-B5UBB-pU.js} +1 -1
  42. package/dist/assets/{advanced-vuRNp9gZ.js → advanced-Cvboset8.js} +1 -1
  43. package/dist/assets/api-BVwAqPhr.js +1 -0
  44. package/dist/assets/appearance-DmQgth7a.js +1 -0
  45. package/dist/assets/{audit-logs-C51Acdy3.js → audit-logs-LLoqbniS.js} +3 -3
  46. package/dist/assets/{base32-CEWQZb_G.js → base32-CMrsHquD.js} +1 -1
  47. package/dist/assets/{branding-PF95Dp3j.js → branding-BfxdFbW1.js} +2 -2
  48. package/dist/assets/{branding-B4OmIbxT.js → branding-DcviCyPr.js} +3 -3
  49. package/dist/assets/bundle-avatar-Ci9fNblN.js +1 -0
  50. package/dist/assets/button-OxbVr1Od.js +1 -0
  51. package/dist/assets/click-to-copy-q_I2l6Sg.js +1 -0
  52. package/dist/assets/cloneDeep-g5lbcy6_.js +1 -0
  53. package/dist/assets/complete-ogipf6id.js +45 -0
  54. package/dist/assets/{component-BbpzttYw.js → component-DVhWy5jQ.js} +1 -1
  55. package/dist/assets/{config-DXNBk8Sr.js → config-BdUShvO-.js} +1 -1
  56. package/dist/assets/{config-BRGxJ2eh.js → config-YsfQuvvt.js} +2 -2
  57. package/dist/assets/{config-navigation-Bp_tpZTf.js → config-navigation-C4hgzi4R.js} +3 -3
  58. package/dist/assets/config-space-DJ-fZ6j4.js +1 -0
  59. package/dist/assets/{confirm-DMfA-cen.js → confirm-C1Nde1Nq.js} +1 -1
  60. package/dist/assets/connect-BkxyLG9H.js +1 -0
  61. package/dist/assets/{connect-BbnPPMBE.js → connect-dGBjAgNF.js} +1 -1
  62. package/dist/assets/connect-to-CdG3TX0A.js +1 -0
  63. package/dist/assets/{content-layout-uPtoKIAs.js → content-layout-Bs-vdQ_U.js} +1 -1
  64. package/dist/assets/dashboard-2jQIZ8v5.js +222 -0
  65. package/dist/assets/{delete-confirm-BOPmqCDE.js → delete-confirm-CpPzqeJx.js} +1 -1
  66. package/dist/assets/{did-address-_2BUka_2.js → did-address-D-fI5ZyH.js} +1 -1
  67. package/dist/assets/{domain-C058D5cL.js → domain-1X_uRV9L.js} +1 -1
  68. package/dist/assets/{domain-action-card-hJylsZDf.js → domain-action-card-Crwneu7N.js} +2 -2
  69. package/dist/assets/domains-BHkUaPc7.js +1 -0
  70. package/dist/assets/{email-DTd5dLMw.js → email-DGh9v0en.js} +3 -3
  71. package/dist/assets/{empty-spinner-CoimPnT0.js → empty-spinner-Cia24BVr.js} +1 -1
  72. package/dist/assets/exchange-passport-CgGOJDm9.js +1 -0
  73. package/dist/assets/{format-error-LAoTjvJe.js → format-error-BrmqJs5a.js} +1 -1
  74. package/dist/assets/{fuel-D1-QzTfA.js → fuel-CItPP5Vk.js} +1 -1
  75. package/dist/assets/{get-safe-url-B2pIo8YT.js → get-safe-url-B2BlmlqT.js} +1 -1
  76. package/dist/assets/{get-safe-url-M62JolcK.js → get-safe-url-C2N97NJc.js} +1 -1
  77. package/dist/assets/{home-D8xdbvkr.js → home-12LB7wlV.js} +1 -1
  78. package/dist/assets/{iframe-BGb_KeKZ.js → iframe-54rcs7kU.js} +1 -1
  79. package/dist/assets/{index-B9lZsGBd.js → index-0CgHVUpB.js} +1 -1
  80. package/dist/assets/{index-DvX6CH9d.js → index-3dawiJIg.js} +3 -3
  81. package/dist/assets/{index-DY7FozBP.js → index-4WjT4o1e.js} +5 -5
  82. package/dist/assets/{index-C-E-0SKx.js → index-643kpB1h.js} +1 -1
  83. package/dist/assets/{index-Bn6qMcz9.js → index-9XJ5HzSd.js} +1 -1
  84. package/dist/assets/index-BIu-u1kW.js +1 -0
  85. package/dist/assets/{index-CKv9guDo.js → index-BTOIZL6e.js} +1 -1
  86. package/dist/assets/{index-DvDiL1rm.js → index-BYsXlcQC.js} +1 -1
  87. package/dist/assets/{index-DUqEJSX8.js → index-Bj10Vbvc.js} +4 -4
  88. package/dist/assets/index-C4dzrN-k.js +290 -0
  89. package/dist/assets/{index-Dja0MgHa.js → index-CB6NPYWM.js} +3 -3
  90. package/dist/assets/index-CFs0La6o.js +15 -0
  91. package/dist/assets/{index-pV_0wOyY.js → index-CPE8Apzb.js} +1 -1
  92. package/dist/assets/{index--QvOAcHK.js → index-CTpJt8AJ.js} +47 -45
  93. package/dist/assets/{index-BYC998Xz.js → index-Cuoxr9xB.js} +1 -1
  94. package/dist/assets/{index-Biod65HH.js → index-D5G2v7wN.js} +2 -2
  95. package/dist/assets/{index-CqRb1YIC.js → index-DKPGWA5E.js} +1 -1
  96. package/dist/assets/{index-BQddb9SV.js → index-DQC9zneB.js} +11 -11
  97. package/dist/assets/{index-tUQxVYYQ.js → index-DVQCgvFb.js} +1 -1
  98. package/dist/assets/index-DVogNW6l.js +1 -0
  99. package/dist/assets/{index-CDJctLrv.js → index-DkZfhapD.js} +1 -1
  100. package/dist/assets/{index-Bcipz7Xh.js → index-Du71d9ZJ.js} +1 -1
  101. package/dist/assets/{index-r4W5xGua.js → index-G26gYrxE.js} +2 -2
  102. package/dist/assets/{index-DOTrxWIb.js → index-YqrAgavD.js} +1 -1
  103. package/dist/assets/{index-COXsk6dn.js → index-jny05NvM.js} +30 -30
  104. package/dist/assets/{invitation-CLrDi0w3.js → invitation-BBqRmSx1.js} +6 -6
  105. package/dist/assets/invite-CKxzd-7d.js +1 -0
  106. package/dist/assets/issue-passport-BA7u3NC-.js +1 -0
  107. package/dist/assets/{item-DFeRxihy.js → item-DssQyiFI.js} +2 -2
  108. package/dist/assets/landing-page-2uYUfHoY.js +1 -0
  109. package/dist/assets/{launch-result-message-DvcvHHH1.js → launch-result-message-C0Ao1hE-.js} +1 -1
  110. package/dist/assets/{layout-BQ9Qhixa.js → layout-R4Ynfcbq.js} +2 -2
  111. package/dist/assets/{list-BO1EU3G2.js → list-BhXWs05I.js} +18 -9
  112. package/dist/assets/{list-header-DvakxkxK.js → list-header-BibBP5t1.js} +1 -1
  113. package/dist/assets/localization-BsSUbpzO.js +1 -0
  114. package/dist/assets/{log-Qir3lxDV.js → log-D4PQ7UF3.js} +7 -7
  115. package/dist/assets/{login-C780ZUv4.js → login-CuCcTu--.js} +1 -1
  116. package/dist/assets/{login-oauth-callback-CfaWz0tg.js → login-oauth-callback-BzcAZfXM.js} +1 -1
  117. package/dist/assets/{logo-uploader-gCM0_9lk.js → logo-uploader-C9TwiAKx.js} +3 -3
  118. package/dist/assets/{lost-passport-ieF1z1Fq.js → lost-passport-DD7XCIgg.js} +4 -4
  119. package/dist/assets/{lottie-react.esm-CPHH620R.js → lottie-react.esm-D2t-u0YU.js} +1 -1
  120. package/dist/assets/{lottie-web-B6s7dDoL.js → lottie-web-jYmAQWuC.js} +1 -1
  121. package/dist/assets/omit-DF3Nt1_-.js +1 -0
  122. package/dist/assets/{open-window-DMkA-B_A.js → open-window-Dsc5mHei.js} +1 -1
  123. package/dist/assets/{overview-CqE5Qd7t.js → overview-BjFpvrpN.js} +2 -2
  124. package/dist/assets/{page-header-D3dCkXy7.js → page-header-B7j9M6Zp.js} +1 -1
  125. package/dist/assets/{permission-ClAqVelD.js → permission-CLAOGeOf.js} +1 -1
  126. package/dist/assets/preferences-qZW-dsds.js +1 -0
  127. package/dist/assets/profile-embed-6mTqkL03.js +1 -0
  128. package/dist/assets/publish-resource-DO-PRxdk.js +1 -0
  129. package/dist/assets/{raf-schd.esm-GV-XhwE0.js → raf-schd.esm-B3j6BePR.js} +1 -1
  130. package/dist/assets/{react-beautiful-dnd.esm-Cx5BcFIr.js → react-beautiful-dnd.esm-Bu3K07pf.js} +1 -1
  131. package/dist/assets/{relative-time-BUHtgSDe.js → relative-time-Cu4jaQ9H.js} +1 -1
  132. package/dist/assets/{runtime-B5YY9Qgr.js → runtime-kNyRK8Hy.js} +1 -1
  133. package/dist/assets/sdk-BjsIctsl.js +1 -0
  134. package/dist/assets/{security-Dad28Y4W.js → security-Dkk4FgYt.js} +4 -4
  135. package/dist/assets/session-UJ7B0EdV.js +1 -0
  136. package/dist/assets/{setup-DEJbIHrj.js → setup-SAEzURDR.js} +3 -3
  137. package/dist/assets/{shorten-label-C642GTxb.js → shorten-label-DDBwv81M.js} +1 -1
  138. package/dist/assets/{simple-select-i-SepLIh.js → simple-select-vCKkiHhG.js} +1 -1
  139. package/dist/assets/{slicedToArray-B6WXjdrb.js → slicedToArray-Da5X2Yv5.js} +1 -1
  140. package/dist/assets/spaces-B_lJq3Uz.js +1 -0
  141. package/dist/assets/{start-9UMY8DNC.js → start-C53MN0u7.js} +1 -1
  142. package/dist/assets/status-5Z1CW-le.js +1 -0
  143. package/dist/assets/{step-actions-DZ9FTtHm.js → step-actions-CujnheOz.js} +1 -1
  144. package/dist/assets/{studio-Bv91lan_.js → studio-BYzuzhpL.js} +1 -1
  145. package/dist/assets/{switch-control-DjMziEFc.js → switch-control-DWiX5YiK.js} +1 -1
  146. package/dist/assets/{traffic-DPZuINtB.js → traffic-WemHsP0B.js} +3 -3
  147. package/dist/assets/{transfer-PY0D3H2H.js → transfer-CF7CWbdm.js} +1 -1
  148. package/dist/assets/{unsubscribe-B3uFNG06.js → unsubscribe-Dfof7yLG.js} +1 -1
  149. package/dist/assets/{use-mobile-B_Gqv6b6.js → use-mobile-DjnNmGRG.js} +1 -1
  150. package/dist/assets/{use-mobile-DudfIz3d.js → use-mobile-DpXDDjat.js} +1 -1
  151. package/dist/assets/{useAsync-BmuLIImU.js → useAsync-De6s-0n9.js} +1 -1
  152. package/dist/assets/{useAsyncRetry-CwtLImQi.js → useAsyncRetry-B6OdNqyX.js} +1 -1
  153. package/dist/assets/{useLocalStorage-C1_Fkr6_.js → useLocalStorage-DLwAkPmo.js} +1 -1
  154. package/dist/assets/{useSetState-BL3ktMon.js → useSetState-CWq0AVWn.js} +1 -1
  155. package/dist/assets/{user-center-C2i8ji9Q.js → user-center-CowUpoIn.js} +3 -3
  156. package/dist/assets/{util-CORzDFgw.js → util-B6E4W35Y.js} +1 -1
  157. package/dist/assets/util-C57yoAn6.js +1 -0
  158. package/dist/assets/{vendor-arcblock-D8eCUoJY.js → vendor-arcblock-CD8CMsgQ.js} +148 -81
  159. package/dist/assets/{vendor-hooks-DtYI0-rF.js → vendor-hooks-8r-lvvPs.js} +1 -1
  160. package/dist/assets/{vendor-mui-core-C-PhacC8.js → vendor-mui-core-1jJmAutq.js} +2 -2
  161. package/dist/assets/{vendor-mui-x-BiTj3AZC.js → vendor-mui-x-CPwlD3uT.js} +1 -1
  162. package/dist/assets/{vendor-react-DoD83n6N.js → vendor-react-DEoibe3W.js} +1 -1
  163. package/dist/assets/{vendor-utils-CRBr0QUY.js → vendor-utils-Cm2BKG2b.js} +6 -6
  164. package/dist/assets/{vendor-ux-did-connect-BQ3cvv_1.js → vendor-ux-did-connect-DlrX4cqq.js} +4 -4
  165. package/dist/assets/{wrap-locale-BFOSjPWa.js → wrap-locale-NNP_yq5G.js} +1 -1
  166. package/dist/index.html +8 -8
  167. package/dist/service-worker.js +1 -1
  168. package/package.json +41 -41
  169. package/dist/assets/add-resource-tZ8OPVzc.js +0 -1
  170. package/dist/assets/api-DlN8K5Jg.js +0 -1
  171. package/dist/assets/appearance-CFcde0Qw.js +0 -1
  172. package/dist/assets/bundle-avatar-xyEwd0kl.js +0 -1
  173. package/dist/assets/button-BQLtMsfK.js +0 -1
  174. package/dist/assets/click-to-copy-CkbZjUXU.js +0 -1
  175. package/dist/assets/cloneDeep-C7Ok409J.js +0 -1
  176. package/dist/assets/complete-BnqT6D6R.js +0 -45
  177. package/dist/assets/config-space-DLpGXOv3.js +0 -1
  178. package/dist/assets/connect-DrhKSeJG.js +0 -1
  179. package/dist/assets/connect-to-BWtx4RxY.js +0 -1
  180. package/dist/assets/dashboard-D1IAu0pg.js +0 -213
  181. package/dist/assets/domains-CHSNHTzm.js +0 -1
  182. package/dist/assets/exchange-passport-CUoEzJAn.js +0 -1
  183. package/dist/assets/index-Be9flGYn.js +0 -1
  184. package/dist/assets/index-Bgbz960f.js +0 -15
  185. package/dist/assets/index-BmIHv0Ao.js +0 -290
  186. package/dist/assets/index-Tc7h84RU.js +0 -1
  187. package/dist/assets/invite-BlqLHSHA.js +0 -1
  188. package/dist/assets/issue-passport-0xgFeiRm.js +0 -1
  189. package/dist/assets/landing-page-Dl8nGCZh.js +0 -1
  190. package/dist/assets/localization-rR3sV7At.js +0 -1
  191. package/dist/assets/omit-r8RGw6zD.js +0 -1
  192. package/dist/assets/preferences-YM19d1y9.js +0 -1
  193. package/dist/assets/profile-embed-DJJJzari.js +0 -1
  194. package/dist/assets/publish-resource-BFGnGhHk.js +0 -1
  195. package/dist/assets/sdk-DRBcrGrS.js +0 -1
  196. package/dist/assets/session-Clq9kJzg.js +0 -1
  197. package/dist/assets/spaces-CcqmBId2.js +0 -1
  198. package/dist/assets/status-BFrUchan.js +0 -1
  199. package/dist/assets/util-BL-qFiRh.js +0 -1
@@ -1 +1 @@
1
- import{d as A,v as R,p as w,e as p}from"./index-CKv9guDo.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
1
+ import{d as A,v as R,p as w,e as p}from"./index-BTOIZL6e.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
@@ -1,4 +1,4 @@
1
- import{r as j}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a2 as Pe,R as vt,a5 as jt,T as Y,a4 as w,A as Fe,bl as ke,cc as et,bL as Re,bp as Te,bM as Ie,x as je,b2 as De,a3 as tt,aa as oe,W as st,bf as Xe,bo as yt,bk as St,ak as Je,bT as Ct}from"./vendor-mui-core-C-PhacC8.js";import{c as ne,au as le,A as Nt}from"./vendor-utils-CRBr0QUY.js";import{V as G,m as F,b1 as wt,r as _e,u as X,bJ as Rt,U as nt,B as Ee,a2 as at,bh as xe,aj as Tt,ap as It,bG as Dt}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{A as Et,v as $,m as At,I as Qe}from"./index--QvOAcHK.js";import{f as ee,a as Ae}from"./vendor-hooks-DtYI0-rF.js";import{S as pe}from"./shorten-label-C642GTxb.js";import{I as it}from"./index-CqRb1YIC.js";import{A as Lt,S as Ot,a as Pt,b as Ft}from"./list-BO1EU3G2.js";import{R as Be}from"./relative-time-BUHtgSDe.js";import{b as ze}from"./dashboard-D1IAu0pg.js";import{W as kt}from"./did-address-_2BUka_2.js";import{p as ot}from"./util-CORzDFgw.js";import{D as _t,g as Bt}from"./traffic-DPZuINtB.js";import{i as zt,B as Wt}from"./index-Tc7h84RU.js";import{B as rt}from"./bundle-avatar-xyEwd0kl.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-D8eCUoJY.js";import"./index-BYC998Xz.js";import"./InfoOutlined-DFTm-vVr.js";import"./CheckCircle-D7CrWlJ6.js";import"./useLocalStorage-C1_Fkr6_.js";import"./confirm-DMfA-cen.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-BEUAi9Bt.js";import"./get-safe-url-M62JolcK.js";import"./session-Clq9kJzg.js";import"./useAsyncRetry-CwtLImQi.js";import"./useAsync-BmuLIImU.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-DudfIz3d.js";import"./base32-CEWQZb_G.js";import"./iframe-BGb_KeKZ.js";import"./LaunchOutlined-DttrDnYo.js";import"./ChevronLeft-DeulnkX8.js";import"./ChevronRight-CACHNf5Y.js";import"./index-CDJctLrv.js";import"./vendor-mui-x-BiTj3AZC.js";const lt=j.createContext({}),{Provider:Mt,Consumer:an}=lt;function qt({children:t,blocklet:s=""}){const{api:n,inService:o}=Et(),[i,r]=j.useState([]),[x,u]=j.useState({total:0,pageSize:20,pageCount:0,page:1}),b=ee(()=>{var D;return(D=s.meta)==null?void 0:D.did},[s]),[S,C]=j.useState([]),N=async({page:D=1,pageSize:O=20,...m}={})=>{if(!b)return[];try{const g={paging:{page:D,pageSize:O},...m,teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0},{dids:L,...Q}=g;let K="";L.includes("system")&&(K="system");const J=L.filter(Z=>Z!=="system"),_=await n.getNotificationSendLog({input:{...Q,source:K,componentDids:J}});return r(_.list),u(_.paging),_.list}catch(g){return G.error(g.message),[]}},E=async()=>{const D=await n.getNotificationComponents({input:{teamDid:b}});C(D.componentDids)},z=j.useCallback(D=>{const O=s.children.find(m=>{var g;return((g=m.meta)==null?void 0:g.did)===D});if(O)return O.ancestors=[s],O},[s]),A=async({notificationId:D,receivers:O,channels:m,...g})=>{await n.resendNotification({input:{teamDid:b,notificationId:D,receivers:O,channels:m.map(L=>L==="wallet"?F.NOTIFICATION_SEND_CHANNEL.WALLET:L==="pushKit"?F.NOTIFICATION_SEND_CHANNEL.PUSH:L),...g}})},P=j.useCallback(async D=>(await n.getUser({input:{teamDid:b,user:{did:D}}})).user,[n,b]),I=j.useCallback(async({page:D=1,pageSize:O=20,...m}={})=>{try{const g={paging:{page:D,pageSize:O},...m,userName:m.searchText||"",teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:g})}catch(g){throw G.error(g.message),g}},[n,b]);j.useEffect(()=>{b&&E()},[b]);const W={fetch:N,data:i,paging:x,blocklet:s,getComponent:z,resendNotification:A,getUser:P,componentDids:S,getReceivers:I,inService:o,teamDid:b};return e.jsx(Mt,{value:{notificationRecords:W},children:t})}function We(){const{notificationRecords:t}=j.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Kt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(wt,{type:Kt[t],children:t})}var Me={},Ht=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,$t=Ht(_e()),Ut=e;ct=Me.default=(0,$t.default)((0,Ut.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},Vt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Gt=Vt(_e()),Yt=e;dt=qe.default=(0,Gt.default)((0,Yt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ke={},Xt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Jt=Xt(_e()),Qt=e;ut=Ke.default=(0,Jt.default)((0,Qt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Zt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case F.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:o,updatedAt:i,reason:r="",channel:x="wallet"}=n,u=i?t("notification.sendStatus.sentTime",{date:At(i,s)}):"",b=Zt(t,x,r);return o===F.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:b}:o===F.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:b,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Oe=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},mt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},es=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ts=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},ss=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),ns=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),he=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),as=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ge=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},is=(t,s="")=>{if(s&&Oe.includes(s)){const r=`${s}SendRecord`,x=ne(t,r,[]);return ge(x)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const r=n[s]??[];return ge(r)}const i={};return Oe.forEach(r=>{const x=`${r}SendRecord`,u=ne(t,x,[]),b=ge(u);i[r]=b}),o.length>0&&o.forEach(r=>{const x=n[r]??[],u=ge(x);i[r]=u}),i},be=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},os=t=>{switch(t){case F.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case F.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case F.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case F.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>vt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"},divider:"#F4F4F5"},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:i,title:r="",sentTime:x="",reason:u=""}=t,b=[r,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:b}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[i],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[i]})]}),e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:n?r:o})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};te.defaultProps={enableTooltip:!0,showTitle:!1,children:null};ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};ce.defaultProps={onDelete:()=>{}};function ce({list:t,label:s,onDelete:n}){const{t:o,locale:i}=X();return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(r=>{const x=pt(o,i,{status:r});return e.jsx(Fe,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,r)},r)})]})}He.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function He({filterList:t,onChange:s,index:n,column:o,filterValues:i,label:r,renderLabel:x}){return e.jsxs(ke,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:r}),e.jsx(Re,{row:!0,children:i.map(u=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:b=>{const S=[...t];b.target.checked?S[n]=[...S[n],u.value??u]:S[n]=S[n].filter(C=>C!==(u.value??u)),s(S[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function we(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}re.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function re({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:i}){const{t:r,locale:x}=X(),u=pt(r,x,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(te,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(je,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:r("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[i,r]=j.useState(null),x=j.useCallback(S=>{r(i?null:S.currentTarget)},[i]),u=!!i,b=j.useCallback(S=>{if(!S.startDate||!S.endDate){G.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){G.error("Invalid date range");return}s([S.startDate,S.endDate]),r(null)},[s]);return e.jsxs("div",{children:[e.jsx(Y,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(je,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],n)," - ",Qe(t[1],n)]})}),e.jsx(De,{open:u,anchorEl:i,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(_t,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Bt(o),onChange:b})})]})}Ue.propTypes={itemComponent:d.elementType.isRequired};function Ue({itemComponent:t,...s}){var i;const{t:n}=X();return!((i=s==null?void 0:s.filterList)!=null&&i.filter(r=>r.length).length)?null:e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Rt.TableFilterList,{...s,ItemComponent:t})})]})}function ye({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const i=s&&typeof s=="function"?s:void 0;let r=!0;return n&&typeof n=="function"&&(r=n({label:t,...o})),e.jsx(Fe,{label:t,variant:"outlined",...i&&r?{onDelete:i}:{}})}ye.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};ye.defaultProps={canDelete:()=>!0};const rs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ve.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ve.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ve({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[i,r]=j.useState(rs),[x,u]=j.useState(!0),b=(C,N)=>{N.checked=C.target.checked;const E=i.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));r(E)},S=C=>{C.stopPropagation(),n({channels:i.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:x})};return e.jsxs(w,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Y,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(w,{className:"choose-channel",children:e.jsxs(ke,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(C=>e.jsx(Te,{control:e.jsx(Ie,{checked:C.checked,onChange:N=>b(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(w,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:x,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(w,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(je,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(je,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:i}=X(),{getReceivers:r,inService:x,teamDid:u,getUser:b,blocklet:S}=We(),[C,N]=j.useState(!1),[E,z]=j.useState([]),A=Ae({anchorEl:null,position:null}),P=Ae({anchorEl:null,position:null}),[I,W]=j.useState(null),[D,O]=j.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,g]=j.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[L,Q]=j.useState([]),K=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],J=async()=>{if(!C&&t)try{N(!0);const a=await r({notificationId:t,...m}),l=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));z(l),O(a.paging),N(!1)}catch(a){G.error(a.message),N(!1)}};j.useEffect(()=>{J()},[m]);const _=a=>{a.stopPropagation();const l=a.currentTarget;P.anchorEl=l;const c=l.getBoundingClientRect();P.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},Z=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ee,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:o("notification.resend")})}):null,M={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:L,onRowSelectionChange:(a,l)=>{Q(l.map(c=>c.dataIndex))},customToolbarSelect:Z},Ce=({page:a,rowsPerPage:l,searchText:c,filterList:y})=>{const[,k=[],H=[],q=[]]=y;m.pageSize!==l?g(B=>({...B,pageSize:l,page:1})):m.page!==a+1?g(B=>({...B,page:a+1})):m.searchText!==c?g(B=>({...B,searchText:c,page:1})):le(k,m.walletSendStatus)?le(H,m.pushKitSendStatus)?le(q,m.emailSendStatus)||g(B=>({...B,emailSendStatus:q,page:1})):g(B=>({...B,pushKitSendStatus:H,page:1})):g(B=>({...B,walletSendStatus:k,page:1}))},Ne=j.useCallback(async(a,l)=>{if(!l)return!1;const c=await b(l);return c?a==="wallet"?ss(c):a==="email"?es(S,c):a==="pushKit"?ts(S,c):a==="webhook"?ns(c):!0:!1},[b,S]),me=j.useCallback(a=>as(o,a),[o]),f=()=>{A.anchorEl=null,A.position=null,W(null)},p=()=>{P.anchorEl=null,P.position=null},h=async(a,l,c=!0,y="")=>{if(!(!l.length||!a.length))try{s(a,l,c,y),P.anchorEl||(await he(.5),f())}catch(k){console.error("handleResend error",{error:k})}},v=async({channels:a,isResendFailedOnly:l})=>{const c=L.map(y=>E[y].receiver);await h(a,c,l),await he(.5),p(),Q([])},T=async(a,l=[],c=!0)=>{try{await h(["webhook"],[a.receiver],c,l)}catch(y){G.error(y.response?y.response.statusText:y.message)}},R=async(a,l,c,y=[],k=!0)=>{if(a.stopPropagation(),is(l,c)>=4){G.warning(o("notification.resendLimit"));return}if(!Oe.includes(c)){await T(l,y,k);return}if(a){const q=a.currentTarget,B=q.getBoundingClientRect();A.anchorEl=q,A.position={top:B.top+window.scrollY,left:B.left+window.scrollX}}W({channel:c});try{const q=await Ne(c,l.receiver);await he(1),W({channel:c,result:q}),(typeof q=="boolean"&&q||Nt(q)&&Object.values(q).every(B=>!!B))&&(await s([c],[l.receiver],k),P.anchorEl||(await he(.5),f()))}catch(q){G.error(q.message)}},U=a=>{g(l=>({...l,dateRange:a,page:1}))},V=(a,l,c,y)=>{a.stopPropagation();const k=c.filter(H=>H!==l);g(H=>({...H,[y]:k,page:1}))},se=ee(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:l,receiver:c}=E[a];return l?e.jsxs(w,{"data-cy":`member-name-${l.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(nt,{src:`${l.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(pe,{children:l.fullName})]},c):e.jsx(kt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[1].options.filterList,"walletSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:l,index:c,column:y,filterValues:K})},customBodyRenderLite:a=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"wallet",onResend:k=>R(k,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"pushkit",onResend:k=>R(k,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[2].options.filterList,"pushKitSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"email",onResend:k=>R(k,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[3].options.filterList,"emailSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Email",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:l}=E[a];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[y,k]=c,H=k[0];return e.jsx(w,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(w,{className:"webhook-item",fontSize:12,children:[e.jsx(pe,{maxLength:30,children:y},y),e.jsx(re,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>R(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:l}=E[a];return e.jsx(Be,{value:l,locale:i,shouldUpdate:!0})}}}],[E,i,m,o]),Ye=[e.jsx($e,{value:m.dateRange,onChange:U},"date-picker"),e.jsx(Ee,{variant:"contained",size:"small",color:"primary",loading:C,startIcon:e.jsx(ut,{}),onClick:()=>J(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(w,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(cs,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:i,loading:C,columns:se,data:E,onChange:Ce,options:M,customButtons:Ye,components:{TableFilterList:a=>e.jsx(Ue,{...a,itemComponent:l=>e.jsx(ye,{...l,canDelete:()=>!1})})}}),A.anchorEl&&e.jsx(De,{open:!!A.anchorEl,anchorReference:"anchorPosition",anchorPosition:A.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ds,{children:[e.jsxs(Y,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:me(I==null?void 0:I.channel).map(a=>{var k,H;const{type:l,pass:c,fail:y}=a;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[l]?e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[l]?xe.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:xe.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(Y,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:xe.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:y})]},l)})})]})}),P.anchorEl&&e.jsx(De,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:v})})]})})})}const ls=j.memo(gt),cs=oe.div`
1
+ import{r as j}from"./vendor-react-DEoibe3W.js";import{j as e,E as d,a2 as Pe,R as vt,a5 as jt,T as Y,a4 as w,A as Fe,bn as ke,cd as et,bM as Re,br as Te,bN as Ie,x as je,b2 as De,a3 as tt,aa as oe,W as st,bf as Xe,bq as yt,bm as St,ak as Je,bU as Ct}from"./vendor-mui-core-1jJmAutq.js";import{c as ne,au as le,A as Nt}from"./vendor-utils-Cm2BKG2b.js";import{Z as G,p as F,b3 as wt,r as _e,u as X,bJ as Rt,Y as nt,B as Ee,a6 as at,bh as xe,al as Tt,ar as It,bG as Dt}from"./vendor-ux-did-connect-DlrX4cqq.js";import{z as Et,t as $,l as At,G as Ze}from"./index-CTpJt8AJ.js";import{f as ee,a as Ae}from"./vendor-hooks-8r-lvvPs.js";import{S as pe}from"./shorten-label-DDBwv81M.js";import{I as it}from"./index-DKPGWA5E.js";import{A as Ot,S as Lt,a as Pt,b as Ft}from"./list-BhXWs05I.js";import{R as Be}from"./relative-time-Cu4jaQ9H.js";import{b as ze}from"./dashboard-2jQIZ8v5.js";import{W as kt}from"./did-address-D-fI5ZyH.js";import{p as ot}from"./util-B6E4W35Y.js";import{D as _t,g as Bt}from"./traffic-WemHsP0B.js";import{i as zt,B as Wt}from"./index-DVogNW6l.js";import{B as rt}from"./bundle-avatar-Ci9fNblN.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CD8CMsgQ.js";import"./index-Cuoxr9xB.js";import"./InfoOutlined-jnMrCCfZ.js";import"./CheckCircle-BHD7aj9l.js";import"./useLocalStorage-DLwAkPmo.js";import"./confirm-C1Nde1Nq.js";import"./format-error-BrmqJs5a.js";import"./PlayArrow-CXtQLadK.js";import"./get-safe-url-C2N97NJc.js";import"./session-UJ7B0EdV.js";import"./useAsyncRetry-B6OdNqyX.js";import"./useAsync-De6s-0n9.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-DjnNmGRG.js";import"./base32-CMrsHquD.js";import"./iframe-54rcs7kU.js";import"./LaunchOutlined-yZsgpXar.js";import"./ChevronLeft-CUdxcGLW.js";import"./ChevronRight-Bol9kSyE.js";import"./index-DkZfhapD.js";import"./vendor-mui-x-CPwlD3uT.js";const lt=j.createContext({}),{Provider:Mt,Consumer:an}=lt;function qt({children:t,blocklet:s=""}){const{api:n,inService:o}=Et(),[i,r]=j.useState([]),[x,u]=j.useState({total:0,pageSize:20,pageCount:0,page:1}),b=ee(()=>{var D;return(D=s.meta)==null?void 0:D.did},[s]),[S,C]=j.useState([]),N=async({page:D=1,pageSize:L=20,...m}={})=>{if(!b)return[];try{const g={paging:{page:D,pageSize:L},...m,teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0},{dids:O,...Z}=g;let K="";O.includes("system")&&(K="system");const J=O.filter(Q=>Q!=="system"),_=await n.getNotificationSendLog({input:{...Z,source:K,componentDids:J}});return r(_.list),u(_.paging),_.list}catch(g){return G.error(g.message),[]}},E=async()=>{const D=await n.getNotificationComponents({input:{teamDid:b}});C(D.componentDids)},z=j.useCallback(D=>{const L=s.children.find(m=>{var g;return((g=m.meta)==null?void 0:g.did)===D});if(L)return L.ancestors=[s],L},[s]),A=async({notificationId:D,receivers:L,channels:m,...g})=>{await n.resendNotification({input:{teamDid:b,notificationId:D,receivers:L,channels:m.map(O=>O==="wallet"?F.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?F.NOTIFICATION_SEND_CHANNEL.PUSH:O),...g}})},P=j.useCallback(async D=>(await n.getUser({input:{teamDid:b,user:{did:D}}})).user,[n,b]),I=j.useCallback(async({page:D=1,pageSize:L=20,...m}={})=>{try{const g={paging:{page:D,pageSize:L},...m,userName:m.searchText||"",teamDid:b,dateRange:m.dateRange?[$(m.dateRange[0]).toISOString(),$(m.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:g})}catch(g){throw G.error(g.message),g}},[n,b]);j.useEffect(()=>{b&&E()},[b]);const W={fetch:N,data:i,paging:x,blocklet:s,getComponent:z,resendNotification:A,getUser:P,componentDids:S,getReceivers:I,inService:o,teamDid:b};return e.jsx(Mt,{value:{notificationRecords:W},children:t})}function We(){const{notificationRecords:t}=j.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Kt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(wt,{type:Kt[t],children:t})}var Me={},Ht=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,$t=Ht(_e()),Ut=e;ct=Me.default=(0,$t.default)((0,Ut.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},Vt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Gt=Vt(_e()),Yt=e;dt=qe.default=(0,Gt.default)((0,Yt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ke={},Xt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Jt=Xt(_e()),Zt=e;ut=Ke.default=(0,Jt.default)((0,Zt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Qt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case F.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case F.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:o,updatedAt:i,reason:r="",channel:x="wallet"}=n,u=i?t("notification.sendStatus.sentTime",{date:At(i,s)}):"",b=Qt(t,x,r);return o===F.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:b}:o===F.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:b,sentTime:u}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],Qe=["info","success","error","warning"],ft=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},mt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},es=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ts=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},ss=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),ns=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),he=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),as=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ge=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},is=(t,s="")=>{if(s&&Le.includes(s)){const r=`${s}SendRecord`,x=ne(t,r,[]);return ge(x)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const r=n[s]??[];return ge(r)}const i={};return Le.forEach(r=>{const x=`${r}SendRecord`,u=ne(t,x,[]),b=ge(u);i[r]=b}),o.length>0&&o.forEach(r=>{const x=n[r]??[],u=ge(x);i[r]=u}),i},be=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},os=t=>{switch(t){case F.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case F.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case F.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case F.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>vt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"},divider:"#F4F4F5"},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:i,title:r="",sentTime:x="",reason:u=""}=t,b=[r,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:b}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[i],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[i]})]}),e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:n?r:o})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};te.defaultProps={enableTooltip:!0,showTitle:!1,children:null};ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};ce.defaultProps={onDelete:()=>{}};function ce({list:t,label:s,onDelete:n}){const{t:o,locale:i}=X();return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(r=>{const x=pt(o,i,{status:r});return e.jsx(Fe,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,r)},r)})]})}He.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function He({filterList:t,onChange:s,index:n,column:o,filterValues:i,label:r,renderLabel:x}){return e.jsxs(ke,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:r}),e.jsx(Re,{row:!0,children:i.map(u=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:b=>{const S=[...t];b.target.checked?S[n]=[...S[n],u.value??u]:S[n]=S[n].filter(C=>C!==(u.value??u)),s(S[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function we(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}re.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function re({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:i}){const{t:r,locale:x}=X(),u=pt(r,x,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(te,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(je,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:r("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[i,r]=j.useState(null),x=j.useCallback(S=>{r(i?null:S.currentTarget)},[i]),u=!!i,b=j.useCallback(S=>{if(!S.startDate||!S.endDate){G.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){G.error("Invalid date range");return}s([S.startDate,S.endDate]),r(null)},[s]);return e.jsxs("div",{children:[e.jsx(Y,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(je,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Ze(t[0],n)," - ",Ze(t[1],n)]})}),e.jsx(De,{open:u,anchorEl:i,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(_t,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Bt(o),onChange:b})})]})}Ue.propTypes={itemComponent:d.elementType.isRequired};function Ue({itemComponent:t,...s}){var i;const{t:n}=X();return!((i=s==null?void 0:s.filterList)!=null&&i.filter(r=>r.length).length)?null:e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Rt.TableFilterList,{...s,ItemComponent:t})})]})}function ye({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const i=s&&typeof s=="function"?s:void 0;let r=!0;return n&&typeof n=="function"&&(r=n({label:t,...o})),e.jsx(Fe,{label:t,variant:"outlined",...i&&r?{onDelete:i}:{}})}ye.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};ye.defaultProps={canDelete:()=>!0};const rs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ve.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ve.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ve({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[i,r]=j.useState(rs),[x,u]=j.useState(!0),b=(C,N)=>{N.checked=C.target.checked;const E=i.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));r(E)},S=C=>{C.stopPropagation(),n({channels:i.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:x})};return e.jsxs(w,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Y,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(w,{className:"choose-channel",children:e.jsxs(ke,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(C=>e.jsx(Te,{control:e.jsx(Ie,{checked:C.checked,onChange:N=>b(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(w,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:x,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(w,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(je,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(je,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:i}=X(),{getReceivers:r,inService:x,teamDid:u,getUser:b,blocklet:S}=We(),[C,N]=j.useState(!1),[E,z]=j.useState([]),A=Ae({anchorEl:null,position:null}),P=Ae({anchorEl:null,position:null}),[I,W]=j.useState(null),[D,L]=j.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,g]=j.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[O,Z]=j.useState([]),K=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],J=async()=>{if(!C&&t)try{N(!0);const a=await r({notificationId:t,...m}),l=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));z(l),L(a.paging),N(!1)}catch(a){G.error(a.message),N(!1)}};j.useEffect(()=>{J()},[m]);const _=a=>{a.stopPropagation();const l=a.currentTarget;P.anchorEl=l;const c=l.getBoundingClientRect();P.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},Q=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ee,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:o("notification.resend")})}):null,M={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(a,l)=>{Z(l.map(c=>c.dataIndex))},customToolbarSelect:Q},Ce=({page:a,rowsPerPage:l,searchText:c,filterList:y})=>{const[,k=[],H=[],q=[]]=y;m.pageSize!==l?g(B=>({...B,pageSize:l,page:1})):m.page!==a+1?g(B=>({...B,page:a+1})):m.searchText!==c?g(B=>({...B,searchText:c,page:1})):le(k,m.walletSendStatus)?le(H,m.pushKitSendStatus)?le(q,m.emailSendStatus)||g(B=>({...B,emailSendStatus:q,page:1})):g(B=>({...B,pushKitSendStatus:H,page:1})):g(B=>({...B,walletSendStatus:k,page:1}))},Ne=j.useCallback(async(a,l)=>{if(!l)return!1;const c=await b(l);return c?a==="wallet"?ss(c):a==="email"?es(S,c):a==="pushKit"?ts(S,c):a==="webhook"?ns(c):!0:!1},[b,S]),me=j.useCallback(a=>as(o,a),[o]),f=()=>{A.anchorEl=null,A.position=null,W(null)},p=()=>{P.anchorEl=null,P.position=null},h=async(a,l,c=!0,y="")=>{if(!(!l.length||!a.length))try{s(a,l,c,y),P.anchorEl||(await he(.5),f())}catch(k){console.error("handleResend error",{error:k})}},v=async({channels:a,isResendFailedOnly:l})=>{const c=O.map(y=>E[y].receiver);await h(a,c,l),await he(.5),p(),Z([])},T=async(a,l=[],c=!0)=>{try{await h(["webhook"],[a.receiver],c,l)}catch(y){G.error(y.response?y.response.statusText:y.message)}},R=async(a,l,c,y=[],k=!0)=>{if(a.stopPropagation(),is(l,c)>=4){G.warning(o("notification.resendLimit"));return}if(!Le.includes(c)){await T(l,y,k);return}if(a){const q=a.currentTarget,B=q.getBoundingClientRect();A.anchorEl=q,A.position={top:B.top+window.scrollY,left:B.left+window.scrollX}}W({channel:c});try{const q=await Ne(c,l.receiver);await he(1),W({channel:c,result:q}),(typeof q=="boolean"&&q||Nt(q)&&Object.values(q).every(B=>!!B))&&(await s([c],[l.receiver],k),P.anchorEl||(await he(.5),f()))}catch(q){G.error(q.message)}},U=a=>{g(l=>({...l,dateRange:a,page:1}))},V=(a,l,c,y)=>{a.stopPropagation();const k=c.filter(H=>H!==l);g(H=>({...H,[y]:k,page:1}))},se=ee(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:l,receiver:c}=E[a];return l?e.jsxs(w,{"data-cy":`member-name-${l.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(nt,{src:`${l.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(pe,{children:l.fullName})]},c):e.jsx(kt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[1].options.filterList,"walletSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:l,index:c,column:y,filterValues:K})},customBodyRenderLite:a=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"wallet",onResend:k=>R(k,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"pushkit",onResend:k=>R(k,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[2].options.filterList,"pushKitSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(re,{status:l,updatedAt:c,reason:y,channel:"email",onResend:k=>R(k,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(ce,{list:a,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),V(l,c,se[3].options.filterList,"emailSendStatus")}}),update:be},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(a,l,c,y)=>e.jsx(we,{label:"Email",filterList:a,onChange:l,index:c,column:y,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:l}=E[a];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[y,k]=c,H=k[0];return e.jsx(w,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(w,{className:"webhook-item",fontSize:12,children:[e.jsx(pe,{maxLength:30,children:y},y),e.jsx(re,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>R(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:l}=E[a];return e.jsx(Be,{value:l,locale:i,shouldUpdate:!0})}}}],[E,i,m,o]),Ye=[e.jsx($e,{value:m.dateRange,onChange:U},"date-picker"),e.jsx(Ee,{variant:"contained",size:"small",color:"primary",loading:C,startIcon:e.jsx(ut,{}),onClick:()=>J(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(w,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(cs,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:i,loading:C,columns:se,data:E,onChange:Ce,options:M,customButtons:Ye,components:{TableFilterList:a=>e.jsx(Ue,{...a,itemComponent:l=>e.jsx(ye,{...l,canDelete:()=>!1})})}}),A.anchorEl&&e.jsx(De,{open:!!A.anchorEl,anchorReference:"anchorPosition",anchorPosition:A.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ds,{children:[e.jsxs(Y,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:me(I==null?void 0:I.channel).map(a=>{var k,H;const{type:l,pass:c,fail:y}=a;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[l]?e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[l]?xe.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:xe.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(Y,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:xe.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:y})]},l)})})]})}),P.anchorEl&&e.jsx(De,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:v})})]})})})}const ls=j.memo(gt),cs=oe.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -27,7 +27,7 @@ import{r as j}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a2 as Pe,R a
27
27
  }
28
28
  font-size: 12px;
29
29
  }
30
- `,de=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function us(t){const{wallet:s,push:n,email:o,webhook:i}=t;return[{name:"Wallet",value:e.jsx(ae,{item:s})},{name:"Push",value:e.jsx(ae,{item:n})},{name:"Email",value:e.jsx(ae,{item:o})},...i.total>0?[{name:"Webhook",value:e.jsx(ae,{item:i,isWebhook:!0})}]:[]]}function ps(t,s,n){const{wallet:o,push:i,email:r,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.EMAIL,item:r,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Se.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Se.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ae.propTypes={item:d.object.isRequired,isWebhook:d.bool};ae.defaultProps={isWebhook:!1};function ae({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,i=t.total,r=o===i?"success":"failed";return e.jsx(w,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(w,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(te,{config:{status:r},enableTooltip:!1,children:[de(o)," / ",de(i)," ",n("notification.sendStatus.success")]})})})}ie.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};ie.defaultProps={isWebhook:!1,channel:F.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function ie({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:i}){const{t:r}=X(),{success:x,failed:u,pending:b}=s,S=os(t),C=n?x.length:x,N=n?u.length:u,E=n?b.length:b,z=async W=>{W.stopPropagation();const D=n?[...new Set([...x,...u].map(O=>O))]:[];await o([t],[],!0,D)},A=C+N,P=A>0?C/A*100:0,I=A>0?N/A*100:0;return e.jsxs(fs,{successRatio:P,failedRatio:I,children:[e.jsxs(Y,{variant:"h6",children:[S," (",s.total,")"]}),e.jsxs(Y,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:de(C)}),e.jsx("small",{style:{paddingLeft:4},children:r("notification.sendStatus.success")})]}),e.jsxs(w,{className:"unsent-area",children:[e.jsxs(w,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[de(N)," ",r("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[de(E)," ",r("notification.sendStatus.pending")]})]}),N>0&&e.jsx(w,{className:"resend-btn",children:e.jsx(Ee,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:r("notification.resend")})})]})]})}function Se({statistics:t,mode:s="simple",onResend:n,resending:o}){const i=ee(()=>s==="simple"?us(t):ps(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(r=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:r.name,children:r.value},r.name))}):e.jsx(Xe,{container:!0,spacing:2,children:i.map(r=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:r.value},r.name))})}const fs=oe(w)`
30
+ `,de=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function us(t){const{wallet:s,push:n,email:o,webhook:i}=t;return[{name:"Wallet",value:e.jsx(ae,{item:s})},{name:"Push",value:e.jsx(ae,{item:n})},{name:"Email",value:e.jsx(ae,{item:o})},...i.total>0?[{name:"Webhook",value:e.jsx(ae,{item:i,isWebhook:!0})}]:[]]}function ps(t,s,n){const{wallet:o,push:i,email:r,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.EMAIL,item:r,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ie,{loading:n,channel:F.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Se.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Se.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ae.propTypes={item:d.object.isRequired,isWebhook:d.bool};ae.defaultProps={isWebhook:!1};function ae({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,i=t.total,r=o===i?"success":"failed";return e.jsx(w,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(w,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(te,{config:{status:r},enableTooltip:!1,children:[de(o)," / ",de(i)," ",n("notification.sendStatus.success")]})})})}ie.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};ie.defaultProps={isWebhook:!1,channel:F.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function ie({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:i}){const{t:r}=X(),{success:x,failed:u,pending:b}=s,S=os(t),C=n?x.length:x,N=n?u.length:u,E=n?b.length:b,z=async W=>{W.stopPropagation();const D=n?[...new Set([...x,...u].map(L=>L))]:[];await o([t],[],!0,D)},A=C+N,P=A>0?C/A*100:0,I=A>0?N/A*100:0;return e.jsxs(fs,{successRatio:P,failedRatio:I,children:[e.jsxs(Y,{variant:"h6",children:[S," (",s.total,")"]}),e.jsxs(Y,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Oe.success,fontWeight:600,fontSize:24},children:de(C)}),e.jsx("small",{style:{paddingLeft:4},children:r("notification.sendStatus.success")})]}),e.jsxs(w,{className:"unsent-area",children:[e.jsxs(w,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[de(N)," ",r("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[de(E)," ",r("notification.sendStatus.pending")]})]}),N>0&&e.jsx(w,{className:"resend-btn",children:e.jsx(Ee,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:r("notification.resend")})})]})]})}function Se({statistics:t,mode:s="simple",onResend:n,resending:o}){const i=ee(()=>s==="simple"?us(t):ps(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(r=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:r.name,children:r.value},r.name))}):e.jsx(Xe,{container:!0,spacing:2,children:i.map(r=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:r.value},r.name))})}const fs=oe(w)`
31
31
  display: flex;
32
32
  flex-direction: column;
33
33
  align-items: flex-start;
@@ -45,7 +45,7 @@ import{r as j}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a2 as Pe,R a
45
45
  bottom: 0;
46
46
  }
47
47
  }
48
- `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:i,locale:r}=X(),{getComponent:x,resendNotification:u}=We(),[b,S]=j.useState(!1),C=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),N=Ae({tab:o||"info"}),E=j.useCallback(async(g,L,Q=!0,K=[])=>{var Z;if(!g.length||!t.id)return;const J=L.length>0?L:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(M=>M.receiver);if(!J.length)return;let _=[...g];if(_.includes(F.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),_=_.filter(M=>M!==F.NOTIFICATION_SEND_CHANNEL.PUSH)),_.includes(F.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),_=_.filter(M=>M!==F.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!_.length)try{S(!0),await u({notificationId:t.id,receivers:J,channels:_,resendFailedOnly:Q,..._.includes("webhook")&&K.length?{webhookUrls:K}:{}}),G.success("Message has been sent!")}catch(M){console.error("handleResend error",{error:M}),G.error(M.response?M.response.statusText:M.message)}finally{S(!1)}},[n,t.id,t==null?void 0:t.receivers,u,i]),z=ee(()=>zt(t),[t]),A=ee(()=>z?t==null?void 0:t.actorInfo:[],[t]),P=ee(()=>{var g;return(n==null?void 0:n.did)||((g=n==null?void 0:n.meta)==null?void 0:g.did)||""},[n]);function I(){return[{name:i("notification.from"),value:z?e.jsx(Lt,{actors:A,teamDid:P,size:32,showName:!0}):e.jsx(Ot,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(pe,{maxLength:50,children:t.title})},{name:i("notification.body"),value:z?e.jsx(Pt,{notification:t,blocklet:n}):e.jsx(Ft,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:r,shouldUpdate:!0})}].map(L=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:L.name,children:L.value},L.name))}const W={info:{label:i("common.basicInfo"),value:"info",component:I},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},D=Object.values(W).map(({label:g,value:L})=>({label:g,value:L})),O=W[N.tab]||W.info,m=g=>{N.tab=g};return e.jsx(Tt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(hs,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(It,{tabs:D,current:N.tab,onChange:m,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ls,{notificationId:t.id,resending:b,handleResend:E}),N.tab==="statistics"&&e.jsx(Se,{statistics:t.statistics,mode:"detail",resending:b,onResend:E}),N.tab==="info"&&e.jsx(O.component,{})]})]})})}const ms=j.memo(xt),hs=oe.div`
48
+ `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:i,locale:r}=X(),{getComponent:x,resendNotification:u}=We(),[b,S]=j.useState(!1),C=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),N=Ae({tab:o||"info"}),E=j.useCallback(async(g,O,Z=!0,K=[])=>{var Q;if(!g.length||!t.id)return;const J=O.length>0?O:(Q=t==null?void 0:t.receivers)==null?void 0:Q.map(M=>M.receiver);if(!J.length)return;let _=[...g];if(_.includes(F.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),_=_.filter(M=>M!==F.NOTIFICATION_SEND_CHANNEL.PUSH)),_.includes(F.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(G.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),_=_.filter(M=>M!==F.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!_.length)try{S(!0),await u({notificationId:t.id,receivers:J,channels:_,resendFailedOnly:Z,..._.includes("webhook")&&K.length?{webhookUrls:K}:{}}),G.success("Message has been sent!")}catch(M){console.error("handleResend error",{error:M}),G.error(M.response?M.response.statusText:M.message)}finally{S(!1)}},[n,t.id,t==null?void 0:t.receivers,u,i]),z=ee(()=>zt(t),[t]),A=ee(()=>z?t==null?void 0:t.actorInfo:[],[t]),P=ee(()=>{var g;return(n==null?void 0:n.did)||((g=n==null?void 0:n.meta)==null?void 0:g.did)||""},[n]);function I(){return[{name:i("notification.from"),value:z?e.jsx(Ot,{actors:A,teamDid:P,size:32,showName:!0}):e.jsx(Lt,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(pe,{maxLength:50,children:t.title})},{name:i("notification.body"),value:z?e.jsx(Pt,{notification:t,blocklet:n}):e.jsx(Ft,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:r,shouldUpdate:!0})}].map(O=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:O.name,children:O.value},O.name))}const W={info:{label:i("common.basicInfo"),value:"info",component:I},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},D=Object.values(W).map(({label:g,value:O})=>({label:g,value:O})),L=W[N.tab]||W.info,m=g=>{N.tab=g};return e.jsx(Tt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(hs,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(It,{tabs:D,current:N.tab,onChange:m,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ls,{notificationId:t.id,resending:b,handleResend:E}),N.tab==="statistics"&&e.jsx(Se,{statistics:t.statistics,mode:"detail",resending:b,onResend:E}),N.tab==="info"&&e.jsx(L.component,{})]})]})})}const ms=j.memo(xt),hs=oe.div`
49
49
  & > .notification-row {
50
50
  padding: 0;
51
51
  }
@@ -92,7 +92,7 @@ import{r as j}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a2 as Pe,R a
92
92
  overflow: hidden;
93
93
  text-overflow: ellipsis;
94
94
  }
95
- `;function ue({blocklet:t,label:s}){var n;return e.jsx(gs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((n=t.meta)==null?void 0:n.title)})]}):e.jsx("span",{className:"name",children:s})})}Ge.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ge.defaultProps={onDelete:()=>{}};function Ge({list:t,label:s,onDelete:n}){return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(o=>e.jsx(Fe,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:o})}),onDelete:i=>n(i,o)},o))]})}function xs(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(fe,{severity:s})})}function bs({customTableButtons:t}){var me;const{t:s,locale:n}=X(),[o,i]=j.useState(!1),{data:r,paging:x,blocklet:u,fetch:b,getComponent:S,componentDids:C,inService:N,teamDid:E}=We(),z=j.useRef(null),[A,P]=j.useState(null),[I,W]=j.useState("info"),D=`notification-records-${(me=u.meta)==null?void 0:me.did}`,O=Dt(D),[m,g]=j.useState({pageSize:O.rowsPerPage||10,page:O.page?O.page+1:1,dids:O.dids||[],dateRange:O.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),L=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var v;const h=p.did||((v=p.meta)==null?void 0:v.did);C.includes(h)&&(p.ancestors=[u],f.push(p))}),f},[C,u]),Q=j.useCallback(async()=>{try{i(!0),await b(m),i(!1)}finally{i(!1)}},[b,m]);j.useEffect(()=>{Q()},[]),j.useEffect(()=>{const f=setInterval(()=>{document.visibilityState==="visible"&&b(m).then(p=>{const h=p.find(v=>v.id===(A==null?void 0:A.id));A&&h&&P({...h})})},3e3);return()=>clearInterval(f)},[m,A]);const K=(f,p,h,v)=>{f.stopPropagation();const T=h.filter(R=>R!==p);g(R=>({...R,[v]:T,page:1}))},J=({page:f,rowsPerPage:p,filterList:h})=>{const[v=[],,,,T=[]]=h;m.pageSize!==p?g(R=>({...R,pageSize:p,page:1})):m.page!==f+1?g(R=>({...R,page:f+1})):le(m.dids,v)?le(m.severities,T)||g(R=>({...R,severities:T,page:1})):g(R=>({...R,dids:v,page:1}))},_=j.useCallback(()=>{P(null),W("info")},[]),Z=j.useCallback(()=>{b(m)},[b,m]),M=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,h)=>{var T;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${h}`);const v=L.find(R=>{var V;return(R.did||((V=R.meta)==null?void 0:V.did))===p});return e.jsx(ue,{blocklet:v,label:(v==null?void 0:v.title)||((T=v==null?void 0:v.meta)==null?void 0:T.title)},p)}),update:(f,p,h)=>(f[h].splice(p,1),f)},filterOptions:{names:L,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,h,v)=>e.jsxs(ke,{style:{width:"380px"},children:[e.jsx(yt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(St,{multiple:!0,value:f[h],renderValue:T=>e.jsx(w,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var V;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=L.find(se=>{var a;return(se.did||((a=se.meta)==null?void 0:a.did))===R});return e.jsx(ue,{blocklet:U,label:(U==null?void 0:U.title)||((V=U==null?void 0:U.meta)==null?void 0:V.title)},R)})}),onChange:T=>{f[h]=T.target.value,p(f[h],h,v)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),L.map(T=>{var U,V;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ue,{blocklet:T,label:T.title||((V=T.meta)==null?void 0:V.title)})},R)})]})]})},customBodyRenderLite:f=>{var v,T;const p=r[f],h=S(p.componentDid);return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[h?e.jsx(rt,{size:32,blocklet:h,ancestors:h.ancestors??[]}):e.jsx(Wt,{blocklet:u,size:32}),e.jsx(pe,{maxLength:50,children:((v=h==null?void 0:h.meta)==null?void 0:v.title)||((T=u==null?void 0:u.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f],{receivers:h}=p;return e.jsx(Ct,{total:h.length,renderSurplus:v=>v<100?e.jsxs("span",{children:["+",v]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:v=>{v.stopPropagation(),P(p),W("receivers")},children:h.map(v=>{const{receiverUser:T}=v,R=ot(T.avatar,E,N);return e.jsx(nt,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:v.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},v.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(w,{onClick:h=>{h.stopPropagation(),P(p),W("statistics")},children:e.jsx(Se,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(pe,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=r[f];return e.jsx(fe,{severity:p.severity})},filter:!0,filterType:"custom",filterList:m.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,h)=>{p.stopPropagation(),K(p,h,M[4].options.filterList,"severities")}}),update:be},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(f,p,h,v)=>e.jsx(xs,{label:s("notification.severity"),filterList:f,onChange:p,index:h,column:v,filterValues:Ze})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=r[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],Ce=f=>{g(p=>({...p,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(w,{ref:z,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(vs,{children:e.jsx(st,{theme:ht(),children:e.jsx(at,{className:"main-data",verticalKeyWidth:100,loading:o,locale:n,columns:M,data:r,durable:D,onChange:J,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...O,onRowClick:(f,{dataIndex:p})=>{P(r[p])}},customPreButtons:[e.jsx($e,{value:m.dateRange,onChange:Ce})],customButtons:Ne,components:{TableFilterList:f=>e.jsx(Ue,{...f,itemComponent:p=>e.jsx(ye,{...p,canDelete:h=>{var T;const v=(T=h==null?void 0:h.columnNames)==null?void 0:T[(h==null?void 0:h.index)||0];return(v==null?void 0:v.name)==="sender"}})})}})})}),A&&e.jsx(ms,{refresh:Z,onCancel:_,notification:A,blocklet:u,tab:I})]})}const vs=oe.div`
95
+ `;function ue({blocklet:t,label:s}){var n;return e.jsx(gs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((n=t.meta)==null?void 0:n.title)})]}):e.jsx("span",{className:"name",children:s})})}Ge.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ge.defaultProps={onDelete:()=>{}};function Ge({list:t,label:s,onDelete:n}){return e.jsxs(w,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Y,{children:[s,": "]}),t.map(o=>e.jsx(Fe,{size:"small",label:e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:o})}),onDelete:i=>n(i,o)},o))]})}function xs(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(fe,{severity:s})})}function bs({customTableButtons:t}){var me;const{t:s,locale:n}=X(),[o,i]=j.useState(!1),{data:r,paging:x,blocklet:u,fetch:b,getComponent:S,componentDids:C,inService:N,teamDid:E}=We(),z=j.useRef(null),[A,P]=j.useState(null),[I,W]=j.useState("info"),D=`notification-records-${(me=u.meta)==null?void 0:me.did}`,L=Dt(D),[m,g]=j.useState({pageSize:L.rowsPerPage||10,page:L.page?L.page+1:1,dids:L.dids||[],dateRange:L.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),O=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var v;const h=p.did||((v=p.meta)==null?void 0:v.did);C.includes(h)&&(p.ancestors=[u],f.push(p))}),f},[C,u]),Z=j.useCallback(async()=>{try{i(!0),await b(m),i(!1)}finally{i(!1)}},[b,m]);j.useEffect(()=>{Z()},[]),j.useEffect(()=>{const f=setInterval(()=>{document.visibilityState==="visible"&&b(m).then(p=>{const h=p.find(v=>v.id===(A==null?void 0:A.id));A&&h&&P({...h})})},3e3);return()=>clearInterval(f)},[m,A]);const K=(f,p,h,v)=>{f.stopPropagation();const T=h.filter(R=>R!==p);g(R=>({...R,[v]:T,page:1}))},J=({page:f,rowsPerPage:p,filterList:h})=>{const[v=[],,,,T=[]]=h;m.pageSize!==p?g(R=>({...R,pageSize:p,page:1})):m.page!==f+1?g(R=>({...R,page:f+1})):le(m.dids,v)?le(m.severities,T)||g(R=>({...R,severities:T,page:1})):g(R=>({...R,dids:v,page:1}))},_=j.useCallback(()=>{P(null),W("info")},[]),Q=j.useCallback(()=>{b(m)},[b,m]),M=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,h)=>{var T;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${h}`);const v=O.find(R=>{var V;return(R.did||((V=R.meta)==null?void 0:V.did))===p});return e.jsx(ue,{blocklet:v,label:(v==null?void 0:v.title)||((T=v==null?void 0:v.meta)==null?void 0:T.title)},p)}),update:(f,p,h)=>(f[h].splice(p,1),f)},filterOptions:{names:O,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,h,v)=>e.jsxs(ke,{style:{width:"380px"},children:[e.jsx(yt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(St,{multiple:!0,value:f[h],renderValue:T=>e.jsx(w,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var V;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=O.find(se=>{var a;return(se.did||((a=se.meta)==null?void 0:a.did))===R});return e.jsx(ue,{blocklet:U,label:(U==null?void 0:U.title)||((V=U==null?void 0:U.meta)==null?void 0:V.title)},R)})}),onChange:T=>{f[h]=T.target.value,p(f[h],h,v)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),O.map(T=>{var U,V;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ue,{blocklet:T,label:T.title||((V=T.meta)==null?void 0:V.title)})},R)})]})]})},customBodyRenderLite:f=>{var v,T;const p=r[f],h=S(p.componentDid);return e.jsxs(w,{display:"flex",alignItems:"center",gap:1,children:[h?e.jsx(rt,{size:32,blocklet:h,ancestors:h.ancestors??[]}):e.jsx(Wt,{blocklet:u,size:32}),e.jsx(pe,{maxLength:50,children:((v=h==null?void 0:h.meta)==null?void 0:v.title)||((T=u==null?void 0:u.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f],{receivers:h}=p;return e.jsx(Ct,{total:h.length,renderSurplus:v=>v<100?e.jsxs("span",{children:["+",v]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:v=>{v.stopPropagation(),P(p),W("receivers")},children:h.map(v=>{const{receiverUser:T}=v,R=ot(T.avatar,E,N);return e.jsx(nt,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:v.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},v.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(w,{onClick:h=>{h.stopPropagation(),P(p),W("statistics")},children:e.jsx(Se,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=r[f];return e.jsx(pe,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=r[f];return e.jsx(fe,{severity:p.severity})},filter:!0,filterType:"custom",filterList:m.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,h)=>{p.stopPropagation(),K(p,h,M[4].options.filterList,"severities")}}),update:be},filterOptions:{names:Qe,fullWidth:!0,logic:ve,display:(f,p,h,v)=>e.jsx(xs,{label:s("notification.severity"),filterList:f,onChange:p,index:h,column:v,filterValues:Qe})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=r[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],Ce=f=>{g(p=>({...p,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(w,{ref:z,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(vs,{children:e.jsx(st,{theme:ht(),children:e.jsx(at,{className:"main-data",verticalKeyWidth:100,loading:o,locale:n,columns:M,data:r,durable:D,onChange:J,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...L,onRowClick:(f,{dataIndex:p})=>{P(r[p])}},customPreButtons:[e.jsx($e,{value:m.dateRange,onChange:Ce})],customButtons:Ne,components:{TableFilterList:f=>e.jsx(Ue,{...f,itemComponent:p=>e.jsx(ye,{...p,canDelete:h=>{var T;const v=(T=h==null?void 0:h.columnNames)==null?void 0:T[(h==null?void 0:h.index)||0];return(v==null?void 0:v.name)==="sender"}})})}})})}),A&&e.jsx(ms,{refresh:Q,onCancel:_,notification:A,blocklet:u,tab:I})]})}const vs=oe.div`
96
96
  td.MuiTableCell-footer {
97
97
  border: none !important;
98
98
  }