@abtnode/blocklet-services 1.16.39-beta-20250218-132815-6baaf20e → 1.16.39-beta-20250220-212222-627e9ea7

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 (202) hide show
  1. package/api/index.js +1 -1
  2. package/api/libs/push-kit/index.js +2 -2
  3. package/api/services/auth/index.js +1 -2
  4. package/api/services/dashboard/index.js +32 -48
  5. package/api/services/notification/notification-queue.js +77 -165
  6. package/api/socket/channel/did.js +44 -32
  7. package/api/util/attach-shared-utils.js +11 -4
  8. package/dist/assets/{Add-meGhscd6.js → Add-qzAc2S9X.js} +1 -1
  9. package/dist/assets/{ArrowDropDown-B7S4xnEe.js → ArrowDropDown-CH-FgtE-.js} +1 -1
  10. package/dist/assets/{CheckCircle-CnvZ4oB1.js → CheckCircle-Bk5vNiEj.js} +1 -1
  11. package/dist/assets/{ChevronLeft-D1qkw0FM.js → ChevronLeft-CtdCxfvp.js} +1 -1
  12. package/dist/assets/{ChevronRight-CEkTH0up.js → ChevronRight-C0FYeIUm.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BjrgG_HY.js → DeleteOutline-DJPUGW0c.js} +1 -1
  14. package/dist/assets/{Done-7hvoRcVZ.js → Done-BBJndopl.js} +1 -1
  15. package/dist/assets/{Download-CMvqPsK9.js → Download-DR7jogQn.js} +1 -1
  16. package/dist/assets/{EditIcon-BOr0kf6I.js → EditIcon-Mm3W5DE6.js} +1 -1
  17. package/dist/assets/{Error-D3I1nNnO.js → Error-DtmzeQ7l.js} +1 -1
  18. package/dist/assets/{Google-TNOfJ3uU.js → Google-DLwblvhu.js} +1 -1
  19. package/dist/assets/{InfoOutlined-CwoytfGr.js → InfoOutlined-D5FF63tH.js} +1 -1
  20. package/dist/assets/{Launch-wyBVNKfb.js → Launch-CmFwRERO.js} +1 -1
  21. package/dist/assets/{LaunchOutlined-B2ZU9fkg.js → LaunchOutlined-DBHgr88s.js} +1 -1
  22. package/dist/assets/{LockIcon-D-W4Rph6.js → LockIcon-BbWIWjve.js} +1 -1
  23. package/dist/assets/{Loop-CQAI5rIS.js → Loop-Bca4uFY8.js} +1 -1
  24. package/dist/assets/{MoreHoriz-CyCcv2bV.js → MoreHoriz-Dye919yY.js} +1 -1
  25. package/dist/assets/{PlayArrow-B5ZFUKPq.js → PlayArrow-C2iusqXD.js} +1 -1
  26. package/dist/assets/{QuestionMarkCircle-BvUTckGB.js → QuestionMarkCircle-D5Im4T0u.js} +1 -1
  27. package/dist/assets/{ServerLogo-BDEZRDcg.js → ServerLogo-DWgX8KHy.js} +1 -1
  28. package/dist/assets/{ViewList-C8AcRueZ.js → ViewList-DKhSCuMV.js} +1 -1
  29. package/dist/assets/access-control-B0LaD0k_.js +13 -0
  30. package/dist/assets/{actions-C0a0eUYM.js → actions-yv07Sweq.js} +1 -1
  31. package/dist/assets/{add-component-core-CK3SAdlQ.js → add-component-core-C2j8WeZe.js} +35 -35
  32. package/dist/assets/add-resource-BqHzz2Ig.js +1 -0
  33. package/dist/assets/addon-B-oiJMyb.js +31 -0
  34. package/dist/assets/{analytics-CjaAB5m2.js → analytics-Djm-FxYj.js} +1 -1
  35. package/dist/assets/{ar-DoIWDL3Q.js → ar-BIivBIFd.js} +1 -1
  36. package/dist/assets/ar-COZYSjgL.js +3 -0
  37. package/dist/assets/{audit-logs-bl5st5Lr.js → audit-logs-e69kZ-on.js} +1 -1
  38. package/dist/assets/{base32-9oQoOkFy.js → base32-CD3Vv-Tv.js} +1 -1
  39. package/dist/assets/branding-BxqW8Sc9.js +40 -0
  40. package/dist/assets/{bundle-avatar-Dnk7mw7b.js → bundle-avatar-BHE5y99P.js} +1 -1
  41. package/dist/assets/button-DYvqAiv_.js +1 -0
  42. package/dist/assets/{click-to-copy-C9X-UQyL.js → click-to-copy-Do3l3xtT.js} +1 -1
  43. package/dist/assets/complete-BHA60Kfa.js +45 -0
  44. package/dist/assets/{component-B0WI6_H4.js → component-CkH8Sb15.js} +96 -88
  45. package/dist/assets/config-CGVl3CyQ.js +32 -0
  46. package/dist/assets/{config-C0wq7rMr.js → config-CZ4gUB4m.js} +1 -1
  47. package/dist/assets/{config-navigation-Dskr7Yic.js → config-navigation-B_PVAliu.js} +3 -3
  48. package/dist/assets/{config-space-BYYAVRcS.js → config-space-Cjs4lh6z.js} +1 -1
  49. package/dist/assets/{confirm-BmLsHbj9.js → confirm-HOW8FaxK.js} +1 -1
  50. package/dist/assets/{connect-06lWrPrR.js → connect--Oy8GGMA.js} +1 -1
  51. package/dist/assets/{connect-hhGPDSK8.js → connect-D4PAe19d.js} +1 -1
  52. package/dist/assets/{connect-to-DIJ57-hM.js → connect-to-aA5MeDcj.js} +1 -1
  53. package/dist/assets/{content-layout-cWwRTmIc.js → content-layout-CE2kjm54.js} +1 -1
  54. package/dist/assets/{dashboard-PlqPcVrd.js → dashboard-CiOynIcf.js} +10 -10
  55. package/dist/assets/de-C2zBBjYP.js +3 -0
  56. package/dist/assets/{de-BVgb1fEg.js → de-CQlYxUo4.js} +1 -1
  57. package/dist/assets/delete-confirm-CsLJksmh.js +1 -0
  58. package/dist/assets/{did-address-Bl2N44vc.js → did-address-5heyoc8D.js} +1 -1
  59. package/dist/assets/domain-DH9NJU3V.js +9 -0
  60. package/dist/assets/domain-action-card-COoKhuua.js +15 -0
  61. package/dist/assets/domains-CyoWnOlx.js +1 -0
  62. package/dist/assets/{email-9CbD02fM.js → email-kdvuQq1P.js} +1 -1
  63. package/dist/assets/es-BeW3ehjv.js +3 -0
  64. package/dist/assets/{es-CWcVPAna.js → es-CiFVrJLk.js} +1 -1
  65. package/dist/assets/{exchange-passport-ZTeqENxf.js → exchange-passport-DC5cSNtB.js} +1 -1
  66. package/dist/assets/{form-text-input-DEadnM80.js → form-text-input-Vg6k4hxG.js} +1 -1
  67. package/dist/assets/{fr-C8Jr_C8u.js → fr-ByVHFXxu.js} +1 -1
  68. package/dist/assets/fr-D2xyGusB.js +3 -0
  69. package/dist/assets/{fuel-AxStjHWS.js → fuel-BtUPmbM2.js} +1 -1
  70. package/dist/assets/{fullpage-BXvfrD1C.js → fullpage-9ClXH1L9.js} +1 -1
  71. package/dist/assets/{get-safe-url-BVjMxmwp.js → get-safe-url-BRR4RLgg.js} +1 -1
  72. package/dist/assets/{get-safe-url-BxZD1oA_.js → get-safe-url-bdLdP6Lf.js} +1 -1
  73. package/dist/assets/{hi-DTqZQNNB.js → hi-BIS_6XAM.js} +1 -1
  74. package/dist/assets/hi-OH9OAZfb.js +1 -0
  75. package/dist/assets/{home-CrkVy1DG.js → home-DERpglCy.js} +1 -1
  76. package/dist/assets/{id-CUsGyKYW.js → id-BK78HolG.js} +1 -1
  77. package/dist/assets/id-BNCctHPN.js +3 -0
  78. package/dist/assets/{iframe-BcWepstA.js → iframe-D3k1dg5d.js} +1 -1
  79. package/dist/assets/index-8p3WpvMR.js +192 -0
  80. package/dist/assets/{index-DIQ33Q8Z.js → index-B0unYdcz.js} +1 -1
  81. package/dist/assets/{index-BBOSdbE7.js → index-B3zo8s95.js} +1 -1
  82. package/dist/assets/{index-BtFCAsqh.js → index-BQSYz_Lo.js} +1 -1
  83. package/dist/assets/{index-DgaUl_lv.js → index-BbnozP7b.js} +1 -1
  84. package/dist/assets/index-BelkkFch.js +228 -0
  85. package/dist/assets/index-BtWvJbA-.js +52 -0
  86. package/dist/assets/{index-DkVoxpR-.js → index-BwEZdySL.js} +7 -7
  87. package/dist/assets/{index-Be9vrMiA.js → index-Bygo8biQ.js} +1 -1
  88. package/dist/assets/{index-CHFvfli7.js → index-CF4Aobpk.js} +1 -1
  89. package/dist/assets/{index-CDvqNewi.js → index-CR0qrcky.js} +1 -1
  90. package/dist/assets/{index-BSC2apzE.js → index-CfM3rPHl.js} +1 -1
  91. package/dist/assets/{index-DtwN19zv.js → index-DIP3om2u.js} +1 -1
  92. package/dist/assets/{index-C-D-nCB1.js → index-DQ3_atB3.js} +1 -1
  93. package/dist/assets/{index-DfBNyFsV.js → index-DV2omMe2.js} +1 -1
  94. package/dist/assets/{index-ChSPqVLh.js → index-DcvnbXW2.js} +1 -1
  95. package/dist/assets/index-H3wqK9-u.js +109 -0
  96. package/dist/assets/{index-BXlJ03I_.js → index-XiSmd1mo.js} +1 -1
  97. package/dist/assets/index-dZzRZ2ZY.js +104 -0
  98. package/dist/assets/{invitation-BzHMoDRH.js → invitation-CxmBuTs1.js} +6 -6
  99. package/dist/assets/{invite-BBcuJaUv.js → invite-B874TDmG.js} +1 -1
  100. package/dist/assets/{issue-passport-sgBfFZ4Y.js → issue-passport-D9TAuz7P.js} +1 -1
  101. package/dist/assets/item-Bl6VQtAH.js +2 -0
  102. package/dist/assets/ja-BP7svMm3.js +3 -0
  103. package/dist/assets/{ja-B0U7M2t1.js → ja-C_qbKn0g.js} +1 -1
  104. package/dist/assets/ko-Bucx3EaX.js +3 -0
  105. package/dist/assets/{ko-CpDA9JjF.js → ko-Dlp9c2u9.js} +1 -1
  106. package/dist/assets/{launch-result-message-keU5grqY.js → launch-result-message-B237vj_f.js} +1 -1
  107. package/dist/assets/{layout-CGas_HfS.js → layout--JdBWkq8.js} +1 -1
  108. package/dist/assets/{list-cZ-OXxN0.js → list-D6KYwBs8.js} +1 -1
  109. package/dist/assets/{list-header-Dd4BEf4y.js → list-header-CRB0LxnL.js} +1 -1
  110. package/dist/assets/localization-CfyOuYf8.js +1 -0
  111. package/dist/assets/{log-BFj6TDz5.js → log-CY8wNU8M.js} +1 -1
  112. package/dist/assets/{login-B-6s411x.js → login-B248a-js.js} +1 -1
  113. package/dist/assets/login-oauth-callback-BLrbomPI.js +1 -0
  114. package/dist/assets/{logo-uploader-pyVqJwKp.js → logo-uploader-CXyCerZA.js} +3 -3
  115. package/dist/assets/{lost-passport-DKkxzCH8.js → lost-passport-BviMxb1A.js} +1 -1
  116. package/dist/assets/{open-window-Cvetj9Mn.js → open-window-Ch1rgFaC.js} +1 -1
  117. package/dist/assets/overview-B6x2PVnm.js +12 -0
  118. package/dist/assets/{page-header--y63DY5K.js → page-header-BVxfqM_P.js} +1 -1
  119. package/dist/assets/{permission-Be_APIVZ.js → permission-Ct9GXCMW.js} +1 -1
  120. package/dist/assets/{preferences-D-NDmLhf.js → preferences-BhZaRM6Y.js} +1 -1
  121. package/dist/assets/pt-DWx2CRwy.js +1 -0
  122. package/dist/assets/{pt-7r06GaNd.js → pt-SFZ6JUYf.js} +1 -1
  123. package/dist/assets/publish-resource-DcoLPJys.js +1 -0
  124. package/dist/assets/{react-beautiful-dnd.esm-Czr1mmuu.js → react-beautiful-dnd.esm-Bj96SiFV.js} +1 -1
  125. package/dist/assets/{relative-time-D0P0AJUI.js → relative-time-cY8dsU43.js} +1 -1
  126. package/dist/assets/{ru-MS-ksi2g.js → ru-Bz5lOwmE.js} +1 -1
  127. package/dist/assets/ru-CCmcxEDp.js +1 -0
  128. package/dist/assets/sdk-DQoMrTNt.js +1 -0
  129. package/dist/assets/{session-CV6ez46v.js → session-CldqrK3N.js} +1 -1
  130. package/dist/assets/setup-AfPc0iVj.js +19 -0
  131. package/dist/assets/{shorten-label-J69eHfMN.js → shorten-label-la5sIm_0.js} +1 -1
  132. package/dist/assets/{simple-select-D06JmA0a.js → simple-select-Cu-p9eCv.js} +1 -1
  133. package/dist/assets/{slicedToArray-CXBLQZX4.js → slicedToArray-DBh5Z78L.js} +2 -2
  134. package/dist/assets/{start-BjFFihjS.js → start-D-vJAX65.js} +1 -1
  135. package/dist/assets/{step-actions-qXq3r5tX.js → step-actions-EEz4d7kn.js} +1 -1
  136. package/dist/assets/{studio-BNGylnt7.js → studio-BfuxFzVZ.js} +1 -1
  137. package/dist/assets/{switch-control-DmKC0hpm.js → switch-control-DkVbfEAf.js} +1 -1
  138. package/dist/assets/{th-gcuRSNHo.js → th-B1jLPjfm.js} +1 -1
  139. package/dist/assets/th-yhtyMUEz.js +1 -0
  140. package/dist/assets/{traffic-Djmt2Ph8.js → traffic-DIdLhQbQ.js} +1 -1
  141. package/dist/assets/{transfer-B9ohZjja.js → transfer-CSUEJJtc.js} +1 -1
  142. package/dist/assets/{unsubscribe-6xRksnNz.js → unsubscribe-Dma6eGwK.js} +1 -1
  143. package/dist/assets/{use-mobile-DnWfrhc7.js → use-mobile-B7gJcr5J.js} +1 -1
  144. package/dist/assets/{useAsync-Ua5iss51.js → useAsync-CEZQNMFX.js} +1 -1
  145. package/dist/assets/{useAsyncRetry-Bmo6a1Zp.js → useAsyncRetry-BEB-tWmQ.js} +2 -2
  146. package/dist/assets/{useLocalStorage-B5t6MEw6.js → useLocalStorage-CM7gP1Ni.js} +1 -1
  147. package/dist/assets/{user-center-DEGm9vzv.js → user-center-BkMU0Sgl.js} +1 -1
  148. package/dist/assets/util-C5G3YrVZ.js +1 -0
  149. package/dist/assets/{util-Bl4vyFsm.js → util-Dn2l5LdV.js} +1 -1
  150. package/dist/assets/{vendor-arcblock-BFUPp1Ez.js → vendor-arcblock-CLdpcBR_.js} +73 -73
  151. package/dist/assets/{vendor-hooks-BKxTDk_P.js → vendor-hooks-ZnvK17j8.js} +2 -2
  152. package/dist/assets/vendor-mui-core-DrGFkjqr.js +266 -0
  153. package/dist/assets/{vendor-mui-x-CSUdon8K.js → vendor-mui-x-vjsTA-wt.js} +1 -1
  154. package/dist/assets/vi-C8K3TxgS.js +1 -0
  155. package/dist/assets/{vi-CGYOhf_R.js → vi-RXH5xiEz.js} +1 -1
  156. package/dist/assets/wrap-locale-fZXg9Dsd.js +1 -0
  157. package/dist/assets/zh-BZ_tPxRT.js +4 -0
  158. package/dist/assets/{zh-BYS_9r4v.js → zh-NJ5wkDCG.js} +1 -1
  159. package/dist/assets/{zh-tw-BR5CO3an.js → zh-tw-BpuS6s2j.js} +1 -1
  160. package/dist/assets/zh-tw-DKnxL7q7.js +3 -0
  161. package/dist/index.html +4 -4
  162. package/dist/service-worker.js +1 -1
  163. package/package.json +34 -34
  164. package/dist/assets/access-control-ClVHa3J1.js +0 -13
  165. package/dist/assets/add-resource-hs_iM1xk.js +0 -1
  166. package/dist/assets/addon-C7fx4MJ0.js +0 -31
  167. package/dist/assets/ar-BFUPmTkR.js +0 -3
  168. package/dist/assets/branding-5S3zjZlC.js +0 -40
  169. package/dist/assets/button-BTVoaDd7.js +0 -1
  170. package/dist/assets/complete-C3yyjx_N.js +0 -45
  171. package/dist/assets/config-DINcJX6A.js +0 -32
  172. package/dist/assets/de-hV0yD3gq.js +0 -3
  173. package/dist/assets/domain-DDa_Ldun.js +0 -9
  174. package/dist/assets/domain-list-DXbfS21Z.js +0 -15
  175. package/dist/assets/es-BcSAobJW.js +0 -3
  176. package/dist/assets/fr-8qti32p1.js +0 -3
  177. package/dist/assets/hi-DDEUhQcX.js +0 -1
  178. package/dist/assets/id-DkUYINLx.js +0 -3
  179. package/dist/assets/index-BJA4YPaC.js +0 -243
  180. package/dist/assets/index-CoxJ8G1A.js +0 -77
  181. package/dist/assets/index-DcfIKM1A.js +0 -9
  182. package/dist/assets/index-DkufOgYs.js +0 -125
  183. package/dist/assets/index-MxM82EtU.js +0 -228
  184. package/dist/assets/index-uYcwdGZL.js +0 -104
  185. package/dist/assets/item-C5sAxGxS.js +0 -2
  186. package/dist/assets/ja-C2LP4WQG.js +0 -3
  187. package/dist/assets/ko-C-DMeONa.js +0 -3
  188. package/dist/assets/localization-Z_CTe1Z8.js +0 -1
  189. package/dist/assets/login-oauth-callback-aKbzfltj.js +0 -1
  190. package/dist/assets/overview-BxbJCUbS.js +0 -12
  191. package/dist/assets/pt-CbxvF__Z.js +0 -1
  192. package/dist/assets/publish-resource-CxkiI4_n.js +0 -1
  193. package/dist/assets/ru-DLHrAeE7.js +0 -1
  194. package/dist/assets/sdk-NKQJT0FS.js +0 -1
  195. package/dist/assets/setup-CF2VhAxD.js +0 -19
  196. package/dist/assets/th-Dil9kwjH.js +0 -1
  197. package/dist/assets/util-PzCAH0nE.js +0 -1
  198. package/dist/assets/vendor-mui-core-xF5F4eT7.js +0 -266
  199. package/dist/assets/vi-B46hyfUM.js +0 -1
  200. package/dist/assets/wrap-locale-6MxBCfA2.js +0 -1
  201. package/dist/assets/zh-DWWuPzr1.js +0 -4
  202. package/dist/assets/zh-tw-Ci21sS2Y.js +0 -3
