@abtnode/blocklet-services 1.16.42-beta-20250416-010627-a89e72e0 → 1.16.43-beta-20250419-231352-c78ac93d

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 (246) hide show
  1. package/api/emails/_components/compose.js +1 -1
  2. package/api/emails/_templates/new-user-session.js +67 -0
  3. package/api/index.js +12 -9
  4. package/api/libs/connect/session.js +3 -0
  5. package/api/libs/connect/v1.js +4 -3
  6. package/api/routes/federated.js +9 -1
  7. package/api/routes/user-session.js +3 -0
  8. package/api/routes/user.js +19 -12
  9. package/api/services/auth/connect/invite.js +3 -0
  10. package/api/services/auth/connect/issue-passport.js +3 -0
  11. package/api/services/auth/passkey.js +7 -6
  12. package/api/services/auth/session.js +30 -7
  13. package/api/services/static.js +0 -6
  14. package/api/util/user-util.js +3 -0
  15. package/dist/assets/{AdapterDayjs-B7fWFwN5.js → AdapterDayjs-DBd25Gc9.js} +1 -1
  16. package/dist/assets/{ArrowDropDown-DO9H_COV.js → ArrowDropDown-CplPoZk0.js} +1 -1
  17. package/dist/assets/{CheckCircle-B_wWOO2P.js → CheckCircle-DKW0gPt9.js} +1 -1
  18. package/dist/assets/{ChevronLeft-BdrBCIFt.js → ChevronLeft-f4mXxiqC.js} +1 -1
  19. package/dist/assets/{ChevronRight-CO9My6tF.js → ChevronRight-I8lL2o6m.js} +1 -1
  20. package/dist/assets/{Community-B_YqAP9P.js → Community-eISlOOkV.js} +1 -1
  21. package/dist/assets/{DeleteOutline-7AloJjcV.js → DeleteOutline-gXV6-Yj1.js} +1 -1
  22. package/dist/assets/{Done-BXISjL2g.js → Done-D7ovxqe0.js} +1 -1
  23. package/dist/assets/{Download-B0rKRcTB.js → Download-DnSJYUu9.js} +1 -1
  24. package/dist/assets/{Edit-C1mcIe4c.js → Edit-K6PObbWp.js} +1 -1
  25. package/dist/assets/{EditIcon-5ixNT5sW.js → EditIcon-CQgpOLLT.js} +1 -1
  26. package/dist/assets/{Email-RGD-rKFl.js → Email-BWTg6iJI.js} +1 -1
  27. package/dist/assets/{Error-BnWmSZ5k.js → Error-Cpr3WuZf.js} +1 -1
  28. package/dist/assets/{ExpandLess-DRlih5VO.js → ExpandLess-CfCbhFiC.js} +1 -1
  29. package/dist/assets/{Google-1eG1YH-u.js → Google-BPbeA72O.js} +1 -1
  30. package/dist/assets/{Holiday-C_1hMIGZ.js → Holiday-C3bRTVlx.js} +1 -1
  31. package/dist/assets/{InfoOutlined-DO0_Vjz-.js → InfoOutlined-Cxodw3Dd.js} +1 -1
  32. package/dist/assets/{Launch-CIC8rZgo.js → Launch-BtCtZYws.js} +1 -1
  33. package/dist/assets/{LaunchOutlined-CkYWJcA9.js → LaunchOutlined--YSktZgX.js} +1 -1
  34. package/dist/assets/{Location-B6FoL795.js → Location-C_mUMqZP.js} +1 -1
  35. package/dist/assets/{LockIcon-D3vSMIOk.js → LockIcon-G8zLxYzV.js} +1 -1
  36. package/dist/assets/{Meeting-BfKca-xn.js → Meeting-vvmUKHs1.js} +1 -1
  37. package/dist/assets/{MoreHoriz-B8cBSV22.js → MoreHoriz-ChU2hdzJ.js} +1 -1
  38. package/dist/assets/{OffSick-QPPyYyU6.js → OffSick-BTxtVws3.js} +1 -1
  39. package/dist/assets/{Phone-_lRBpoVi.js → Phone-Cz_yY8ed.js} +1 -1
  40. package/dist/assets/{PlayArrow-NjIpSDwJ.js → PlayArrow-sN_fSbsI.js} +1 -1
  41. package/dist/assets/{QuestionMarkCircle-B4EnwYju.js → QuestionMarkCircle-DeAbZuzW.js} +1 -1
  42. package/dist/assets/{ServerLogo-BW4PKwV0.js → ServerLogo-UZVUmHWK.js} +1 -1
  43. package/dist/assets/{Timezone-bYzGwn3x.js → Timezone-5RxC7sK-.js} +1 -1
  44. package/dist/assets/{TuneOutlined-Bry0vSC0.js → TuneOutlined-CiDODSgi.js} +1 -1
  45. package/dist/assets/{ViewList-BzGRahvc.js → ViewList-BgK0KBCz.js} +1 -1
  46. package/dist/assets/{WorkingRemotely-BK9_vlZ-.js → WorkingRemotely-_QD8QN72.js} +1 -1
  47. package/dist/assets/{access-control-7Ih10vY9.js → access-control-Py8YI7Sg.js} +1 -1
  48. package/dist/assets/{actions-BOikuUJD.js → actions-C-bMrlCM.js} +1 -1
  49. package/dist/assets/add-component-core-Qy10hfGq.js +762 -0
  50. package/dist/assets/{add-resource-VgacdokL.js → add-resource--JfwloZn.js} +1 -1
  51. package/dist/assets/{addon-F4fsk4Yi.js → addon-BF7ni3fn.js} +1 -1
  52. package/dist/assets/advanced--o9qksiV.js +14 -0
  53. package/dist/assets/api-DwjKcjK8.js +1 -0
  54. package/dist/assets/{appearance-BWtF9DZd.js → appearance-DQ7WvKeM.js} +1 -1
  55. package/dist/assets/ar-DRtGxecv.js +7 -0
  56. package/dist/assets/audit-logs-CXRUUhqH.js +35 -0
  57. package/dist/assets/{authorize-BKpxW7YW.js → authorize-DUug1C68.js} +1 -1
  58. package/dist/assets/{base32-CQfYcymN.js → base32-CWI-u9nV.js} +1 -1
  59. package/dist/assets/{branding-DoPxX3nU.js → branding-BS99MP-h.js} +2 -2
  60. package/dist/assets/branding-D9uh0isl.js +54 -0
  61. package/dist/assets/bundle-avatar-nPtHnMPN.js +1 -0
  62. package/dist/assets/button-BxdaIS5g.js +1 -0
  63. package/dist/assets/{click-to-copy-Cygm8U3_.js → click-to-copy-CTfzGpml.js} +1 -1
  64. package/dist/assets/{cloneDeep-kMVNpUap.js → cloneDeep-DUYD8ZBI.js} +1 -1
  65. package/dist/assets/{complete-Cnzbqj4O.js → complete-DVY-bJt4.js} +1 -1
  66. package/dist/assets/{component-BBRNk4Tr.js → component-DvDJBvwl.js} +1 -1
  67. package/dist/assets/{config-Dko9yBri.js → config-BQCgx2fR.js} +1 -1
  68. package/dist/assets/{config-navigation-CDw3CW3J.js → config-navigation-gxUAyoWT.js} +6 -6
  69. package/dist/assets/{config-Ba-WdcGO.js → config-ogNfLnBw.js} +1 -1
  70. package/dist/assets/{config-space-CSSDG-WO.js → config-space-BVobvnPL.js} +1 -1
  71. package/dist/assets/{confirm-BX8_-j-l.js → confirm-DVW7YBsC.js} +1 -1
  72. package/dist/assets/connect-C1ax2q5c.js +5 -0
  73. package/dist/assets/{connect-ByA6PdRd.js → connect-CZiBZEfi.js} +1 -1
  74. package/dist/assets/{connect-to-yIsMDJbM.js → connect-to-CzcgHUZG.js} +1 -1
  75. package/dist/assets/{content-layout-BM34AwsG.js → content-layout-Cg5RRv1R.js} +1 -1
  76. package/dist/assets/dashboard-CP2P7oxj.js +279 -0
  77. package/dist/assets/de-BZDWXY3K.js +7 -0
  78. package/dist/assets/{delete-confirm-C0cAQSXq.js → delete-confirm-XK8jSuf8.js} +1 -1
  79. package/dist/assets/{did-address-GAxLGeWB.js → did-address-CQl19Nvh.js} +1 -1
  80. package/dist/assets/domain-Gbwc_7wY.js +9 -0
  81. package/dist/assets/domain-action-card-kpBwugfc.js +25 -0
  82. package/dist/assets/domains-PNVO5nNw.js +1 -0
  83. package/dist/assets/dot-BBxUn__M.js +7 -0
  84. package/dist/assets/{email-B9kMynU0.js → email-C_xHssUU.js} +2 -2
  85. package/dist/assets/{empty-spinner-Ict2ItjU.js → empty-spinner-yzHJfTIe.js} +1 -1
  86. package/dist/assets/es-kQ6jQG-H.js +7 -0
  87. package/dist/assets/{exchange-passport-CgO3iLVh.js → exchange-passport-hQXgq3GD.js} +1 -1
  88. package/dist/assets/fr-Bf3jz4q5.js +7 -0
  89. package/dist/assets/{fuel-C6fpJHcg.js → fuel-DVf4_c57.js} +1 -1
  90. package/dist/assets/{gen-access-key-jNw5st5h.js → gen-access-key-DpUd0FlR.js} +1 -1
  91. package/dist/assets/{get-safe-url-CRmmLBFf.js → get-safe-url-B-sc0A-n.js} +1 -1
  92. package/dist/assets/{get-safe-url-ZRaKUVld.js → get-safe-url-B_RF0YU0.js} +1 -1
  93. package/dist/assets/{hi-DCG5QxbH.js → hi-DPdbGXyy.js} +2 -8
  94. package/dist/assets/{home-AJ00GuT0.js → home-DMgMCymt.js} +1 -1
  95. package/dist/assets/id-BqmT-cL5.js +7 -0
  96. package/dist/assets/{iframe-C4N_8Wwh.js → iframe-4UgdZZC1.js} +1 -1
  97. package/dist/assets/{index-D1fVmwHN.js → index-B0Z8409R.js} +1 -1
  98. package/dist/assets/{index-DkPKxdcu.js → index-BjmnM2sd.js} +1 -1
  99. package/dist/assets/index-BkddeMo4.js +346 -0
  100. package/dist/assets/index-BwaE3jmF.js +10 -0
  101. package/dist/assets/index-C0Iiqot3.css +1 -0
  102. package/dist/assets/index-C7N2sf_h.js +138 -0
  103. package/dist/assets/{index-O2l0NSUF.js → index-CEMXycV7.js} +1 -1
  104. package/dist/assets/{index-BP62CTBB.js → index-CHnniEyF.js} +1 -1
  105. package/dist/assets/index-CagPo5v-.js +113 -0
  106. package/dist/assets/{index-DzDfEcNp.js → index-CgtY16Wm.js} +1 -1
  107. package/dist/assets/{index-PfRsNX8F.js → index-CsgM0f6J.js} +1 -1
  108. package/dist/assets/{index-DyO7bYXp.js → index-CtXa7h2w.js} +9 -9
  109. package/dist/assets/index-Cy-N-WWk.js +92 -0
  110. package/dist/assets/index-D0RC10aR.js +55 -0
  111. package/dist/assets/{index-EBUaBME3.js → index-DDQJBjEj.js} +2 -2
  112. package/dist/assets/{index-CyBxUW5e.js → index-DLKBGmpX.js} +1 -1
  113. package/dist/assets/index-DPgbycNO.js +1 -0
  114. package/dist/assets/index-DZj02tPf.js +113 -0
  115. package/dist/assets/{index-BRz2myBK.js → index-DpPN2Hn-.js} +1 -1
  116. package/dist/assets/{index-CNl-IhR2.js → index-GjE02L4C.js} +2 -2
  117. package/dist/assets/index-Gm2-_e3j.js +1 -0
  118. package/dist/assets/{index-B64a4BbE.js → index-I8x_0gIy.js} +18 -18
  119. package/dist/assets/index-Pg83GFwT.js +4 -0
  120. package/dist/assets/{index-8Co4tmLR.js → index-WrR7FOJW.js} +8 -8
  121. package/dist/assets/{index-CX4jvZnM.js → index-haYY8BAk.js} +1 -1
  122. package/dist/assets/{index-C-7MyHbp.js → index-kqlC8JFQ.js} +1 -1
  123. package/dist/assets/{invitation-DVbBeS8B.js → invitation-BHGagSLV.js} +1 -1
  124. package/dist/assets/{invite-t8rB5ZWZ.js → invite-CvX-43Qc.js} +1 -1
  125. package/dist/assets/{issue-passport-CSlA5ioP.js → issue-passport-BW6yzKx3.js} +1 -1
  126. package/dist/assets/{item--dgEgBvz.js → item-BF4KPkcQ.js} +1 -1
  127. package/dist/assets/ja-CyUU4_H1.js +7 -0
  128. package/dist/assets/ko-DWTxutv1.js +7 -0
  129. package/dist/assets/landing-page-D5MYBFUa.js +1 -0
  130. package/dist/assets/{launch-result-message-Bvdtucih.js → launch-result-message-Ckk5lRW7.js} +1 -1
  131. package/dist/assets/{layout-B4YOjaNK.js → layout-aojLTImI.js} +1 -1
  132. package/dist/assets/list-Dc8Jfe8L.js +234 -0
  133. package/dist/assets/{list-header-Bm8u_Z_p.js → list-header-BYlc5SI1.js} +1 -1
  134. package/dist/assets/localization-Bd0hX08w.js +1 -0
  135. package/dist/assets/{log-CP1_Zl5R.js → log-DOIIPe_H.js} +1 -1
  136. package/dist/assets/{logger-B9-TWjbH.js → logger-BWFrucDF.js} +1 -1
  137. package/dist/assets/{login-C8k7kmim.js → login-CWe2jVnz.js} +1 -1
  138. package/dist/assets/{login-oauth-callback-DqejBHsA.js → login-oauth-callback-DX0RUZbI.js} +1 -1
  139. package/dist/assets/logo-uploader-DrmXtKUh.js +133 -0
  140. package/dist/assets/{lost-passport-Croi_0xR.js → lost-passport-3IUMBdMK.js} +2 -2
  141. package/dist/assets/{omit-MMUW2k9W.js → omit-B1LDXfkq.js} +1 -1
  142. package/dist/assets/{open-window-plauGxNl.js → open-window-C9M0sLPo.js} +1 -1
  143. package/dist/assets/{overview-C8MR_9r7.js → overview-DXBkrcK9.js} +1 -1
  144. package/dist/assets/{page-header-Cu9lHawO.js → page-header-CtJV2gil.js} +1 -1
  145. package/dist/assets/passport-item-Eb0O4plM.js +1 -0
  146. package/dist/assets/{permission-C5Df-sxb.js → permission-Bua36Doc.js} +1 -1
  147. package/dist/assets/preferences-D4p_dB62.js +1 -0
  148. package/dist/assets/profile-embed-CBcCbRqv.js +1 -0
  149. package/dist/assets/pt-BcsDG9H6.js +5 -0
  150. package/dist/assets/publish-resource-DZIl2SXf.js +1 -0
  151. package/dist/assets/{react-beautiful-dnd.esm-BQ3hEDNY.js → react-beautiful-dnd.esm-QRb5iprr.js} +1 -1
  152. package/dist/assets/{relative-time-DESntOZH.js → relative-time-BTIpMkPf.js} +1 -1
  153. package/dist/assets/ru-BwH1q1F1.js +5 -0
  154. package/dist/assets/runtime-DZIYyJfe.js +1 -0
  155. package/dist/assets/sdk-Bt5s8-As.js +1 -0
  156. package/dist/assets/{security-CRd92J54.js → security-fEJBFCBy.js} +1 -1
  157. package/dist/assets/{session-DaQ4KCFD.js → session-CW6CHHdW.js} +1 -1
  158. package/dist/assets/setup-D3w4xkpj.js +19 -0
  159. package/dist/assets/{shorten-label-CwDvu4_S.js → shorten-label-8jfEkawx.js} +1 -1
  160. package/dist/assets/{simple-select-DgqUhMvQ.js → simple-select-CNZc1N7Q.js} +1 -1
  161. package/dist/assets/{slicedToArray-B8PdYes9.js → slicedToArray-gyBkcGHe.js} +1 -1
  162. package/dist/assets/{spaces-D1rqZVaX.js → spaces-970nXC4W.js} +1 -1
  163. package/dist/assets/{start-Df0wvo1-.js → start-2a5gIZRp.js} +1 -1
  164. package/dist/assets/{status-D7e11K9q.js → status-DBrvkky_.js} +1 -1
  165. package/dist/assets/{step-actions-BAf7tRyq.js → step-actions-6TYxd1MB.js} +1 -1
  166. package/dist/assets/{studio-CJpRZ6Af.js → studio-DbIZ4lHD.js} +1 -1
  167. package/dist/assets/{switch-control-DPANzJ8H.js → switch-control-Bw3ohhMA.js} +1 -1
  168. package/dist/assets/th-CNztcQMJ.js +5 -0
  169. package/dist/assets/traffic-DBgXOCbQ.js +35 -0
  170. package/dist/assets/{transfer-CBAuvpGA.js → transfer-B0de7VRU.js} +1 -1
  171. package/dist/assets/{unsubscribe-Cyuj6w2n.js → unsubscribe-CUEA_4Ow.js} +1 -1
  172. package/dist/assets/use-app-logo-DoDXvoIT.js +1 -0
  173. package/dist/assets/{use-mobile-BHPd3bDQ.js → use-mobile-BbxjRR_q.js} +1 -1
  174. package/dist/assets/{use-mobile-CHMVa8_W.js → use-mobile-T-9_nK_m.js} +1 -1
  175. package/dist/assets/useAsync-B_98ShEr.js +1 -0
  176. package/dist/assets/{useLocalStorage-BXnF_60k.js → useLocalStorage-CkST2tLi.js} +1 -1
  177. package/dist/assets/user-center-B2qCZ2yX.js +77 -0
  178. package/dist/assets/{util-Csa0tyHO.js → util-BUnBptcm.js} +1 -1
  179. package/dist/assets/{util-C9b90o5T.js → util-Bt5DR42K.js} +1 -1
  180. package/dist/assets/{vendor-arcblock-BtlDhznp.js → vendor-arcblock-CBc_0mJh.js} +78 -78
  181. package/dist/assets/{vendor-hooks-BwVH-TAd.js → vendor-hooks-jg6xPUPF.js} +1 -1
  182. package/dist/assets/{vendor-mui-core-DxD1UA4o.js → vendor-mui-core-DiDsSLd-.js} +30 -30
  183. package/dist/assets/{vendor-mui-x-Bit8yv3W.js → vendor-mui-x-mVhD3N7n.js} +1 -1
  184. package/dist/assets/vendor-utils-DMClavLd.js +11 -0
  185. package/dist/assets/vendor-ux-did-connect-BKeZkgZt.js +1832 -0
  186. package/dist/assets/{vendor-ux-did-connect-2GapMFC4.css → vendor-ux-did-connect-DpSGLE7B.css} +1 -1
  187. package/dist/assets/vi-Bpl5HEj4.js +5 -0
  188. package/dist/assets/wrap-locale-CJY3ql5f.js +1 -0
  189. package/dist/assets/{zh-BYP8UvRZ.js → zh-CY9wasmC.js} +2 -9
  190. package/dist/assets/{zh-tw-Dcs2VpLv.js → zh-tw-D6qZTlL3.js} +2 -9
  191. package/dist/index.html +7 -7
  192. package/dist/service-worker.js +1 -1
  193. package/package.json +47 -45
  194. package/dist/assets/add-component-core-DRJSzr-6.js +0 -763
  195. package/dist/assets/advanced-a-1InjKG.js +0 -14
  196. package/dist/assets/api-3sG9at7i.js +0 -1
  197. package/dist/assets/ar-CMzth4YC.js +0 -13
  198. package/dist/assets/audit-logs-DqFf6jS-.js +0 -35
  199. package/dist/assets/branding--Qk4aIi4.js +0 -55
  200. package/dist/assets/bundle-avatar-DNxC8z4b.js +0 -1
  201. package/dist/assets/button-leITu2bm.js +0 -1
  202. package/dist/assets/connect-DBfZH_8M.js +0 -5
  203. package/dist/assets/dashboard-oxsbu66O.js +0 -275
  204. package/dist/assets/de-BkBUnf4o.js +0 -13
  205. package/dist/assets/domain-BB7h2xMD.js +0 -9
  206. package/dist/assets/domain-action-card-BKzC5bbv.js +0 -29
  207. package/dist/assets/domains-CQPZJx98.js +0 -1
  208. package/dist/assets/es-C47yMWlQ.js +0 -14
  209. package/dist/assets/fr-CXUB715N.js +0 -13
  210. package/dist/assets/id-BjbrrkXh.js +0 -14
  211. package/dist/assets/index-B5bNvBjf.js +0 -138
  212. package/dist/assets/index-BS5tohCn.js +0 -4
  213. package/dist/assets/index-BSlpaPEE.js +0 -346
  214. package/dist/assets/index-C1H5SEVx.js +0 -113
  215. package/dist/assets/index-Cv9H4C1K.js +0 -55
  216. package/dist/assets/index-D4PP6P2d.css +0 -1
  217. package/dist/assets/index-D6v3bOtJ.js +0 -14
  218. package/dist/assets/index-DIckhHU5.js +0 -1
  219. package/dist/assets/index-DKLLCs8G.js +0 -93
  220. package/dist/assets/index-Dc-Oeqo9.js +0 -1
  221. package/dist/assets/index-tjRN_EVx.js +0 -119
  222. package/dist/assets/ja-DmNZQIta.js +0 -14
  223. package/dist/assets/ko-CfYwMwZz.js +0 -14
  224. package/dist/assets/landing-page-aHOyrHWC.js +0 -1
  225. package/dist/assets/list-Bny5F0T2.js +0 -234
  226. package/dist/assets/localization-DS_PbFVL.js +0 -1
  227. package/dist/assets/logo-uploader-zhddoC5p.js +0 -133
  228. package/dist/assets/passport-item-DDktLU4q.js +0 -1
  229. package/dist/assets/preferences-BUVHMy7R.js +0 -1
  230. package/dist/assets/profile-embed-BKX2YBaX.js +0 -1
  231. package/dist/assets/pt-DD_rP5GH.js +0 -12
  232. package/dist/assets/publish-resource-tDbEc2CN.js +0 -1
  233. package/dist/assets/ru-CwgUUzV8.js +0 -11
  234. package/dist/assets/runtime-8Gq50HDL.js +0 -1
  235. package/dist/assets/sdk-DRKovxXZ.js +0 -1
  236. package/dist/assets/setup-DXwqTfxV.js +0 -19
  237. package/dist/assets/th-KqE3tuDR.js +0 -12
  238. package/dist/assets/traffic-Brsh4OZD.js +0 -35
  239. package/dist/assets/useAsync-BmW5cnbx.js +0 -1
  240. package/dist/assets/useAsync-DkPaceIy.js +0 -1
  241. package/dist/assets/useAsyncRetry-k063P8TB.js +0 -7
  242. package/dist/assets/user-center-DOyIfHWq.js +0 -77
  243. package/dist/assets/vendor-utils-CTIzdAFg.js +0 -11
  244. package/dist/assets/vendor-ux-did-connect-CiLSrCOH.js +0 -1832
  245. package/dist/assets/vi-BSkiIyr-.js +0 -12
  246. package/dist/assets/wrap-locale--aKPMOdK.js +0 -1
