@abtnode/webapp 1.16.45-beta-20250609-111118-0d252ebe → 1.16.45-beta-20250610-112229-2eb0face

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 (223) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-BqwbfR-J.js → AdapterDayjs-DAz3KrnL.js} +1 -1
  4. package/dist/assets/{Add-CSGWebd7.js → Add-BvcTJL6g.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-BCCxOUNE.js → ArrowDropDown-lSBhitmG.js} +1 -1
  6. package/dist/assets/{Autocomplete-BRFoT1-d.js → Autocomplete-DPEAys5B.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-B-xYTnoc.js → Breadcrumbs-CCANSAXq.js} +1 -1
  8. package/dist/assets/{ButtonGroup-ClVwTb7r.js → ButtonGroup-8JIPxBFt.js} +1 -1
  9. package/dist/assets/{CSSTransition-DpoNbm4c.js → CSSTransition-CrBmaRu0.js} +1 -1
  10. package/dist/assets/{CallMerge-weq4zXp-.js → CallMerge-ChAxopdM.js} +1 -1
  11. package/dist/assets/{CardContent-CTAfwoUe.js → CardContent-BQOdBMgK.js} +1 -1
  12. package/dist/assets/{ChevronLeft-DQK-aqqz.js → ChevronLeft-CQivGJHk.js} +1 -1
  13. package/dist/assets/{ChevronRight-BtkdX9A9.js → ChevronRight-BlhG3yZY.js} +1 -1
  14. package/dist/assets/{Clear-D0I7uWhD.js → Clear-9k4hE_iq.js} +1 -1
  15. package/dist/assets/{Close-6CxneLlA.js → Close-aI0rARqu.js} +1 -1
  16. package/dist/assets/{Community-v2_SoLAO.js → Community-BX8y7YvB.js} +1 -1
  17. package/dist/assets/{Delete-P4B2dduO.js → Delete-EgRRDgvd.js} +1 -1
  18. package/dist/assets/{DeleteOutline-EQ9bHspP.js → DeleteOutline-Ja8iJJm1.js} +1 -1
  19. package/dist/assets/{Done-2EsU1aO2.js → Done-yL7tHkLt.js} +1 -1
  20. package/dist/assets/{Edit-frf3Fbx4.js → Edit-WOZnUVvS.js} +1 -1
  21. package/dist/assets/{ErrorOutline-a1DnwqoR.js → ErrorOutline-BjAyvxx4.js} +1 -1
  22. package/dist/assets/{HelpOutline-CBv7x3VM.js → HelpOutline-BmFBsSz3.js} +1 -1
  23. package/dist/assets/{Holiday-CM3JD4xm.js → Holiday-BwHFmcPg.js} +1 -1
  24. package/dist/assets/{Launch-B7fv6nTK.js → Launch-DHV3U2Y3.js} +1 -1
  25. package/dist/assets/{Link-CiUEO3cQ.js → Link-C4RjtlPw.js} +1 -1
  26. package/dist/assets/{ListItemButton-ByIRcZGW.js → ListItemButton-CS_u4xql.js} +1 -1
  27. package/dist/assets/{ListSubheader-Yn3XMnVm.js → ListSubheader-C-e_2m7m.js} +1 -1
  28. package/dist/assets/{LoadingButton-B3es9INs.js → LoadingButton-bxrmduDd.js} +1 -1
  29. package/dist/assets/{LockIcon-C1gL9Uz4.js → LockIcon--YdvMZNM.js} +1 -1
  30. package/dist/assets/{Meeting-BkxfSXYG.js → Meeting-CTX8DATf.js} +1 -1
  31. package/dist/assets/{MoreHoriz-3d6Yp_t-.js → MoreHoriz-DAgzjMkD.js} +1 -1
  32. package/dist/assets/{MoreVert-C_Ck3fn9.js → MoreVert-C7ADSe__.js} +1 -1
  33. package/dist/assets/{OffSick-Z9k6qoex.js → OffSick-Cw_Bo4pj.js} +1 -1
  34. package/dist/assets/{OpenInNew-D79h4Iot.js → OpenInNew-DloC4nwa.js} +1 -1
  35. package/dist/assets/{Public-BtS6bdiD.js → Public-DYzbOE-T.js} +1 -1
  36. package/dist/assets/{Refresh-C1kA8imS.js → Refresh-By8bfp9S.js} +1 -1
  37. package/dist/assets/{SchemaReference.es-Dfqhb0uS.js → SchemaReference.es-CbqYK7gW.js} +1 -1
  38. package/dist/assets/{Search-CUm1f8xo.js → Search-CjaYHOuY.js} +1 -1
  39. package/dist/assets/{Slider-B0hY7ZYB.js → Slider-14Xp1QE3.js} +1 -1
  40. package/dist/assets/{Stepper-CEe-v4P_.js → Stepper-Cz4oLc0v.js} +1 -1
  41. package/dist/assets/{Switch-D3iZUzda.js → Switch-lDUha6nF.js} +1 -1
  42. package/dist/assets/{TableRow-CQ8RBtid.js → TableRow-uM5dbbKH.js} +1 -1
  43. package/dist/assets/{TableSearch-Uk9kIt7i.js → TableSearch-CUrFzIWx.js} +1 -1
  44. package/dist/assets/{ToggleButtonGroup-BrZT8OFC.js → ToggleButtonGroup-ruLs9U48.js} +1 -1
  45. package/dist/assets/{Verified-DjfvSM3n.js → Verified-Cr6wy4Uq.js} +1 -1
  46. package/dist/assets/{VerifiedUser-CGB9pAg5.js → VerifiedUser-DQ1XdtS0.js} +1 -1
  47. package/dist/assets/{ViewColumn-CcQluqhl.js → ViewColumn-BncCRTIT.js} +1 -1
  48. package/dist/assets/{ViewList-CPkfx4gI.js → ViewList-Co_V4mfD.js} +1 -1
  49. package/dist/assets/{WorkingRemotely-BMx519Rn.js → WorkingRemotely-B4kcvx6l.js} +1 -1
  50. package/dist/assets/{_createAggregator-Dp2y-Mf_.js → _createAggregator-zWIYJPBX.js} +1 -1
  51. package/dist/assets/{actions-CvZtuIOm.js → actions-Cq51qPdo.js} +1 -1
  52. package/dist/assets/{actions-C8ldDfDc.js → actions-DAVGXMmF.js} +1 -1
  53. package/dist/assets/{agreement-4TUvZhY3.js → agreement-CfNMWvuB.js} +1 -1
  54. package/dist/assets/api-C6KC1P_U.js +1 -0
  55. package/dist/assets/{appearance-CztLZ35g.js → appearance-DJMviNOj.js} +1 -1
  56. package/dist/assets/ar-D9QEDjY-.js +7 -0
  57. package/dist/assets/{audit-logs-vnwtSLPp.js → audit-logs-aDT3tL_y.js} +1 -1
  58. package/dist/assets/{base-chart-tXWghrta.js → base-chart-DFps1bMz.js} +1 -1
  59. package/dist/assets/{blocklet-SKmr21o8.js → blocklet-C3B7_czn.js} +1 -1
  60. package/dist/assets/{brace-fold.es-C8hYDu8C.js → brace-fold.es-DdrA8572.js} +1 -1
  61. package/dist/assets/{chain-Cw3CxpIJ.js → chain-BgOjv6uW.js} +1 -1
  62. package/dist/assets/{click-to-copy-BBcwV5Sv.js → click-to-copy-CVJCV48Y.js} +1 -1
  63. package/dist/assets/cloneDeep-D8oICiE5.js +1 -0
  64. package/dist/assets/{closebrackets.es-n7j2YaKC.js → closebrackets.es-BAEECG-J.js} +1 -1
  65. package/dist/assets/{codemirror.es-q3z3D3fp.js → codemirror.es-CtyzpQd3.js} +1 -1
  66. package/dist/assets/{collapse-Cy01Qhtt.js → collapse-cvMh281U.js} +1 -1
  67. package/dist/assets/{comment.es-CZaW3Zjc.js → comment.es-CT1dSA50.js} +1 -1
  68. package/dist/assets/{config-navigation-B4iEyuxN.js → config-navigation-CJVBY_1Y.js} +3 -3
  69. package/dist/assets/{connect-to-BbdcjX_x.js → connect-to-B6vJIcaQ.js} +1 -1
  70. package/dist/assets/{de-Dv_ApqsF.js → de-BOa43YBF.js} +2 -2
  71. package/dist/assets/{delete-confirm-qy4uClf5.js → delete-confirm-BSpKG6TK.js} +1 -1
  72. package/dist/assets/{detail-C_SIxTEY.js → detail-BRQO1KYU.js} +3 -3
  73. package/dist/assets/{dialog.es-BEBI39yG.js → dialog.es-DXrJ9E3h.js} +1 -1
  74. package/dist/assets/{domains-Bql4UA4y.js → domains-Cd_E9K6j.js} +2 -2
  75. package/dist/assets/{download-DdDp7qNF.js → download-DD0NX-dO.js} +1 -1
  76. package/dist/assets/emotion-react.browser.esm-CZUhgARx.js +1 -0
  77. package/dist/assets/es-A3ma-OJp.js +9 -0
  78. package/dist/assets/{foldgutter.es-XJVlfA9j.js → foldgutter.es-CS9dkaWG.js} +1 -1
  79. package/dist/assets/fr-I3xKp6I5.js +7 -0
  80. package/dist/assets/{get-safe-url-BHhOK-87.js → get-safe-url-DFKtG9HX.js} +1 -1
  81. package/dist/assets/{get-safe-url-ZQAisLez.js → get-safe-url-rD4VAeiO.js} +1 -1
  82. package/dist/assets/getValidReactChildren-DXpwHayT.js +1 -0
  83. package/dist/assets/{hi-Dqbq8i5Y.js → hi-DacRhM8A.js} +1 -1
  84. package/dist/assets/{hint.es-BXYnqh_9.js → hint.es-C7s_Cw87.js} +1 -1
  85. package/dist/assets/{hint.es2-mCmWTcSI.js → hint.es2-BG7IPyzR.js} +1 -1
  86. package/dist/assets/{id-Bxr8o3Uo.js → id-B7LQAHL7.js} +3 -3
  87. package/dist/assets/{iframe-CVde2I2R.js → iframe-DlTBif6K.js} +1 -1
  88. package/dist/assets/{index-BublfAf3.js → index--pEcZ_jy.js} +1 -1
  89. package/dist/assets/{index-DzK6OW-H.js → index-0tIu-1zK.js} +1 -1
  90. package/dist/assets/{index-B6gCUDLy.js → index-27HrDkC8.js} +1 -1
  91. package/dist/assets/{index-BDHvuJA-.js → index-B-pqbvXR.js} +5 -5
  92. package/dist/assets/{index-ooFvSbXR.js → index-B45EgQpP.js} +1 -1
  93. package/dist/assets/{index-ChSMfUDl.js → index-BDad1uXv.js} +10 -10
  94. package/dist/assets/{index-CFc2cpAq.js → index-BH6N9kiW.js} +1 -1
  95. package/dist/assets/{index-BUWOtFDP.js → index-BIheNxxs.js} +1 -1
  96. package/dist/assets/index-BK4_GEzF.js +41 -0
  97. package/dist/assets/{index-C562LNdR.js → index-BMRaOW3i.js} +9 -9
  98. package/dist/assets/{index-Dg-nEXIR.js → index-BTMNPpbj.js} +1 -1
  99. package/dist/assets/{index-DNFAdenj.js → index-Baygm6LA.js} +1 -1
  100. package/dist/assets/{index-CIeEDIRZ.js → index-Bde_-0lD.js} +1 -1
  101. package/dist/assets/{index-CCGiAGPb.js → index-BgzweKIj.js} +1 -1
  102. package/dist/assets/{index-DRvnuna9.js → index-Bi-MJ5VJ.js} +1 -1
  103. package/dist/assets/{index-DnLtwT4P.js → index-BjBCo6La.js} +1 -1
  104. package/dist/assets/{index-C_5on_zt.js → index-BjO4wh2H.js} +1 -1
  105. package/dist/assets/{index-CEr4LN-P.js → index-BpB-1Bg8.js} +1 -1
  106. package/dist/assets/{index-BkStkax6.js → index-BtMd2e0b.js} +2 -2
  107. package/dist/assets/{index-B37Lr7Hg.js → index-BzjQHdRE.js} +1 -1
  108. package/dist/assets/{index-wKRUqEyT.js → index-C9lGpvq5.js} +2 -2
  109. package/dist/assets/{index-DzcmC4If.js → index-CDuhEPSB.js} +3 -3
  110. package/dist/assets/{index-CZplOWEN.js → index-CEGwKYvA.js} +1 -1
  111. package/dist/assets/{index-DdAt9jDT.js → index-CRtRN11t.js} +1 -1
  112. package/dist/assets/{index-Ds-ruyy-.js → index-CUN_nqtm.js} +1 -1
  113. package/dist/assets/{index-DTnnZgV3.js → index-CeegzfSw.js} +1 -1
  114. package/dist/assets/{index-CViyZjZs.js → index-CqW8J3Hz.js} +1 -1
  115. package/dist/assets/{index-CPBAco4X.js → index-CvUqaFUa.js} +1 -1
  116. package/dist/assets/{index-DzWDWvao.js → index-D1JYJWP1.js} +1 -1
  117. package/dist/assets/{index-uw3m84Z2.js → index-D2RfS7-O.js} +1 -1
  118. package/dist/assets/{index-DTb1YjkO.js → index-D6xNQO9D.js} +186 -186
  119. package/dist/assets/{index-DM5TK3mI.js → index-DApYzB3T.js} +1 -1
  120. package/dist/assets/index-DH6yhpyX.js +1 -0
  121. package/dist/assets/{index-CyCivdc5.js → index-DKh1PYSe.js} +1 -1
  122. package/dist/assets/{index-DVT--CtL.js → index-D_h7IVNI.js} +3 -3
  123. package/dist/assets/{index-DsdaIM1E.js → index-DbByIiV7.js} +4 -4
  124. package/dist/assets/{index-B6YLm2gY.js → index-DdEhGphv.js} +1 -1
  125. package/dist/assets/{index-BKpBz5IS.js → index-DeXCywmG.js} +1 -1
  126. package/dist/assets/{index-BWpZKV7G.js → index-DlxuFr_2.js} +3 -3
  127. package/dist/assets/{index-BLrsx8oH.js → index-FAOrsHzs.js} +1 -1
  128. package/dist/assets/{index-BILcrV-b.js → index-a2DZ9msz.js} +1 -1
  129. package/dist/assets/{index-Cm6VrPFr.js → index-aJFga9DB.js} +1 -1
  130. package/dist/assets/{index-omP-_XYV.js → index-gWj5DPOC.js} +1 -1
  131. package/dist/assets/index-k2TA2gFi.js +236 -0
  132. package/dist/assets/{index-C-QDjEC-.js → index-oGDBSDmQ.js} +1 -1
  133. package/dist/assets/{index-BQOOINkR.js → index-qzXhzN00.js} +1 -1
  134. package/dist/assets/{index-D3OlVE0m.js → index-vg5CgSEg.js} +1 -1
  135. package/dist/assets/{index.esm-CB-7UGfI.js → index.esm-UxoaB6Mu.js} +1 -1
  136. package/dist/assets/{info-addon.es-DKtNhOCh.js → info-addon.es-CZJHTLgg.js} +1 -1
  137. package/dist/assets/{info.es-B7YFO8O9.js → info.es-D24qyler.js} +1 -1
  138. package/dist/assets/{install-from-url-B9F0r0Uk.js → install-from-url-74slzMXU.js} +1 -1
  139. package/dist/assets/{invitation-BAovnHWT.js → invitation-B-BBdPct.js} +1 -1
  140. package/dist/assets/is-path-prefix-equal-1KjO4UlG.js +1 -0
  141. package/dist/assets/item-CX8J2MJp.js +277 -0
  142. package/dist/assets/{ja-CJfcqkdo.js → ja-DRQ4Eecl.js} +3 -1
  143. package/dist/assets/{javascript.es-e4wfmIpw.js → javascript.es-B3XIQ5bF.js} +1 -1
  144. package/dist/assets/{jump-to-line.es-D1zAOCng.js → jump-to-line.es-BPFdS4sP.js} +1 -1
  145. package/dist/assets/{jump.es-CR1apnMt.js → jump.es-DgTQZ6E0.js} +1 -1
  146. package/dist/assets/{ko-BxAazRix.js → ko-CzL3UzwL.js} +3 -1
  147. package/dist/assets/{lint.es-po0cvpDF.js → lint.es-CwL2rPB4.js} +1 -1
  148. package/dist/assets/{lint.es2-CIRlGKEU.js → lint.es2-K3G7qF5X.js} +1 -1
  149. package/dist/assets/{lint.es3-CC5QXby4.js → lint.es3-CDpRIgr_.js} +1 -1
  150. package/dist/assets/{list-header-D5Klosqn.js → list-header-CXofX5mW.js} +1 -1
  151. package/dist/assets/{log-DvWjHRjx.js → log-Dq3hLTsh.js} +1 -1
  152. package/dist/assets/{lottie-react.esm-CzS4D97g.js → lottie-react.esm-BpS8UEol.js} +1 -1
  153. package/dist/assets/{matchbrackets.es-Bh__cUPA.js → matchbrackets.es-BPk0GVm3.js} +1 -1
  154. package/dist/assets/{memory-VuyFpRX6.js → memory-CkILGNBa.js} +1 -1
  155. package/dist/assets/{metric-sJIuzFdD.js → metric--mq9dzfr.js} +1 -1
  156. package/dist/assets/{mode.es-b4PvmWPj.js → mode.es-B948py4j.js} +1 -1
  157. package/dist/assets/{mode.es2-B8UlLCtX.js → mode.es2-DLBpn1Xq.js} +1 -1
  158. package/dist/assets/{mode.es3-CQ9X5NiW.js → mode.es3-R3sBu0Hd.js} +1 -1
  159. package/dist/assets/omit-Bvtj3rp4.js +1 -0
  160. package/dist/assets/{onlineParser.es-mNPHWPcl.js → onlineParser.es-BYKS9Ohl.js} +1 -1
  161. package/dist/assets/{overview-DptGQrLC.js → overview-BhyffKqV.js} +1 -1
  162. package/dist/assets/{permission-DtbkcHFU.js → permission-fFO3ZJsb.js} +1 -1
  163. package/dist/assets/{preference-BIxg48qT.js → preference-D_V_1qTZ.js} +3 -3
  164. package/dist/assets/{pt-FpFCyI6v.js → pt-CHKumXYv.js} +3 -3
  165. package/dist/assets/{raf-schd.esm-CyR0PsG3.js → raf-schd.esm-BoCSLgIS.js} +1 -1
  166. package/dist/assets/refType-DjUDB_a_.js +1 -0
  167. package/dist/assets/{resource-dialog-DSlsEDCi.js → resource-dialog-1Tb87EP-.js} +4 -4
  168. package/dist/assets/{ru-BuGIFp9h.js → ru-CvkEKhgU.js} +1 -1
  169. package/dist/assets/{runtime-BqyrQzUD.js → runtime-BYAbYCDO.js} +1 -1
  170. package/dist/assets/{schema-BD6PrmCO.js → schema-Vu9BjGDN.js} +1 -1
  171. package/dist/assets/sdk-Dt3mm4lK.js +1 -0
  172. package/dist/assets/{search.es-BjwGHA7G.js → search.es-ywYl9dIw.js} +1 -1
  173. package/dist/assets/{searchcursor.es-CbJCToER.js → searchcursor.es-D3BwbrKk.js} +1 -1
  174. package/dist/assets/{service-BV2uNns2.js → service-BdSy4Eq2.js} +1 -1
  175. package/dist/assets/{shorten-label-BOckTQ1X.js → shorten-label-CAYARumO.js} +1 -1
  176. package/dist/assets/{show-hint.es-q9IMwctI.js → show-hint.es-CGSGzLNs.js} +1 -1
  177. package/dist/assets/{simple-select-Dtd0a5G_.js → simple-select-C2mBEc0U.js} +1 -1
  178. package/dist/assets/{spaces-Bqb0c1IC.js → spaces-DeV_YpyK.js} +1 -1
  179. package/dist/assets/{status-CoaEXqC8.js → status-AY9VNZQw.js} +1 -1
  180. package/dist/assets/{status-DAsfcIss.js → status-CuBjattD.js} +1 -1
  181. package/dist/assets/{sublime.es-Di_Rzzft.js → sublime.es-DqRI1gij.js} +1 -1
  182. package/dist/assets/{switch-control-uwHD90eP.js → switch-control-D_7zaAA3.js} +1 -1
  183. package/dist/assets/{table-icons-CMF2B4vQ.js → table-icons-DAVi_zrs.js} +1 -1
  184. package/dist/assets/{team-DbBAK1Lw.js → team-BVeJhT_q.js} +1 -1
  185. package/dist/assets/{th-BafLD2wR.js → th-B2BUfjNJ.js} +1 -1
  186. package/dist/assets/{toLower-Bk4Y66nU.js → toLower-Ddm9p1Fv.js} +1 -1
  187. package/dist/assets/toUpper-Dd2NWyrY.js +1 -0
  188. package/dist/assets/{traffic-C8Jrp6CL.js → traffic-Bvn15N7O.js} +1 -1
  189. package/dist/assets/{url-evaluation-DQ262LSg.js → url-evaluation-D2mP9Xpx.js} +1 -1
  190. package/dist/assets/{url-join-IGglLOtK.js → url-join-DNscpbOT.js} +1 -1
  191. package/dist/assets/{use-mobile-BoYyduuc.js → use-mobile-BCP-_fa6.js} +1 -1
  192. package/dist/assets/{use-mobile-YvhVWxe8.js → use-mobile-DVHkFhK8.js} +1 -1
  193. package/dist/assets/{useAsync-DbB0tJq1.js → useAsync-DKByAgoA.js} +1 -1
  194. package/dist/assets/{useAsyncRetry-BLg3v7lI.js → useAsyncRetry-CXNieOXD.js} +1 -1
  195. package/dist/assets/{useLocalStorage-DQZ59j66.js → useLocalStorage-BvE_hswD.js} +1 -1
  196. package/dist/assets/{useThemeProps-CtXzBlYo.js → useThemeProps-Daih-0Xh.js} +1 -1
  197. package/dist/assets/{util-CUC0Xf5B.js → util-CCEJlwCp.js} +1 -1
  198. package/dist/assets/{vi-BMZxxaJ2.js → vi-BykmwIAT.js} +3 -3
  199. package/dist/assets/{wait-container-GoGxY2Kf.js → wait-container-DHAK3hjx.js} +1 -1
  200. package/dist/assets/{withStyles-_FcG1bkA.js → withStyles-Cj7JqeJd.js} +1 -1
  201. package/dist/assets/wrap-locale-DGIIYNPn.js +1 -0
  202. package/dist/assets/{zh-DusA4qAT.js → zh-CbCaOuAd.js} +3 -1
  203. package/dist/assets/{zh-tw-BO-QhSNP.js → zh-tw-C9JfiCVV.js} +3 -1
  204. package/dist/index.html +1 -1
  205. package/dist/service-worker.js +1 -1
  206. package/package.json +1 -1
  207. package/dist/assets/api-gAVz4YtD.js +0 -1
  208. package/dist/assets/ar-0ZkmCCuq.js +0 -7
  209. package/dist/assets/cloneDeep-CP0xacDT.js +0 -1
  210. package/dist/assets/emotion-react.browser.esm--gIypTeg.js +0 -1
  211. package/dist/assets/es-D_uF0siv.js +0 -7
  212. package/dist/assets/fr-DVFSQfDp.js +0 -7
  213. package/dist/assets/getValidReactChildren-B-b9MOMT.js +0 -1
  214. package/dist/assets/index-Boprg64p.js +0 -236
  215. package/dist/assets/index-DrBxStif.js +0 -41
  216. package/dist/assets/index-s1CQJTjJ.js +0 -1
  217. package/dist/assets/is-path-prefix-equal-C80Jhu_q.js +0 -1
  218. package/dist/assets/item-CrnjScjy.js +0 -277
  219. package/dist/assets/omit-BEDWXxvr.js +0 -1
  220. package/dist/assets/refType-J5vgZzDX.js +0 -1
  221. package/dist/assets/sdk-gxKU3x6m.js +0 -1
  222. package/dist/assets/toUpper-FI4Si1KF.js +0 -1
  223. package/dist/assets/wrap-locale-B35eVgy7.js +0 -1