@@ -0,0 +1,109 @@
1
+ import{r as b}from"./vendor-react-D-afvo_7.js";import{j as e,E as d,a1 as Pe,R as bt,a4 as jt,T as G,a3 as R,A as Fe,bH as _e,cn as et,cm as Te,aN as Ie,bL as De,x as ye,aj as Ee,a2 as tt,aa as ae,V as nt,bO as Xe,bI as vt,aP as yt,al as Je,co as St}from"./vendor-mui-core-DrGFkjqr.js";import{b as Z,ap as re,z as Ct}from"./vendor-utils-5TjOM6td.js";import{j as V,b as L,ac as Nt,a0 as ze,e as X,bB as wt,D as st,a3 as Ae,aW as at,aE as be,a7 as Rt,an as Tt,bk as It}from"./vendor-arcblock-CLdpcBR_.js";import{z as Dt,G as $,m as Et,I as Qe}from"./index-dZzRZ2ZY.js";import{e as pe,a as Oe}from"./vendor-hooks-ZnvK17j8.js";import{S as ue}from"./shorten-label-la5sIm_0.js";import{I as it}from"./index-B3zo8s95.js";import{S as At,a as Ot}from"./list-D6KYwBs8.js";import{R as Be}from"./relative-time-cY8dsU43.js";import{b as We}from"./dashboard-CiOynIcf.js";import{W as Lt}from"./did-address-5heyoc8D.js";import{p as ot}from"./util-Dn2l5LdV.js";import{D as kt,g as Pt}from"./traffic-DIdLhQbQ.js";import{B as rt}from"./bundle-avatar-BHE5y99P.js";import{B as Ft}from"./index-B0unYdcz.js";import"./index-CF4Aobpk.js";import"./InfoOutlined-D5FF63tH.js";import"./useLocalStorage-CM7gP1Ni.js";import"./confirm-HOW8FaxK.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-C2iusqXD.js";import"./get-safe-url-BRR4RLgg.js";import"./session-CldqrK3N.js";import"./useAsyncRetry-BEB-tWmQ.js";import"./useAsync-CEZQNMFX.js";import"./useSetState-Crt4S51m.js";import"./base32-CD3Vv-Tv.js";import"./iframe-D3k1dg5d.js";import"./LaunchOutlined-DBHgr88s.js";import"./ChevronLeft-CtdCxfvp.js";import"./ChevronRight-C0FYeIUm.js";import"./index-DQ3_atB3.js";import"./vendor-mui-x-vjsTA-wt.js";const lt=b.createContext({}),{Provider:_t,Consumer:Qn}=lt;function zt({children:t,blocklet:n=""}){const{api:s,inService:i}=Dt(),[a,l]=b.useState([]),[p,f]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),y=pe(()=>{var j;return(j=n.meta)==null?void 0:j.did},[n]),[S,T]=b.useState([]),N=async({page:j=1,pageSize:v=20,...g}={})=>{if(!y)return[];try{const w={paging:{page:j,pageSize:v},...g,teamDid:y,dateRange:g.dateRange?[$(g.dateRange[0]).toISOString(),$(g.dateRange[1]).toISOString()]:void 0},{dids:M,...z}=w;let K="";M.includes("system")&&(K="system");const _=M.filter(ee=>ee!=="system"),Q=await s.getNotificationSendLog({input:{...z,source:K,componentDids:_}});return l(Q.list),f(Q.paging),Q.list}catch(w){return V.error(w.message),[]}},A=async()=>{const j=await s.getNotificationComponents({input:{teamDid:y}});T(j.componentDids)},P=b.useCallback(j=>{const v=n.children.find(g=>{var w;return((w=g.meta)==null?void 0:w.did)===j});if(v)return v.ancestors=[n],v},[n]),O=async({notificationId:j,receivers:v,channels:g,...w})=>{await s.resendNotification({input:{teamDid:y,notificationId:j,receivers:v,channels:g.map(M=>M==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:M==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:M),...w}})},F=b.useCallback(async j=>(await s.getUser({input:{teamDid:y,user:{did:j}}})).user,[s,y]),I=b.useCallback(async({page:j=1,pageSize:v=20,...g}={})=>{try{const w={paging:{page:j,pageSize:v},...g,userName:g.searchText||"",teamDid:y,dateRange:g.dateRange?[$(g.dateRange[0]).toISOString(),$(g.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[s,y]);b.useEffect(()=>{y&&A()},[y]);const U={fetch:N,data:a,paging:p,blocklet:n,getComponent:P,resendNotification:O,getUser:F,componentDids:S,getReceivers:I,inService:i,teamDid:y};return e.jsx(_t,{value:{notificationRecords:U},children:t})}function Me(){const{notificationRecords:t}=b.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Bt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:Bt[t],children:t})}var qe={},Wt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var ct=qe.default=void 0,Mt=Wt(ze()),qt=e;ct=qe.default=(0,Mt.default)((0,qt.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 Ke={},Kt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var dt=Ke.default=void 0,Ht=Kt(ze()),$t=e;dt=Ke.default=(0,Ht.default)((0,$t.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 He={},Ut=Pe;Object.defineProperty(He,"__esModule",{value:!0});var ut=He.default=void 0,Vt=Ut(ze()),Gt=e;ut=He.default=(0,Vt.default)((0,Gt.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 Yt=(t,n,s="")=>{if(!s||!n)return"";switch(s){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return s}};function pt(t,n,s={}){const{status:i,updatedAt:a,reason:l="",channel:p="wallet"}=s,f=a?t("notification.sendStatus.sentTime",{date:Et(a,n)}):"",y=Yt(t,p,l);return i===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:i===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.email)==null?void 0:i.enabled},mt=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.pushKit)==null?void 0:i.enabled},Xt=(t,n)=>{const s=Z(n,"extra.notifications.email",!0);return{available:ft(t),enabled:s}},Jt=(t,n)=>{const s=Z(n,"extra.notifications.push",!0);return{available:mt(t),enabled:s}},Qt=t=>({enabled:Z(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:Z(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(n=>{setTimeout(()=>{n()},t*1e3)}),en=(t,n)=>n==="wallet"||n==="webhook"?[{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:n==="pushKit"||n==="email"?[{channel:n,type:"available",pass:t("notification.sendStatus.reason.available",{channel:n}),fail:t("notification.sendStatus.reason.unavailable",{channel:n})},{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:[],xe=(t=[])=>{const n=$().startOf("day");return t.filter(s=>$(s.sendAt).isSame(n,"day")).length},tn=(t,n="")=>{if(n&&ke.includes(n)){const l=`${n}SendRecord`,p=Z(t,l,[]);return xe(p)}const s=Z(t,"webhook",{}),i=Object.keys(s??{})??[];if(n&&i.includes(n)){const l=s[n]??[];return xe(l)}const a={};return ke.forEach(l=>{const p=`${l}SendRecord`,f=Z(t,p,[]),y=xe(f);a[l]=y}),i.length>0&&i.forEach(l=>{const p=s[l]??[],f=xe(p);a[l]=f}),a},je=(t,n,s)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[s].splice(n,1),t},ve=(t,n)=>{if(!Array.isArray(n))throw new Error("filters must be an array");return n.length?!n.includes(t):!1},nn=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>bt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"}},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 J({config:t,enableTooltip:n=!0,showTitle:s=!1,children:i}){const{status:a,title:l="",sentTime:p="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:n?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:p})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:s?l:i})]})})}J.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};J.defaultProps={enableTooltip:!0,showTitle:!1,children:null};le.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};le.defaultProps={onDelete:()=>{}};function le({list:t,label:n,onDelete:s}){const{t:i,locale:a}=X();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(l=>{const p=pt(i,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(J,{config:p,enableTooltip:!1,children:p.title})}),onDelete:f=>s(f,l)},l)})]})}$e.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 $e({filterList:t,onChange:n,index:s,column:i,filterValues:a,label:l,renderLabel:p}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(f=>e.jsx(Ie,{control:e.jsx(De,{checked:t[s].indexOf(f.value??f)>-1,onChange:y=>{const S=[...t];y.target.checked?S[s]=[...S[s],f.value??f]:S[s]=S[s].filter(T=>T!==(f.value??f)),n(S[s],s,i)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:p(f)})},f.value??f))})]})}function Re(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(J,{enableTooltip:!1,config:{status:n.status},children:n.label})})}oe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function oe({status:t,updatedAt:n,reason:s="",channel:i="wallet",onResend:a}){const{t:l,locale:p}=X(),f=pt(l,p,{status:t,updatedAt:n,reason:s,channel:i});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(J,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(ye,{className:"resend-btn",size:"small",startIcon:e.jsx(We,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2rpx"}},onClick:a,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:n}){const{locale:s}=X(),i=$().toDate(),[a,l]=b.useState(null),p=b.useCallback(S=>{l(a?null:S.currentTarget)},[a]),f=!!a,y=b.useCallback(S=>{if(!S.startDate||!S.endDate){V.error("Please select a date range");return}if($(S.startDate).isAfter(S.endDate)||!$(S.startDate).isValid()||!$(S.endDate).isValid()){V.error("Invalid date range");return}n([S.startDate,S.endDate]),l(null)},[n]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(ye,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],s)," - ",Qe(t[1],s)]})}),e.jsx(Ee,{open:f,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(kt,{open:!0,maxDate:i,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Pt(i),onChange:y})})]})}Ve.propTypes={itemComponent:d.elementType.isRequired};function Ve({itemComponent:t,...n}){var a;const{t:s}=X();return!((a=n==null?void 0:n.filterList)!=null&&a.filter(l=>l.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...n,ItemComponent:t})})]})}function Se({label:t,onDelete:n,canDelete:s=()=>!0,...i}){const a=n&&typeof n=="function"?n:void 0;let l=!0;return s&&typeof s=="function"&&(l=s({label:t,...i})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Se.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Se.defaultProps={canDelete:()=>!0};const sn=[{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}];Ge.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ge.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ge({loading:t=!1,onCancel:n,onConfirm:s}){const{t:i}=X(),[a,l]=b.useState(sn),[p,f]=b.useState(!0),y=(T,N)=>{N.checked=T.target.checked;const A=a.map(P=>({...P,checked:P.value===N.value?N.checked:P.checked}));l(A)},S=T=>{T.stopPropagation(),s({channels:a.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:p})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:i("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:i("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(T=>e.jsx(Ie,{control:e.jsx(De,{checked:T.checked,onChange:N=>y(N,T),name:T.value}),label:T.label},T.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(De,{checked:p,onChange:T=>f(T.target.checked)}),label:i("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(ye,{onClick:T=>{T.stopPropagation(),n()},color:"inherit",children:i("common.cancel")}),e.jsxs(ye,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),i("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:n,resending:s=!1}){const{t:i,locale:a}=X(),{getReceivers:l,inService:p,teamDid:f,getUser:y,blocklet:S}=Me(),[T,N]=b.useState(!1),[A,P]=b.useState([]),O=Oe({anchorEl:null,position:null}),F=Oe({anchorEl:null,position:null}),[I,U]=b.useState(null),[j,v]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[g,w]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[M,z]=b.useState([]),K=[{label:i("notification.sendStatus.pending"),value:0,status:"pending"},{label:i("notification.sendStatus.success"),value:1,status:"success"},{label:i("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!T&&t)try{N(!0);const o=await l({notificationId:t,...g}),r=o.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,f,p)}}));P(r),v(o.paging),N(!1)}catch(o){V.error(o.message),N(!1)}};b.useEffect(()=>{_()},[g]);const Q=o=>{o.stopPropagation();const r=o.currentTarget;F.anchorEl=r;const c=r.getBoundingClientRect();F.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ee=o=>o.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(We,{}),sx:{fontSize:12,".MuiButton-startIcon":{mr:"2rpx"}},onClick:Q,children:i("notification.resend")})}):null,Ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:i("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:j.page-1,rowsPerPage:j.pageSize,count:j.total,searchText:g.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:M,onRowSelectionChange:(o,r)=>{z(r.map(c=>c.dataIndex))},customToolbarSelect:ee},we=({page:o,rowsPerPage:r,searchText:c,filterList:C})=>{const[,k=[],H=[],q=[]]=C;g.pageSize!==r?w(W=>({...W,pageSize:r,page:1})):g.page!==o+1?w(W=>({...W,page:o+1})):g.searchText!==c?w(W=>({...W,searchText:c,page:1})):re(k,g.walletSendStatus)?re(H,g.pushKitSendStatus)?re(q,g.emailSendStatus)||w(W=>({...W,emailSendStatus:q,page:1})):w(W=>({...W,pushKitSendStatus:H,page:1})):w(W=>({...W,walletSendStatus:k,page:1}))},me=b.useCallback(async(o,r)=>{if(!r)return!1;const c=await y(r);return c?o==="wallet"?Qt(c):o==="email"?Xt(S,c):o==="pushKit"?Jt(S,c):o==="webhook"?Zt(c):!0:!1},[y,S]),h=b.useCallback(o=>en(i,o),[i]),u=()=>{O.anchorEl=null,O.position=null,U(null)},m=()=>{F.anchorEl=null,F.position=null},x=async(o,r,c=!0,C="")=>{if(!(!r.length||!o.length))try{n(o,r,c,C),F.anchorEl||(await ge(.5),u())}catch(k){console.error("handleResend error",{error:k})}},D=async({channels:o,isResendFailedOnly:r})=>{const c=M.map(C=>A[C].receiver);await x(o,c,r),await ge(.5),m(),z([])},E=async(o,r=[],c=!0)=>{try{await x(["webhook"],[o.receiver],c,r)}catch(C){V.error(C.response?C.response.statusText:C.message)}},B=async(o,r,c,C=[],k=!0)=>{if(o.stopPropagation(),tn(r,c)>=4){V.warning(i("notification.resendLimit"));return}if(!ke.includes(c)){await E(r,C,k);return}if(o){const q=o.currentTarget,W=q.getBoundingClientRect();O.anchorEl=q,O.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}U({channel:c});try{const q=await me(c,r.receiver);await ge(1),U({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(W=>!!W))&&(await n([c],[r.receiver],k),F.anchorEl||(await ge(.5),u()))}catch(q){V.error(q.message)}},Y=o=>{w(r=>({...r,dateRange:o,page:1}))},te=(o,r,c,C)=>{o.stopPropagation();const k=c.filter(H=>H!==r);w(H=>({...H,[C]:k,page:1}))},ie=pe(()=>[{label:i("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:o=>{const{receiverUser:r,receiver:c}=A[o];return r?e.jsxs(R,{"data-cy":`member-name-${r.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(st,{src:`${r.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(ue,{children:r.fullName})]},c):e.jsx(Lt,{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:g.walletSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Wallet",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Wallet",filterList:o,onChange:r,index:c,column:C,filterValues:K})},customBodyRenderLite:o=>{const{walletSendStatus:r,walletSendAt:c,walletSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"wallet",onResend:k=>B(k,A[o],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{pushKitSendStatus:r,pushKitSendAt:c,pushKitSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"pushkit",onResend:k=>B(k,A[o],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:g.pushKitSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Push Kit",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Push Kit",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{emailSendStatus:r,emailSendAt:c,emailSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"email",onResend:k=>B(k,A[o],"email",[],!1)})},filter:!0,filterType:"custom",filterList:g.emailSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Email",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Email",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{webhook:r}=A[o];if(!r)return null;const c=Object.entries(r)[0];if(!c)return null;const[C,k]=c,H=k[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(ue,{maxLength:30,children:C},C),e.jsx(oe,{status:H.status,updatedAt:H.sendAt,reason:H.failedReason,channel:"webhook",onResend:q=>B(q,A[o],"webhook",[C],!1)})]},C)})}}},{label:i("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:o=>{const{createdAt:r}=A[o];return e.jsx(Be,{value:r,locale:a,shouldUpdate:!0})}}}],[A,a,g,i]),he=[e.jsx(Ue,{value:g.dateRange,onChange:Y},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:T,startIcon:e.jsx(ut,{}),onClick:()=>_(),style:{marginLeft:8},children:i("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(on,{children:e.jsxs(nt,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:a,loading:T,columns:ie,data:A,onChange:we,options:Ne,customButtons:he,components:{TableFilterList:o=>e.jsx(Ve,{...o,itemComponent:r=>e.jsx(Se,{...r,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(Ee,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rn,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:h(I==null?void 0:I.channel).map(o=>{var k,H;const{type:r,pass:c,fail:C}=o;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[r]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(H=I==null?void 0:I.result)!=null&&H[r]?be.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},r):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:be.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:C})]},r)})})]})}),F.anchorEl&&e.jsx(Ee,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ge,{loading:s,onCancel:m,onConfirm:D})})]})})})}const an=b.memo(gt),on=ae.div`
2
+ td.MuiTableCell-footer {
3
+ border: none !important;
4
+ }
5
+ .sent-status-cell {
6
+ .resend-btn {
7
+ display: none;
8
+ }
9
+ &:hover {
10
+ .resend-btn {
11
+ display: flex;
12
+ }
13
+ }
14
+ }
15
+ `,rn=ae.div`
16
+ padding: 8px 16px;
17
+ .check-title {
18
+ font-weight: 500;
19
+ margin-bottom: 8px;
20
+ &::first-letter {
21
+ text-transform: uppercase;
22
+ }
23
+ }
24
+ .check-item {
25
+ svg {
26
+ font-size: 16px;
27
+ }
28
+ font-size: 12px;
29
+ }
30
+ `,ce=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ln(t){const{wallet:n,push:s,email:i,webhook:a}=t;return[{name:"Wallet",value:e.jsx(ne,{item:n})},{name:"Push",value:e.jsx(ne,{item:s})},{name:"Email",value:e.jsx(ne,{item:i})},...a.total>0?[{name:"Webhook",value:e.jsx(ne,{item:a})}]:[]]}function cn(t,n,s){const{wallet:i,push:a,email:l,webhook:p}=t;return[{name:"Wallet",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,item:i,onResend:n})},{name:"Push",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.PUSH,item:a,onResend:n})},{name:"Email",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:n})},...p.total>0?[{name:"Webhook",value:e.jsx(se,{loading:s,channel:L.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:p,isWebhook:!0,onResend:n})}]:[]]}Ce.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Ce.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ne.propTypes={item:d.object.isRequired,isWebhook:d.bool};ne.defaultProps={isWebhook:!1};function ne({item:t,isWebhook:n=!1}){const{t:s}=X(),i=n?t.success.length:t.success,a=t.total,l=i===a?"success":"failed";return e.jsx(R,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(R,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(J,{config:{status:l},enableTooltip:!1,children:[ce(i)," / ",ce(a)," ",s("notification.sendStatus.success")]})})})}se.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};se.defaultProps={isWebhook:!1,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function se({channel:t,item:n,isWebhook:s=!1,onResend:i,loading:a}){const{t:l}=X(),{success:p,failed:f,pending:y}=n,S=nn(t),T=s?p.length:p,N=s?f.length:f,A=s?y.length:y,P=async U=>{U.stopPropagation();const j=s?[...new Set([...p,...f].map(v=>v))]:[];await i([t],[],!0,j)},O=T+N,F=O>0?T/O*100:0,I=O>0?N/O*100:0;return e.jsxs(dn,{successRatio:F,failedRatio:I,children:[e.jsxs(G,{variant:"h6",children:[S," (",n.total,")"]}),e.jsxs(G,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:ce(T)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(R,{className:"unsent-area",children:[e.jsxs(R,{children:[e.jsxs(J,{config:{status:"failed"},enableTooltip:!1,children:[ce(N)," ",l("notification.sendStatus.failed")]}),e.jsxs(J,{config:{status:"pending"},enableTooltip:!1,children:[ce(A)," ",l("notification.sendStatus.pending")]})]}),N>0&&e.jsx(R,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:a,variant:"contained",startIcon:e.jsx(We,{}),sx:{fontSize:12,".MuiButton-startIcon":{mr:"2rpx"}},onClick:P,children:l("notification.resend")})})]})]})}function Ce({statistics:t,mode:n="simple",onResend:s,resending:i}){const a=pe(()=>n==="simple"?ln(t):cn(t,s,i),[t,n]);return n==="simple"?e.jsx("div",{children:a.map(l=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:n==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Xe,{container:!0,spacing:2,children:a.map(l=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:l.value},l.name))})}const dn=ae(R)`
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ padding: 16px;
35
+ border-radius: 8px;
36
+ background: ${({successRatio:t,failedRatio:n})=>t===0&&n===0?"#eff3fa":`linear-gradient(to right, #dafee7 ${t}%, #fef2f2 ${t}%)`};
37
+ transition: 'background 0.5s ease',
38
+ cursor: pointer;
39
+ .unsent-area {
40
+ width: 100%;
41
+ position: relative;
42
+ .resend-btn {
43
+ position: absolute;
44
+ right: 0;
45
+ bottom: 0;
46
+ }
47
+ }
48
+ `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:n=()=>{},blocklet:s,tab:i="info"}){const{t:a,locale:l}=X(),{getComponent:p,resendNotification:f}=Me(),[y,S]=b.useState(!1),T=pe(()=>p(t.componentDid)||s,[s,t.componentDid]),N=Oe({tab:i||"info"}),A=b.useCallback(async(j,v,g=!0,w=[])=>{var K;if(!j.length||!t.id)return;const M=v.length>0?v:(K=t==null?void 0:t.receivers)==null?void 0:K.map(_=>_.receiver);if(!M.length)return;let z=[...j];if(z.includes(L.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),z=z.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.PUSH)),z.includes(L.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(s)&&(V.warning(a("notification.sendStatus.reason.unavailable",{channel:"Email"})),z=z.filter(_=>_!==L.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!z.length)try{S(!0),await f({notificationId:t.id,receivers:M,channels:z,resendFailedOnly:g,...z.includes("webhook")&&w.length?{webhookUrls:w}:{}}),V.success("Message has been sent!")}catch(_){console.error("handleResend error",{error:_}),V.error(_.response?_.response.statusText:_.message)}finally{S(!1)}},[s,t.id,t==null?void 0:t.receivers,f,a]);function P(){return[{name:a("notification.from"),value:e.jsx(At,{size:32,blocklet:T,showName:!0,hideDot:!0})},{name:a("notification.notificationTitle"),value:e.jsx(ue,{maxLength:50,children:t.title})},{name:a("notification.body"),value:e.jsx(Ot,{notification:t,rows:0})},{name:a("notification.severity"),value:e.jsx(fe,{severity:t.severity})},{name:a("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:l,shouldUpdate:!0})}].map(v=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:v.name,children:v.value},v.name))}const O={info:{label:a("common.basicInfo"),value:"info",component:P},receivers:{label:a("notification.receiver"),value:"receivers"},statistics:{label:a("notification.statistics"),value:"statistics"}},F=Object.values(O).map(({label:j,value:v})=>({label:j,value:v})),I=O[N.tab]||O.info,U=j=>{N.tab=j};return e.jsx(Rt,{title:a("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{N.tab="info",n()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(pn,{children:[e.jsx(R,{mx:3,className:"tabs",children:e.jsx(Tt,{tabs:F,current:N.tab,onChange:U,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(an,{notificationId:t.id,resending:y,handleResend:A}),N.tab==="statistics"&&e.jsx(Ce,{statistics:t.statistics,mode:"detail",resending:y,onResend:A}),N.tab==="info"&&e.jsx(I.component,{})]})]})})}const un=b.memo(xt),pn=ae.div`
49
+ & > .notification-row {
50
+ padding: 0;
51
+ }
52
+
53
+ .tabs {
54
+ margin: 0;
55
+ }
56
+ .body {
57
+ margin-top: 16px;
58
+ }
59
+
60
+ .channel-item {
61
+ display: flex;
62
+ padding: 4px;
63
+ justify-content: flex-start;
64
+ align-items: center;
65
+ gap: 8px;
66
+ > p {
67
+ font-size: 15px;
68
+ }
69
+ .resend-btn {
70
+ svg {
71
+ font-size: 16px;
72
+ }
73
+ display: flex;
74
+ align-items: center;
75
+ font-size: 12px;
76
+ cursor: pointer;
77
+ &.disabled {
78
+ cursor: not-allowed;
79
+ color: ${be.text.disabled};
80
+ }
81
+ }
82
+ }
83
+ `;de.propTypes={blocklet:d.object,label:d.string};de.defaultProps={blocklet:null,label:""};const fn=ae.div`
84
+ display: flex;
85
+ justify-items: flex-start;
86
+ align-items: center;
87
+ gap: 8px;
88
+ .name {
89
+ display: block;
90
+ max-width: 260px;
91
+ white-space: nowrap;
92
+ overflow: hidden;
93
+ text-overflow: ellipsis;
94
+ }
95
+ `;function de({blocklet:t,label:n}){var s;return e.jsx(fn,{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||((s=t.meta)==null?void 0:s.title)})]}):e.jsx("span",{className:"name",children:n})})}Ye.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ye.defaultProps={onDelete:()=>{}};function Ye({list:t,label:n,onDelete:s}){return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(i=>e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(fe,{severity:i})}),onDelete:a=>s(a,i)},i))]})}function mn(t){return e.jsx($e,{...t,renderLabel:n=>e.jsx(fe,{severity:n})})}function hn(){var me;const{t,locale:n}=X(),[s,i]=b.useState(!1),{data:a,paging:l,blocklet:p,fetch:f,getComponent:y,componentDids:S,inService:T,teamDid:N}=Me(),A=b.useRef(null),[P,O]=b.useState(null),[F,I]=b.useState("info"),U=`notification-records-${(me=p.meta)==null?void 0:me.did}`,j=It(U),[v,g]=b.useState({pageSize:j.rowsPerPage||10,page:j.page?j.page+1:1,dids:j.dids||[],dateRange:j.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),w=pe(()=>{if(!p.children||!p.children.length)return[];const h=[];return p.children.forEach(u=>{var x;const m=u.did||((x=u.meta)==null?void 0:x.did);S.includes(m)&&(u.ancestors=[p],h.push(u))}),h},[S,p]),M=b.useCallback(async()=>{try{i(!0),await f(v),i(!1)}finally{i(!1)}},[f,v]);b.useEffect(()=>{M()},[]),b.useEffect(()=>{const h=setInterval(()=>{document.visibilityState==="visible"&&f(v).then(u=>{const m=u.find(x=>x.id===(P==null?void 0:P.id));P&&m&&O({...m})})},3e3);return()=>clearInterval(h)},[v,P]);const z=(h,u,m,x)=>{h.stopPropagation();const D=m.filter(E=>E!==u);g(E=>({...E,[x]:D,page:1}))},K=({page:h,rowsPerPage:u,filterList:m})=>{const[x=[],,,,D=[]]=m;v.pageSize!==u?g(E=>({...E,pageSize:u,page:1})):v.page!==h+1?g(E=>({...E,page:h+1})):re(v.dids,x)?re(v.severities,D)||g(E=>({...E,severities:D,page:1})):g(E=>({...E,dids:x,page:1}))},_=b.useCallback(()=>{O(null),I("info")},[]),Q=b.useCallback(()=>{f(v)},[f,v]),ee=[{label:t("notification.from"),name:"sender",width:300,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:h=>h.map((u,m)=>{var D;if(u==="system")return e.jsx("span",{children:t("notification.system")},`system-${m}`);const x=w.find(E=>{var Y;return(E.did||((Y=E.meta)==null?void 0:Y.did))===u});return e.jsx(de,{blocklet:x,label:(x==null?void 0:x.title)||((D=x==null?void 0:x.meta)==null?void 0:D.title)},u)}),update:(h,u,m)=>(h[m].splice(u,1),h)},filterOptions:{names:w,logic:(h,u)=>u.length?!u.includes(h):!1,display:(h,u,m,x)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(vt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(yt,{multiple:!0,value:h[m],renderValue:D=>e.jsx(R,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:D.map(E=>{var Y;if(E==="system")return e.jsx("span",{children:t("notification.system")},E);const B=w.find(te=>{var he;return(te.did||((he=te.meta)==null?void 0:he.did))===E});return e.jsx(de,{blocklet:B,label:(B==null?void 0:B.title)||((Y=B==null?void 0:B.meta)==null?void 0:Y.title)},E)})}),onChange:D=>{h[m]=D.target.value,u(h[m],m,x)},children:[e.jsx(Je,{value:"system",children:t("notification.system")}),w.map(D=>{var B,Y;const E=D.did||((B=D.meta)==null?void 0:B.did);return e.jsx(Je,{value:E,children:e.jsx(de,{blocklet:D,label:D.title||((Y=D.meta)==null?void 0:Y.title)})},E)})]})]})},customBodyRenderLite:h=>{var x,D;const u=a[h],m=y(u.componentDid);return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[m?e.jsx(rt,{size:32,blocklet:m,ancestors:m.ancestors??[]}):e.jsx(Ft,{blocklet:p,size:32}),e.jsx(ue,{maxLength:50,children:((x=m==null?void 0:m.meta)==null?void 0:x.title)||((D=p==null?void 0:p.meta)==null?void 0:D.title)})]})}}},{label:t("notification.receiver"),name:"receivers",width:200,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h],{receivers:m}=u;return e.jsx(St,{total:m.length,max:3,sx:{height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px"}},onClick:x=>{x.stopPropagation(),O(u),I("receivers")},children:m.map(x=>{const{receiverUser:D}=x,E=ot(D.avatar,N,T);return e.jsx(st,{alt:D.fullName,src:`${E}?imageFilter=resize&w=48&h=48`,size:32,did:x.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},x.receiver)})})}}},{label:t("notification.statistics"),name:"statistics",width:200,options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(R,{onClick:m=>{m.stopPropagation(),O(u),I("statistics")},children:e.jsx(Ce,{statistics:u.statistics})})}}},{label:t("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:h=>{const u=a[h];return e.jsx(ue,{maxLength:50,children:u.title})}}},{label:t("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:h=>{const u=a[h];return e.jsx(fe,{severity:u.severity})},filter:!0,filterType:"custom",filterList:v.severities??[],customFilterListOptions:{render:h=>e.jsx(Ye,{list:h,label:t("notification.severity"),onDelete:(u,m)=>{u.stopPropagation(),z(u,m,ee[4].options.filterList,"severities")}}),update:je},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(h,u,m,x)=>e.jsx(mn,{label:t("notification.severity"),filterList:h,onChange:u,index:m,column:x,filterValues:Ze})}}},{label:t("common.createdAt"),name:"createdAt",width:200,options:{filter:!1,customBodyRenderLite:h=>{const{createdAt:u}=a[h];return e.jsx(Be,{value:u,locale:n,shouldUpdate:!0})}}}],Ne=h=>{g(u=>({...u,dateRange:h,page:1}))},we=[e.jsx(Ue,{value:v.dateRange,onChange:Ne})];return e.jsxs(R,{ref:A,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(gn,{children:e.jsx(nt,{theme:ht(),children:e.jsx(at,{className:"main-data",verticalKeyWidth:100,loading:s,locale:n,columns:ee,data:a,durable:U,onChange:K,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:l.page-1,rowsPerPage:l.pageSize,count:l.total,...j,onRowClick:(h,{dataIndex:u})=>{O(a[u])}},customButtons:we,components:{TableFilterList:h=>e.jsx(Ve,{...h,itemComponent:u=>e.jsx(Se,{...u,canDelete:m=>{var D;const x=(D=m==null?void 0:m.columnNames)==null?void 0:D[(m==null?void 0:m.index)||0];return(x==null?void 0:x.name)==="sender"}})})}})})}),P&&e.jsx(un,{refresh:Q,onCancel:_,notification:P,blocklet:p,tab:F})]})}const gn=ae.div`
96
+ td.MuiTableCell-footer {
97
+ border: none !important;
98
+ }
99
+ .sent-status-cell {
100
+ .resend-btn {
101
+ display: none;
102
+ }
103
+ &:hover {
104
+ .resend-btn {
105
+ display: flex;
106
+ }
107
+ }
108
+ }
109
+ `;xn.propTypes={blocklet:d.object.isRequired};function xn({blocklet:t={}}){return e.jsx(zt,{blocklet:t,children:e.jsx(hn,{})})}export{xn as default};
@@ -1,4 +1,4 @@
1
- import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-xF5F4eT7.js";import{d as ce}from"./Add-meGhscd6.js";import{e as q,a7 as G,a3 as N,j as A,x as Qe,a0 as Xe,b as de,av as ue,n as et,ac as tt,a2 as Be,bm as X,bn as be,aw as st}from"./vendor-arcblock-BFUPp1Ez.js";import{d as te}from"./EditIcon-BOr0kf6I.js";import{d as rt}from"./LockIcon-D-W4Rph6.js";import{L as pe,S as me,d as nt}from"./list-header-Dd4BEf4y.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{z as B,O as K,at as Re,C as ot,ab as it,f as lt,h as ct,b as J,au as dt}from"./index-uYcwdGZL.js";import{u as U}from"./dashboard-PlqPcVrd.js";import{w as H,P as we}from"./permission-Be_APIVZ.js";import{C as fe}from"./confirm-BmLsHbj9.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-TNOfJ3uU.js";import{W as ze}from"./did-address-Bl2N44vc.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-B5t6MEw6.js";import"./PlayArrow-B5ZFUKPq.js";import"./get-safe-url-BVjMxmwp.js";import"./index-DIQ33Q8Z.js";import"./session-CV6ez46v.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-CwoytfGr.js";import"./cloneDeep-BRiLvZjr.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Q=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";Q=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
1
+ import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-DrGFkjqr.js";import{d as ce}from"./Add-qzAc2S9X.js";import{e as q,a7 as G,a3 as N,j as A,x as Qe,a0 as Xe,b as de,av as ue,n as et,ac as tt,a2 as Be,bm as X,bn as be,aw as st}from"./vendor-arcblock-CLdpcBR_.js";import{d as te}from"./EditIcon-Mm3W5DE6.js";import{d as rt}from"./LockIcon-BbWIWjve.js";import{L as pe,S as me,d as nt}from"./list-header-CRB0LxnL.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{z as B,O as K,au as Re,C as ot,ab as it,f as lt,h as ct,b as J,av as dt}from"./index-dZzRZ2ZY.js";import{u as U}from"./dashboard-CiOynIcf.js";import{w as H,P as we}from"./permission-Ct9GXCMW.js";import{C as fe}from"./confirm-HOW8FaxK.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-DLwblvhu.js";import{W as ze}from"./did-address-5heyoc8D.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-ZnvK17j8.js";import"./useLocalStorage-CM7gP1Ni.js";import"./PlayArrow-C2iusqXD.js";import"./get-safe-url-BRR4RLgg.js";import"./index-B0unYdcz.js";import"./session-CldqrK3N.js";import"./useAsyncRetry-BEB-tWmQ.js";import"./useAsync-CEZQNMFX.js";import"./InfoOutlined-D5FF63tH.js";import"./cloneDeep-BRiLvZjr.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Q=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";Q=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
2
2
  * Determine if an object is a Buffer
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>