@@ -1 +1 @@
1
- import{r as h}from"./vendor-react-DoD83n6N.js";import{H as e,j as a,bo as Y,bq as w,O as S,q as j,aa as v}from"./vendor-mui-core-DxD1UA4o.js";import{t as s}from"./index-tjRN_EVx.js";import{u as H}from"./vendor-ux-did-connect-CiLSrCOH.js";import{A as M}from"./vendor-arcblock-BtlDhznp.js";import{f as _}from"./vendor-hooks-BwVH-TAd.js";import{L as A,D as C}from"./vendor-mui-x-Bit8yv3W.js";import{A as y}from"./AdapterDayjs-B7fWFwN5.js";function x({value:r,onChange:i,error:m,helperText:u,label:t,timezone:n}){const f=n?s().tz(n):s(),p=_(()=>{let l=s();return r&&(l=n?s(r).tz(n):s(r)),l.format("YYYY-MM-DD[T]HH:mm")},[r,n]),D=l=>{const T=n?s(l).tz(n).format("YYYY-MM-DD HH:mm:00"):s(l).format("YYYY-MM-DD HH:mm:00");i(new Date(T))};return a.jsx(A,{dateAdapter:y,children:a.jsxs(Y,{fullWidth:!0,error:m,children:[a.jsx(C,{label:t,minDateTime:f,value:s(p),onChange:D,slotProps:{textField:{error:m,helperText:m?u:""}},format:"YYYY-MM-DD HH:mm"}),u&&a.jsx(w,{children:u})]})})}x.propTypes={value:e.oneOfType([e.string,e.instanceOf(Date)]),onChange:e.func.isRequired,error:e.bool,helperText:e.string,label:e.string,timezone:e.string};x.defaultProps={value:null,error:!1,helperText:"",label:"",timezone:""};function E(r){return a.jsx(M,{...r,width:20,height:20})}const c={MINUTES_30:30*60*1e3,HOUR_1:60*60*1e3,HOURS_3:3*60*60*1e3,DAY_1:24*60*60*1e3,DAYS_7:7*24*60*60*1e3,DAYS_30:30*24*60*60*1e3};function b({placeholder:r,value:i,onChange:m,timezone:u}){const{t}=H(),[n,f]=h.useState(i||""),[p,D]=h.useState(null),l=h.useMemo(()=>[{value:new Date(Date.now()+c.MINUTES_30),label:`30 ${t("common.minutes")}`},{value:new Date(Date.now()+c.HOUR_1),label:`1 ${t("common.hour")}`},{value:new Date(Date.now()+c.HOURS_3),label:`3 ${t("common.hours")}`},{value:new Date(Date.now()+c.DAY_1),label:`1 ${t("common.day")}`},{value:new Date(Date.now()+c.DAYS_7),label:`7 ${t("common.days")}`},{value:new Date(Date.now()+c.DAYS_30),label:`30 ${t("common.days")}`},{value:"custom",label:t("common.custom")}],[t]),T=o=>{if(f(o),o==="custom"){const d=s().toDate();D(d),m(d)}else m(o)},g=o=>{D(o),m(o)};return h.useEffect(()=>{i&&(l.find(d=>s(d.value).isSame(i))||(f("custom"),D(i)))},[]),a.jsxs(a.Fragment,{children:[a.jsx(Y,{fullWidth:!0,children:a.jsx(S,{select:!0,value:n,label:r||t("team.passport.passportExpireTime"),onChange:o=>T(o.target.value),variant:"outlined",SelectProps:{IconComponent:E},children:l.map(o=>a.jsx(j,{value:o.value,children:o.label},o.value))})}),n==="custom"&&a.jsx(v,{children:a.jsx(x,{value:p,onChange:g,label:t("team.passport.customExpireTime"),timezone:u,error:!p,helperText:p?void 0:t("team.passport.customExpireTime")})})]})}b.propTypes={value:e.oneOfType([e.string,e.instanceOf(Date)]),onChange:e.func.isRequired,timezone:e.string,placeholder:e.string};b.defaultProps={value:"",timezone:"",placeholder:""};export{b as T};
1
+ import{r as h}from"./vendor-react-DoD83n6N.js";import{H as e,j as a,bo as Y,bq as w,O as S,q as j,aa as v}from"./vendor-mui-core-DiDsSLd-.js";import{t as s}from"./index-CagPo5v-.js";import{u as H}from"./vendor-ux-did-connect-BKeZkgZt.js";import{A as M}from"./vendor-arcblock-CBc_0mJh.js";import{f as _}from"./vendor-hooks-jg6xPUPF.js";import{L as A,D as C}from"./vendor-mui-x-mVhD3N7n.js";import{A as y}from"./AdapterDayjs-DBd25Gc9.js";function x({value:r,onChange:i,error:m,helperText:u,label:t,timezone:n}){const f=n?s().tz(n):s(),p=_(()=>{let l=s();return r&&(l=n?s(r).tz(n):s(r)),l.format("YYYY-MM-DD[T]HH:mm")},[r,n]),D=l=>{const T=n?s(l).tz(n).format("YYYY-MM-DD HH:mm:00"):s(l).format("YYYY-MM-DD HH:mm:00");i(new Date(T))};return a.jsx(A,{dateAdapter:y,children:a.jsxs(Y,{fullWidth:!0,error:m,children:[a.jsx(C,{label:t,minDateTime:f,value:s(p),onChange:D,slotProps:{textField:{error:m,helperText:m?u:""}},format:"YYYY-MM-DD HH:mm"}),u&&a.jsx(w,{children:u})]})})}x.propTypes={value:e.oneOfType([e.string,e.instanceOf(Date)]),onChange:e.func.isRequired,error:e.bool,helperText:e.string,label:e.string,timezone:e.string};x.defaultProps={value:null,error:!1,helperText:"",label:"",timezone:""};function E(r){return a.jsx(M,{...r,width:20,height:20})}const c={MINUTES_30:30*60*1e3,HOUR_1:60*60*1e3,HOURS_3:3*60*60*1e3,DAY_1:24*60*60*1e3,DAYS_7:7*24*60*60*1e3,DAYS_30:30*24*60*60*1e3};function b({placeholder:r,value:i,onChange:m,timezone:u}){const{t}=H(),[n,f]=h.useState(i||""),[p,D]=h.useState(null),l=h.useMemo(()=>[{value:new Date(Date.now()+c.MINUTES_30),label:`30 ${t("common.minutes")}`},{value:new Date(Date.now()+c.HOUR_1),label:`1 ${t("common.hour")}`},{value:new Date(Date.now()+c.HOURS_3),label:`3 ${t("common.hours")}`},{value:new Date(Date.now()+c.DAY_1),label:`1 ${t("common.day")}`},{value:new Date(Date.now()+c.DAYS_7),label:`7 ${t("common.days")}`},{value:new Date(Date.now()+c.DAYS_30),label:`30 ${t("common.days")}`},{value:"custom",label:t("common.custom")}],[t]),T=o=>{if(f(o),o==="custom"){const d=s().toDate();D(d),m(d)}else m(o)},g=o=>{D(o),m(o)};return h.useEffect(()=>{i&&(l.find(d=>s(d.value).isSame(i))||(f("custom"),D(i)))},[]),a.jsxs(a.Fragment,{children:[a.jsx(Y,{fullWidth:!0,children:a.jsx(S,{select:!0,value:n,label:r||t("team.passport.passportExpireTime"),onChange:o=>T(o.target.value),variant:"outlined",SelectProps:{IconComponent:E},children:l.map(o=>a.jsx(j,{value:o.value,children:o.label},o.value))})}),n==="custom"&&a.jsx(v,{children:a.jsx(x,{value:p,onChange:g,label:t("team.passport.customExpireTime"),timezone:u,error:!p,helperText:p?void 0:t("team.passport.customExpireTime")})})]})}b.propTypes={value:e.oneOfType([e.string,e.instanceOf(Date)]),onChange:e.func.isRequired,timezone:e.string,placeholder:e.string};b.defaultProps={value:"",timezone:"",placeholder:""};export{b as T};
@@ -0,0 +1 @@
1
+ import{r as P,b as J,g as W}from"./vendor-react-DoD83n6N.js";import{H as x,j as i,ao as B,s as _,w as ee,aa as U,T as w,y as te}from"./vendor-mui-core-DiDsSLd-.js";import{f as E,u as H}from"./vendor-hooks-jg6xPUPF.js";import{p as ne,o as v,h as se}from"./vendor-ux-did-connect-BKeZkgZt.js";import{z as O,x as re,y as z}from"./vendor-utils-DMClavLd.js";const Be=e=>{if(!e||!e.length)return[];const t=[];let o=null,s=[];if(e.forEach(n=>{var y,f,p,h;if(!n.activity||!n.activity.type||!o){o&&(s.length===1?t.push(s[0]):(o.items=s,t.push(o))),n.activity&&n.activity.type?(o=n,s=[n]):(t.push(n),o=null,s=[]);return}const r=s[0].activity,a=r.type,c=(y=r.target)==null?void 0:y.type,l=(f=r.target)==null?void 0:f.id,u=n.activity.type,d=(p=n.activity.target)==null?void 0:p.type,g=(h=n.activity.target)==null?void 0:h.id;if(a&&u&&a===u&&(!r.target&&!n.activity.target||r.target&&n.activity.target&&c===d&&l===g))s.push(n);else{if(s.length===1)t.push(s[0]);else{const T=Object.assign({},o,{items:s});t.push(T)}o=n,s=[n]}}),o)if(s.length===1)t.push(s[0]);else{const n=Object.assign({},o,{items:s});t.push(n)}return t},oe=e=>!O(e.activity)&&!!e.activity.type&&!!e.activity.actor,ze=e=>oe(e)&&!!e.actorInfo&&!!e.actorInfo.did,ie=e=>{if(!e)return null;const{meta:t,target:o}=e;return{metaLink:t==null?void 0:t.id,targetLink:o==null?void 0:o.id}},S={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign"},ae={[S.COMMENT]:(e,t)=>t>1?i.jsxs(i.Fragment,{children:["left ",t," comments on your ",e]}):i.jsxs(i.Fragment,{children:["commented on your ",e]}),[S.LIKE]:e=>i.jsxs(i.Fragment,{children:["liked your ",e]}),[S.FOLLOW]:()=>i.jsx(i.Fragment,{children:"followed you"}),[S.TIPS]:e=>i.jsxs(i.Fragment,{children:["gave tips to your ",e]}),[S.MENTION]:e=>i.jsxs(i.Fragment,{children:["mentioned you in ",e]}),[S.ASSIGN]:()=>i.jsx(i.Fragment,{children:"assigned you a task"})},b=P.memo(function({user:t,color:o=v.textBase}){const s=re(z(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return i.jsx(B,{href:s,color:o,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});b.propTypes={user:x.shape({did:x.string.isRequired,fullName:x.string.isRequired}).isRequired,color:x.string};b.displayName="UserLink";function $e({activity:e,users:t,actors:o,extra:s={},mountPoint:n=""}){const{type:r,target:a}=e||{},{type:c}=a||{},{linkColor:l=v.textBase}=s||{},u=E(()=>{if(!Array.isArray(t))return new Map;const p=new Map;return t.forEach(h=>{h!=null&&h.did&&!p.has(h.did)&&p.set(h.did,h)}),p},[t]),d=E(()=>Array.isArray(o)?o.map(p=>p?u.get(p)||{did:p,fullName:"System"}:null):[],[o,u]),g=H(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return i.jsx(b,{user:d[0],color:l});const p=d.slice(0,-1),h=d[d.length-1];if(d.length===2)return i.jsxs(i.Fragment,{children:[i.jsx(b,{user:p[0],color:l})," and ",i.jsx(b,{user:h,color:l})]});const T=d.length>3,F=T?d.slice(0,2):p;return i.jsxs(i.Fragment,{children:[F.map((I,Z)=>i.jsxs(J.Fragment,{children:[i.jsx(b,{user:I,color:l}),Z<F.length-1?", ":""]},I.did)),T?`, and ${d.length-2} others`:i.jsxs(i.Fragment,{children:[", and ",i.jsx(b,{user:h,color:l})]})]})}),m=H(()=>{const p=ae[r];return p?p(c,t.length):null}),y=E(()=>{const p=g(),h=m();return!p||!h?null:i.jsxs(i.Fragment,{children:[p," ",h]})},[r,c,d,g,m]),f=E(()=>{if(!e)return null;const p=ie(e);return p!=null&&p.targetLink?z(n,p.targetLink):null},[e,n]);return!r||O(a)?null:i.jsxs(i.Fragment,{children:[y," ",i.jsx(B,{href:f,color:v.primaryBase,target:"_blank",sx:{textDecoration:"none"},onClick:p=>{p.customPreventRedirect=!0},children:a.name})]})}const le={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};$.propTypes={meta:x.object.isRequired};const ce=_(ee)(({theme:e})=>({maxWidth:320,display:"flex",flexDirection:"column",gap:e.spacing(1.5),padding:e.spacing(2),marginTop:e.spacing(1),borderRadius:e.spacing(1),border:`1px solid ${v.dividerColor}`,boxShadow:"none"})),de=_(U)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),pe=_(U)({display:"flex",justifyContent:"space-between",alignItems:"center"});function $({meta:e}){const{amount:t,symbol:o,chainId:s}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${s}`,"_blank")};return i.jsxs(ce,{children:[i.jsxs(de,{children:[i.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),i.jsx(w,{variant:"h5",color:v.textBase,children:"ArcBlock"})]}),i.jsxs(pe,{children:[i.jsxs(U,{display:"flex",alignItems:"baseline",gap:1,children:[i.jsxs(w,{component:"span",variant:"h5",color:v.textBase,fontWeight:"bold",children:["+ ",t]}),i.jsx(w,{component:"span",variant:"subtitle2",color:v.textSubtitle,children:o})]}),i.jsx(te,{variant:"outlined",size:"small",color:"secondary",endIcon:i.jsx(se,{icon:le}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}q.propTypes={meta:x.object.isRequired,type:x.string.isRequired,hideTips:x.bool,sx:x.object};q.defaultProps={hideTips:!1,sx:{}};function q({meta:e,type:t,hideTips:o=!1,sx:s}){return O(e)?null:t==="tips"&&!o?i.jsx($,{meta:e}):i.jsx(w,{variant:"subtitle2",fontSize:16,component:"p",sx:s,color:v.textSubtitle,children:e.content})}var ue=P;function he(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var M=he(ue);function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])}return e},j.apply(this,arguments)}function fe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C(e,t)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},C(e,t)}function me(e,t){if(e==null)return{};var o={},s=Object.keys(e),n,r;for(r=0;r<s.length;r++)n=s[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var A={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},ge=["box-sizing","width","font-size","font-weight","font-family","font-style","letter-spacing","text-indent","white-space","word-break","overflow-wrap","padding-left","padding-right"];function ye(e,t){if(!e||typeof e!="object")return e;var o={};return Object.keys(e).forEach(function(s){t.indexOf(s)>-1||(o[s]=e[s])}),o}var xe=["component","className","unsafeHTML"];function V(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var o=document.createDocumentFragment(),s;switch(t){case"words":s=e.textContent.split(/\b|(?=\W)/);break;case"letters":s=Array.from(e.textContent);break}s.forEach(function(c){o.appendChild(ve(c))}),e.parentNode.replaceChild(o,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),r=n.length,a=0;a<r;a++)V(n[a],t)}function ve(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function R(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function G(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);G(e.parentNode,t)}}function be(e){for(var t=e;t=t.parentNode;)if(/p|div|main|section|h\d|ul|ol|li/.test(t.tagName.toLowerCase()))return t}function N(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var K={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},Se=Object.keys(K),Y=function(e){fe(t,e);function t(s){var n;return n=e.call(this,s)||this,n.state={html:s.unsafeHTML,clamped:!1},n.canvas=null,n.maxLine=0,n.nlUnits=[],n}var o=t.prototype;return o.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},o.componentDidUpdate=function(n){n.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==n&&this.reflow(this.props)},o.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},o.setState=function(n,r){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,r)},o.initCanvas=function(){if(!this.canvas){var n=this.canvas=document.createElement("div");n.className="LinesEllipsis-canvas "+this.props.className,n.setAttribute("aria-hidden","true"),this.copyStyleToCanvas(),Object.keys(A).forEach(function(r){n.style[r]=A[r]}),document.body.appendChild(n)}},o.copyStyleToCanvas=function(){var n=this,r=window.getComputedStyle(this.target);ge.forEach(function(a){n.canvas.style[a]=r[a]})},o.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var r=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");V(this.canvas,r);var a=this.putEllipsis(this.calcIndexes()),c={clamped:a,html:this.canvas.innerHTML};this.setState(c,n.onReflow.bind(this,c))},o.calcIndexes=function(){var n=[0],r=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),a=r.length;if(!r.length)return n;var c=r.find(N);if(!c)return n;for(var l=1,u=c.offsetTop,d=1;d<a&&!(N(r[d])&&r[d].offsetTop-u>1&&(l++,n.push(d),u=r[d].offsetTop,l>this.maxLine));d++);return n},o.putEllipsis=function(n){if(n.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,n[this.maxLine]);var r=this.nlUnits.pop(),a=this.makeEllipsisSpan();do G(r,this.canvas),be(r).appendChild(a),r=this.nlUnits.pop();while(r&&(!N(r)||a.offsetHeight>r.offsetHeight||a.offsetTop>r.offsetTop));return r&&R(r),this.nlUnits.forEach(R),!0},o.makeEllipsisSpan=function(){var n=this.props,r=n.ellipsisHTML,a=n.ellipsis,c=document.createElement("span");c.appendChild(document.createElement("wbr"));var l=document.createElement("span");return l.className="LinesEllipsis-ellipsis",r?l.innerHTML=r:l.textContent=a,c.appendChild(l),c},o.isClamped=function(){return this.clamped},o.render=function(){var n=this,r=this.state,a=r.html,c=r.clamped,l=this.props,u=l.component,d=l.className,g=l.unsafeHTML,m=me(l,xe);return M.default.createElement(u,j({className:"LinesEllipsis "+(c?"LinesEllipsis--clamped":"")+" "+d,ref:function(f){return n.target=f}},ye(m,Se)),M.default.createElement("div",{dangerouslySetInnerHTML:{__html:c?a:g}}))},t}(M.default.Component);Y.defaultProps=K;var Le=Y;const qe=W(Le),Te=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Ee=e=>{try{return new URL(e).host}catch{return e}};var Ve={getChainHost:Te,getUrlHost:Ee},Ge={linkStyle:{color:"#2754C5",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"14px",textDecoration:"underline"},actionsStyle:{margin:"20px -8px 0px"},actionStyle:{color:"#4598fa",fontSize:14,border:"1px solid #4598fa",display:"inline-block",borderRadius:"4px",margin:"8px",marginTop:"8px",marginBottom:"8px",marginLeft:"8px",marginRight:"8px"},assetStyle:{backgroundColor:"#f6f6f6",borderRadius:"8px",padding:"8px"},remarkStyle:{color:"#9397a1",fontSize:"12px",margin:0,whiteSpace:"pre-line!important"},summaryStyle:{color:"#49c3ad",fontWeight:700},titleStyle:{marginBottom:"6px"},severityColorMap:{normal:"#C4C5CA",success:"#25C99B",error:"#F16E6E",warning:"#DE9E37"},attachmentsStyle:{borderLeft:"2px solid transparent",paddingLeft:"20px"},h1Style:{color:"#333",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"24px",fontWeight:"bold",margin:"40px 0",padding:"0"},footerStyle:{color:"#898989",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"12px",lineHeight:"22px",margin:0}},we={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},Me={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const k=new Map,Ne=(e,t)=>{k.set(e,t)},je=(e="en_US")=>k.get(e)||k.get("en_US");var X={registerLang:Ne,getLang:je},Ce=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const ke=Ce,{getLang:L}=X,_e=(e,t)=>t===1?e:`${e}s`,Ue=1e-7;var Oe=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const o=L(t.locale),s=[],n=(c,l)=>{const u=Math.floor(c*10**l+Ue);return(Math.round(u)/10**l).toFixed(l)},r=(c,l,u)=>{if((s.length===0||!t.colonNotation)&&c===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=o[l]||L("en_US")[l],{short:g}=o[l]||L("en_US")[l];let m=(u||c||"0").toString(),y,f;if(t.colonNotation){y=s.length>0?":":"",f="";const p=m.includes(".")?m.split(".")[0].length:m.length,h=s.length>0?2:1;m="0".repeat(Math.max(0,h-p))+m}else y="",t.locale==="zh_CN"?Object.values(a).filter(p=>p>0).length>1?!a.days&&!a.hours&&a.minutes&&t.compact?f=d:f=g:a.minutes?f=d:f=g:f=t.verbose?` ${_e(d,c)}`:g;s.push(y+m+f)},a=ke(e);if(r(Math.trunc(a.days/365),"year"),r(a.days%365,"day"),r(a.hours,"hour"),r(a.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(r(a.seconds,"second"),t.formatSubMilliseconds)r(a.milliseconds,"millisecond"),r(a.microseconds,"microsecond"),r(a.nanoseconds,"nanosecond");else{const c=a.milliseconds+a.microseconds/1e3+a.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=c>=1?Math.round(c):Math.ceil(c),d=l?c.toFixed(l):u;r(Number.parseFloat(d,10),"millisecond",d)}else{const c=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=n(c,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");r(Number.parseFloat(d,10),"second",d)}if(s.length===0){const c=(o.millisecond||L("en_US").millisecond).long,l=(o.millisecond||L("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${c}`:l}`:`0${t.verbose?` ${c}s`:l}`}if(t.compact)return s[0];if(typeof t.unitCount=="number"){const c=t.colonNotation?"":" ";return s.slice(0,Math.max(t.unitCount,1)).join(c)}return t.colonNotation?s.join(""):s.join(" ")};const De=we,Fe=Me,{registerLang:D}=X,Q=Oe;D("en_US",De);D("zh_CN",Fe);Q.registerLang=D;var Ie=Q;const Ke=W(Ie);export{qe as H,q as M,ze as a,Ve as c,le as d,ie as g,oe as i,Be as m,Ke as p,Ge as s,$e as u};
@@ -0,0 +1,113 @@
1
+ import{r as b}from"./vendor-react-DoD83n6N.js";import{j as e,H as d,a8 as Pe,ab as yt,T as Q,aa as C,E as Fe,bo as _e,ce as et,bN as Te,bs as Re,bO as Ie,y as Se,b3 as Ee,a9 as tt,ag as ce,a1 as st,bg as Xe,br as jt,bn as vt,q as Je,bV as St}from"./vendor-mui-core-DiDsSLd-.js";import{c as ie,av as ue,A as Ct}from"./vendor-utils-DMClavLd.js";import{Y as J,p as P,b4 as Nt,r as ke,f as wt,u as te,bM as Tt,X as nt,B as Ae,a5 as at,al as Rt,ar as It,br as Et}from"./vendor-ux-did-connect-BKeZkgZt.js";import{z as At,t as V,l as Dt,G as Qe}from"./index-CagPo5v-.js";import{f as ee,a as De}from"./vendor-hooks-jg6xPUPF.js";import{S as he}from"./shorten-label-8jfEkawx.js";import{I as it}from"./index-DpPN2Hn-.js";import{A as Ot,S as Lt,a as Pt,b as Ft,B as _t}from"./list-Dc8Jfe8L.js";import{R as Be}from"./relative-time-BTIpMkPf.js";import{b as ze}from"./dashboard-CP2P7oxj.js";import{W as kt}from"./did-address-CQl19Nvh.js";import{p as ot}from"./util-BUnBptcm.js";import{D as Bt,g as zt}from"./traffic-DBgXOCbQ.js";import{i as Wt,a as Mt}from"./index-DPgbycNO.js";import{B as rt}from"./bundle-avatar-nPtHnMPN.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-CBc_0mJh.js";import"./index-B0Z8409R.js";import"./use-app-logo-DoDXvoIT.js";import"./InfoOutlined-Cxodw3Dd.js";import"./sdk-Bt5s8-As.js";import"./CheckCircle-DKW0gPt9.js";import"./index-BwaE3jmF.js";import"./Location-C_mUMqZP.js";import"./Email-BWTg6iJI.js";import"./Timezone-5RxC7sK-.js";import"./useLocalStorage-CkST2tLi.js";import"./confirm-DVW7YBsC.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-sN_fSbsI.js";import"./get-safe-url-B_RF0YU0.js";import"./session-CW6CHHdW.js";import"./dot-BBxUn__M.js";import"./useAsync-B_98ShEr.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-T-9_nK_m.js";import"./base32-CWI-u9nV.js";import"./iframe-4UgdZZC1.js";import"./LaunchOutlined--YSktZgX.js";import"./ChevronLeft-f4mXxiqC.js";import"./ChevronRight-I8lL2o6m.js";import"./index-CgtY16Wm.js";import"./vendor-mui-x-mVhD3N7n.js";import"./AdapterDayjs-DBd25Gc9.js";const lt=b.createContext({}),{Provider:qt,Consumer:fn}=lt;function Kt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=At(),[a,x]=b.useState([]),[u,T]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),m=ee(()=>{var h;return(h=s.meta)==null?void 0:h.did},[s]),[v,S]=b.useState([]),[I,M]=b.useState({}),E=ee(()=>a.length?new Set(a.map(h=>h.id)):new Set,[a]),L=async({page:h=1,pageSize:O=20,...D}={})=>{if(!m)return[];try{const F={paging:{page:h,pageSize:O},...D,teamDid:m,dateRange:D.dateRange?[V(D.dateRange[0]).toISOString(),V(D.dateRange[1]).toISOString()]:void 0},{dids:B,...q}=F;let Z="";B&&B.includes("system")&&(Z="system");const z=B?B.filter(f=>f!=="system"):[],oe={...q,source:Z,componentDids:z},se=await n.getNotificationSendLog({input:oe});return M(oe),x(se.list),T(se.paging),se.list}catch(F){return J.error(F.message),[]}},A=async()=>{const h=await n.getNotificationComponents({input:{teamDid:m}});S(h.componentDids)},G=b.useCallback(h=>{const O=s.children.find(D=>{var F;return((F=D.meta)==null?void 0:F.did)===h});if(O)return O.ancestors=[s],O},[s]),H=async({notificationId:h,receivers:O,channels:D,...F})=>{await n.resendNotification({input:{teamDid:m,notificationId:h,receivers:O,channels:D.map(B=>B==="wallet"?P.NOTIFICATION_SEND_CHANNEL.WALLET:B==="pushKit"?P.NOTIFICATION_SEND_CHANNEL.PUSH:B),...F}})},U=b.useCallback(async h=>(await n.getUser({input:{teamDid:m,user:{did:h}}})).user,[n,m]),N=b.useCallback(async({page:h=1,pageSize:O=20,...D}={})=>{try{const F={paging:{page:h,pageSize:O},...D,userName:D.searchText||"",teamDid:m,dateRange:D.dateRange?[V(D.dateRange[0]).toISOString(),V(D.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:F})}catch(F){throw J.error(F.message),F}},[n,m]);b.useEffect(()=>{m&&A()},[m]),o(P.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{E.has(h.notificationId)&&L(I)},[E,I]),o(P.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{E.has(h.id)||L(I)},[E,I]);const k={fetch:L,data:a,paging:u,blocklet:s,getComponent:G,resendNotification:H,getUser:U,componentDids:v,getReceivers:N,inService:r,teamDid:m};return e.jsx(qt,{value:{notificationRecords:k},children:t})}function We(){const{notificationRecords:t}=b.useContext(lt);return t}const ye={common:{black:"#000",white:"#fff"},primary:{main:"#3773F2",contrastText:"#fff"},secondary:{main:"#16CED1",contrastText:"#fff"},error:{main:"#F16E6E",contrastText:"#fff"},warning:{main:"#DE9E37",contrastText:"#fff"},info:{main:"#0775F8",contrastText:"#fff"},success:{main:"#34BE74",contrastText:"#fff"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{default:"#fff"},did:{primary:"#4598FA",secondary:"#49C3AD"}};ge.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Ht={info:"primary",success:"success",error:"error",warning:"warning"};function ge({severity:t="info"}){return e.jsx(Nt,{type:Ht[t],children:t})}var Me={},Ut=Pe;Object.defineProperty(Me,"__esModule",{value:!0});var ct=Me.default=void 0,$t=Ut(ke()),Vt=e;ct=Me.default=(0,$t.default)((0,Vt.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={},Gt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var dt=qe.default=void 0,Yt=Gt(ke()),Xt=e;dt=qe.default=(0,Yt.default)((0,Xt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var Ke={},Jt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var ut=Ke.default=void 0,Qt=Jt(ke()),Zt=e;ut=Ke.default=(0,Qt.default)((0,Zt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const es=(t,s,n="")=>{if(!n||!s)return"";switch(n){case P.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case P.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function pt(t,s,n={}){const{status:r,updatedAt:o,reason:a="",channel:x="wallet"}=n,u=o?t("notification.sendStatus.sentTime",{date:Dt(o,s)}):"",T=es(t,x,a);return r===P.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===P.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],Ze=["info","success","error","warning"],ft=t=>{var n,r;const{settings:s}=t;return(r=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:r.enabled},mt=t=>{var n,r;const{settings:s}=t;return(r=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:r.enabled},ts=(t,s)=>{const n=ie(s,"extra.notifications.email",!0);return{available:ft(t),enabled:n}},ss=(t,s)=>{const n=ie(s,"extra.notifications.push",!0);return{available:mt(t),enabled:n}},ns=t=>({enabled:ie(t,"extra.notifications.wallet",!0)}),as=t=>({enabled:ie(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),is=(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})}]:[],be=(t=[])=>{const s=V().startOf("day");return t.filter(n=>V(n.sendAt).isSame(s,"day")).length},os=(t,s="")=>{if(s&&Le.includes(s)){const a=`${s}SendRecord`,x=ie(t,a,[]);return be(x)}const n=ie(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const a=n[s]??[];return be(a)}const o={};return Le.forEach(a=>{const x=`${a}SendRecord`,u=ie(t,x,[]),T=be(u);o[a]=T}),r.length>0&&r.forEach(a=>{const x=n[a]??[],u=be(x);o[a]=u}),o},je=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},rs=t=>{switch(t){case P.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case P.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case P.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case P.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>wt({typography:{fontSize:14,button:{textTransform:"none"}},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 ne({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r}){const{status:o,title:a="",sentTime:x="",reason:u=""}=t,T=[a,u].filter(Boolean).join(", ");return e.jsx(yt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Q,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(C,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[o],style:{opacity:.15}}),e.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[o]})]}),e.jsx(Q,{color:"inherit",sx:{fontSize:12},children:n?a:r})]})})}ne.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ne.defaultProps={enableTooltip:!0,showTitle:!1,children:null};pe.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};pe.defaultProps={onDelete:()=>{}};function pe({list:t,label:s,onDelete:n}){const{t:r,locale:o}=te();return e.jsxs(C,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Q,{children:[s,": "]}),t.map(a=>{const x=pt(r,o,{status:a});return e.jsx(Fe,{size:"small",label:e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ne,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,a)},a)})]})}He.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function He({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:a,renderLabel:x}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:a}),e.jsx(Te,{row:!0,children:o.map(u=>e.jsx(Re,{control:e.jsx(Ie,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const m=[...t];T.target.checked?m[n]=[...m[n],u.value??u]:m[n]=m[n].filter(v=>v!==(u.value??u)),s(m[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function we(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(ne,{enableTooltip:!1,config:{status:s.status},children:s.label})})}de.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function de({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:o}){const{t:a,locale:x}=te(),u=pt(a,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ne,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(Se,{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:o,children:a("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:s}){const{locale:n}=te(),r=V().toDate(),[o,a]=b.useState(null),x=b.useCallback(m=>{a(o?null:m.currentTarget)},[o]),u=!!o,T=b.useCallback(m=>{if(!m.startDate||!m.endDate){J.error("Please select a date range");return}if(V(m.startDate).isAfter(m.endDate)||!V(m.startDate).isValid()||!V(m.endDate).isValid()){J.error("Invalid date range");return}s([m.startDate,m.endDate]),a(null)},[s]);return e.jsxs("div",{children:[e.jsx(Q,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(Se,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],n)," - ",Qe(t[1],n)]})}),e.jsx(Ee,{open:u,anchorEl:o,onClose:()=>{a(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Bt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:zt(r),onChange:T})})]})}$e.propTypes={itemComponent:d.elementType.isRequired};function $e({itemComponent:t,...s}){var o;const{t:n}=te();return!((o=s==null?void 0:s.filterList)!=null&&o.filter(a=>a.length).length)?null:e.jsxs(C,{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(Tt.TableFilterList,{...s,ItemComponent:t})})]})}function Ce({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let a=!0;return n&&typeof n=="function"&&(a=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...o&&a?{onDelete:o}:{}})}Ce.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Ce.defaultProps={canDelete:()=>!0};const ls=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Ve.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ve.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ve({loading:t=!1,onCancel:s,onConfirm:n}){const{t:r}=te(),[o,a]=b.useState(ls),[x,u]=b.useState(!0),T=(v,S)=>{S.checked=v.target.checked;const I=o.map(M=>({...M,checked:M.value===S.value?S.checked:M.checked}));a(I)},m=v=>{v.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Q,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(v=>e.jsx(Re,{control:e.jsx(Ie,{checked:v.checked,onChange:S=>T(S,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Re,{control:e.jsx(Ie,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(Se,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Se,{onClick:m,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),r("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:o}=te(),{getReceivers:a,inService:x,teamDid:u,getUser:T,blocklet:m}=We(),[v,S]=b.useState(!1),[I,M]=b.useState([]),E=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[A,G]=b.useState(null),[H,U]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[N,k]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[V().subtract(1,"month").startOf("day").toDate(),V().endOf("day").toDate()]}),[h,O]=b.useState([]),D=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],F=async()=>{if(!v&&t)try{S(!0);const i=await a({notificationId:t,...N}),l=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,u,x)}}));M(l),U(i.paging),S(!1)}catch(i){J.error(i.message),S(!1)}};b.useEffect(()=>{F()},[N]);const B=i=>{i.stopPropagation();const l=i.currentTarget;L.anchorEl=l;const c=l.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},q=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,Z={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:H.page-1,rowsPerPage:H.pageSize,count:H.total,searchText:N.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:h,onRowSelectionChange:(i,l)=>{O(l.map(c=>c.dataIndex))},customToolbarSelect:q},z=({page:i,rowsPerPage:l,searchText:c,filterList:j})=>{const[,_=[],$=[],K=[]]=j;N.pageSize!==l?k(W=>({...W,pageSize:l,page:1})):N.page!==i+1?k(W=>({...W,page:i+1})):N.searchText!==c?k(W=>({...W,searchText:c,page:1})):ue(_,N.walletSendStatus)?ue($,N.pushKitSendStatus)?ue(K,N.emailSendStatus)||k(W=>({...W,emailSendStatus:K,page:1})):k(W=>({...W,pushKitSendStatus:$,page:1})):k(W=>({...W,walletSendStatus:_,page:1}))},oe=b.useCallback(async(i,l)=>{if(!l)return!1;const c=await T(l);return c?i==="wallet"?ns(c):i==="email"?ts(m,c):i==="pushKit"?ss(m,c):i==="webhook"?as(c):!0:!1},[T,m]),se=b.useCallback(i=>is(r,i),[r]),f=()=>{E.anchorEl=null,E.position=null,G(null)},p=()=>{L.anchorEl=null,L.position=null},g=async(i,l,c=!0,j="")=>{if(!(!l.length||!i.length))try{s(i,l,c,j),L.anchorEl||(await xe(.5),f())}catch(_){console.error("handleResend error",{error:_})}},y=async({channels:i,isResendFailedOnly:l})=>{const c=h.map(j=>I[j].receiver);await g(i,c,l),await xe(.5),p(),O([])},R=async(i,l=[],c=!0)=>{try{await g(["webhook"],[i.receiver],c,l)}catch(j){J.error(j.response?j.response.statusText:j.message)}},w=async(i,l,c,j=[],_=!0)=>{if(i.stopPropagation(),os(l,c)>=4){J.warning(r("notification.resendLimit"));return}if(!Le.includes(c)){await R(l,j,_);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();E.anchorEl=K,E.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}G({channel:c});try{const K=await oe(c,l.receiver);await xe(1),G({channel:c,result:K}),(typeof K=="boolean"&&K||Ct(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[l.receiver],_),L.anchorEl||(await xe(.5),f()))}catch(K){J.error(K.message)}},Y=i=>{k(l=>({...l,dateRange:i,page:1}))},X=(i,l,c,j)=>{i.stopPropagation();const _=c.filter($=>$!==l);k($=>({...$,[j]:_,page:1}))},ae=ee(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:l,receiver:c}=I[i];return l?e.jsxs(C,{"data-cy":`member-name-${l.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(nt,{src:`${l.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(he,{children:l.fullName})]},c):e.jsx(kt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:N.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Wallet",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:D,fullWidth:!0,logic:ve,display:(i,l,c,j)=>e.jsx(we,{label:"Wallet",filterList:i,onChange:l,index:c,column:j,filterValues:D})},customBodyRenderLite:i=>{const{walletSendStatus:l,walletSendAt:c,walletSendFailedReason:j}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:j,channel:"wallet",onResend:_=>w(_,I[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:l,pushKitSendAt:c,pushKitSendFailedReason:j}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:j,channel:"pushkit",onResend:_=>w(_,I[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:N.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Push Kit",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:D,fullWidth:!0,logic:ve,display:(i,l,c,j)=>e.jsx(we,{label:"Push Kit",filterList:i,onChange:l,index:c,column:j,filterValues:D})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:l,emailSendAt:c,emailSendFailedReason:j}=I[i];return e.jsx(de,{status:l,updatedAt:c,reason:j,channel:"email",onResend:_=>w(_,I[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:N.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(pe,{list:i,label:"Email",onDelete:(l,c)=>{l.stopPropagation(),X(l,c,ae[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:D,fullWidth:!0,logic:ve,display:(i,l,c,j)=>e.jsx(we,{label:"Email",filterList:i,onChange:l,index:c,column:j,filterValues:D})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:l}=I[i];if(!l)return null;const c=Object.entries(l)[0];if(!c)return null;const[j,_]=c,$=_[0];return e.jsx(C,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(C,{className:"webhook-item",fontSize:12,children:[e.jsx(he,{maxLength:30,children:j},j),e.jsx(de,{status:$.status,updatedAt:$.sendAt,reason:$.failedReason,channel:"webhook",onResend:K=>w(K,I[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:l}=I[i];return e.jsx(Be,{value:l,locale:o,shouldUpdate:!0})}}}],[I,o,N,r]),Ye=[e.jsx(Ue,{value:N.dateRange,onChange:Y},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:v,startIcon:e.jsx(ut,{}),onClick:()=>F(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(ds,{children:e.jsxs(st,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:o,loading:v,columns:ae,data:I,onChange:z,options:Z,customButtons:Ye,components:{TableFilterList:i=>e.jsx($e,{...i,itemComponent:l=>e.jsx(Ce,{...l,canDelete:()=>!1})})}}),E.anchorEl&&e.jsx(Ee,{open:!!E.anchorEl,anchorReference:"anchorPosition",anchorPosition:E.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(us,{children:[e.jsxs(Q,{variant:"body1",component:"div",className:"check-title",children:[A==null?void 0:A.channel," Checking"]}),e.jsx(C,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:se(A==null?void 0:A.channel).map(i=>{var _,$;const{type:l,pass:c,fail:j}=i;return!(A!=null&&A.result)||(_=A==null?void 0:A.result)!=null&&_[l]?e.jsxs(Q,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:($=A==null?void 0:A.result)!=null&&$[l]?ye.success.main:"inherit"},children:[A!=null&&A.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},l):e.jsxs(Q,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:ye.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:j})]},l)})})]})}),L.anchorEl&&e.jsx(Ee,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ve,{loading:n,onCancel:p,onConfirm:y})})]})})})}const cs=b.memo(gt),ds=ce.div`
2
+ td.MuiTableCell-footer {
3
+ border: none !important;
4
+ }
5
+ .sent-status-cell {
6
+ .resend-btn {
7
+ display: none;
8
+ }
9
+ &:hover {
10
+ .resend-btn {
11
+ display: flex;
12
+ }
13
+ }
14
+ }
15
+ `,us=ce.div`
16
+ padding: 8px 16px;
17
+ .check-title {
18
+ font-weight: 500;
19
+ margin-bottom: 8px;
20
+ &::first-letter {
21
+ text-transform: uppercase;
22
+ }
23
+ }
24
+ .check-item {
25
+ svg {
26
+ font-size: 16px;
27
+ }
28
+ font-size: 12px;
29
+ }
30
+ `,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ps(t){const{wallet:s,push:n,email:r,webhook:o}=t;return[{name:"Wallet",value:e.jsx(re,{item:s})},{name:"Push",value:e.jsx(re,{item:n})},{name:"Email",value:e.jsx(re,{item:r})},...o.total>0?[{name:"Webhook",value:e.jsx(re,{item:o,isWebhook:!0})}]:[]]}function fs(t,s,n){const{wallet:r,push:o,email:a,webhook:x}=t;return[{name:"Wallet",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.PUSH,item:o,onResend:s})},{name:"Email",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.EMAIL,item:a,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(le,{loading:n,channel:P.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Ne.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};Ne.defaultProps={mode:"simple",onResend:()=>{},resending:!1};re.propTypes={item:d.object.isRequired,isWebhook:d.bool};re.defaultProps={isWebhook:!1};function re({item:t,isWebhook:s=!1}){const{t:n}=te(),r=s?t.success.length:t.success,o=t.total,a=r===o?"success":"failed";return e.jsx(C,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(C,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(ne,{config:{status:a},enableTooltip:!1,children:[fe(r)," / ",fe(o)," ",n("notification.sendStatus.success")]})})})}le.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};le.defaultProps={isWebhook:!1,channel:P.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function le({channel:t,item:s,isWebhook:n=!1,onResend:r,loading:o}){const{t:a}=te(),{success:x,failed:u,pending:T}=s,m=rs(t),v=n?x.length:x,S=n?u.length:u,I=n?T.length:T,M=async G=>{G.stopPropagation();const H=n?[...new Set([...x,...u].map(U=>U))]:[];await r([t],[],!0,H)},E=v+S,L=E>0?v/E*100:0,A=E>0?S/E*100:0;return e.jsxs(ms,{successRatio:L,failedRatio:A,children:[e.jsxs(Q,{variant:"h6",children:[m," (",s.total,")"]}),e.jsxs(Q,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Oe.success,fontWeight:600,fontSize:24},children:fe(v)}),e.jsx("small",{style:{paddingLeft:4},children:a("notification.sendStatus.success")})]}),e.jsxs(C,{className:"unsent-area",children:[e.jsxs(C,{children:[e.jsxs(ne,{config:{status:"failed"},enableTooltip:!1,children:[fe(S)," ",a("notification.sendStatus.failed")]}),e.jsxs(ne,{config:{status:"pending"},enableTooltip:!1,children:[fe(I)," ",a("notification.sendStatus.pending")]})]}),S>0&&e.jsx(C,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:o,variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:M,children:a("notification.resend")})})]})]})}function Ne({statistics:t,mode:s="simple",onResend:n,resending:r}){const o=ee(()=>s==="simple"?ps(t):fs(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:o.map(a=>e.jsx(it,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:a.name,children:a.value},a.name))}):e.jsx(Xe,{container:!0,spacing:2,children:o.map(a=>e.jsx(Xe,{item:!0,md:4,sm:6,xs:12,children:a.value},a.name))})}const ms=ce(C)`
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ padding: 16px;
35
+ border-radius: 8px;
36
+ background: ${({successRatio:t,failedRatio:s})=>t===0&&s===0?"#eff3fa":`linear-gradient(to right, #dafee7 ${t}%, #fef2f2 ${t}%)`};
37
+ transition: 'background 0.5s ease',
38
+ cursor: pointer;
39
+ .unsent-area {
40
+ width: 100%;
41
+ position: relative;
42
+ .resend-btn {
43
+ position: absolute;
44
+ right: 0;
45
+ bottom: 0;
46
+ }
47
+ }
48
+ `;xt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function xt({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:o,locale:a}=te(),{getComponent:x,resendNotification:u}=We(),[T,m]=b.useState(!1),v=ee(()=>x(t.componentDid)||n,[n,t.componentDid]),S=De({tab:r||"info"}),I=b.useCallback(async(h,O,D=!0,F=[])=>{var Z;if(!h.length||!t.id)return;const B=O.length>0?O:(Z=t==null?void 0:t.receivers)==null?void 0:Z.map(z=>z.receiver);if(!B.length)return;let q=[...h];if(q.includes(P.NOTIFICATION_SEND_CHANNEL.PUSH)&&!mt(n)&&(J.warning(o("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),q=q.filter(z=>z!==P.NOTIFICATION_SEND_CHANNEL.PUSH)),q.includes(P.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ft(n)&&(J.warning(o("notification.sendStatus.reason.unavailable",{channel:"Email"})),q=q.filter(z=>z!==P.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!q.length)try{m(!0),await u({notificationId:t.id,receivers:B,channels:q,resendFailedOnly:D,...q.includes("webhook")&&F.length?{webhookUrls:F}:{}}),J.success("Message has been sent!")}catch(z){console.error("handleResend error",{error:z}),J.error(z.response?z.response.statusText:z.message)}finally{m(!1)}},[n,t.id,t==null?void 0:t.receivers,u,o]),M=ee(()=>Wt(t),[t]),E=ee(()=>Mt(t),[t]),L=ee(()=>M?t==null?void 0:t.actorInfo:[],[t]),A=ee(()=>{var h;return(n==null?void 0:n.did)||((h=n==null?void 0:n.meta)==null?void 0:h.did)||""},[n]);function G(){return[{name:o("notification.from"),value:M&&E?e.jsx(Ot,{actors:L,teamDid:A,size:32,showName:!0}):e.jsx(Lt,{size:32,blocklet:v,showName:!0,hideDot:!0})},{name:o("notification.notificationTitle"),value:e.jsx(he,{maxLength:50,children:t.title})},{name:o("notification.body"),value:M?e.jsx(Pt,{notification:t,blocklet:n}):e.jsx(Ft,{notification:t,rows:0})},{name:o("notification.severity"),value:e.jsx(ge,{severity:t.severity})},{name:o("notification.createdAt"),value:e.jsx(Be,{value:t.createdAt,locale:a,shouldUpdate:!0})}].map(O=>e.jsx(it,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:O.name,children:O.value},O.name))}const H={info:{label:o("common.basicInfo"),value:"info",component:G},receivers:{label:o("notification.receiver"),value:"receivers"},statistics:{label:o("notification.statistics"),value:"statistics"}},U=Object.values(H).map(({label:h,value:O})=>({label:h,value:O})),N=H[S.tab]||H.info,k=h=>{S.tab=h};return e.jsx(Rt,{title:o("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{S.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(gs,{children:[e.jsx(C,{mx:3,className:"tabs",children:e.jsx(It,{tabs:U,current:S.tab,onChange:k,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[S.tab==="receivers"&&e.jsx(cs,{notificationId:t.id,resending:T,handleResend:I}),S.tab==="statistics"&&e.jsx(Ne,{statistics:t.statistics,mode:"detail",resending:T,onResend:I}),S.tab==="info"&&e.jsx(N.component,{})]})]})})}const hs=b.memo(xt),gs=ce.div`
49
+ & > .notification-row {
50
+ padding: 0;
51
+ }
52
+
53
+ .tabs {
54
+ margin: 0;
55
+ }
56
+ .body {
57
+ margin-top: 16px;
58
+ }
59
+
60
+ .channel-item {
61
+ display: flex;
62
+ padding: 4px;
63
+ justify-content: flex-start;
64
+ align-items: center;
65
+ gap: 8px;
66
+ > p {
67
+ font-size: 15px;
68
+ }
69
+ .resend-btn {
70
+ svg {
71
+ font-size: 16px;
72
+ }
73
+ display: flex;
74
+ align-items: center;
75
+ font-size: 12px;
76
+ cursor: pointer;
77
+ &.disabled {
78
+ cursor: not-allowed;
79
+ color: ${ye.text.disabled};
80
+ }
81
+ }
82
+ }
83
+ `;me.propTypes={blocklet:d.object,label:d.string};me.defaultProps={blocklet:null,label:""};const xs=ce.div`
84
+ display: flex;
85
+ justify-items: flex-start;
86
+ align-items: center;
87
+ gap: 8px;
88
+ .name {
89
+ display: block;
90
+ max-width: 260px;
91
+ white-space: nowrap;
92
+ overflow: hidden;
93
+ text-overflow: ellipsis;
94
+ }
95
+ `;function me({blocklet:t,label:s}){var n;return e.jsx(xs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(rt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||((n=t.meta)==null?void 0:n.title)})]}):e.jsx("span",{className:"name",children:s})})}Ge.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};Ge.defaultProps={onDelete:()=>{}};function Ge({list:t,label:s,onDelete:n}){return e.jsxs(C,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(Q,{children:[s,": "]}),t.map(r=>e.jsx(Fe,{size:"small",label:e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ge,{severity:r})}),onDelete:o=>n(o,r)},r))]})}function bs(t){return e.jsx(He,{...t,renderLabel:s=>e.jsx(ge,{severity:s})})}function ys({customTableButtons:t}){var se;const{t:s,locale:n}=te(),[r,o]=b.useState(!1),{data:a,paging:x,blocklet:u,fetch:T,getComponent:m,componentDids:v,inService:S,teamDid:I}=We(),M=b.useRef(null),[E,L]=b.useState(null),[A,G]=b.useState("info"),H=`notification-records-${(se=u.meta)==null?void 0:se.did}`,U=Et(H),[N,k]=b.useState({pageSize:U.rowsPerPage||10,page:U.page?U.page+1:1,dids:U.dids||[],dateRange:U.dateRange||[V().subtract(1,"month").startOf("day").toDate(),V().endOf("day").toDate()]}),h=ee(()=>{if(!u.children||!u.children.length)return[];const f=[];return u.children.forEach(p=>{var y;const g=p.did||((y=p.meta)==null?void 0:y.did);v.includes(g)&&(p.ancestors=[u],f.push(p))}),f},[v,u]),O=b.useCallback(async()=>{try{o(!0),await T(N),o(!1)}finally{o(!1)}},[T,N]);b.useEffect(()=>{O()},[]),b.useEffect(()=>{const f=a.find(p=>p.id===(E==null?void 0:E.id));E&&f&&L({...f})},[a,E]);const D=(f,p,g,y)=>{f.stopPropagation();const R=g.filter(w=>w!==p);k(w=>({...w,[y]:R,page:1}))},F=({page:f,rowsPerPage:p,filterList:g})=>{const[y=[],,,,R=[]]=g;N.pageSize!==p?k(w=>({...w,pageSize:p,page:1})):N.page!==f+1?k(w=>({...w,page:f+1})):ue(N.dids,y)?ue(N.severities,R)||k(w=>({...w,severities:R,page:1})):k(w=>({...w,dids:y,page:1}))},B=b.useCallback(()=>{L(null),G("info")},[]),q=b.useCallback(()=>{T(N)},[T,N]),Z=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((p,g)=>{var R;if(p==="system")return e.jsx("span",{children:s("notification.system")},`system-${g}`);const y=h.find(w=>{var X;return(w.did||((X=w.meta)==null?void 0:X.did))===p});return e.jsx(me,{blocklet:y,label:(y==null?void 0:y.title)||((R=y==null?void 0:y.meta)==null?void 0:R.title)},p)}),update:(f,p,g)=>(f[g].splice(p,1),f)},filterOptions:{names:h,logic:(f,p)=>p.length?!p.includes(f):!1,display:(f,p,g,y)=>e.jsxs(_e,{style:{width:"380px"},children:[e.jsx(jt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(vt,{multiple:!0,value:f[g],renderValue:R=>e.jsx(C,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:R.map(w=>{var X;if(w==="system")return e.jsx("span",{children:s("notification.system")},w);const Y=h.find(ae=>{var i;return(ae.did||((i=ae.meta)==null?void 0:i.did))===w});return e.jsx(me,{blocklet:Y,label:(Y==null?void 0:Y.title)||((X=Y==null?void 0:Y.meta)==null?void 0:X.title)},w)})}),onChange:R=>{f[g]=R.target.value,p(f[g],g,y)},children:[e.jsx(Je,{value:"system",children:s("notification.system")}),h.map(R=>{var Y,X;const w=R.did||((Y=R.meta)==null?void 0:Y.did);return e.jsx(Je,{value:w,children:e.jsx(me,{blocklet:R,label:R.title||((X=R.meta)==null?void 0:X.title)})},w)})]})]})},customBodyRenderLite:f=>{var y,R;const p=a[f],g=m(p.componentDid);return e.jsxs(C,{display:"flex",alignItems:"center",gap:1,children:[g?e.jsx(rt,{size:32,blocklet:g,ancestors:g.ancestors??[]}):e.jsx(_t,{blocklet:u,size:32}),e.jsx(he,{maxLength:50,children:((y=g==null?void 0:g.meta)==null?void 0:y.title)||((R=u==null?void 0:u.meta)==null?void 0:R.title)})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const p=a[f],{receivers:g}=p;return e.jsx(St,{total:g.length,renderSurplus:y=>y<100?e.jsxs("span",{children:["+",y]}):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:y=>{y.stopPropagation(),L(p),G("receivers")},children:g.map(y=>{const{receiverUser:R}=y,w=ot(R.avatar,I,S);return e.jsx(nt,{alt:R.fullName,src:`${w}?imageFilter=resize&w=48&h=48`,size:32,did:y.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},y.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const p=a[f];return e.jsx(C,{onClick:g=>{g.stopPropagation(),L(p),G("statistics")},children:e.jsx(Ne,{statistics:p.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const p=a[f];return e.jsx(he,{maxLength:50,children:p.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const p=a[f];return e.jsx(ge,{severity:p.severity})},filter:!0,filterType:"custom",filterList:N.severities??[],customFilterListOptions:{render:f=>e.jsx(Ge,{list:f,label:s("notification.severity"),onDelete:(p,g)=>{p.stopPropagation(),D(p,g,Z[4].options.filterList,"severities")}}),update:je},filterOptions:{names:Ze,fullWidth:!0,logic:ve,display:(f,p,g,y)=>e.jsx(bs,{label:s("notification.severity"),filterList:f,onChange:p,index:g,column:y,filterValues:Ze})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:p}=a[f];return e.jsx(Be,{value:p,locale:n,shouldUpdate:!0})}}}],z=f=>{k(p=>({...p,dateRange:f,page:1}))},oe=[...t||[]];return e.jsxs(C,{ref:M,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(js,{children:e.jsx(st,{theme:ht(),children:e.jsx(at,{className:"main-table",verticalKeyWidth:100,loading:r,locale:n,columns:Z,data:a,durable:H,onChange:F,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:x.page-1,rowsPerPage:x.pageSize,count:x.total,...U,onRowClick:(f,{dataIndex:p})=>{L(a[p])}},customPreButtons:[e.jsx(Ue,{value:N.dateRange,onChange:z})],customButtons:oe,components:{TableFilterList:f=>e.jsx($e,{...f,itemComponent:p=>e.jsx(Ce,{...p,canDelete:g=>{var R;const y=(R=g==null?void 0:g.columnNames)==null?void 0:R[(g==null?void 0:g.index)||0];return(y==null?void 0:y.name)==="sender"}})})}})})}),E&&e.jsx(hs,{refresh:q,onCancel:B,notification:E,blocklet:u,tab:A})]})}const js=ce.div`
96
+ td.MuiTableCell-footer {
97
+ border: none !important;
98
+ }
99
+ .sent-status-cell {
100
+ .resend-btn {
101
+ display: none;
102
+ }
103
+ &:hover {
104
+ .resend-btn {
105
+ display: flex;
106
+ }
107
+ }
108
+ }
109
+
110
+ .custom-toobar-btns {
111
+ gap: 4px;
112
+ }
113
+ `;bt.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};bt.defaultProps={customTableButtons:[]};function bt({blocklet:t={},customTableButtons:s}){return e.jsx(Kt,{blocklet:t,children:e.jsx(ys,{customTableButtons:s})})}export{bt as default};
@@ -1,4 +1,4 @@
1
- import{j as r,T as i}from"./vendor-mui-core-DxD1UA4o.js";import{Z as p,ah as x}from"./vendor-utils-CTIzdAFg.js";import{s as c}from"./vendor-ux-did-connect-CiLSrCOH.js";function y({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(f=>p(x(f))).join(" "):o,layout:n="horizontal",children:e,valueComponent:l="div",nameWidth:s=90,...m}){return r.jsxs(u,{layout:n,width:s,...m,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),e&&r.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:e})]})}const u=c("div")`
1
+ import{j as r,T as i}from"./vendor-mui-core-DiDsSLd-.js";import{Z as p,ah as x}from"./vendor-utils-DMClavLd.js";import{s as c}from"./vendor-ux-did-connect-BKeZkgZt.js";function y({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(f=>p(x(f))).join(" "):o,layout:n="horizontal",children:e,valueComponent:l="div",nameWidth:s=90,...m}){return r.jsxs(u,{layout:n,width:s,...m,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),e&&r.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:e})]})}const u=c("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;
@@ -1,4 +1,4 @@
1
- import{r as d}from"./vendor-react-DoD83n6N.js";import{H as l,j as n,aa as g,b3 as A,O as G,I as O,a9 as J,b_ as U,ag as Y}from"./vendor-mui-core-DxD1UA4o.js";import{a$ as Q,aJ as Z,d as v}from"./vendor-ux-did-connect-CiLSrCOH.js";import{d as ee}from"./Done-BXISjL2g.js";import{C as te}from"./Google-1eG1YH-u.js";import{a7 as ne,f as re}from"./index-tjRN_EVx.js";import{R as oe,F as se,L as ie}from"./logo-uploader-zhddoC5p.js";const N={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function S({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},C=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(te,{color:o,onChange:s=>k(s.hex)})})]});return r?f:C}S.propTypes=N;function D({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(Q),C=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:C,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}D.propTypes=N;D.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Z.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:ne({title:"Owner",issuer:re.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(S,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...N,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ae=U`
1
+ import{r as d}from"./vendor-react-DoD83n6N.js";import{H as l,j as n,aa as g,b3 as A,O as G,I as O,a9 as U,b_ as Y,ag as J}from"./vendor-mui-core-DiDsSLd-.js";import{b0 as Q,aK as Z,d as v}from"./vendor-ux-did-connect-BKeZkgZt.js";import{d as ee}from"./Done-D7ovxqe0.js";import{C as te}from"./Google-BPbeA72O.js";import{a7 as ne,f as re}from"./index-CagPo5v-.js";import{R as oe,F as se,L as ie}from"./logo-uploader-DrmXtKUh.js";const N={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function S({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const b=s=>{p.current=s,a(s)},k=()=>{u(!1),a(p.current)},C=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:k,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(te,{color:o,onChange:s=>b(s.hex)})})]});return r?f:C}S.propTypes=N;function D({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,b=d.useRef(a),{t:k}=d.useContext(Q),C=s=>{s.key==="Enter"&&c(b.current,"confirm")},f=s=>{b.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:C,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:k("common.requiredInputPlaceholder",{name:o||p})})})}D.propTypes=N;D.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Z.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:ne({title:"Owner",issuer:re.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(S,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...N,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ae=Y`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -8,4 +8,4 @@ import{r as d}from"./vendor-react-DoD83n6N.js";import{H as l,j as n,aa as g,b3 a
8
8
  25%, 75% {
9
9
  transform: scale(1.1) translateX(3px);
10
10
  }
11
- `,le={input:D,color:S,passport:T,uploader:r=>n.jsx(ie,{...r.componentProps})};function ce(r,{editing:o=!1}){const{componentType:a="input",render:c,renderFormItem:u}=r;return o&&u?u:!o&&c?c:le[a==null?void 0:a.toLowerCase()]}function z({schema:r,loading:o,value:a,defaultValue:c,onChange:u,style:m,disabled:p}){const k=Object.prototype.toString.call(a)==="[object Object]",[b,C]=d.useState([]),[f,s]=d.useState(k?a:c),V=d.useMemo(()=>r.length===1,[r]),h=d.useCallback(e=>b.find(t=>t.key===e),[b]);d.useEffect(()=>{var e;V&&((e=r[0])!=null&&e.required)&&C([{key:r[0].key,editing:!0,initialValue:c[r[0].key]}])},[r,V,c]);const I=d.useCallback(e=>{C(t=>t.find(i=>i.key===e.key)?t.map(i=>i.key===e.key?e:{...i}):[e].concat(t))},[]),P=d.useCallback((e,t,x)=>{const{key:i,secure:w}=e,y=h(i)??{...e};y.editing=!0;const R=f[i]!==t;y.edited=t&&y.initialValue!==t,y.initialValue=c[i];const j={...f,[i]:t};R&&s(j),u({[i]:t},{allValues:j,action:x,currentItem:e}),x==="confirm"&&w&&s({...f,[i]:"__encrypted__"}),x==="confirm"&&(y.initialValue=f[i]),["confirm","cancel"].includes(x)&&(y.editing=!1,y.edited=!1),I(y)},[c,f,u,I,h]);function K(e,{editing:t=!1}){const{key:x}=e,i=k?a[x]:f[x];return i==="__encrypted__"?t?"":"******":i}const _=d.useCallback(e=>{const t=h(e.key);t&&P(e,t.initialValue,"cancel")},[h,P]),q=d.useCallback(e=>{const t=h(e.key);!t||!t.edited||(t.shaking=!0,I(t),setTimeout(()=>{t.shaking=!1,I(t)},500))},[h,I]),B=d.useCallback(e=>{const t=h(e.key);!t||!t.edited?_(e):q(e)},[h,q,_]);return n.jsx(de,{className:"form",style:m,children:r==null?void 0:r.map(e=>{const{key:t,description:x,required:i,solo:w=!1,hidden:y=!1,componentProps:L={},skipButtonDisabled:R=!1}=e;if(y)return null;const j=h(t),{editing:F,shaking:M}=j??{},E=K(e,{editing:F}),W=ce(e,{editing:F}),X={inputProps:{"data-cy":"schema-form-item-component"},key:t,description:x,editing:F,value:E,onChange:($,H="change")=>P(e,$,H),componentProps:L,skipButtonDisabled:R,onBlur:()=>B(e)};return n.jsxs(g,{className:"form-item",children:[!w&&n.jsxs(g,{className:"form-item-label",style:{color:i&&!E?"#ff0000":"#333"},children:[x,i&&n.jsx(oe,{})]}),n.jsxs(g,{className:"form-item-body",children:[n.jsx(g,{className:"form-item-input","data-cy":"schema-form-item-edit",sx:{textAlign:w?"center":"left"},style:{cursor:"text"},onClick:()=>{p||j!=null&&j.edited||R||P(e,f[t],"edit")},children:n.jsx(W,{...X})}),!w&&n.jsx(g,{className:"form-item-action",style:{marginLeft:0},children:F?n.jsxs(n.Fragment,{children:[j.edited?n.jsx(O,{"data-cy":"schema-form-item-confirm",onClick:()=>{P(e,E,"confirm")},disabled:p||o,sx:{animation:M?`${ae} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:o?n.jsx(J,{size:24}):n.jsx(ee,{})}):null,n.jsx(O,{"data-cy":"schema-form-item-cancel",onClick:()=>_(e),style:{paddingLeft:j.edited?4:8},disabled:p||o,size:"large",children:n.jsx(v,{})})]}):null})]})]},t)})})}z.propTypes={schema:l.array.isRequired,loading:l.bool,onChange:l.func.isRequired,value:l.object,defaultValue:l.object,style:l.object,disabled:l.bool};z.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const de=Y(se)``;export{z as S};
11
+ `,le={input:D,color:S,passport:T,uploader:r=>n.jsx(ie,{...r.componentProps})};function ce(r,{editing:o=!1}){const{componentType:a="input",render:c,renderFormItem:u}=r;return o&&u?u:!o&&c?c:le[a==null?void 0:a.toLowerCase()]}function z({schema:r,loading:o,value:a,defaultValue:c,onChange:u,style:m,disabled:p}){const b=Object.prototype.toString.call(a)==="[object Object]",[k,C]=d.useState([]),[f,s]=d.useState(b?a:c),V=d.useMemo(()=>r.length===1,[r]),h=d.useCallback(e=>k.find(t=>t.key===e),[k]);d.useEffect(()=>{var e;V&&((e=r[0])!=null&&e.required)&&C([{key:r[0].key,editing:!0,initialValue:c[r[0].key]}])},[r,V,c]);const I=d.useCallback(e=>{C(t=>t.find(i=>i.key===e.key)?t.map(i=>i.key===e.key?e:{...i}):[e].concat(t))},[]),P=d.useCallback((e,t,x)=>{const{key:i,secure:w}=e,y=h(i)??{...e};y.editing=!0;const R=f[i]!==t;y.edited=t&&y.initialValue!==t,y.initialValue=c[i];const j={...f,[i]:t};R&&s(j),u({[i]:t},{allValues:j,action:x,currentItem:e}),x==="confirm"&&w&&s({...f,[i]:"__encrypted__"}),x==="confirm"&&(y.initialValue=f[i]),["confirm","cancel"].includes(x)&&(y.editing=!1,y.edited=!1),I(y)},[c,f,u,I,h]);function K(e,{editing:t=!1}){const{key:x}=e,i=b?a[x]:f[x];return i==="__encrypted__"?t?"":"******":i}const _=d.useCallback(e=>{const t=h(e.key);t&&P(e,t.initialValue,"cancel")},[h,P]),q=d.useCallback(e=>{const t=h(e.key);!t||!t.edited||(t.shaking=!0,I(t),setTimeout(()=>{t.shaking=!1,I(t)},500))},[h,I]),B=d.useCallback(e=>{const t=h(e.key);!t||!t.edited?_(e):q(e)},[h,q,_]);return n.jsx(de,{className:"form",style:m,children:r==null?void 0:r.map(e=>{const{key:t,description:x,required:i,solo:w=!1,hidden:y=!1,componentProps:L={},skipButtonDisabled:R=!1}=e;if(y)return null;const j=h(t),{editing:F,shaking:M}=j??{},E=K(e,{editing:F}),W=ce(e,{editing:F}),X={inputProps:{"data-cy":"schema-form-item-component"},key:t,description:x,editing:F,value:E,onChange:(H,$="change")=>P(e,H,$),componentProps:L,skipButtonDisabled:R,onBlur:()=>B(e)};return n.jsxs(g,{className:"form-item",children:[!w&&n.jsxs(g,{className:"form-item-label",style:{color:i&&!E?"#ff0000":"#333"},children:[x,i&&n.jsx(oe,{})]}),n.jsxs(g,{className:"form-item-body",children:[n.jsx(g,{className:"form-item-input","data-cy":"schema-form-item-edit",sx:{textAlign:w?"center":"left"},style:{cursor:"text"},onClick:()=>{p||j!=null&&j.edited||R||P(e,f[t],"edit")},children:n.jsx(W,{...X})}),!w&&n.jsx(g,{className:"form-item-action",style:{marginLeft:0},children:F?n.jsxs(n.Fragment,{children:[j.edited?n.jsx(O,{"data-cy":"schema-form-item-confirm",onClick:()=>{P(e,E,"confirm")},disabled:p||o,sx:{animation:M?`${ae} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:o?n.jsx(U,{size:24}):n.jsx(ee,{})}):null,n.jsx(O,{"data-cy":"schema-form-item-cancel",onClick:()=>_(e),style:{paddingLeft:j.edited?4:8},disabled:p||o,size:"large",children:n.jsx(v,{})})]}):null})]})]},t)})})}z.propTypes={schema:l.array.isRequired,loading:l.bool,onChange:l.func.isRequired,value:l.object,defaultValue:l.object,style:l.object,disabled:l.bool};z.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const de=J(se)``;export{z as S};
@@ -0,0 +1 @@
1
+ import{j as t,ag as r}from"./vendor-mui-core-DiDsSLd-.js";import{r as s}from"./vendor-react-DoD83n6N.js";import{b0 as a}from"./vendor-ux-did-connect-BKeZkgZt.js";import{R as e}from"./vendor-arcblock-CBc_0mJh.js";import"./vendor-utils-DMClavLd.js";import"./vendor-hooks-jg6xPUPF.js";import"./lottie-web-B6s7dDoL.js";function x(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{x as default};