@@ -1 +1 @@
1
- import{x as g,bp as v,u as y,j as r,N as f,S as x,Q as h}from"./index-DTb1YjkO.js";import{L as j,D as S}from"./download-DdDp7qNF.js";import{_ as b}from"./useLocalStorage-DQZ59j66.js";import"./ButtonGroup-ClVwTb7r.js";import"./getValidReactChildren-B-b9MOMT.js";function F(){const c=g(),[s,i]=b("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(j,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(S,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{F as default};
1
+ import{x as g,bp as v,u as y,j as r,N as f,S as x,Q as h}from"./index-D6xNQO9D.js";import{L as j,D as S}from"./download-DD0NX-dO.js";import{_ as b}from"./useLocalStorage-BvE_hswD.js";import"./ButtonGroup-8JIPxBFt.js";import"./getValidReactChildren-DXpwHayT.js";function F(){const c=g(),[s,i]=b("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(j,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(S,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{F as default};
@@ -0,0 +1 @@
1
+ import{c5 as c,r as _,cu as f,i9 as S,cU as r}from"./index-D6xNQO9D.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],i=a[1],o=f(function(t){i(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,o]};export{d as u};
@@ -1,4 +1,4 @@
1
- import{cF as qm,bl as s2,i6 as tT,be as Km,cU as jm,bh as l2,r as u2,bf as Jm}from"./index-DTb1YjkO.js";/*! *****************************************************************************
1
+ import{cF as qm,bl as s2,i7 as tT,be as Km,cU as jm,bh as l2,r as u2,bf as Jm}from"./index-D6xNQO9D.js";/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B37Lr7Hg.js","./index-DTb1YjkO.js","./index-Cp6LwWOU.css"])))=>i.map(i=>d[i]);
2
- import{r as p,cv as F,c5 as X,cw as H,cx as q,aP as G,aQ as O,j as s,n as E,P as j,E as Q,aT as V,e as J,cy as K,v as _,K as x,cz as Y,W as Z,B as I,bc as ee,k as M,cA as $,g as te,cB as se,bB as ae,cC as oe,cD as ne,u as re,w as ie,ap as ce,bz as le,af as pe}from"./index-DTb1YjkO.js";import{d as de}from"./ViewList-CPkfx4gI.js";import{d as ue}from"./Done-2EsU1aO2.js";import{N as me}from"./index-uw3m84Z2.js";import{w as fe}from"./wrap-locale-B35eVgy7.js";import{g as he}from"./get-safe-url-BHhOK-87.js";import{S as xe,a as ge,b as ve}from"./Stepper-CEe-v4P_.js";import"./emotion-react.browser.esm--gIypTeg.js";var P=function(t){if(!t)return 0;var r=q(t).valueOf()-Date.now();return r<0?0:r},be=function(t){return{days:Math.floor(t/864e5),hours:Math.floor(t/36e5)%24,minutes:Math.floor(t/6e4)%60,seconds:Math.floor(t/1e3)%60,milliseconds:Math.floor(t)%1e3}},we=function(t){t===void 0&&(t={});var r=t||{},l=r.leftTime,i=r.targetDate,d=r.interval,v=d===void 0?1e3:d,b=r.onEnd,g=p.useMemo(function(){return F(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in t?g:i,m=X(p.useState(function(){return P(a)}),2),f=m[0],u=m[1],o=H(b);p.useEffect(function(){if(!a){u(0);return}u(P(a));var w=setInterval(function(){var n,c=P(a);u(c),c===0&&(clearInterval(w),(n=o.current)===null||n===void 0||n.call(o))},v);return function(){return clearInterval(w)}},[a,v]);var y=p.useMemo(function(){return be(f)},[f]);return[f,y]},k={},ye=O;Object.defineProperty(k,"__esModule",{value:!0});var R=k.default=void 0,je=ye(G()),Se=s;R=k.default=(0,je.default)((0,Se.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:t,width:r,height:l,cardSpace:i,onSelect:d,defaultIndex:v}){const[b,g]=p.useState(0),[a,m]=p.useState(0),f=p.useRef(null),u=n=>{if(n<0||n>t.length-1)return;g(n);const c=f.current.clientWidth;m(n*(r+i)-(c-r)/2+i*.5),d(n)};p.useEffect(()=>{u(v);const n=c=>c.preventDefault();f.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const y=n=>{o=n.touches[0].clientX},w=n=>{const c=n.changedTouches[0],S=o-c.clientX;Math.abs(S)>60&&(S>0?u(b+1):u(b-1))};return s.jsx(Pe,{ref:f,onTouchStart:y,onTouchEnd:w,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:t.map((n,c)=>s.jsx("div",{className:`card-item ${c===b?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>u(c),children:n.display?s.jsx("div",{className:"card-content",children:s.jsx(me,{data:n.display,style:{width:"100%",height:"100%"}})}):s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const Pe=E.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BzjQHdRE.js","./index-D6xNQO9D.js","./index-Cp6LwWOU.css"])))=>i.map(i=>d[i]);
2
+ import{r as p,cv as F,c5 as X,cw as H,cx as q,aP as G,aQ as O,j as s,n as E,P as j,E as Q,aT as V,e as J,cy as K,v as _,K as x,cz as Y,W as Z,B as I,bc as ee,k as M,cA as $,g as te,cB as se,bB as ae,cC as oe,cD as ne,u as re,w as ie,ap as ce,bz as le,af as pe}from"./index-D6xNQO9D.js";import{d as de}from"./ViewList-Co_V4mfD.js";import{d as ue}from"./Done-yL7tHkLt.js";import{N as me}from"./index-D2RfS7-O.js";import{w as fe}from"./wrap-locale-DGIIYNPn.js";import{g as he}from"./get-safe-url-rD4VAeiO.js";import{S as xe,a as ge,b as ve}from"./Stepper-Cz4oLc0v.js";import"./emotion-react.browser.esm-CZUhgARx.js";var P=function(t){if(!t)return 0;var r=q(t).valueOf()-Date.now();return r<0?0:r},be=function(t){return{days:Math.floor(t/864e5),hours:Math.floor(t/36e5)%24,minutes:Math.floor(t/6e4)%60,seconds:Math.floor(t/1e3)%60,milliseconds:Math.floor(t)%1e3}},we=function(t){t===void 0&&(t={});var r=t||{},l=r.leftTime,i=r.targetDate,d=r.interval,v=d===void 0?1e3:d,b=r.onEnd,g=p.useMemo(function(){return F(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in t?g:i,m=X(p.useState(function(){return P(a)}),2),f=m[0],u=m[1],o=H(b);p.useEffect(function(){if(!a){u(0);return}u(P(a));var w=setInterval(function(){var n,c=P(a);u(c),c===0&&(clearInterval(w),(n=o.current)===null||n===void 0||n.call(o))},v);return function(){return clearInterval(w)}},[a,v]);var y=p.useMemo(function(){return be(f)},[f]);return[f,y]},k={},ye=O;Object.defineProperty(k,"__esModule",{value:!0});var R=k.default=void 0,je=ye(G()),Se=s;R=k.default=(0,je.default)((0,Se.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:t,width:r,height:l,cardSpace:i,onSelect:d,defaultIndex:v}){const[b,g]=p.useState(0),[a,m]=p.useState(0),f=p.useRef(null),u=n=>{if(n<0||n>t.length-1)return;g(n);const c=f.current.clientWidth;m(n*(r+i)-(c-r)/2+i*.5),d(n)};p.useEffect(()=>{u(v);const n=c=>c.preventDefault();f.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const y=n=>{o=n.touches[0].clientX},w=n=>{const c=n.changedTouches[0],S=o-c.clientX;Math.abs(S)>60&&(S>0?u(b+1):u(b-1))};return s.jsx(Pe,{ref:f,onTouchStart:y,onTouchEnd:w,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:t.map((n,c)=>s.jsx("div",{className:`card-item ${c===b?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>u(c),children:n.display?s.jsx("div",{className:"card-content",children:s.jsx(me,{data:n.display,style:{width:"100%",height:"100%"}})}):s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const Pe=E.div`
3
3
  overflow: hidden;
4
4
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
5
5
  overflow: hidden;
@@ -33,7 +33,7 @@ import{r as p,cv as F,c5 as X,cw as H,cx as q,aP as G,aQ as O,j as s,n as E,P as
33
33
  }
34
34
  }
35
35
  }
36
- `;T.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function ke({icon:t,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(R,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(t)]})}function Te({SessionContext:t,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(t),g=Q(e=>e.breakpoints.down("sm")),a=V({user:null,passport:null,success:!1,activeStep:0}),m=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:u}=ne(),{t:o,locale:y}=p.useContext(J),{wallet:w}=K(),[n,c]=p.useState(0),{searchParams:S}=new URL(window.location.href),C=()=>{a.activeStep++},W=e=>{a.user=e.user},A=()=>{C()},z=(e,h)=>{e!=null&&e.passportId&&f(e.passportId),e!=null&&e.sessionToken&&(m.current.sessionToken=h(e.sessionToken)),e!=null&&e.refreshToken&&(m.current.refreshToken=h(e.refreshToken)),a.success=!0,C()},B=async()=>{try{await b.logout()}catch(e){console.warn(e)}},D=async()=>{if(w&&$()){ae(()=>import("./index-B37Lr7Hg.js").then(h=>h.i),__vite__mapDeps([0,1,2]),import.meta.url).then(h=>{h.call("arcClosePage")});return}await B(),oe(d)&&d({sessionToken:m.current.sessionToken,refreshToken:m.current.refreshToken});const e=S.get("redirect");if(e){window.location.replace(he(e));return}u(),window.location.replace("/")},U=e=>{a.passport=e.target.value},[N]=we({leftTime:n,onEnd:()=>{D()}}),L=[{label:o("lostPassport.recoverPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Y,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(Z,{responsive:!g,compact:g,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(e=>({src:l({scope:e.scope,role:e.role,title:e.scope==="kyc"?e.name:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto",extra:e.scope==="kyc"?{key:"Email",value:e.name}:void 0}),name:e.title,id:e.id,display:e.display})),onSelect:e=>U({target:{value:a.user.passportTypes[e].id}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(I,{variant:"contained",color:"primary",onClick:()=>A(),disabled:!a.passport,children:o("common.next")})})]}):s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:W,locale:y,messages:{title:o("lostPassport.recoverDialog.title"),scan:o("lostPassport.recoverDialog.scan"),confirm:o("lostPassport.recoverDialog.confirm"),success:o("lostPassport.recoverDialog.success")}})},{label:o("lostPassport.receivePassport"),content:()=>{var h;const e={receiverDid:a.user.did,passportId:a.passport,teamDid:((h=window==null?void 0:window.blocklet)==null?void 0:h.did)||""};return s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:z,locale:y,messages:{title:`${o("lostPassport.receiveDialog.title")}`,scan:o("lostPassport.receiveDialog.scan"),confirm:o("lostPassport.receiveDialog.confirm"),success:o("lostPassport.receiveDialog.success")},extraParams:e})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(ee,{style:{fontSize:60}})}),s.jsx(M,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),s.jsx(M,{component:"p",variant:"body2",color:"gray",children:w&&$()?o("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(I,{style:{marginTop:40},variant:"contained",color:"primary",onClick:D,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(Ce,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(xe,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:L.map(({label:e})=>s.jsx(ge,{children:s.jsx(ve,{StepIconComponent:ke,children:e})},e))}),s.jsx("div",{className:"stepper-content",children:L[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(te,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:o("lostPassport.return")})})]})})}const Ce=E(se)`
36
+ `;T.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function ke({icon:t,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(R,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(t)]})}function Te({SessionContext:t,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(t),g=Q(e=>e.breakpoints.down("sm")),a=V({user:null,passport:null,success:!1,activeStep:0}),m=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:u}=ne(),{t:o,locale:y}=p.useContext(J),{wallet:w}=K(),[n,c]=p.useState(0),{searchParams:S}=new URL(window.location.href),C=()=>{a.activeStep++},W=e=>{a.user=e.user},A=()=>{C()},z=(e,h)=>{e!=null&&e.passportId&&f(e.passportId),e!=null&&e.sessionToken&&(m.current.sessionToken=h(e.sessionToken)),e!=null&&e.refreshToken&&(m.current.refreshToken=h(e.refreshToken)),a.success=!0,C()},B=async()=>{try{await b.logout()}catch(e){console.warn(e)}},D=async()=>{if(w&&$()){ae(()=>import("./index-BzjQHdRE.js").then(h=>h.i),__vite__mapDeps([0,1,2]),import.meta.url).then(h=>{h.call("arcClosePage")});return}await B(),oe(d)&&d({sessionToken:m.current.sessionToken,refreshToken:m.current.refreshToken});const e=S.get("redirect");if(e){window.location.replace(he(e));return}u(),window.location.replace("/")},U=e=>{a.passport=e.target.value},[N]=we({leftTime:n,onEnd:()=>{D()}}),L=[{label:o("lostPassport.recoverPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Y,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(Z,{responsive:!g,compact:g,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(e=>({src:l({scope:e.scope,role:e.role,title:e.scope==="kyc"?e.name:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto",extra:e.scope==="kyc"?{key:"Email",value:e.name}:void 0}),name:e.title,id:e.id,display:e.display})),onSelect:e=>U({target:{value:a.user.passportTypes[e].id}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(I,{variant:"contained",color:"primary",onClick:()=>A(),disabled:!a.passport,children:o("common.next")})})]}):s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:W,locale:y,messages:{title:o("lostPassport.recoverDialog.title"),scan:o("lostPassport.recoverDialog.scan"),confirm:o("lostPassport.recoverDialog.confirm"),success:o("lostPassport.recoverDialog.success")}})},{label:o("lostPassport.receivePassport"),content:()=>{var h;const e={receiverDid:a.user.did,passportId:a.passport,teamDid:((h=window==null?void 0:window.blocklet)==null?void 0:h.did)||""};return s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:z,locale:y,messages:{title:`${o("lostPassport.receiveDialog.title")}`,scan:o("lostPassport.receiveDialog.scan"),confirm:o("lostPassport.receiveDialog.confirm"),success:o("lostPassport.receiveDialog.success")},extraParams:e})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(ee,{style:{fontSize:60}})}),s.jsx(M,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),s.jsx(M,{component:"p",variant:"body2",color:"gray",children:w&&$()?o("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(I,{style:{marginTop:40},variant:"contained",color:"primary",onClick:D,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(Ce,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(xe,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:L.map(({label:e})=>s.jsx(ge,{children:s.jsx(ve,{StepIconComponent:ke,children:e})},e))}),s.jsx("div",{className:"stepper-content",children:L[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(te,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:o("lostPassport.return")})})]})})}const Ce=E(se)`
37
37
  padding-top: 46px;
38
38
  padding-bottom: 46px;
39
39
  height: 100%;
@@ -1,4 +1,4 @@
1
- import{bq as St,r as x,bC as Q,bi as $,y as V,A as L,j as e,P as d,T as Ct,aP as Xe,aQ as Ze,aw as Nt,h as ne,aB as wt,k as G,K as v,m as X,ej as _e,N as Be,kF as et,bn as Ee,aY as De,U as Ae,ep as we,b7 as Ge,b5 as Oe,C as tt,n as re,f as st,dB as nt,aT as Le,W as Tt,av as at,kG as it,B as ke,kH as ot,g0 as Se,gh as rt,ai as fe,ff as Rt,ax as It,G as Ye,kI as Et,kJ as Dt,D as lt,kK as At,kL as Ot,kM as Lt,kN as kt,R as Pt,bw as ct,O as Ft,S as _t,Q as Je,J as Bt,kO as zt,a4 as Wt}from"./index-DTb1YjkO.js";import{l as Mt,D as dt,g as qt}from"./index-CFc2cpAq.js";import{a as ze,c as Kt}from"./actions-CvZtuIOm.js";import{B as $t}from"./index-DrBxStif.js";import{S as xe}from"./shorten-label-BOckTQ1X.js";import{I as ut}from"./index-BLrsx8oH.js";import{T as Ht}from"./index-DzK6OW-H.js";import{d as Ut}from"./Refresh-C1kA8imS.js";import{D as Vt,g as Gt}from"./traffic-C8Jrp6CL.js";import{u as Yt}from"./use-mobile-BoYyduuc.js";import"./TableRow-CQ8RBtid.js";import"./useThemeProps-CtXzBlYo.js";import"./emotion-react.browser.esm--gIypTeg.js";import"./ViewColumn-CcQluqhl.js";import"./Search-CUm1f8xo.js";import"./Clear-D0I7uWhD.js";import"./Delete-P4B2dduO.js";import"./index-omP-_XYV.js";import"./MoreVert-C_Ck3fn9.js";import"./TableSearch-Uk9kIt7i.js";import"./useLocalStorage-DQZ59j66.js";import"./get-safe-url-BHhOK-87.js";import"./ButtonGroup-ClVwTb7r.js";import"./getValidReactChildren-B-b9MOMT.js";import"./url-evaluation-DQ262LSg.js";import"./permission-DtbkcHFU.js";import"./index.esm-CB-7UGfI.js";import"./collapse-Cy01Qhtt.js";import"./blocklet-SKmr21o8.js";import"./Switch-D3iZUzda.js";import"./iframe-CVde2I2R.js";import"./ChevronLeft-DQK-aqqz.js";import"./ChevronRight-BtkdX9A9.js";import"./index-DRvnuna9.js";import"./base-chart-tXWghrta.js";import"./index-CyCivdc5.js";import"./AdapterDayjs-BqwbfR-J.js";import"./CSSTransition-DpoNbm4c.js";import"./refType-J5vgZzDX.js";const pt=x.createContext({}),{Provider:Jt,Consumer:pn}=pt;function Qt({children:t,blocklet:s=""}){const{api:n,inService:o,ws:{useSubscription:r}}=St(),[l,b]=x.useState([]),[u,D]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),f=Q(()=>{var p;return(p=s.meta)==null?void 0:p.did},[s]),[C,N]=x.useState([]),[B,z]=x.useState({}),E=Q(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),Y=async({page:p=1,pageSize:S=20,...A}={})=>{if(!f)return[];try{const w={paging:{page:p,pageSize:S},...A,teamDid:f,dateRange:A.dateRange?[$(A.dateRange[0]).toISOString(),$(A.dateRange[1]).toISOString()]:void 0},{dids:O,..._}=w;let Z="";O&&O.includes("system")&&(Z="system");const W=O?O.filter(le=>le!=="system"):[],ae={..._,source:Z,componentDids:W},se=await n.getNotificationSendLog({input:ae});return z(ae),b(se.list),D(se.paging),se.list}catch(w){return V.error(w.message),[]}},P=async()=>{const p=await n.getNotificationComponents({input:{teamDid:f}});N(p.componentDids)},k=x.useCallback(p=>{const S=s.children.find(A=>{var w;return((w=A.meta)==null?void 0:w.did)===p});if(S)return S.ancestors=[s],S},[s]),I=async({notificationId:p,receivers:S,channels:A,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:p,receivers:S,channels:A.map(O=>O==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:O),...w}})},H=x.useCallback(async p=>(await n.getUser({input:{teamDid:f,user:{did:p}}})).user,[n,f]),J=x.useCallback(async({page:p=1,pageSize:S=20,...A}={})=>{try{const w={paging:{page:p,pageSize:S},...A,userName:A.searchText||"",teamDid:f,dateRange:A.dateRange?[$(A.dateRange[0]).toISOString(),$(A.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[n,f]);x.useEffect(()=>{f&&P()},[f]),r(L.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{E.has(p.notificationId)&&Y(B)},[E,B]),r(L.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{E.has(p.id)||Y(B)},[E,B]);const te={fetch:Y,data:l,paging:u,blocklet:s,getComponent:k,resendNotification:I,getUser:H,componentDids:C,getReceivers:J,inService:o,teamDid:f};return e.jsx(Jt,{value:{notificationRecords:te},children:t})}function We(){const{notificationRecords:t}=x.useContext(pt);return t}be.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Xt={info:"primary",success:"success",error:"error",warning:"warning"};function be({severity:t="info"}){return e.jsx(Ct,{type:Xt[t],children:t})}var Me={},Zt=Ze;Object.defineProperty(Me,"__esModule",{value:!0});var ft=Me.default=void 0,es=Zt(Xe()),ts=e;ft=Me.default=(0,es.default)((0,ts.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={},ss=Ze;Object.defineProperty(qe,"__esModule",{value:!0});var mt=qe.default=void 0,ns=ss(Xe()),as=e;mt=qe.default=(0,ns.default)((0,as.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");const is=(t,s,n="")=>{if(!n||!s)return"";switch(n){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function ht(t,s,n={}){const{status:o,updatedAt:r,reason:l="",channel:b="wallet"}=n,u=r?t("notification.sendStatus.sentTime",{date:Nt(r,s)}):"",D=is(t,b,l);return o===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:D}:o===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:D,sentTime:u}}const Pe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Fe=["wallet","pushKit","email"],Qe=["info","success","error","warning"],gt=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},xt=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},os=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:gt(t),enabled:n}},rs=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:xt(t),enabled:n}},ls=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),cs=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),ye=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ds=(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})}]:[],ve=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},us=(t,s="")=>{if(s&&Fe.includes(s)){const l=`${s}SendRecord`,b=ne(t,l,[]);return ve(b)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const l=n[s]??[];return ve(l)}const r={};return Fe.forEach(l=>{const b=`${l}SendRecord`,u=ne(t,b,[]),D=ve(u);r[l]=D}),o.length>0&&o.forEach(l=>{const b=n[l]??[],u=ve(b);r[l]=u}),r},Ce=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Ne=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ps=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""}},bt=()=>({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 ee({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:r,title:l="",sentTime:b="",reason:u=""}=t,D=[l,u].filter(Boolean).join(", ");return e.jsx(wt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:D}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(v,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(v,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(v,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Pe[r],style:{opacity:.15}}),e.jsx(v,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Pe[r]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:n?l:o})]})})}ee.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ee.defaultProps={enableTooltip:!0,showTitle:!1,children:null};me.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};me.defaultProps={onDelete:()=>{}};function me({list:t,label:s,onDelete:n}){const{t:o,locale:r}=X();return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(l=>{const b=ht(o,r,{status:l});return e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ee,{config:b,enableTooltip:!1,children:b.title})}),onDelete:u=>n(u,l)},l)})]})}Ke.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 Ke({filterList:t,onChange:s,index:n,column:o,filterValues:r,label:l,renderLabel:b}){return e.jsxs(Be,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Ee,{row:!0,children:r.map(u=>e.jsx(De,{control:e.jsx(Ae,{checked:t[n].indexOf(u.value??u)>-1,onChange:D=>{const f=[...t];D.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(C=>C!==(u.value??u)),s(f[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(u)})},u.value??u))})]})}function Ie(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(ee,{enableTooltip:!1,config:{status:s.status},children:s.label})})}pe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function pe({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:r}){const{t:l,locale:b}=X(),u=ht(l,b,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ee,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{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:r,children:l("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[r,l]=x.useState(null),b=x.useCallback(f=>{l(r?null:f.currentTarget)},[r]),u=!!r,D=x.useCallback(f=>{if(!f.startDate||!f.endDate){V.error("Please select a date range");return}if($(f.startDate).isAfter(f.endDate)||!$(f.startDate).isValid()||!$(f.endDate).isValid()){V.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(we,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ge(t[0],n)," - ",Ge(t[1],n)]})}),e.jsx(Oe,{open:u,anchorEl:r,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Vt,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Gt(o),onChange:D})})]})}He.propTypes={itemComponent:d.elementType.isRequired};function He({itemComponent:t,...s}){var r;const{t:n}=X();return!((r=s==null?void 0:s.filterList)!=null&&r.filter(l=>l.length).length)?null:e.jsxs(v,{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(Mt.TableFilterList,{...s,ItemComponent:t})})]})}function Te({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const r=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...o})),e.jsx(_e,{label:t,variant:"outlined",...r&&l?{onDelete:r}:{}})}Te.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Te.defaultProps={canDelete:()=>!0};const fs=[{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}];Ue.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ue.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ue({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[r,l]=x.useState(fs),[b,u]=x.useState(!0),D=(C,N)=>{N.checked=C.target.checked;const B=r.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));l(B)},f=C=>{C.stopPropagation(),n({channels:r.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:b})};return e.jsxs(v,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(v,{className:"choose-channel",children:e.jsxs(Be,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:r.map(C=>e.jsx(De,{control:e.jsx(Ae,{checked:C.checked,onChange:N=>D(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(v,{className:"resend-config-footer",children:e.jsx(Ee,{children:e.jsx(De,{control:e.jsx(Ae,{checked:b,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(we,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}jt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function jt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:r}=X(),l=st(),b=x.useMemo(()=>nt(l,bt()),[l]),{getReceivers:u,inService:D,teamDid:f,getUser:C,blocklet:N}=We(),[B,z]=x.useState(!1),[E,Y]=x.useState([]),P=Le({anchorEl:null,position:null}),k=Le({anchorEl:null,position:null}),[I,H]=x.useState(null),[J,te]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,S]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[A,w]=x.useState([]),O=[{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"}],_=async()=>{if(!B&&t)try{z(!0);const a=await u({notificationId:t,...p}),i=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:rt(c.receiverUser.avatar,f,D)}}));Y(i),te(a.paging),z(!1)}catch(a){V.error(a.message),z(!1)}};x.useEffect(()=>{_()},[p]);const Z=a=>{a.stopPropagation();const i=a.currentTarget;k.anchorEl=i;const c=i.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},W=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(ke,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Z,children:o("notification.resend")})}):null,ae={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:J.page-1,rowsPerPage:J.pageSize,count:J.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:A,onRowSelectionChange:(a,i)=>{w(i.map(c=>c.dataIndex))},customToolbarSelect:W},se=({page:a,rowsPerPage:i,searchText:c,filterList:y})=>{const[,F=[],K=[],q=[]]=y;p.pageSize!==i?S(M=>({...M,pageSize:i,page:1})):p.page!==a+1?S(M=>({...M,page:a+1})):p.searchText!==c?S(M=>({...M,searchText:c,page:1})):fe(F,p.walletSendStatus)?fe(K,p.pushKitSendStatus)?fe(q,p.emailSendStatus)||S(M=>({...M,emailSendStatus:q,page:1})):S(M=>({...M,pushKitSendStatus:K,page:1})):S(M=>({...M,walletSendStatus:F,page:1}))},le=x.useCallback(async(a,i)=>{if(!i)return!1;const c=await C(i);return c?a==="wallet"?ls(c):a==="email"?os(N,c):a==="pushKit"?rs(N,c):a==="webhook"?cs(c):!0:!1},[C,N]),je=x.useCallback(a=>ds(o,a),[o]),ce=()=>{P.anchorEl=null,P.position=null,H(null)},de=()=>{k.anchorEl=null,k.position=null},ue=async(a,i,c=!0,y="")=>{if(!(!i.length||!a.length))try{s(a,i,c,y),k.anchorEl||(await ye(.5),ce())}catch(F){console.error("handleResend error",{error:F})}},h=async({channels:a,isResendFailedOnly:i})=>{const c=A.map(y=>E[y].receiver);await ue(a,c,i),await ye(.5),de(),w([])},m=async(a,i=[],c=!0)=>{try{await ue(["webhook"],[a.receiver],c,i)}catch(y){V.error(y.response?y.response.statusText:y.message)}},g=async(a,i,c,y=[],F=!0)=>{if(a.stopPropagation(),us(i,c)>=4){V.warning(o("notification.resendLimit"));return}if(!Fe.includes(c)){await m(i,y,F);return}if(a){const q=a.currentTarget,M=q.getBoundingClientRect();P.anchorEl=q,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}H({channel:c});try{const q=await le(c,i.receiver);await ye(1),H({channel:c,result:q}),(typeof q=="boolean"&&q||Rt(q)&&Object.values(q).every(M=>!!M))&&(await s([c],[i.receiver],F),k.anchorEl||(await ye(.5),ce()))}catch(q){V.error(q.message)}},j=a=>{S(i=>({...i,dateRange:a,page:1}))},T=(a,i,c,y)=>{a.stopPropagation();const F=c.filter(K=>K!==i);S(K=>({...K,[y]:F,page:1}))},R=Q(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:i,receiver:c}=E[a];return i?e.jsxs(v,{"data-cy":`member-name-${i.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(at,{src:`${i.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(xe,{children:i.fullName})]},c):e.jsx(Tt,{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:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Wallet",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[1].options.filterList,"walletSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Wallet",filterList:a,onChange:i,index:c,column:y,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:i,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"wallet",onResend:F=>g(F,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:i,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"pushkit",onResend:F=>g(F,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Push Kit",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[2].options.filterList,"pushKitSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Push Kit",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:i,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"email",onResend:F=>g(F,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Email",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[3].options.filterList,"emailSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Email",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:i}=E[a];if(!i)return null;const c=Object.entries(i)[0];if(!c)return null;const[y,F]=c,K=F[0];return e.jsx(v,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(v,{className:"webhook-item",fontSize:12,children:[e.jsx(xe,{maxLength:30,children:y},y),e.jsx(pe,{status:K.status,updatedAt:K.sendAt,reason:K.failedReason,channel:"webhook",onResend:q=>g(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:i}=E[a];return e.jsx(it,{value:i,locale:r,shouldUpdate:!0})}}}],[E,r,p,o]),U=[e.jsx($e,{value:p.dateRange,onChange:j},"date-picker"),e.jsx(ke,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(v,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(hs,{children:e.jsxs(ot,{theme:b,children:[e.jsx(dt,{className:"receivers-table",locale:r,loading:B,columns:R,data:E,onChange:se,options:ae,customButtons:U,components:{TableFilterList:a=>e.jsx(He,{...a,itemComponent:i=>e.jsx(Te,{...i,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Oe,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:ce,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(gs,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(v,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:je(I==null?void 0:I.channel).map(a=>{var F,K;const{type:i,pass:c,fail:y}=a;return!(I!=null&&I.result)||(F=I==null?void 0:I.result)!=null&&F[i]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(K=I==null?void 0:I.result)!=null&&K[i]?Se.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ft,{}):e.jsx(tt,{size:12,sx:{color:Se.primary.main}}),e.jsx("span",{children:c})]},i):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:Se.error.main},children:[e.jsx(mt,{}),e.jsx("span",{children:y})]},i)})})]})}),k.anchorEl&&e.jsx(Oe,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ue,{loading:n,onCancel:de,onConfirm:h})})]})})})}const ms=x.memo(jt),hs=re.div`
1
+ import{bq as St,r as x,bC as Q,bi as $,y as V,A as L,j as e,P as d,T as Ct,aP as Xe,aQ as Ze,aw as Nt,h as ne,aB as wt,k as G,K as v,m as X,ej as _e,N as Be,kG as et,bn as Ee,aY as De,U as Ae,ep as we,b7 as Ge,b5 as Oe,C as tt,n as re,f as st,dB as nt,aT as Le,W as Tt,av as at,kH as it,B as Pe,kI as ot,g1 as Se,gi as rt,ai as fe,ff as Rt,ax as It,G as Ye,kJ as Et,kK as Dt,D as lt,kL as At,kM as Ot,kN as Lt,kO as Pt,R as kt,bw as ct,O as Ft,S as _t,Q as Je,J as Bt,kP as zt,a4 as Wt}from"./index-D6xNQO9D.js";import{l as Mt,D as dt,g as qt}from"./index-BH6N9kiW.js";import{a as ze,c as Kt}from"./actions-Cq51qPdo.js";import{B as $t}from"./index-BK4_GEzF.js";import{S as xe}from"./shorten-label-CAYARumO.js";import{I as ut}from"./index-FAOrsHzs.js";import{T as Ht}from"./index-0tIu-1zK.js";import{d as Ut}from"./Refresh-By8bfp9S.js";import{D as Vt,g as Gt}from"./traffic-Bvn15N7O.js";import{u as Yt}from"./use-mobile-BCP-_fa6.js";import"./TableRow-uM5dbbKH.js";import"./useThemeProps-Daih-0Xh.js";import"./emotion-react.browser.esm-CZUhgARx.js";import"./ViewColumn-BncCRTIT.js";import"./Search-CjaYHOuY.js";import"./Clear-9k4hE_iq.js";import"./Delete-EgRRDgvd.js";import"./index-gWj5DPOC.js";import"./MoreVert-C7ADSe__.js";import"./TableSearch-CUrFzIWx.js";import"./useLocalStorage-BvE_hswD.js";import"./get-safe-url-rD4VAeiO.js";import"./ButtonGroup-8JIPxBFt.js";import"./getValidReactChildren-DXpwHayT.js";import"./url-evaluation-D2mP9Xpx.js";import"./permission-fFO3ZJsb.js";import"./index.esm-UxoaB6Mu.js";import"./collapse-cvMh281U.js";import"./blocklet-C3B7_czn.js";import"./Switch-lDUha6nF.js";import"./iframe-DlTBif6K.js";import"./ChevronLeft-CQivGJHk.js";import"./ChevronRight-BlhG3yZY.js";import"./index-Bi-MJ5VJ.js";import"./base-chart-DFps1bMz.js";import"./index-DKh1PYSe.js";import"./AdapterDayjs-DAz3KrnL.js";import"./CSSTransition-CrBmaRu0.js";import"./refType-DjUDB_a_.js";const pt=x.createContext({}),{Provider:Jt,Consumer:pn}=pt;function Qt({children:t,blocklet:s=""}){const{api:n,inService:o,ws:{useSubscription:r}}=St(),[l,b]=x.useState([]),[u,D]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),f=Q(()=>{var p;return(p=s.meta)==null?void 0:p.did},[s]),[C,N]=x.useState([]),[B,z]=x.useState({}),E=Q(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),Y=async({page:p=1,pageSize:S=20,...A}={})=>{if(!f)return[];try{const w={paging:{page:p,pageSize:S},...A,teamDid:f,dateRange:A.dateRange?[$(A.dateRange[0]).toISOString(),$(A.dateRange[1]).toISOString()]:void 0},{dids:O,..._}=w;let Z="";O&&O.includes("system")&&(Z="system");const W=O?O.filter(le=>le!=="system"):[],ae={..._,source:Z,componentDids:W},se=await n.getNotificationSendLog({input:ae});return z(ae),b(se.list),D(se.paging),se.list}catch(w){return V.error(w.message),[]}},k=async()=>{const p=await n.getNotificationComponents({input:{teamDid:f}});N(p.componentDids)},P=x.useCallback(p=>{const S=s.children.find(A=>{var w;return((w=A.meta)==null?void 0:w.did)===p});if(S)return S.ancestors=[s],S},[s]),I=async({notificationId:p,receivers:S,channels:A,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:p,receivers:S,channels:A.map(O=>O==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:O),...w}})},H=x.useCallback(async p=>(await n.getUser({input:{teamDid:f,user:{did:p}}})).user,[n,f]),J=x.useCallback(async({page:p=1,pageSize:S=20,...A}={})=>{try{const w={paging:{page:p,pageSize:S},...A,userName:A.searchText||"",teamDid:f,dateRange:A.dateRange?[$(A.dateRange[0]).toISOString(),$(A.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[n,f]);x.useEffect(()=>{f&&k()},[f]),r(L.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{E.has(p.notificationId)&&Y(B)},[E,B]),r(L.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{E.has(p.id)||Y(B)},[E,B]);const te={fetch:Y,data:l,paging:u,blocklet:s,getComponent:P,resendNotification:I,getUser:H,componentDids:C,getReceivers:J,inService:o,teamDid:f};return e.jsx(Jt,{value:{notificationRecords:te},children:t})}function We(){const{notificationRecords:t}=x.useContext(pt);return t}be.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Xt={info:"primary",success:"success",error:"error",warning:"warning"};function be({severity:t="info"}){return e.jsx(Ct,{type:Xt[t],children:t})}var Me={},Zt=Ze;Object.defineProperty(Me,"__esModule",{value:!0});var ft=Me.default=void 0,es=Zt(Xe()),ts=e;ft=Me.default=(0,es.default)((0,ts.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={},ss=Ze;Object.defineProperty(qe,"__esModule",{value:!0});var mt=qe.default=void 0,ns=ss(Xe()),as=e;mt=qe.default=(0,ns.default)((0,as.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");const is=(t,s,n="")=>{if(!n||!s)return"";switch(n){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function ht(t,s,n={}){const{status:o,updatedAt:r,reason:l="",channel:b="wallet"}=n,u=r?t("notification.sendStatus.sentTime",{date:Nt(r,s)}):"",D=is(t,b,l);return o===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:D}:o===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:D,sentTime:u}}const ke={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Fe=["wallet","pushKit","email"],Qe=["info","success","error","warning"],gt=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},xt=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},os=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:gt(t),enabled:n}},rs=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:xt(t),enabled:n}},ls=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),cs=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),ye=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ds=(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})}]:[],ve=(t=[])=>{const s=$().startOf("day");return t.filter(n=>$(n.sendAt).isSame(s,"day")).length},us=(t,s="")=>{if(s&&Fe.includes(s)){const l=`${s}SendRecord`,b=ne(t,l,[]);return ve(b)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const l=n[s]??[];return ve(l)}const r={};return Fe.forEach(l=>{const b=`${l}SendRecord`,u=ne(t,b,[]),D=ve(u);r[l]=D}),o.length>0&&o.forEach(l=>{const b=n[l]??[],u=ve(b);r[l]=u}),r},Ce=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Ne=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ps=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""}},bt=()=>({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 ee({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:r,title:l="",sentTime:b="",reason:u=""}=t,D=[l,u].filter(Boolean).join(", ");return e.jsx(wt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:D}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(v,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(v,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(v,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:ke[r],style:{opacity:.15}}),e.jsx(v,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:ke[r]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:n?l:o})]})})}ee.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ee.defaultProps={enableTooltip:!0,showTitle:!1,children:null};me.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};me.defaultProps={onDelete:()=>{}};function me({list:t,label:s,onDelete:n}){const{t:o,locale:r}=X();return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(l=>{const b=ht(o,r,{status:l});return e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ee,{config:b,enableTooltip:!1,children:b.title})}),onDelete:u=>n(u,l)},l)})]})}Ke.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 Ke({filterList:t,onChange:s,index:n,column:o,filterValues:r,label:l,renderLabel:b}){return e.jsxs(Be,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Ee,{row:!0,children:r.map(u=>e.jsx(De,{control:e.jsx(Ae,{checked:t[n].indexOf(u.value??u)>-1,onChange:D=>{const f=[...t];D.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(C=>C!==(u.value??u)),s(f[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(u)})},u.value??u))})]})}function Ie(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(ee,{enableTooltip:!1,config:{status:s.status},children:s.label})})}pe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function pe({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:r}){const{t:l,locale:b}=X(),u=ht(l,b,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ee,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{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:r,children:l("notification.resend")})]})}$e.propTypes={value:d.array.isRequired,onChange:d.func};function $e({value:t,onChange:s}){const{locale:n}=X(),o=$().toDate(),[r,l]=x.useState(null),b=x.useCallback(f=>{l(r?null:f.currentTarget)},[r]),u=!!r,D=x.useCallback(f=>{if(!f.startDate||!f.endDate){V.error("Please select a date range");return}if($(f.startDate).isAfter(f.endDate)||!$(f.startDate).isValid()||!$(f.endDate).isValid()){V.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(we,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ge(t[0],n)," - ",Ge(t[1],n)]})}),e.jsx(Oe,{open:u,anchorEl:r,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Vt,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Gt(o),onChange:D})})]})}He.propTypes={itemComponent:d.elementType.isRequired};function He({itemComponent:t,...s}){var r;const{t:n}=X();return!((r=s==null?void 0:s.filterList)!=null&&r.filter(l=>l.length).length)?null:e.jsxs(v,{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(Mt.TableFilterList,{...s,ItemComponent:t})})]})}function Te({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const r=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...o})),e.jsx(_e,{label:t,variant:"outlined",...r&&l?{onDelete:r}:{}})}Te.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Te.defaultProps={canDelete:()=>!0};const fs=[{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}];Ue.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ue.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ue({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=X(),[r,l]=x.useState(fs),[b,u]=x.useState(!0),D=(C,N)=>{N.checked=C.target.checked;const B=r.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));l(B)},f=C=>{C.stopPropagation(),n({channels:r.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:b})};return e.jsxs(v,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(v,{className:"choose-channel",children:e.jsxs(Be,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:r.map(C=>e.jsx(De,{control:e.jsx(Ae,{checked:C.checked,onChange:N=>D(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(v,{className:"resend-config-footer",children:e.jsx(Ee,{children:e.jsx(De,{control:e.jsx(Ae,{checked:b,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(we,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}jt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function jt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:r}=X(),l=st(),b=x.useMemo(()=>nt(l,bt()),[l]),{getReceivers:u,inService:D,teamDid:f,getUser:C,blocklet:N}=We(),[B,z]=x.useState(!1),[E,Y]=x.useState([]),k=Le({anchorEl:null,position:null}),P=Le({anchorEl:null,position:null}),[I,H]=x.useState(null),[J,te]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,S]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),[A,w]=x.useState([]),O=[{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"}],_=async()=>{if(!B&&t)try{z(!0);const a=await u({notificationId:t,...p}),i=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:rt(c.receiverUser.avatar,f,D)}}));Y(i),te(a.paging),z(!1)}catch(a){V.error(a.message),z(!1)}};x.useEffect(()=>{_()},[p]);const Z=a=>{a.stopPropagation();const i=a.currentTarget;P.anchorEl=i;const c=i.getBoundingClientRect();P.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},W=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Pe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Z,children:o("notification.resend")})}):null,ae={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:J.page-1,rowsPerPage:J.pageSize,count:J.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:A,onRowSelectionChange:(a,i)=>{w(i.map(c=>c.dataIndex))},customToolbarSelect:W},se=({page:a,rowsPerPage:i,searchText:c,filterList:y})=>{const[,F=[],K=[],q=[]]=y;p.pageSize!==i?S(M=>({...M,pageSize:i,page:1})):p.page!==a+1?S(M=>({...M,page:a+1})):p.searchText!==c?S(M=>({...M,searchText:c,page:1})):fe(F,p.walletSendStatus)?fe(K,p.pushKitSendStatus)?fe(q,p.emailSendStatus)||S(M=>({...M,emailSendStatus:q,page:1})):S(M=>({...M,pushKitSendStatus:K,page:1})):S(M=>({...M,walletSendStatus:F,page:1}))},le=x.useCallback(async(a,i)=>{if(!i)return!1;const c=await C(i);return c?a==="wallet"?ls(c):a==="email"?os(N,c):a==="pushKit"?rs(N,c):a==="webhook"?cs(c):!0:!1},[C,N]),je=x.useCallback(a=>ds(o,a),[o]),ce=()=>{k.anchorEl=null,k.position=null,H(null)},de=()=>{P.anchorEl=null,P.position=null},ue=async(a,i,c=!0,y="")=>{if(!(!i.length||!a.length))try{s(a,i,c,y),P.anchorEl||(await ye(.5),ce())}catch(F){console.error("handleResend error",{error:F})}},h=async({channels:a,isResendFailedOnly:i})=>{const c=A.map(y=>E[y].receiver);await ue(a,c,i),await ye(.5),de(),w([])},m=async(a,i=[],c=!0)=>{try{await ue(["webhook"],[a.receiver],c,i)}catch(y){V.error(y.response?y.response.statusText:y.message)}},g=async(a,i,c,y=[],F=!0)=>{if(a.stopPropagation(),us(i,c)>=4){V.warning(o("notification.resendLimit"));return}if(!Fe.includes(c)){await m(i,y,F);return}if(a){const q=a.currentTarget,M=q.getBoundingClientRect();k.anchorEl=q,k.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}H({channel:c});try{const q=await le(c,i.receiver);await ye(1),H({channel:c,result:q}),(typeof q=="boolean"&&q||Rt(q)&&Object.values(q).every(M=>!!M))&&(await s([c],[i.receiver],F),P.anchorEl||(await ye(.5),ce()))}catch(q){V.error(q.message)}},j=a=>{S(i=>({...i,dateRange:a,page:1}))},T=(a,i,c,y)=>{a.stopPropagation();const F=c.filter(K=>K!==i);S(K=>({...K,[y]:F,page:1}))},R=Q(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:i,receiver:c}=E[a];return i?e.jsxs(v,{"data-cy":`member-name-${i.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(at,{src:`${i.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(xe,{children:i.fullName})]},c):e.jsx(Tt,{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:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Wallet",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[1].options.filterList,"walletSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Wallet",filterList:a,onChange:i,index:c,column:y,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:i,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"wallet",onResend:F=>g(F,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:i,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"pushkit",onResend:F=>g(F,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Push Kit",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[2].options.filterList,"pushKitSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Push Kit",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:i,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"email",onResend:F=>g(F,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Email",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[3].options.filterList,"emailSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Email",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:i}=E[a];if(!i)return null;const c=Object.entries(i)[0];if(!c)return null;const[y,F]=c,K=F[0];return e.jsx(v,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(v,{className:"webhook-item",fontSize:12,children:[e.jsx(xe,{maxLength:30,children:y},y),e.jsx(pe,{status:K.status,updatedAt:K.sendAt,reason:K.failedReason,channel:"webhook",onResend:q=>g(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:i}=E[a];return e.jsx(it,{value:i,locale:r,shouldUpdate:!0})}}}],[E,r,p,o]),U=[e.jsx($e,{value:p.dateRange,onChange:j},"date-picker"),e.jsx(Pe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(v,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(hs,{children:e.jsxs(ot,{theme:b,children:[e.jsx(dt,{className:"receivers-table",locale:r,loading:B,columns:R,data:E,onChange:se,options:ae,customButtons:U,components:{TableFilterList:a=>e.jsx(He,{...a,itemComponent:i=>e.jsx(Te,{...i,canDelete:()=>!1})})}}),k.anchorEl&&e.jsx(Oe,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:ce,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(gs,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(v,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:je(I==null?void 0:I.channel).map(a=>{var F,K;const{type:i,pass:c,fail:y}=a;return!(I!=null&&I.result)||(F=I==null?void 0:I.result)!=null&&F[i]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(K=I==null?void 0:I.result)!=null&&K[i]?Se.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ft,{}):e.jsx(tt,{size:12,sx:{color:Se.primary.main}}),e.jsx("span",{children:c})]},i):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:Se.error.main},children:[e.jsx(mt,{}),e.jsx("span",{children:y})]},i)})})]})}),P.anchorEl&&e.jsx(Oe,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ue,{loading:n,onCancel:de,onConfirm:h})})]})})})}const ms=x.memo(jt),hs=re.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -27,7 +27,7 @@ import{bq as St,r as x,bC as Q,bi as $,y as V,A as L,j as e,P as d,T as Ct,aP as
27
27
  }
28
28
  font-size: 12px;
29
29
  }
30
- `,he=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function xs(t){const{wallet:s,push:n,email:o,webhook:r}=t;return[{name:"Wallet",value:e.jsx(ie,{item:s})},{name:"Push",value:e.jsx(ie,{item:n})},{name:"Email",value:e.jsx(ie,{item:o})},...r.total>0?[{name:"Webhook",value:e.jsx(ie,{item:r,isWebhook:!0})}]:[]]}function bs(t,s,n){const{wallet:o,push:r,email:l,webhook:b}=t;return[{name:"Wallet",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.PUSH,item:r,onResend:s})},{name:"Email",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}Re.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Re.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ie.propTypes={item:d.object.isRequired,isWebhook:d.bool};ie.defaultProps={isWebhook:!1};function ie({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,r=t.total,l=o===r?"success":"failed";return e.jsx(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(v,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(ee,{config:{status:l},enableTooltip:!1,children:[he(o)," / ",he(r)," ",n("notification.sendStatus.success")]})})})}oe.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};oe.defaultProps={isWebhook:!1,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function oe({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:r}){const{t:l}=X(),{success:b,failed:u,pending:D}=s,f=ps(t),C=n?b.length:b,N=n?u.length:u,B=n?D.length:D,z=async k=>{k.stopPropagation();const I=n?[...new Set([...b,...u].map(H=>H))]:[];await o([t],[],!0,I)},E=C+N,Y=E>0?C/E*100:0,P=E>0?N/E*100:0;return e.jsxs(js,{successRatio:Y,failedRatio:P,children:[e.jsxs(G,{variant:"h6",children:[f," (",s.total,")"]}),e.jsxs(G,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Pe.success,fontWeight:600,fontSize:24},children:he(C)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(v,{className:"unsent-area",children:[e.jsxs(v,{children:[e.jsxs(ee,{config:{status:"failed"},enableTooltip:!1,children:[he(N)," ",l("notification.sendStatus.failed")]}),e.jsxs(ee,{config:{status:"pending"},enableTooltip:!1,children:[he(B)," ",l("notification.sendStatus.pending")]})]}),N>0&&e.jsx(v,{className:"resend-btn",children:e.jsx(ke,{size:"small",color:"primary",loading:r,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:l("notification.resend")})})]})]})}function Re({statistics:t,mode:s="simple",onResend:n,resending:o}){const r=Q(()=>s==="simple"?xs(t):bs(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:r.map(l=>e.jsx(ut,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Ye,{container:!0,spacing:2,children:r.map(l=>e.jsx(Ye,{item:!0,md:4,sm:6,xs:12,children:l.value},l.name))})}const js=re(v)`
30
+ `,he=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function xs(t){const{wallet:s,push:n,email:o,webhook:r}=t;return[{name:"Wallet",value:e.jsx(ie,{item:s})},{name:"Push",value:e.jsx(ie,{item:n})},{name:"Email",value:e.jsx(ie,{item:o})},...r.total>0?[{name:"Webhook",value:e.jsx(ie,{item:r,isWebhook:!0})}]:[]]}function bs(t,s,n){const{wallet:o,push:r,email:l,webhook:b}=t;return[{name:"Wallet",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:s})},{name:"Push",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.PUSH,item:r,onResend:s})},{name:"Email",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(oe,{loading:n,channel:L.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}Re.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Re.defaultProps={mode:"simple",onResend:()=>{},resending:!1};ie.propTypes={item:d.object.isRequired,isWebhook:d.bool};ie.defaultProps={isWebhook:!1};function ie({item:t,isWebhook:s=!1}){const{t:n}=X(),o=s?t.success.length:t.success,r=t.total,l=o===r?"success":"failed";return e.jsx(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(v,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(ee,{config:{status:l},enableTooltip:!1,children:[he(o)," / ",he(r)," ",n("notification.sendStatus.success")]})})})}oe.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};oe.defaultProps={isWebhook:!1,channel:L.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function oe({channel:t,item:s,isWebhook:n=!1,onResend:o,loading:r}){const{t:l}=X(),{success:b,failed:u,pending:D}=s,f=ps(t),C=n?b.length:b,N=n?u.length:u,B=n?D.length:D,z=async P=>{P.stopPropagation();const I=n?[...new Set([...b,...u].map(H=>H))]:[];await o([t],[],!0,I)},E=C+N,Y=E>0?C/E*100:0,k=E>0?N/E*100:0;return e.jsxs(js,{successRatio:Y,failedRatio:k,children:[e.jsxs(G,{variant:"h6",children:[f," (",s.total,")"]}),e.jsxs(G,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:ke.success,fontWeight:600,fontSize:24},children:he(C)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(v,{className:"unsent-area",children:[e.jsxs(v,{children:[e.jsxs(ee,{config:{status:"failed"},enableTooltip:!1,children:[he(N)," ",l("notification.sendStatus.failed")]}),e.jsxs(ee,{config:{status:"pending"},enableTooltip:!1,children:[he(B)," ",l("notification.sendStatus.pending")]})]}),N>0&&e.jsx(v,{className:"resend-btn",children:e.jsx(Pe,{size:"small",color:"primary",loading:r,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:z,children:l("notification.resend")})})]})]})}function Re({statistics:t,mode:s="simple",onResend:n,resending:o}){const r=Q(()=>s==="simple"?xs(t):bs(t,n,o),[t,s]);return s==="simple"?e.jsx("div",{children:r.map(l=>e.jsx(ut,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Ye,{container:!0,spacing:2,children:r.map(l=>e.jsx(Ye,{item:!0,md:4,sm:6,xs:12,children:l.value},l.name))})}const js=re(v)`
31
31
  display: flex;
32
32
  flex-direction: column;
33
33
  align-items: flex-start;
@@ -45,7 +45,7 @@ import{bq as St,r as x,bC as Q,bi as $,y as V,A as L,j as e,P as d,T as Ct,aP as
45
45
  bottom: 0;
46
46
  }
47
47
  }
48
- `;yt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function yt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:r,locale:l}=X(),{getComponent:b,resendNotification:u}=We(),[D,f]=x.useState(!1),C=Q(()=>b(t.componentDid)||n,[n,t.componentDid]),N=Le({tab:o||"info"}),B=x.useCallback(async(p,S,A=!0,w=[])=>{var Z;if(!p.length||!t.id)return;const O=S.length>0?S:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(W=>W.receiver);if(!O.length)return;let _=[...p];if(_.includes(L.NOTIFICATION_SEND_CHANNEL.PUSH)&&!xt(n)&&(V.warning(r("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),_=_.filter(W=>W!==L.NOTIFICATION_SEND_CHANNEL.PUSH)),_.includes(L.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!gt(n)&&(V.warning(r("notification.sendStatus.reason.unavailable",{channel:"Email"})),_=_.filter(W=>W!==L.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!_.length)try{f(!0),await u({notificationId:t.id,receivers:O,channels:_,resendFailedOnly:A,..._.includes("webhook")&&w.length?{webhookUrls:w}:{}}),V.success("Message has been sent!")}catch(W){console.error("handleResend error",{error:W}),V.error(W.response?W.response.statusText:W.message)}finally{f(!1)}},[n,t.id,t==null?void 0:t.receivers,u,r]),z=Q(()=>Et(t),[t]),E=Q(()=>Dt(t),[t]),Y=Q(()=>z?t==null?void 0:t.actorInfo:[],[t]),P=Q(()=>{var p;return(n==null?void 0:n.did)||((p=n==null?void 0:n.meta)==null?void 0:p.did)||""},[n]);function k(){return[{name:r("notification.from"),value:z&&E?e.jsx(At,{actors:Y,teamDid:P,size:32,showName:!0}):e.jsx(Ot,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:r("notification.notificationTitle"),value:e.jsx(xe,{maxLength:50,children:t.title})},{name:r("notification.body"),value:z?e.jsx(Lt,{notification:t,blocklet:n}):e.jsx(kt,{notification:t,rows:0})},{name:r("notification.severity"),value:e.jsx(be,{severity:t.severity})},{name:r("notification.createdAt"),value:e.jsx(Pt,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(S=>e.jsx(ut,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:S.name,children:S.value},S.name))}const I={info:{label:r("common.basicInfo"),value:"info",component:k},receivers:{label:r("notification.receiver"),value:"receivers"},statistics:{label:r("notification.statistics"),value:"statistics"}},H=Object.values(I).map(({label:p,value:S})=>({label:p,value:S})),J=I[N.tab]||I.info,te=p=>{N.tab=p};return e.jsx(lt,{title:r("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(vs,{children:[e.jsx(v,{mx:3,className:"tabs",children:e.jsx(Ht,{tabs:H,current:N.tab,onChange:te,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ms,{notificationId:t.id,resending:D,handleResend:B}),N.tab==="statistics"&&e.jsx(Re,{statistics:t.statistics,mode:"detail",resending:D,onResend:B}),N.tab==="info"&&e.jsx(J.component,{})]})]})})}const ys=x.memo(yt),vs=re.div`
48
+ `;yt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function yt({notification:t,onCancel:s=()=>{},blocklet:n,tab:o="info"}){const{t:r,locale:l}=X(),{getComponent:b,resendNotification:u}=We(),[D,f]=x.useState(!1),C=Q(()=>b(t.componentDid)||n,[n,t.componentDid]),N=Le({tab:o||"info"}),B=x.useCallback(async(p,S,A=!0,w=[])=>{var Z;if(!p.length||!t.id)return;const O=S.length>0?S:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(W=>W.receiver);if(!O.length)return;let _=[...p];if(_.includes(L.NOTIFICATION_SEND_CHANNEL.PUSH)&&!xt(n)&&(V.warning(r("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),_=_.filter(W=>W!==L.NOTIFICATION_SEND_CHANNEL.PUSH)),_.includes(L.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!gt(n)&&(V.warning(r("notification.sendStatus.reason.unavailable",{channel:"Email"})),_=_.filter(W=>W!==L.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!_.length)try{f(!0),await u({notificationId:t.id,receivers:O,channels:_,resendFailedOnly:A,..._.includes("webhook")&&w.length?{webhookUrls:w}:{}}),V.success("Message has been sent!")}catch(W){console.error("handleResend error",{error:W}),V.error(W.response?W.response.statusText:W.message)}finally{f(!1)}},[n,t.id,t==null?void 0:t.receivers,u,r]),z=Q(()=>Et(t),[t]),E=Q(()=>Dt(t),[t]),Y=Q(()=>z?t==null?void 0:t.actorInfo:[],[t]),k=Q(()=>{var p;return(n==null?void 0:n.did)||((p=n==null?void 0:n.meta)==null?void 0:p.did)||""},[n]);function P(){return[{name:r("notification.from"),value:z&&E?e.jsx(At,{actors:Y,teamDid:k,size:32,showName:!0}):e.jsx(Ot,{size:32,blocklet:C,showName:!0,hideDot:!0})},{name:r("notification.notificationTitle"),value:e.jsx(xe,{maxLength:50,children:t.title})},{name:r("notification.body"),value:z?e.jsx(Lt,{notification:t,blocklet:n}):e.jsx(Pt,{notification:t,rows:0})},{name:r("notification.severity"),value:e.jsx(be,{severity:t.severity})},{name:r("notification.createdAt"),value:e.jsx(kt,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(S=>e.jsx(ut,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:S.name,children:S.value},S.name))}const I={info:{label:r("common.basicInfo"),value:"info",component:P},receivers:{label:r("notification.receiver"),value:"receivers"},statistics:{label:r("notification.statistics"),value:"statistics"}},H=Object.values(I).map(({label:p,value:S})=>({label:p,value:S})),J=I[N.tab]||I.info,te=p=>{N.tab=p};return e.jsx(lt,{title:r("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(vs,{children:[e.jsx(v,{mx:3,className:"tabs",children:e.jsx(Ht,{tabs:H,current:N.tab,onChange:te,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[N.tab==="receivers"&&e.jsx(ms,{notificationId:t.id,resending:D,handleResend:B}),N.tab==="statistics"&&e.jsx(Re,{statistics:t.statistics,mode:"detail",resending:D,onResend:B}),N.tab==="info"&&e.jsx(J.component,{})]})]})})}const ys=x.memo(yt),vs=re.div`
49
49
  & > .notification-row {
50
50
  padding: 0;
51
51
  }
@@ -92,7 +92,7 @@ import{bq as St,r as x,bC as Q,bi as $,y as V,A as L,j as e,P as d,T as Ct,aP as
92
92
  overflow: hidden;
93
93
  text-overflow: ellipsis;
94
94
  }
95
- `;function ge({blocklet:t,label:s}){var n;return e.jsx(Ss,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(ct,{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})})}Ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ve.defaultProps={onDelete:()=>{}};function Ve({list:t,label:s,onDelete:n}){return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(o=>e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(be,{severity:o})}),onDelete:r=>n(r,o)},o))]})}function Cs(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(be,{severity:s})})}function Ns({customTableButtons:t}){var ue;const{t:s,locale:n}=X(),o=st(),r=x.useMemo(()=>nt(o,bt()),[o]),[l,b]=x.useState(!1),{data:u,paging:D,blocklet:f,fetch:C,getComponent:N,componentDids:B,inService:z,teamDid:E}=We(),Y=x.useRef(null),[P,k]=x.useState(null),[I,H]=x.useState("info"),J=Yt(),[te,p]=x.useState(!1),S=`notification-records-${(ue=f.meta)==null?void 0:ue.did}`,A=qt(S),[w,O]=x.useState({pageSize:A.rowsPerPage||10,page:A.page?A.page+1:1,dids:A.dids||[],dateRange:A.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),_=Q(()=>{if(!f.children||!f.children.length)return[];const h=[];return f.children.forEach(m=>{var j;const g=m.did||((j=m.meta)==null?void 0:j.did);B.includes(g)&&(m.ancestors=[f],h.push(m))}),h},[B,f]),Z=async h=>{try{b(!0),await C(h),b(!1)}finally{b(!1)}};x.useEffect(()=>{Z(w)},[w]),x.useEffect(()=>{const h=u.find(m=>m.id===(P==null?void 0:P.id));P&&h&&k({...h})},[u]);const W=(h,m,g,j)=>{h.stopPropagation();const T=g.filter(R=>R!==m);O(R=>({...R,[j]:T,page:1}))},ae=({page:h,rowsPerPage:m,filterList:g})=>{const[j=[],,,,T=[]]=g;w.pageSize!==m?O(R=>({...R,pageSize:m,page:1})):w.page!==h+1?O(R=>({...R,page:h+1})):fe(w.dids,j)?fe(w.severities,T)||O(R=>({...R,severities:T,page:1})):O(R=>({...R,dids:j,page:1}))},se=x.useCallback(()=>{k(null),H("info")},[]),le=x.useCallback(()=>{C(w)},[C,w]),je=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:h=>h.map((m,g)=>{var T;if(m==="system")return e.jsx("span",{children:s("notification.system")},`system-${g}`);const j=_.find(R=>{var a;return(R.did||((a=R.meta)==null?void 0:a.did))===m});return e.jsx(ge,{blocklet:j,label:(j==null?void 0:j.title)||((T=j==null?void 0:j.meta)==null?void 0:T.title)},m)}),update:(h,m,g)=>(h[g].splice(m,1),h)},filterOptions:{names:_,logic:(h,m)=>m.length?!m.includes(h):!1,display:(h,m,g,j)=>e.jsxs(Be,{style:{width:"380px"},children:[e.jsx(Ft,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(_t,{multiple:!0,value:h[g],renderValue:T=>e.jsx(v,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var a;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=_.find(i=>{var y;return(i.did||((y=i.meta)==null?void 0:y.did))===R});return e.jsx(ge,{blocklet:U,label:(U==null?void 0:U.title)||((a=U==null?void 0:U.meta)==null?void 0:a.title)},R)})}),onChange:T=>{h[g]=T.target.value,m(h[g],g,j)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),_.map(T=>{var U,a;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ge,{blocklet:T,label:T.title||((a=T.meta)==null?void 0:a.title)})},R)})]})]})},customBodyRenderLite:h=>{var j,T;const m=u[h],g=N(m.componentDid);return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[g?e.jsx(ct,{size:32,blocklet:g,ancestors:g.ancestors??[]}):e.jsx(Bt,{blocklet:f,size:32}),e.jsx(xe,{maxLength:50,children:((j=g==null?void 0:g.meta)==null?void 0:j.title)||((T=f==null?void 0:f.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:h=>{const m=u[h],{receivers:g}=m;return e.jsx(zt,{total:g.length,renderSurplus:j=>j<100?e.jsxs("span",{children:["+",j]}):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:j=>{j.stopPropagation(),k(m),H("receivers")},children:g.map(j=>{const{receiverUser:T}=j,R=rt(T.avatar,E,z);return e.jsx(at,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:j.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},j.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:h=>{const m=u[h];return e.jsx(v,{onClick:g=>{g.stopPropagation(),k(m),H("statistics")},children:e.jsx(Re,{statistics:m.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:h=>{const m=u[h];return e.jsx(xe,{maxLength:50,children:m.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:h=>{const m=u[h];return e.jsx(be,{severity:m.severity})},filter:!0,filterType:"custom",filterList:w.severities??[],customFilterListOptions:{render:h=>e.jsx(Ve,{list:h,label:s("notification.severity"),onDelete:(m,g)=>{m.stopPropagation(),W(m,g,je[4].options.filterList,"severities")}}),update:Ce},filterOptions:{names:Qe,fullWidth:!0,logic:Ne,display:(h,m,g,j)=>e.jsx(Cs,{label:s("notification.severity"),filterList:h,onChange:m,index:g,column:j,filterValues:Qe})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:h=>{const{createdAt:m}=u[h];return e.jsx(it,{value:m,locale:n,shouldUpdate:!0})}}}],ce=h=>{O(m=>({...m,dateRange:h,page:1}))},de=[e.jsxs(v,{display:"flex",alignItems:"center",gap:1.5,children:[e.jsx(Wt,{onClick:()=>p(!0),sx:{p:J?0:void 0},children:e.jsx(Kt,{})},"settings"),J?e.jsx(G,{children:s("common.setting")}):null]}),...t||[]];return e.jsxs(v,{ref:Y,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(ws,{children:e.jsx(ot,{theme:r,children:e.jsx(dt,{className:"main-table",verticalKeyWidth:100,loading:l,locale:n,columns:je,data:u,durable:S,onChange:ae,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,...A,onRowClick:(h,{dataIndex:m})=>{k(u[m])}},customPreButtons:[e.jsx($e,{value:w.dateRange,onChange:ce})],customButtons:de,components:{TableFilterList:h=>e.jsx(He,{...h,itemComponent:m=>e.jsx(Te,{...m,canDelete:g=>{var T;const j=(T=g==null?void 0:g.columnNames)==null?void 0:T[(g==null?void 0:g.index)||0];return(j==null?void 0:j.name)==="sender"}})})}})})}),P&&e.jsx(ys,{refresh:le,onCancel:se,notification:P,blocklet:f,tab:I}),e.jsx(lt,{title:`${s("common.notification")} ${s("common.setting")}`,fullWidth:!0,maxWidth:"md",open:te,onClose:()=>p(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(v,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx($t,{})})})]})}const ws=re.div`
95
+ `;function ge({blocklet:t,label:s}){var n;return e.jsx(Ss,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(ct,{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})})}Ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ve.defaultProps={onDelete:()=>{}};function Ve({list:t,label:s,onDelete:n}){return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(o=>e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(be,{severity:o})}),onDelete:r=>n(r,o)},o))]})}function Cs(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(be,{severity:s})})}function Ns({customTableButtons:t}){var ue;const{t:s,locale:n}=X(),o=st(),r=x.useMemo(()=>nt(o,bt()),[o]),[l,b]=x.useState(!1),{data:u,paging:D,blocklet:f,fetch:C,getComponent:N,componentDids:B,inService:z,teamDid:E}=We(),Y=x.useRef(null),[k,P]=x.useState(null),[I,H]=x.useState("info"),J=Yt(),[te,p]=x.useState(!1),S=`notification-records-${(ue=f.meta)==null?void 0:ue.did}`,A=qt(S),[w,O]=x.useState({pageSize:A.rowsPerPage||10,page:A.page?A.page+1:1,dids:A.dids||[],dateRange:A.dateRange||[$().subtract(1,"month").startOf("day").toDate(),$().endOf("day").toDate()]}),_=Q(()=>{if(!f.children||!f.children.length)return[];const h=[];return f.children.forEach(m=>{var j;const g=m.did||((j=m.meta)==null?void 0:j.did);B.includes(g)&&(m.ancestors=[f],h.push(m))}),h},[B,f]),Z=async h=>{try{b(!0),await C(h),b(!1)}finally{b(!1)}};x.useEffect(()=>{Z(w)},[w]),x.useEffect(()=>{const h=u.find(m=>m.id===(k==null?void 0:k.id));k&&h&&P({...h})},[u]);const W=(h,m,g,j)=>{h.stopPropagation();const T=g.filter(R=>R!==m);O(R=>({...R,[j]:T,page:1}))},ae=({page:h,rowsPerPage:m,filterList:g})=>{const[j=[],,,,T=[]]=g;w.pageSize!==m?O(R=>({...R,pageSize:m,page:1})):w.page!==h+1?O(R=>({...R,page:h+1})):fe(w.dids,j)?fe(w.severities,T)||O(R=>({...R,severities:T,page:1})):O(R=>({...R,dids:j,page:1}))},se=x.useCallback(()=>{P(null),H("info")},[]),le=x.useCallback(()=>{C(w)},[C,w]),je=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:h=>h.map((m,g)=>{var T;if(m==="system")return e.jsx("span",{children:s("notification.system")},`system-${g}`);const j=_.find(R=>{var a;return(R.did||((a=R.meta)==null?void 0:a.did))===m});return e.jsx(ge,{blocklet:j,label:(j==null?void 0:j.title)||((T=j==null?void 0:j.meta)==null?void 0:T.title)},m)}),update:(h,m,g)=>(h[g].splice(m,1),h)},filterOptions:{names:_,logic:(h,m)=>m.length?!m.includes(h):!1,display:(h,m,g,j)=>e.jsxs(Be,{style:{width:"380px"},children:[e.jsx(Ft,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(_t,{multiple:!0,value:h[g],renderValue:T=>e.jsx(v,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:T.map(R=>{var a;if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const U=_.find(i=>{var y;return(i.did||((y=i.meta)==null?void 0:y.did))===R});return e.jsx(ge,{blocklet:U,label:(U==null?void 0:U.title)||((a=U==null?void 0:U.meta)==null?void 0:a.title)},R)})}),onChange:T=>{h[g]=T.target.value,m(h[g],g,j)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),_.map(T=>{var U,a;const R=T.did||((U=T.meta)==null?void 0:U.did);return e.jsx(Je,{value:R,children:e.jsx(ge,{blocklet:T,label:T.title||((a=T.meta)==null?void 0:a.title)})},R)})]})]})},customBodyRenderLite:h=>{var j,T;const m=u[h],g=N(m.componentDid);return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[g?e.jsx(ct,{size:32,blocklet:g,ancestors:g.ancestors??[]}):e.jsx(Bt,{blocklet:f,size:32}),e.jsx(xe,{maxLength:50,children:((j=g==null?void 0:g.meta)==null?void 0:j.title)||((T=f==null?void 0:f.meta)==null?void 0:T.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:h=>{const m=u[h],{receivers:g}=m;return e.jsx(zt,{total:g.length,renderSurplus:j=>j<100?e.jsxs("span",{children:["+",j]}):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:j=>{j.stopPropagation(),P(m),H("receivers")},children:g.map(j=>{const{receiverUser:T}=j,R=rt(T.avatar,E,z);return e.jsx(at,{alt:T.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:j.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},j.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:h=>{const m=u[h];return e.jsx(v,{onClick:g=>{g.stopPropagation(),P(m),H("statistics")},children:e.jsx(Re,{statistics:m.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:h=>{const m=u[h];return e.jsx(xe,{maxLength:50,children:m.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:h=>{const m=u[h];return e.jsx(be,{severity:m.severity})},filter:!0,filterType:"custom",filterList:w.severities??[],customFilterListOptions:{render:h=>e.jsx(Ve,{list:h,label:s("notification.severity"),onDelete:(m,g)=>{m.stopPropagation(),W(m,g,je[4].options.filterList,"severities")}}),update:Ce},filterOptions:{names:Qe,fullWidth:!0,logic:Ne,display:(h,m,g,j)=>e.jsx(Cs,{label:s("notification.severity"),filterList:h,onChange:m,index:g,column:j,filterValues:Qe})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:h=>{const{createdAt:m}=u[h];return e.jsx(it,{value:m,locale:n,shouldUpdate:!0})}}}],ce=h=>{O(m=>({...m,dateRange:h,page:1}))},de=[e.jsxs(v,{display:"flex",alignItems:"center",gap:1.5,children:[e.jsx(Wt,{onClick:()=>p(!0),sx:{p:J?0:void 0},children:e.jsx(Kt,{})},"settings"),J?e.jsx(G,{children:s("common.setting")}):null]}),...t||[]];return e.jsxs(v,{ref:Y,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(ws,{children:e.jsx(ot,{theme:r,children:e.jsx(dt,{className:"main-table",verticalKeyWidth:100,loading:l,locale:n,columns:je,data:u,durable:S,onChange:ae,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:D.page-1,rowsPerPage:D.pageSize,count:D.total,...A,onRowClick:(h,{dataIndex:m})=>{P(u[m])}},customPreButtons:[e.jsx($e,{value:w.dateRange,onChange:ce})],customButtons:de,components:{TableFilterList:h=>e.jsx(He,{...h,itemComponent:m=>e.jsx(Te,{...m,canDelete:g=>{var T;const j=(T=g==null?void 0:g.columnNames)==null?void 0:T[(g==null?void 0:g.index)||0];return(j==null?void 0:j.name)==="sender"}})})}})})}),k&&e.jsx(ys,{refresh:le,onCancel:se,notification:k,blocklet:f,tab:I}),e.jsx(lt,{title:`${s("common.notification")} ${s("common.setting")}`,fullWidth:!0,maxWidth:"md",open:te,onClose:()=>p(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(v,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx($t,{})})})]})}const ws=re.div`
96
96
  td.MuiTableCell-footer {
97
97
  border: none !important;
98
98
  }
@@ -1,4 +1,4 @@
1
- import{bl as c}from"./index-DTb1YjkO.js";var i={exports:{}};/*!
1
+ import{bl as c}from"./index-D6xNQO9D.js";var i={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
@@ -1,4 +1,4 @@
1
- import{n as q,P as E,r as p,e as we,j as e,C as J,g as Be,u as pe,m as Y,o as De,q as Ee,D as Te,B as Q,s as Le,k as F,t as oe,v as Ae,w as Ie,x as fe,y as z,z as _e,d as Pe,A as le,E as Re,F as Fe,H as M,I as ne,J as ae,K as B,M as Ne,R as W,N as re,O as Ue,S as ie,Q as ce,U as Oe,V as me,X as Me,Y as We}from"./index-DTb1YjkO.js";import{_ as $e}from"./useLocalStorage-DQZ59j66.js";import{g as ze,D as Ve}from"./index-CFc2cpAq.js";import{E as qe}from"./index-omP-_XYV.js";import{B as P}from"./status-CoaEXqC8.js";import{D as Ke,u as Xe,B as de,j as He}from"./actions-CvZtuIOm.js";import{u as xe,W as Qe}from"./url-evaluation-DQ262LSg.js";import{I as Je,B as Ye}from"./install-from-url-B9F0r0Uk.js";import{d as Ge}from"./Launch-B7fv6nTK.js";import{d as Ze}from"./Add-CSGWebd7.js";import{S as R}from"./index-DnLtwT4P.js";import{i as et,a as tt}from"./schema-BD6PrmCO.js";import{P as st}from"./permission-DtbkcHFU.js";import"./TableRow-CQ8RBtid.js";import"./useThemeProps-CtXzBlYo.js";import"./emotion-react.browser.esm--gIypTeg.js";import"./ViewColumn-CcQluqhl.js";import"./Search-CUm1f8xo.js";import"./Clear-D0I7uWhD.js";import"./Delete-P4B2dduO.js";import"./MoreVert-C_Ck3fn9.js";import"./TableSearch-Uk9kIt7i.js";import"./get-safe-url-BHhOK-87.js";import"./ButtonGroup-ClVwTb7r.js";import"./getValidReactChildren-B-b9MOMT.js";import"./cloneDeep-CP0xacDT.js";import"./index-BLrsx8oH.js";import"./Autocomplete-BRFoT1-d.js";import"./ListSubheader-Yn3XMnVm.js";import"./ListItemButton-ByIRcZGW.js";import"./Stepper-CEe-v4P_.js";import"./index-CEr4LN-P.js";function V({blocklet:j,skipAccessibilityCheck:m=!1,...u}){const{t:a}=p.useContext(we),{urls:C,loading:n,recommendedUrl:h}=xe(j);if(n&&!m)return e.jsx(J,{size:12,...u});const k=m?C[0]:h;return k?e.jsx(lt,{...u,children:e.jsx(ot,{children:e.jsxs(Be,{href:k,target:"_blank",className:"blocklet-interface",underline:"hover",children:[a("common.visit"),e.jsx(Ge,{fontSize:"12",sx:{marginLeft:.5}})]})})}):a("blocklet.router.noAccessibleUrl")}const ot=q.div`
1
+ import{n as q,P as E,r as p,e as we,j as e,C as J,g as Be,u as pe,m as Y,o as De,q as Ee,D as Te,B as Q,s as Le,k as F,t as oe,v as Ae,w as Ie,x as fe,y as z,z as _e,d as Pe,A as le,E as Re,F as Fe,H as M,I as ne,J as ae,K as B,M as Ne,R as W,N as re,O as Ue,S as ie,Q as ce,U as Oe,V as me,X as Me,Y as We}from"./index-D6xNQO9D.js";import{_ as $e}from"./useLocalStorage-BvE_hswD.js";import{g as ze,D as Ve}from"./index-BH6N9kiW.js";import{E as qe}from"./index-gWj5DPOC.js";import{B as P}from"./status-AY9VNZQw.js";import{D as Ke,u as Xe,B as de,j as He}from"./actions-Cq51qPdo.js";import{u as xe,W as Qe}from"./url-evaluation-D2mP9Xpx.js";import{I as Je,B as Ye}from"./install-from-url-74slzMXU.js";import{d as Ge}from"./Launch-DHV3U2Y3.js";import{d as Ze}from"./Add-BvcTJL6g.js";import{S as R}from"./index-BjBCo6La.js";import{i as et,a as tt}from"./schema-Vu9BjGDN.js";import{P as st}from"./permission-fFO3ZJsb.js";import"./TableRow-uM5dbbKH.js";import"./useThemeProps-Daih-0Xh.js";import"./emotion-react.browser.esm-CZUhgARx.js";import"./ViewColumn-BncCRTIT.js";import"./Search-CjaYHOuY.js";import"./Clear-9k4hE_iq.js";import"./Delete-EgRRDgvd.js";import"./MoreVert-C7ADSe__.js";import"./TableSearch-CUrFzIWx.js";import"./get-safe-url-rD4VAeiO.js";import"./ButtonGroup-8JIPxBFt.js";import"./getValidReactChildren-DXpwHayT.js";import"./cloneDeep-D8oICiE5.js";import"./index-FAOrsHzs.js";import"./Autocomplete-DPEAys5B.js";import"./ListSubheader-C-e_2m7m.js";import"./ListItemButton-CS_u4xql.js";import"./Stepper-Cz4oLc0v.js";import"./index-BpB-1Bg8.js";function V({blocklet:j,skipAccessibilityCheck:m=!1,...u}){const{t:a}=p.useContext(we),{urls:C,loading:n,recommendedUrl:h}=xe(j);if(n&&!m)return e.jsx(J,{size:12,...u});const k=m?C[0]:h;return k?e.jsx(lt,{...u,children:e.jsx(ot,{children:e.jsxs(Be,{href:k,target:"_blank",className:"blocklet-interface",underline:"hover",children:[a("common.visit"),e.jsx(Ge,{fontSize:"12",sx:{marginLeft:.5}})]})})}):a("blocklet.router.noAccessibleUrl")}const ot=q.div`
2
2
  display: flex;
3
3
  margin: 4px 0;
4
4
  `,lt=q.div`