@abtnode/blocklet-services 1.16.43-beta-20250510-123357-65a2988c → 1.16.44-beta-20250512-155818-937e465d

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 (189) hide show
  1. package/api/emails/_components/activity.js +2 -1
  2. package/api/index.js +5 -1
  3. package/api/libs/email.js +1 -1
  4. package/dist/assets/{AdapterDayjs-BiPHzcUP.js → AdapterDayjs-BD9H1lZ-.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-Dghek9CI.js → ArrowDropDown-BrO-zDlb.js} +1 -1
  6. package/dist/assets/{CheckCircle-Dvhgeo9j.js → CheckCircle-Ds4QI0ey.js} +1 -1
  7. package/dist/assets/{ChevronLeft-DE33N57i.js → ChevronLeft-CnQaQ-rc.js} +1 -1
  8. package/dist/assets/{ChevronRight-BfbPIE2b.js → ChevronRight-a_2_x6Ew.js} +1 -1
  9. package/dist/assets/{Community-2MKVAbIk.js → Community-DW6DJTIs.js} +1 -1
  10. package/dist/assets/{DeleteOutline-B6efX_Fy.js → DeleteOutline-CFN4r-OG.js} +1 -1
  11. package/dist/assets/{Done-Ct5slWpT.js → Done-DqSE6KPe.js} +1 -1
  12. package/dist/assets/{Download-DKQGRFHf.js → Download-C_LRKzbG.js} +1 -1
  13. package/dist/assets/{Edit-BLsIdIOp.js → Edit-CbR4eoK8.js} +1 -1
  14. package/dist/assets/{EditIcon-CwTCQzs9.js → EditIcon-DxUWMw59.js} +1 -1
  15. package/dist/assets/{Email-DOy8vL0N.js → Email-DWueGk7t.js} +1 -1
  16. package/dist/assets/{Error-wpqrAfUT.js → Error-jEHdDLNk.js} +1 -1
  17. package/dist/assets/{ExpandLess-CJXkgMMr.js → ExpandLess-CkoEHpgk.js} +1 -1
  18. package/dist/assets/{Google-BbAgcDQ_.js → Google-DHEolkW-.js} +1 -1
  19. package/dist/assets/{Holiday-DT-VjgQP.js → Holiday-Dwvo6QkZ.js} +1 -1
  20. package/dist/assets/{InfoOutlined-Dy7jTc7H.js → InfoOutlined-DkG0jjos.js} +1 -1
  21. package/dist/assets/{Launch-DBKe0gh0.js → Launch-B-2Jomi6.js} +1 -1
  22. package/dist/assets/{LaunchOutlined-BIq6YUU8.js → LaunchOutlined-CXNijfqX.js} +1 -1
  23. package/dist/assets/{Location-C__VfR4D.js → Location-DUEOr9J2.js} +1 -1
  24. package/dist/assets/{LockIcon-DIGiHKHl.js → LockIcon-Cjg8jV1E.js} +1 -1
  25. package/dist/assets/{Meeting-Cn2X2Ix7.js → Meeting-CJaI_cKm.js} +1 -1
  26. package/dist/assets/{MoreHoriz-BxJelL2A.js → MoreHoriz-B6KdR0Y8.js} +1 -1
  27. package/dist/assets/{OffSick-Cnicwu8x.js → OffSick-C9VqqjrN.js} +1 -1
  28. package/dist/assets/{Phone-CoX1qzAs.js → Phone-DcHUzCa-.js} +1 -1
  29. package/dist/assets/{PlayArrow-C9IFmc-j.js → PlayArrow-BToG9L6q.js} +1 -1
  30. package/dist/assets/{QuestionMarkCircle-DCM9zW3a.js → QuestionMarkCircle-BPVDAm8U.js} +1 -1
  31. package/dist/assets/{ServerLogo-CfbYjQbP.js → ServerLogo-s6cfhx92.js} +1 -1
  32. package/dist/assets/{Timezone-CCdgxxpv.js → Timezone-B-Ho_Uno.js} +1 -1
  33. package/dist/assets/{TuneOutlined-CB7t_nGq.js → TuneOutlined-BR2H7Mxj.js} +1 -1
  34. package/dist/assets/{ViewList-B4hmqizo.js → ViewList-D8vtMKQz.js} +1 -1
  35. package/dist/assets/{WorkingRemotely-DWT54kH1.js → WorkingRemotely-lJ6DUMCR.js} +1 -1
  36. package/dist/assets/{access-control-RJu7xYI3.js → access-control-CCSlKYYz.js} +1 -1
  37. package/dist/assets/{actions-BCWb2ez1.js → actions-BjTeIzgS.js} +1 -1
  38. package/dist/assets/{add-component-core-DRAzXCeg.js → add-component-core-C7-Epxoj.js} +15 -15
  39. package/dist/assets/{add-resource-BDJuVU8K.js → add-resource-CJHw7ea0.js} +1 -1
  40. package/dist/assets/{addon-ygDS7Fug.js → addon--u4EErgw.js} +1 -1
  41. package/dist/assets/{advanced-CFME3Vrl.js → advanced-tG5IRVhQ.js} +1 -1
  42. package/dist/assets/{appearance-BqJwEmtt.js → appearance-bRLsRDs2.js} +1 -1
  43. package/dist/assets/audit-logs-B3-Fo3nR.js +35 -0
  44. package/dist/assets/{authorize-WekjQ3_M.js → authorize-DNTNbUhI.js} +1 -1
  45. package/dist/assets/{base32-BbrXtXL6.js → base32-_zEVBJUg.js} +1 -1
  46. package/dist/assets/{branding-CS-f1gMT.js → branding-By8KDk5Q.js} +6 -6
  47. package/dist/assets/{branding-BTfb8_b4.js → branding-hDeNkLC2.js} +2 -2
  48. package/dist/assets/{bundle-avatar-Db5l8MQ4.js → bundle-avatar-DYTLzqlT.js} +1 -1
  49. package/dist/assets/button-D8hoY4xw.js +1 -0
  50. package/dist/assets/click-to-copy-CFiGx48J.js +1 -0
  51. package/dist/assets/{collapse-Bn_BDlF9.js → collapse-QV_2gdtM.js} +1 -1
  52. package/dist/assets/{complete-BRApuFsV.js → complete-6R-n_Ra9.js} +2 -2
  53. package/dist/assets/{component-C7g4FGFm.js → component-Blsql2u0.js} +2 -2
  54. package/dist/assets/{config-C8AXD1JH.js → config-D6r2ZAFY.js} +2 -2
  55. package/dist/assets/{config-qG8JCIJ_.js → config-LE_EJolF.js} +1 -1
  56. package/dist/assets/{config-navigation-B7r4dV5S.js → config-navigation-B0nu0al4.js} +4 -4
  57. package/dist/assets/{config-space-CSKkMgqX.js → config-space-d34Deg7R.js} +1 -1
  58. package/dist/assets/{confirm-BvUfAlkx.js → confirm-DjTZImyg.js} +1 -1
  59. package/dist/assets/{connect-B2HOOYzS.js → connect-Cu2Ssv5A.js} +1 -1
  60. package/dist/assets/connect-K4ZmMu4L.js +5 -0
  61. package/dist/assets/{connect-to-BBtnljQ-.js → connect-to-BG15Vnyg.js} +1 -1
  62. package/dist/assets/{content-layout-DzqMXifY.js → content-layout-BzF-fNQz.js} +1 -1
  63. package/dist/assets/dashboard-BIOpvfj3.js +239 -0
  64. package/dist/assets/{delete-confirm-BBaXcAXg.js → delete-confirm-BzuBR6TW.js} +1 -1
  65. package/dist/assets/{did-address-BKBBjFqv.js → did-address-DjwPl1uy.js} +1 -1
  66. package/dist/assets/{domain-action-card-D-WETV-f.js → domain-action-card-Bcs_GWxq.js} +1 -1
  67. package/dist/assets/domain-wh85yL2O.js +9 -0
  68. package/dist/assets/domains-bzKFbARj.js +1 -0
  69. package/dist/assets/dot-C4hULxc0.js +7 -0
  70. package/dist/assets/{email-Bc5KLu5Q.js → email-BZVu6WP-.js} +1 -1
  71. package/dist/assets/{empty-spinner-BZlBh4vA.js → empty-spinner-n0_Ehns5.js} +1 -1
  72. package/dist/assets/{exchange-passport-DbNEDTaa.js → exchange-passport-8jdiPDph.js} +1 -1
  73. package/dist/assets/{fuel-DzWcrU-I.js → fuel-Dx_cnsCl.js} +1 -1
  74. package/dist/assets/{gen-access-key-D-ftFU9F.js → gen-access-key-CqKmmKML.js} +1 -1
  75. package/dist/assets/get-safe-url-B5RJTMjC.js +1 -0
  76. package/dist/assets/get-safe-url-Bk6PlU7n.js +1 -0
  77. package/dist/assets/{home-DXj5oFeO.js → home-DzCwBE8F.js} +1 -1
  78. package/dist/assets/{iframe-CIVgAJuH.js → iframe-DW7zzzTG.js} +1 -1
  79. package/dist/assets/{index-BemEiFHE.js → index-8CHxrfFP.js} +1 -1
  80. package/dist/assets/{index-CKheO_aT.js → index-B8r-LrrM.js} +1 -1
  81. package/dist/assets/{index-BMPpz8ni.js → index-B9nvthxv.js} +1 -1
  82. package/dist/assets/{index-BMD-pSqT.js → index-BDYaw77z.js} +1 -1
  83. package/dist/assets/{index-Ce2NSVmU.js → index-BIPRCLBG.js} +1 -1
  84. package/dist/assets/{index-DjLLC6N3.js → index-BYCeMwoO.js} +1 -1
  85. package/dist/assets/{index-D09AfnR1.js → index-Bju4sfVL.js} +1 -1
  86. package/dist/assets/{index-BVU8_1Ed.js → index-Btl_rz0J.js} +3 -3
  87. package/dist/assets/index-C-A13dEh.js +141 -0
  88. package/dist/assets/{index-g0L_1foA.js → index-C5SsKJ2n.js} +11 -11
  89. package/dist/assets/{index-CHDiquXf.js → index-CPfvVvHv.js} +11 -11
  90. package/dist/assets/{index-CUfP1M2j.js → index-Cc-e6lxg.js} +1 -1
  91. package/dist/assets/{index-wXCx8TFU.js → index-DcUhenm6.js} +1 -1
  92. package/dist/assets/{index-u-w3iMC9.js → index-DefO2n6z.js} +4 -4
  93. package/dist/assets/{index--HbH1n1_.js → index-DjEDWgGs.js} +1 -1
  94. package/dist/assets/{index-DF3gHUuW.js → index-Du38Vjy4.js} +4 -4
  95. package/dist/assets/{index-D64RNKdt.js → index-Dyl-XQ73.js} +6 -6
  96. package/dist/assets/{index-BmWVfEGP.js → index-HU4yqI-9.js} +1 -1
  97. package/dist/assets/index-Jnk92KZC.js +284 -0
  98. package/dist/assets/{index-Bxd86KLJ.js → index-SzdSxpkq.js} +4 -4
  99. package/dist/assets/index-USO5zFMh.js +55 -0
  100. package/dist/assets/{index-C0SLCehH.js → index-enM9Y412.js} +1 -1
  101. package/dist/assets/index-ioZVVJtg.js +113 -0
  102. package/dist/assets/{invitation-CKfllvl5.js → invitation-1bsb30Yz.js} +1 -1
  103. package/dist/assets/{invite-CCCSmPiy.js → invite-CALl83Zc.js} +1 -1
  104. package/dist/assets/{issue-passport-C3zUptls.js → issue-passport-BcStTsbv.js} +1 -1
  105. package/dist/assets/{item-CkcpHBHM.js → item-Bk_1JLeG.js} +1 -1
  106. package/dist/assets/{landing-page-q-KgqE9Q.js → landing-page-Due4o1uF.js} +1 -1
  107. package/dist/assets/{launch-result-message-BaU6oEsi.js → launch-result-message-DIYoykBK.js} +1 -1
  108. package/dist/assets/{layout-CyCulQBn.js → layout-D93HKT6w.js} +1 -1
  109. package/dist/assets/list-D96_O-GY.js +2 -0
  110. package/dist/assets/{list-header-CU9W30JD.js → list-header-HqBQs1yn.js} +1 -1
  111. package/dist/assets/list-rt6nku1-.js +236 -0
  112. package/dist/assets/localization-BUDtnbyU.js +1 -0
  113. package/dist/assets/{log-DNpJdgp3.js → log--AX8zo75.js} +1 -1
  114. package/dist/assets/{logger-CQ50TnpL.js → logger-BLZgTs_U.js} +1 -1
  115. package/dist/assets/{login-BKaJnfFX.js → login-WRcteY7r.js} +1 -1
  116. package/dist/assets/{login-oauth-callback-LJsgXC8E.js → login-oauth-callback-DZaPZfnA.js} +1 -1
  117. package/dist/assets/{logo-uploader-BYnd80uu.js → logo-uploader-CQCy6MG3.js} +3 -3
  118. package/dist/assets/{lost-passport-Bk0k4I4s.js → lost-passport-kJX7pEJj.js} +1 -1
  119. package/dist/assets/{open-window-DV0D-Mov.js → open-window--2G6Qjbq.js} +1 -1
  120. package/dist/assets/overview-CpKMiGEK.js +85 -0
  121. package/dist/assets/{page-header-CpNMTtn_.js → page-header-xyZktwBS.js} +1 -1
  122. package/dist/assets/{passport-item-BxfGrDcE.js → passport-item-CIvCqz_R.js} +1 -1
  123. package/dist/assets/{permission-BkNXA8B5.js → permission-BH1TY_tz.js} +1 -1
  124. package/dist/assets/{preferences-_jTjKHvU.js → preferences-CfmnTXfl.js} +1 -1
  125. package/dist/assets/{profile-embed-8w4_vg5a.js → profile-embed-ZtzRYgXv.js} +1 -1
  126. package/dist/assets/publish-resource-CCa5xfwz.js +1 -0
  127. package/dist/assets/{react-beautiful-dnd.esm-Cq_dOQ2z.js → react-beautiful-dnd.esm-7PS2VwOi.js} +1 -1
  128. package/dist/assets/runtime-eXYlg9Cz.js +1 -0
  129. package/dist/assets/sdk-9eXJSWHG.js +1 -0
  130. package/dist/assets/section-Cv4udilp.js +41 -0
  131. package/dist/assets/{security-BQbSLSOe.js → security-DM8MeY05.js} +3 -3
  132. package/dist/assets/{session-6XaVDQaE.js → session-CHdTc1We.js} +1 -1
  133. package/dist/assets/setup-BEsU41BB.js +30 -0
  134. package/dist/assets/{shorten-label-Dq7bVuNa.js → shorten-label-Cng55547.js} +1 -1
  135. package/dist/assets/{simple-select-C-wGUGQR.js → simple-select-CP_Svi_D.js} +1 -1
  136. package/dist/assets/{slicedToArray-vWe02CJE.js → slicedToArray-C7EPqaHf.js} +1 -1
  137. package/dist/assets/{spaces-Cp7TgoZP.js → spaces-BVG-t3ND.js} +1 -1
  138. package/dist/assets/{start-CHmWCQE9.js → start-CIjuDAiX.js} +1 -1
  139. package/dist/assets/{starting-progress-CdpkXOrK.js → starting-progress-CiLZpNpg.js} +1 -1
  140. package/dist/assets/{status-46dMQnxA.js → status-CUMJd-nJ.js} +1 -1
  141. package/dist/assets/{step-actions-Bu3Q5M4V.js → step-actions-CeJCmiCS.js} +1 -1
  142. package/dist/assets/{studio-BbeHx14I.js → studio-DikseKRr.js} +1 -1
  143. package/dist/assets/{switch-control-D6CqAlDY.js → switch-control-C5i52ixk.js} +1 -1
  144. package/dist/assets/{traffic-CY9Vj6w7.js → traffic-B5x_6GvF.js} +2 -2
  145. package/dist/assets/{transfer-CSeo2FaW.js → transfer-CTEHVklh.js} +1 -1
  146. package/dist/assets/{unsubscribe-BLaMmgbM.js → unsubscribe-Bi2IV-2n.js} +1 -1
  147. package/dist/assets/{use-blocklet-logo-sEJnYyNL.js → use-blocklet-logo-BEy8Tnso.js} +2 -2
  148. package/dist/assets/{use-mobile-BAjFH6d8.js → use-mobile-Boa_xu9A.js} +1 -1
  149. package/dist/assets/{use-mobile-Bh8CHBbH.js → use-mobile-DyX6Fl8Z.js} +1 -1
  150. package/dist/assets/useAsync-C8ydfEEr.js +1 -0
  151. package/dist/assets/useAsync-CMWsznMW.js +1 -0
  152. package/dist/assets/{useLocalStorage-C6U1Aqya.js → useLocalStorage-DVnkpneF.js} +1 -1
  153. package/dist/assets/user-center-DcXdjtRX.js +76 -0
  154. package/dist/assets/{util-Bg0WSJ-t.js → util-CEAObyfj.js} +1 -1
  155. package/dist/assets/{util-RWes6RwK.js → util-MKllNgBs.js} +1 -1
  156. package/dist/assets/{vendor-arcblock-CN2B_oTr.js → vendor-arcblock-uz9DVywv.js} +45 -45
  157. package/dist/assets/{vendor-mui-core-UZpb7wT7.js → vendor-mui-core-D_bnq77o.js} +1 -1
  158. package/dist/assets/{vendor-mui-x-whuSO90H.js → vendor-mui-x-R-0SFz4c.js} +1 -1
  159. package/dist/assets/{vendor-ux-did-connect-TEE6cGq6.js → vendor-ux-did-connect-DHrruicZ.js} +136 -136
  160. package/dist/assets/{wrap-locale-DZ79GW_G.js → wrap-locale-B9TkXFQe.js} +1 -1
  161. package/dist/index.html +4 -4
  162. package/dist/service-worker.js +1 -1
  163. package/dist/share/shared-bridge.html +4 -4
  164. package/package.json +32 -32
  165. package/dist/assets/audit-logs-CtFZQHby.js +0 -35
  166. package/dist/assets/button-DotKXyjc.js +0 -1
  167. package/dist/assets/click-to-copy-BxhgzyYL.js +0 -1
  168. package/dist/assets/connect-DGPdKMcu.js +0 -5
  169. package/dist/assets/dashboard-C124DXmc.js +0 -279
  170. package/dist/assets/domain-DTrwCkop.js +0 -9
  171. package/dist/assets/domains-BxkmGeZE.js +0 -1
  172. package/dist/assets/dot-C05enzim.js +0 -7
  173. package/dist/assets/get-safe-url-2RcRY8gU.js +0 -1
  174. package/dist/assets/get-safe-url-CEvgWyL5.js +0 -1
  175. package/dist/assets/index-9ixwCOkw.js +0 -113
  176. package/dist/assets/index-B_fwtN9z.js +0 -55
  177. package/dist/assets/index-CyUXddLG.js +0 -284
  178. package/dist/assets/index-DsT9i24r.js +0 -141
  179. package/dist/assets/list-D1dIr8Je.js +0 -2
  180. package/dist/assets/list-TP-VNuzL.js +0 -236
  181. package/dist/assets/localization-BXLZxF1J.js +0 -1
  182. package/dist/assets/overview-UIMGVO1S.js +0 -85
  183. package/dist/assets/publish-resource-CcM3RwPR.js +0 -1
  184. package/dist/assets/relative-time-Cl7lOTkO.js +0 -1
  185. package/dist/assets/runtime-BVDdcpyT.js +0 -1
  186. package/dist/assets/sdk-7yPC_DtN.js +0 -1
  187. package/dist/assets/setup-CifjXQIf.js +0 -30
  188. package/dist/assets/useAsync-DV3NyLhI.js +0 -1
  189. package/dist/assets/user-center-BHyd-rRF.js +0 -76
@@ -1,4 +1,4 @@
1
- import{ah as s,j as n}from"./vendor-mui-core-UZpb7wT7.js";import{T as e}from"./vendor-arcblock-CN2B_oTr.js";function a({labelProps:t,className:i,style:m,...o}){const r={...t,labelPlacement:(t==null?void 0:t.labelPlacement)||"start"};return n.jsx(c,{className:i,style:m,labelPlacement:t==null?void 0:t.labelPlacement,children:n.jsx(e,{labelProps:r,...o})})}a.propTypes=e.propTypes;a.defaultProps=e.defaultProps;const c=s.div`
1
+ import{ah as s,j as n}from"./vendor-mui-core-D_bnq77o.js";import{T as e}from"./vendor-arcblock-uz9DVywv.js";function a({labelProps:t,className:i,style:m,...o}){const r={...t,labelPlacement:(t==null?void 0:t.labelPlacement)||"start"};return n.jsx(c,{className:i,style:m,labelPlacement:t==null?void 0:t.labelPlacement,children:n.jsx(e,{labelProps:r,...o})})}a.propTypes=e.propTypes;a.defaultProps=e.defaultProps;const c=s.div`
2
2
  max-width: ${({labelPlacement:t})=>t==="end"?"100%":"300px"};
3
3
  > label {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{b as r,r as w}from"./vendor-react-DEoibe3W.js";import{t as H,z as Ie,ax as he,I as ge}from"./index-u-w3iMC9.js";import{A as Fe,aC as _e}from"./vendor-utils-rHXShPKm.js";import{_ as Le}from"./dot-C05enzim.js";import{I as Ae}from"./iframe-CIVgAJuH.js";import{d as Ye}from"./LaunchOutlined-BIq6YUU8.js";import{cq as Se,a9 as We,j as d,aa as z,w as Re,bc as y,X as se,T as Y,L as $e,A as qe,b6 as He,I as te,bp as xe,bo as ve,q as De,bX as ze,H as C,ah as Ve,bL as Be,ab as Ke,ak as Xe,y as Je,b4 as Ue}from"./vendor-mui-core-UZpb7wT7.js";import{r as Ge,u as Ze,j as Qe}from"./vendor-ux-did-connect-TEE6cGq6.js";import{d as et}from"./ChevronLeft-DE33N57i.js";import{d as tt}from"./ChevronRight-BfbPIE2b.js";import{r as ce,t as Ce,i as L,a as B,b as I,p as nt,c as at,d as de,e as oe,s as G,f as Z,g as V,h as Q,j as ee,k as ne,l as ae,m as rt,n as ie,o as U,q as ye,u as ue,v as st,w as ot,x as it,y as lt,z as ct}from"./index-wXCx8TFU.js";import{a as dt,b as ut}from"./vendor-hooks-rDgu5KV9.js";import{f as pt}from"./format-error-BrmqJs5a.js";import{L as mt,c as ft}from"./vendor-mui-x-whuSO90H.js";import{A as ht}from"./AdapterDayjs-BiPHzcUP.js";function we(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n<s||isNaN(Number(s)))&&(n=s)}),n||new Date(NaN)}function je(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n>s||isNaN(s.getDate()))&&(n=s)}),n||new Date(NaN)}function gt(e){return ce(1,arguments),L(e,Date.now())}var pe={},xt=We;Object.defineProperty(pe,"__esModule",{value:!0});var Oe=pe.default=void 0,vt=xt(Ge()),Dt=d;Oe=pe.default=(0,vt.default)((0,Dt.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const yt=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,a)=>e.slice(a*t,a*t+t)),bt=(e,t)=>{const n=G(Q(e),{locale:t}),a=Z(ee(e),{locale:t}),s=[];for(let o=n;U(o,a);)s.push(o),o=oe(o,1);return s},Et=({startDate:e},t)=>e&&L(t,e),kt=({endDate:e},t)=>e&&L(t,e),Mt=({startDate:e,endDate:t},n)=>e&&t&&(ue(n,{start:e,end:t})||L(n,e)||L(n,t)),St=({startDate:e,endDate:t})=>e&&t?L(e,t):!1,be=(e,t)=>{if(e){const n=e instanceof Date?e:nt(e);if(at(n))return n}return t},Rt=(e,t,n)=>{const{startDate:a,endDate:s}=e;if(a&&s){const o=we([a,t]),h=je([s,n]);return[o,de(o,h)?I(o,1):h]}return[a,s]},Ct=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:oe(e,-1),endDate:oe(e,-1)},{label:"This Week",startDate:G(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:G(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}],wt=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((a,s)=>e.getFullYear()-n+s)},jt=({date:e,setDate:t,nextDisabled:n,prevDisabled:a,onClickNext:s,onClickPrevious:o,locale:h})=>{const m=typeof h<"u"?[...Array(12).keys()].map(i=>{var D;return(D=h.localize)===null||D===void 0?void 0:D.month(i,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],f=i=>{t(lt(e,parseInt(i.target.value,10)))},p=i=>{t(ct(e,parseInt(i.target.value,10)))};return r.createElement(y,{container:!0,justifyContent:"space-between",alignItems:"center"},r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:o},r.createElement(et,{color:a?"disabled":"action"}))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:ot(e),onChange:f,MenuProps:{disablePortal:!0}},m.map((i,D)=>r.createElement(De,{key:i,value:D},i))))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:it(e),onChange:p,MenuProps:{disablePortal:!0}},wt(e,30).map(i=>r.createElement(De,{key:i,value:i},i))))),r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:s},r.createElement(tt,{color:n?"disabled":"action"}))))},Ot=({startOfRange:e,endOfRange:t,disabled:n,highlighted:a,outlined:s,filled:o,onClick:h,onHover:m,value:f})=>r.createElement(z,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:p=>!n&&a?p.palette.primary.light:void 0}},r.createElement(te,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:p=>!n&&s?`1px solid ${p.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:p=>p.palette.primary.dark},backgroundColor:p=>p.palette.primary.dark}:{}),disabled:n,onClick:h,onMouseOver:m},r.createElement(Y,{sx:{lineHeight:1.6,color:p=>n?p.palette.text.secondary:o?p.palette.primary.contrastText:p.palette.text.primary},variant:"body2"},f)));var re;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(re||(re={}));const Ee=e=>{var t;const{helpers:n,handlers:a,value:s,dateRange:o,marker:h,setValue:m,minDate:f,maxDate:p,locale:i}=e,D=((t=i==null?void 0:i.options)===null||t===void 0?void 0:t.weekStartsOn)||0,b=typeof i<"u"?[...Array(7).keys()].map(g=>{var v;return(v=i.localize)===null||v===void 0?void 0:v.day((g+D)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[x,E]=e.navState;return r.createElement(Re,{square:!0,elevation:0,sx:{width:290}},r.createElement(y,{container:!0},r.createElement(jt,{date:s,setDate:m,nextDisabled:!E,prevDisabled:!x,onClickPrevious:()=>a.onMonthNavigate(h,re.Previous),onClickNext:()=>a.onMonthNavigate(h,re.Next),locale:i}),r.createElement(y,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},b.map((g,v)=>r.createElement(Y,{color:"textSecondary",key:v,variant:"caption"},g))),r.createElement(y,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},yt(bt(s,i),7).map((g,v)=>r.createElement(y,{key:v,container:!0,direction:"row",justifyContent:"center"},g.map(l=>{const S=Et(o,l),O=kt(o,l),k=St(o),j=Mt(o,l)||n.inHoverRange(l);return r.createElement(Ot,{key:ie(l,"dd-MM-yyyy"),filled:S||O,outlined:gt(l),highlighted:j&&!k,disabled:!de(s,l)||!ue(l,{start:f,end:p}),startOfRange:S&&!k,endOfRange:O&&!k,onClick:()=>a.onDayClick(l),onHover:()=>a.onDayHover(l),value:st(l)})}))))))},ke=(e,t)=>{const{startDate:n,endDate:a}=e,{startDate:s,endDate:o}=t;return n&&s&&a&&o?L(n,s)&&L(a,o):!1},Nt=({ranges:e,setRange:t,selectedRange:n})=>r.createElement($e,null,e.map((a,s)=>r.createElement(qe,{button:!0,key:s,onClick:()=>t(a),sx:[ke(a,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},r.createElement(He,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:ke(a,n)?"bold":"normal"}}},a.label)))),le={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Tt=e=>{const{ranges:t,dateRange:n,minDate:a,maxDate:s,firstMonth:o,setFirstMonth:h,secondMonth:m,setSecondMonth:f,setDateRange:p,helpers:i,handlers:D,locale:b}=e,{startDate:x,endDate:E}=n,g=rt(m,o)>=2,v={dateRange:n,minDate:a,maxDate:s,helpers:i,handlers:D};return r.createElement(Re,{elevation:5,square:!0},r.createElement(y,{container:!0,direction:"row",wrap:"nowrap"},r.createElement(y,null,r.createElement(Nt,{selectedRange:n,ranges:t,setRange:p})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(y,null,r.createElement(y,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},x?ie(x,"dd MMMM yyyy",{locale:b}):"Start Date")),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Oe,{color:"action"})),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},E?ie(E,"dd MMMM yyyy",{locale:b}):"End Date"))),r.createElement(se,null),r.createElement(y,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},r.createElement(Ee,Object.assign({},v,{value:o,setValue:h,navState:[!0,g],marker:le.FIRST_MONTH,locale:b})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(Ee,Object.assign({},v,{value:m,setValue:f,navState:[g,!0],marker:le.SECOND_MONTH,locale:b}))))))},Pt=e=>{const t=new Date,{open:n,onChange:a,initialDateRange:s,minDate:o,maxDate:h,definedRanges:m=Ct(new Date,e.locale),locale:f}=e,p=be(o,B(t,-10)),i=be(h,B(t,10)),[D,b]=Rt(s||{},p,i),[x,E]=w.useState(Object.assign({},s)),[g,v]=w.useState(),[l,S]=w.useState(D||t),[O,k]=w.useState(b||I(l,1)),{startDate:j,endDate:P}=x,K=c=>{U(c,O)&&S(c)},X=c=>{ye(c,l)&&k(c)},$=c=>{let{startDate:M,endDate:R}=c;if(M&&R)c.startDate=M=we([M,p]),c.endDate=R=je([R,i]),E(c),a(c),S(M),k(de(M,R)?I(M,1):R);else{const q={};E(q),a(q),S(t),k(I(l,1))}},F=c=>{if(j&&!P&&!U(c,j)){const M={startDate:j,endDate:c};a(M),E(M)}else E({startDate:c,endDate:void 0});v(c)},A=(c,M)=>{if(c===le.FIRST_MONTH){const R=I(l,M);U(R,O)&&S(R)}else{const R=I(O,M);U(l,R)&&k(R)}},W=c=>{j&&!P&&(!g||!L(c,g))&&v(c)},N={inHoverRange:c=>j&&!P&&g&&ye(g,j)&&ue(c,{start:j,end:g})},T={onDayClick:F,onDayHover:W,onMonthNavigate:A};return n?w.createElement(Tt,{dateRange:x,minDate:p,maxDate:i,ranges:m,firstMonth:l,secondMonth:O,setFirstMonth:K,setSecondMonth:X,setDateRange:$,helpers:N,handlers:T,locale:f}):null},It=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:a,open:s}=e,o=()=>{t!==!1&&a()},h=m=>(m==null?void 0:m.key)==="Escape"&&o();return r.createElement(z,{sx:{position:"relative"}},s&&r.createElement(z,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:h,onClick:o}),r.createElement(z,{sx:{position:"relative",zIndex:1},className:n},r.createElement(Pt,Object.assign({},e))))},Ft=e=>r.createElement(It,Object.assign({},e));function Me(e,t,n,a){return parseFloat((t-a*t/e+n).toFixed(2))}function _t(e){[...e.querySelectorAll("*")].forEach(t=>e.removeChild(t))}function Lt(e){return e.value}function J(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const a in t)n.setAttribute(a,t[a]);return n}function At(e,t=[],n={}){if(_t(e),t.length<=1)return;let a=[];typeof t[0]=="number"?a=t.map(u=>({value:u})):a=t;const{onmousemove:s}=n,{onmouseout:o}=n,h="interactive"in n?n.interactive:!!s,m=n.spotRadius||2,f=m*2,p=n.cursorWidth||2,i=parseFloat(e.attributes["stroke-width"].value),D=n.fetch||Lt,b=a.map(u=>D(u)),x=parseFloat(e.attributes.width.value)-f*2,E=parseFloat(e.attributes.height.value),g=E-i*2-f,v=Math.max(...b)===0?1:Math.max(...b),l=-1e3,S=b.length-1,O=x/S,k=[],j=Me(v,g,i+m,b[0]);let P=`M${f} ${j}`;b.forEach((u,N)=>{const T=N*O+f,c=Me(v,g,i+m,u);k.push(Object.assign({},a[N],{index:N,x:T,y:c})),P+=` L ${T} ${c}`});const K=J("path",{class:"sparkline--line",d:P,fill:"none"}),X=`${P} V ${E} L ${f} ${E} Z`,$=J("path",{class:"sparkline--fill",d:X,stroke:"none"});if(e.appendChild($),e.appendChild(K),!h)return;const F=J("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:E,"stroke-width":p}),A=J("circle",{class:"sparkline--spot",cx:l,cy:l,r:m});e.appendChild(F),e.appendChild(A);const W=J("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(W),W.addEventListener("mouseout",u=>{F.setAttribute("x1",l.toString()),F.setAttribute("x2",l.toString()),A.setAttribute("cx",l.toString()),o&&o(u)}),W.addEventListener("mousemove",u=>{const N=u.offsetX;let T=k.find(Pe=>Pe.x>=N);T||(T=k[S]);const c=k[k.indexOf(T)-1];let M,R;c?(R=c.x+(T.x-c.x)/2,M=N>=R?T:c):M=T;const{x:q}=M,{y:Te}=M;A.setAttribute("cx",q.toString()),A.setAttribute("cy",Te.toString()),F.setAttribute("x1",q.toString()),F.setAttribute("x2",q.toString()),s&&s(u,M)})}function me({style:e,title:t,value:n,graph:a,description:s,empty:o}){return d.jsx(Yt,{children:d.jsxs(ze,{style:{...e},children:[d.jsx(Y,{sx:{fontSize:14},color:"text.secondary",children:t}),o&&r.isValidElement(o)?d.jsx(z,{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center",style:{height:150},children:o}):d.jsxs(d.Fragment,{children:[d.jsx(Y,{variant:"h5",component:"div",mt:1,children:n}),a,!!s&&d.jsx(z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:s})]})]})})}me.propTypes={style:C.object,title:C.node,value:C.node,graph:C.node,description:C.any,empty:C.node};me.defaultProps={style:{},title:null,value:null,graph:null,empty:null,description:null};const Yt=Ve(Be)`
1
+ import{b as r,r as w}from"./vendor-react-DEoibe3W.js";import{t as H,z as Ie,ax as he,G as ge}from"./index-DefO2n6z.js";import{A as Fe,aC as _e}from"./vendor-utils-rHXShPKm.js";import{_ as Le}from"./dot-C4hULxc0.js";import{I as Ae}from"./iframe-DW7zzzTG.js";import{d as Ye}from"./LaunchOutlined-CXNijfqX.js";import{cq as Se,a9 as We,j as d,aa as z,w as Re,bc as y,X as se,T as Y,L as $e,A as qe,b6 as He,I as te,bp as xe,bo as ve,q as De,bX as ze,H as C,ah as Ve,bL as Be,ab as Ke,ak as Xe,y as Je,b4 as Ge}from"./vendor-mui-core-D_bnq77o.js";import{r as Ue,u as Ze,j as Qe}from"./vendor-ux-did-connect-DHrruicZ.js";import{d as et}from"./ChevronLeft-CnQaQ-rc.js";import{d as tt}from"./ChevronRight-a_2_x6Ew.js";import{r as ce,t as Ce,i as L,a as B,b as I,p as nt,c as at,d as de,e as oe,s as U,f as Z,g as V,h as Q,j as ee,k as ne,l as ae,m as rt,n as ie,o as G,q as ye,u as ue,v as st,w as ot,x as it,y as lt,z as ct}from"./index-DcUhenm6.js";import{a as dt,b as ut}from"./vendor-hooks-rDgu5KV9.js";import{f as pt}from"./format-error-BrmqJs5a.js";import{L as mt,c as ft}from"./vendor-mui-x-R-0SFz4c.js";import{A as ht}from"./AdapterDayjs-BD9H1lZ-.js";function we(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n<s||isNaN(Number(s)))&&(n=s)}),n||new Date(NaN)}function je(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n>s||isNaN(s.getDate()))&&(n=s)}),n||new Date(NaN)}function gt(e){return ce(1,arguments),L(e,Date.now())}var pe={},xt=We;Object.defineProperty(pe,"__esModule",{value:!0});var Oe=pe.default=void 0,vt=xt(Ue()),Dt=d;Oe=pe.default=(0,vt.default)((0,Dt.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const yt=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,a)=>e.slice(a*t,a*t+t)),bt=(e,t)=>{const n=U(Q(e),{locale:t}),a=Z(ee(e),{locale:t}),s=[];for(let o=n;G(o,a);)s.push(o),o=oe(o,1);return s},Et=({startDate:e},t)=>e&&L(t,e),kt=({endDate:e},t)=>e&&L(t,e),Mt=({startDate:e,endDate:t},n)=>e&&t&&(ue(n,{start:e,end:t})||L(n,e)||L(n,t)),St=({startDate:e,endDate:t})=>e&&t?L(e,t):!1,be=(e,t)=>{if(e){const n=e instanceof Date?e:nt(e);if(at(n))return n}return t},Rt=(e,t,n)=>{const{startDate:a,endDate:s}=e;if(a&&s){const o=we([a,t]),h=je([s,n]);return[o,de(o,h)?I(o,1):h]}return[a,s]},Ct=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:oe(e,-1),endDate:oe(e,-1)},{label:"This Week",startDate:U(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:U(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}],wt=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((a,s)=>e.getFullYear()-n+s)},jt=({date:e,setDate:t,nextDisabled:n,prevDisabled:a,onClickNext:s,onClickPrevious:o,locale:h})=>{const m=typeof h<"u"?[...Array(12).keys()].map(i=>{var D;return(D=h.localize)===null||D===void 0?void 0:D.month(i,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],f=i=>{t(lt(e,parseInt(i.target.value,10)))},p=i=>{t(ct(e,parseInt(i.target.value,10)))};return r.createElement(y,{container:!0,justifyContent:"space-between",alignItems:"center"},r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:o},r.createElement(et,{color:a?"disabled":"action"}))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:ot(e),onChange:f,MenuProps:{disablePortal:!0}},m.map((i,D)=>r.createElement(De,{key:i,value:D},i))))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:it(e),onChange:p,MenuProps:{disablePortal:!0}},wt(e,30).map(i=>r.createElement(De,{key:i,value:i},i))))),r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:s},r.createElement(tt,{color:n?"disabled":"action"}))))},Ot=({startOfRange:e,endOfRange:t,disabled:n,highlighted:a,outlined:s,filled:o,onClick:h,onHover:m,value:f})=>r.createElement(z,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:p=>!n&&a?p.palette.primary.light:void 0}},r.createElement(te,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:p=>!n&&s?`1px solid ${p.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:p=>p.palette.primary.dark},backgroundColor:p=>p.palette.primary.dark}:{}),disabled:n,onClick:h,onMouseOver:m},r.createElement(Y,{sx:{lineHeight:1.6,color:p=>n?p.palette.text.secondary:o?p.palette.primary.contrastText:p.palette.text.primary},variant:"body2"},f)));var re;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(re||(re={}));const Ee=e=>{var t;const{helpers:n,handlers:a,value:s,dateRange:o,marker:h,setValue:m,minDate:f,maxDate:p,locale:i}=e,D=((t=i==null?void 0:i.options)===null||t===void 0?void 0:t.weekStartsOn)||0,b=typeof i<"u"?[...Array(7).keys()].map(g=>{var v;return(v=i.localize)===null||v===void 0?void 0:v.day((g+D)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[x,E]=e.navState;return r.createElement(Re,{square:!0,elevation:0,sx:{width:290}},r.createElement(y,{container:!0},r.createElement(jt,{date:s,setDate:m,nextDisabled:!E,prevDisabled:!x,onClickPrevious:()=>a.onMonthNavigate(h,re.Previous),onClickNext:()=>a.onMonthNavigate(h,re.Next),locale:i}),r.createElement(y,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},b.map((g,v)=>r.createElement(Y,{color:"textSecondary",key:v,variant:"caption"},g))),r.createElement(y,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},yt(bt(s,i),7).map((g,v)=>r.createElement(y,{key:v,container:!0,direction:"row",justifyContent:"center"},g.map(l=>{const S=Et(o,l),O=kt(o,l),k=St(o),j=Mt(o,l)||n.inHoverRange(l);return r.createElement(Ot,{key:ie(l,"dd-MM-yyyy"),filled:S||O,outlined:gt(l),highlighted:j&&!k,disabled:!de(s,l)||!ue(l,{start:f,end:p}),startOfRange:S&&!k,endOfRange:O&&!k,onClick:()=>a.onDayClick(l),onHover:()=>a.onDayHover(l),value:st(l)})}))))))},ke=(e,t)=>{const{startDate:n,endDate:a}=e,{startDate:s,endDate:o}=t;return n&&s&&a&&o?L(n,s)&&L(a,o):!1},Nt=({ranges:e,setRange:t,selectedRange:n})=>r.createElement($e,null,e.map((a,s)=>r.createElement(qe,{button:!0,key:s,onClick:()=>t(a),sx:[ke(a,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},r.createElement(He,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:ke(a,n)?"bold":"normal"}}},a.label)))),le={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Tt=e=>{const{ranges:t,dateRange:n,minDate:a,maxDate:s,firstMonth:o,setFirstMonth:h,secondMonth:m,setSecondMonth:f,setDateRange:p,helpers:i,handlers:D,locale:b}=e,{startDate:x,endDate:E}=n,g=rt(m,o)>=2,v={dateRange:n,minDate:a,maxDate:s,helpers:i,handlers:D};return r.createElement(Re,{elevation:5,square:!0},r.createElement(y,{container:!0,direction:"row",wrap:"nowrap"},r.createElement(y,null,r.createElement(Nt,{selectedRange:n,ranges:t,setRange:p})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(y,null,r.createElement(y,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},x?ie(x,"dd MMMM yyyy",{locale:b}):"Start Date")),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Oe,{color:"action"})),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},E?ie(E,"dd MMMM yyyy",{locale:b}):"End Date"))),r.createElement(se,null),r.createElement(y,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},r.createElement(Ee,Object.assign({},v,{value:o,setValue:h,navState:[!0,g],marker:le.FIRST_MONTH,locale:b})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(Ee,Object.assign({},v,{value:m,setValue:f,navState:[g,!0],marker:le.SECOND_MONTH,locale:b}))))))},Pt=e=>{const t=new Date,{open:n,onChange:a,initialDateRange:s,minDate:o,maxDate:h,definedRanges:m=Ct(new Date,e.locale),locale:f}=e,p=be(o,B(t,-10)),i=be(h,B(t,10)),[D,b]=Rt(s||{},p,i),[x,E]=w.useState(Object.assign({},s)),[g,v]=w.useState(),[l,S]=w.useState(D||t),[O,k]=w.useState(b||I(l,1)),{startDate:j,endDate:P}=x,K=c=>{G(c,O)&&S(c)},X=c=>{ye(c,l)&&k(c)},$=c=>{let{startDate:M,endDate:R}=c;if(M&&R)c.startDate=M=we([M,p]),c.endDate=R=je([R,i]),E(c),a(c),S(M),k(de(M,R)?I(M,1):R);else{const q={};E(q),a(q),S(t),k(I(l,1))}},F=c=>{if(j&&!P&&!G(c,j)){const M={startDate:j,endDate:c};a(M),E(M)}else E({startDate:c,endDate:void 0});v(c)},A=(c,M)=>{if(c===le.FIRST_MONTH){const R=I(l,M);G(R,O)&&S(R)}else{const R=I(O,M);G(l,R)&&k(R)}},W=c=>{j&&!P&&(!g||!L(c,g))&&v(c)},N={inHoverRange:c=>j&&!P&&g&&ye(g,j)&&ue(c,{start:j,end:g})},T={onDayClick:F,onDayHover:W,onMonthNavigate:A};return n?w.createElement(Tt,{dateRange:x,minDate:p,maxDate:i,ranges:m,firstMonth:l,secondMonth:O,setFirstMonth:K,setSecondMonth:X,setDateRange:$,helpers:N,handlers:T,locale:f}):null},It=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:a,open:s}=e,o=()=>{t!==!1&&a()},h=m=>(m==null?void 0:m.key)==="Escape"&&o();return r.createElement(z,{sx:{position:"relative"}},s&&r.createElement(z,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:h,onClick:o}),r.createElement(z,{sx:{position:"relative",zIndex:1},className:n},r.createElement(Pt,Object.assign({},e))))},Ft=e=>r.createElement(It,Object.assign({},e));function Me(e,t,n,a){return parseFloat((t-a*t/e+n).toFixed(2))}function _t(e){[...e.querySelectorAll("*")].forEach(t=>e.removeChild(t))}function Lt(e){return e.value}function J(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const a in t)n.setAttribute(a,t[a]);return n}function At(e,t=[],n={}){if(_t(e),t.length<=1)return;let a=[];typeof t[0]=="number"?a=t.map(u=>({value:u})):a=t;const{onmousemove:s}=n,{onmouseout:o}=n,h="interactive"in n?n.interactive:!!s,m=n.spotRadius||2,f=m*2,p=n.cursorWidth||2,i=parseFloat(e.attributes["stroke-width"].value),D=n.fetch||Lt,b=a.map(u=>D(u)),x=parseFloat(e.attributes.width.value)-f*2,E=parseFloat(e.attributes.height.value),g=E-i*2-f,v=Math.max(...b)===0?1:Math.max(...b),l=-1e3,S=b.length-1,O=x/S,k=[],j=Me(v,g,i+m,b[0]);let P=`M${f} ${j}`;b.forEach((u,N)=>{const T=N*O+f,c=Me(v,g,i+m,u);k.push(Object.assign({},a[N],{index:N,x:T,y:c})),P+=` L ${T} ${c}`});const K=J("path",{class:"sparkline--line",d:P,fill:"none"}),X=`${P} V ${E} L ${f} ${E} Z`,$=J("path",{class:"sparkline--fill",d:X,stroke:"none"});if(e.appendChild($),e.appendChild(K),!h)return;const F=J("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:E,"stroke-width":p}),A=J("circle",{class:"sparkline--spot",cx:l,cy:l,r:m});e.appendChild(F),e.appendChild(A);const W=J("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(W),W.addEventListener("mouseout",u=>{F.setAttribute("x1",l.toString()),F.setAttribute("x2",l.toString()),A.setAttribute("cx",l.toString()),o&&o(u)}),W.addEventListener("mousemove",u=>{const N=u.offsetX;let T=k.find(Pe=>Pe.x>=N);T||(T=k[S]);const c=k[k.indexOf(T)-1];let M,R;c?(R=c.x+(T.x-c.x)/2,M=N>=R?T:c):M=T;const{x:q}=M,{y:Te}=M;A.setAttribute("cx",q.toString()),A.setAttribute("cy",Te.toString()),F.setAttribute("x1",q.toString()),F.setAttribute("x2",q.toString()),s&&s(u,M)})}function me({style:e,title:t,value:n,graph:a,description:s,empty:o}){return d.jsx(Yt,{children:d.jsxs(ze,{style:{...e},children:[d.jsx(Y,{sx:{fontSize:14},color:"text.secondary",children:t}),o&&r.isValidElement(o)?d.jsx(z,{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center",style:{height:150},children:o}):d.jsxs(d.Fragment,{children:[d.jsx(Y,{variant:"h5",component:"div",mt:1,children:n}),a,!!s&&d.jsx(z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:s})]})]})})}me.propTypes={style:C.object,title:C.node,value:C.node,graph:C.node,description:C.any,empty:C.node};me.defaultProps={style:{},title:null,value:null,graph:null,empty:null,description:null};const Yt=Ve(Be)`
2
2
  .card-content {
3
3
  height: 150px;
4
4
  }
@@ -32,4 +32,4 @@ import{b as r,r as w}from"./vendor-react-DEoibe3W.js";import{t as H,z as Ie,ax a
32
32
  fill: red;
33
33
  stroke: red;
34
34
  }
35
- `;function fe({id:e,title:t,current:n,description:a,data:s,dateFn:o,valueFn:h,empty:m}){const f=w.useRef(null),p=w.useRef(null),i=dt({style:{top:0,left:0},hidden:!0,textContent:""}),[D,b]=w.useState(null),x=ut(D),E={onmousemove(g,v){const{date:l,value:S}=v;i.textContent=`${o(l)}: ${h(S)}`,i.style.top=-30,i.style.left=80,i.hidden=!1},onmouseout(){i.hidden=!0}};return w.useEffect(()=>{setTimeout(()=>{b(document.querySelector(`.${e}`)),setTimeout(()=>{f.current&&At(f.current,s||[],E)},400)})},[s]),d.jsx(me,{title:t,value:n,empty:m,graph:d.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[d.jsx("svg",{ref:f,className:"sparkline",width:(x==null?void 0:x.width)||100,height:30,strokeWidth:"2"}),d.jsx("span",{className:"tooltip",ref:p,hidden:i.hidden,style:{...i.style},children:i.textContent})]}),description:a})}fe.propTypes={id:C.string.isRequired,title:C.string.isRequired,current:C.any.isRequired,description:C.any,data:C.array,dateFn:C.func,valueFn:C.func,empty:C.node};fe.defaultProps={description:null,empty:null,data:[],dateFn:e=>e,valueFn:e=>e};const _=_e(0),Ne=(e,t)=>[{label:"This Week",startDate:G(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:G(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}];function Wt({client:e,did:t}){const n=H().subtract(1,"day").toDate(),{info:a,inService:s}=Ie(),{t:o,locale:h}=Ze(),[m,f]=w.useState(null),[p,i]=w.useState(!1),[D,b]=w.useState(n),[x,E]=w.useState({startDate:H().subtract(30,"day").toDate(),endDate:n}),g=Le(async()=>(await e.getTrafficInsights({input:{did:t,startDate:H(x.startDate).format("YYYY-MM-DD"),endDate:H(x.endDate).format("YYYY-MM-DD")}})).list);w.useEffect(()=>{g.loading||x.startDate&&x.endDate&&g.retry()},[x]);const v=u=>{f(m?null:u.currentTarget)},l=g.value||[],{loading:S,error:O}=g;if(!l.length&&S)return d.jsx(Ke,{});if(O)return d.jsx(Xe,{severity:"error",children:pt(O)});const k={totalRequests:_,validRequests:_,failedRequests:_,uniqueVisitors:_,uniqueFiles:_,uniqueReferrers:_,uniqueNotFound:_,uniqueStaticFiles:_,logSize:he,bandwidth:he},j=Object.keys(k).map(u=>({id:`${u}_chart`,title:o(`analytics.traffic.${u}`),current:l.length?k[u](l[0][u]):0,data:l.map(N=>({date:N.date,value:N[u]})).reverse(),dateFn:_,valueFn:k[u]})),P=!!m,K=P?"date-range-picker-popover":void 0,X=s?Qe.WELLKNOWN_SERVICE_PATH_PREFIX:a.routing.adminPath,$=Fe(window.location.origin,X,`/api/analytics/traffic?date=${H(D).format("YYYY-MM-DD")}&did=${t}`),F=u=>{E(u),f(null)},A=u=>{b(u.toDate()),i(!1)},W=()=>{window.open($)};return d.jsxs("div",{children:[d.jsxs(Y,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),d.jsxs(Je,{onClick:v,variant:"outlined",size:"small",color:"inherit",sx:{fontWeight:400},children:[ge(x.startDate,h)," - ",ge(x.endDate,h)]})]}),d.jsx(Ue,{id:K,open:P,anchorEl:m,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:d.jsx(Ft,{open:!0,toggle:v,maxDate:n,definedRanges:Ne(D),onChange:F})}),d.jsx(y,{container:!0,spacing:4,children:j.map(u=>d.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:d.jsx(fe,{...u})},u.id))}),d.jsxs(Y,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),d.jsxs("span",{children:[p&&d.jsx(te,{onClick:W,style:{marginRight:32},children:d.jsx(Ye,{})}),d.jsx(mt,{dateAdapter:ht,children:d.jsx(ft,{disableFuture:!0,format:"ll",value:H(D),onChange:A,slotProps:{textField:{size:"small"}}})})]})]}),d.jsx(Ae,{url:$,width:"100%",height:"100%",frameBorder:0,onLoad:()=>i(!0),styles:{border:0,minHeight:"400vh"}})]})}const nn=Object.freeze(Object.defineProperty({__proto__:null,default:Wt,getDefaultRanges:Ne},Symbol.toStringTag,{value:"Module"}));export{Ft as D,Ne as g,nn as t};
35
+ `;function fe({id:e,title:t,current:n,description:a,data:s,dateFn:o,valueFn:h,empty:m}){const f=w.useRef(null),p=w.useRef(null),i=dt({style:{top:0,left:0},hidden:!0,textContent:""}),[D,b]=w.useState(null),x=ut(D),E={onmousemove(g,v){const{date:l,value:S}=v;i.textContent=`${o(l)}: ${h(S)}`,i.style.top=-30,i.style.left=80,i.hidden=!1},onmouseout(){i.hidden=!0}};return w.useEffect(()=>{setTimeout(()=>{b(document.querySelector(`.${e}`)),setTimeout(()=>{f.current&&At(f.current,s||[],E)},400)})},[s]),d.jsx(me,{title:t,value:n,empty:m,graph:d.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[d.jsx("svg",{ref:f,className:"sparkline",width:(x==null?void 0:x.width)||100,height:30,strokeWidth:"2"}),d.jsx("span",{className:"tooltip",ref:p,hidden:i.hidden,style:{...i.style},children:i.textContent})]}),description:a})}fe.propTypes={id:C.string.isRequired,title:C.string.isRequired,current:C.any.isRequired,description:C.any,data:C.array,dateFn:C.func,valueFn:C.func,empty:C.node};fe.defaultProps={description:null,empty:null,data:[],dateFn:e=>e,valueFn:e=>e};const _=_e(0),Ne=(e,t)=>[{label:"This Week",startDate:U(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:U(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}];function Wt({client:e,did:t}){const n=H().subtract(1,"day").toDate(),{info:a,inService:s}=Ie(),{t:o,locale:h}=Ze(),[m,f]=w.useState(null),[p,i]=w.useState(!1),[D,b]=w.useState(n),[x,E]=w.useState({startDate:H().subtract(30,"day").toDate(),endDate:n}),g=Le(async()=>(await e.getTrafficInsights({input:{did:t,startDate:H(x.startDate).format("YYYY-MM-DD"),endDate:H(x.endDate).format("YYYY-MM-DD")}})).list);w.useEffect(()=>{g.loading||x.startDate&&x.endDate&&g.retry()},[x]);const v=u=>{f(m?null:u.currentTarget)},l=g.value||[],{loading:S,error:O}=g;if(!l.length&&S)return d.jsx(Ke,{});if(O)return d.jsx(Xe,{severity:"error",children:pt(O)});const k={totalRequests:_,validRequests:_,failedRequests:_,uniqueVisitors:_,uniqueFiles:_,uniqueReferrers:_,uniqueNotFound:_,uniqueStaticFiles:_,logSize:he,bandwidth:he},j=Object.keys(k).map(u=>({id:`${u}_chart`,title:o(`analytics.traffic.${u}`),current:l.length?k[u](l[0][u]):0,data:l.map(N=>({date:N.date,value:N[u]})).reverse(),dateFn:_,valueFn:k[u]})),P=!!m,K=P?"date-range-picker-popover":void 0,X=s?Qe.WELLKNOWN_SERVICE_PATH_PREFIX:a.routing.adminPath,$=Fe(window.location.origin,X,`/api/analytics/traffic?date=${H(D).format("YYYY-MM-DD")}&did=${t}`),F=u=>{E(u),f(null)},A=u=>{b(u.toDate()),i(!1)},W=()=>{window.open($)};return d.jsxs("div",{children:[d.jsxs(Y,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),d.jsxs(Je,{onClick:v,variant:"outlined",size:"small",color:"inherit",sx:{fontWeight:400},children:[ge(x.startDate,h)," - ",ge(x.endDate,h)]})]}),d.jsx(Ge,{id:K,open:P,anchorEl:m,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:d.jsx(Ft,{open:!0,toggle:v,maxDate:n,definedRanges:Ne(D),onChange:F})}),d.jsx(y,{container:!0,spacing:4,children:j.map(u=>d.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:d.jsx(fe,{...u})},u.id))}),d.jsxs(Y,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),d.jsxs("span",{children:[p&&d.jsx(te,{onClick:W,style:{marginRight:32},children:d.jsx(Ye,{})}),d.jsx(mt,{dateAdapter:ht,children:d.jsx(ft,{disableFuture:!0,format:"ll",value:H(D),onChange:A,slotProps:{textField:{size:"small"}}})})]})]}),d.jsx(Ae,{url:$,width:"100%",height:"100%",frameBorder:0,onLoad:()=>i(!0),styles:{border:0,minHeight:"400vh"}})]})}const nn=Object.freeze(Object.defineProperty({__proto__:null,default:Wt,getDefaultRanges:Ne},Symbol.toStringTag,{value:"Module"}));export{Ft as D,Ne as g,nn as t};
@@ -1,4 +1,4 @@
1
- import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-UZpb7wT7.js";import{u as A,j as b,B as R,ao as D}from"./vendor-ux-did-connect-TEE6cGq6.js";import{H as P}from"./addon-ygDS7Fug.js";import{L as E}from"./landing-page-q-KgqE9Q.js";import{R as I,b as L}from"./vendor-arcblock-CN2B_oTr.js";import{d as B}from"./CheckCircle-Dvhgeo9j.js";import{m as F}from"./vendor-hooks-rDgu5KV9.js";import{r as o}from"./vendor-react-DEoibe3W.js";import{u as H,d as W,s as _,a as z,S as N}from"./index-u-w3iMC9.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-DCM9zW3a.js";function se(){var i,c,p,l;const{t:s,locale:u}=A(),{api:h,session:x}=H(),{searchParams:g}=new URL(window.location.href),[j,S]=o.useState(!1),r=g.get("transferId"),v=(i=window==null?void 0:window.env)==null?void 0:i.appId,w=o.useCallback(async()=>{const{data:t}=await W.get("/blocklet/transfer",{params:{transferId:r}});return t},[r]),a=F(w),C=o.useCallback(async(t,d)=>{t&&(_(d(t.sessionToken)),z(d(t.refreshToken))),await x.refresh(),S(!0)},[]);if(a.loading)return e.jsx(k,{});if(a.error)return e.jsx(K,{children:e.jsx(I,{status:"404",title:(p=(c=a.error)==null?void 0:c.response)==null?void 0:p.data,description:""})});const y=a.data.status==="success";let n;return y||j?n=e.jsxs(e.Fragment,{children:[e.jsx(q,{children:e.jsx(P,{SessionContext:N})}),e.jsx(f,{pt:1,color:"success.main",children:e.jsx(B,{style:{fontSize:80}})}),e.jsx(T,{my:4,variant:"h5",children:s("team.transferApp.successTitle")}),e.jsx("a",{href:`${b.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,children:e.jsx(R,{variant:"contained",children:s("team.transferApp.visitDashboard")})})]}):n=e.jsx(D,{popup:!0,open:!0,action:"receive-transfer-app-owner",checkFn:h.get,forceConnected:!1,autoConnect:!1,checkTimeout:10*60*1e3,onSuccess:C,onClose:()=>{},locale:u,messages:{title:s("team.transferApp.receiveDialog.title"),scan:s("team.transferApp.receiveDialog.scan"),confirm:s("team.transferApp.receiveDialog.confirm"),success:s("team.transferApp.receiveDialog.success")},extraParams:{transferId:r,appDid:v},hideCloseButton:!0}),e.jsx(E,{did:(l=window.blocklet)==null?void 0:l.appPid,children:e.jsx(f,{sx:{maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n})})}const q=m(L)`
1
+ import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-D_bnq77o.js";import{u as A,j as b,B as R,ao as D}from"./vendor-ux-did-connect-DHrruicZ.js";import{H as P}from"./addon--u4EErgw.js";import{L as E}from"./landing-page-Due4o1uF.js";import{R as I,b as L}from"./vendor-arcblock-uz9DVywv.js";import{d as B}from"./CheckCircle-Ds4QI0ey.js";import{m as F}from"./vendor-hooks-rDgu5KV9.js";import{r as o}from"./vendor-react-DEoibe3W.js";import{u as H,d as W,s as _,a as z,S as N}from"./index-DefO2n6z.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-BPVDAm8U.js";function se(){var i,c,p,l;const{t:s,locale:u}=A(),{api:h,session:x}=H(),{searchParams:g}=new URL(window.location.href),[j,S]=o.useState(!1),r=g.get("transferId"),v=(i=window==null?void 0:window.env)==null?void 0:i.appId,w=o.useCallback(async()=>{const{data:t}=await W.get("/blocklet/transfer",{params:{transferId:r}});return t},[r]),a=F(w),C=o.useCallback(async(t,d)=>{t&&(_(d(t.sessionToken)),z(d(t.refreshToken))),await x.refresh(),S(!0)},[]);if(a.loading)return e.jsx(k,{});if(a.error)return e.jsx(K,{children:e.jsx(I,{status:"404",title:(p=(c=a.error)==null?void 0:c.response)==null?void 0:p.data,description:""})});const y=a.data.status==="success";let n;return y||j?n=e.jsxs(e.Fragment,{children:[e.jsx(q,{children:e.jsx(P,{SessionContext:N})}),e.jsx(f,{pt:1,color:"success.main",children:e.jsx(B,{style:{fontSize:80}})}),e.jsx(T,{my:4,variant:"h5",children:s("team.transferApp.successTitle")}),e.jsx("a",{href:`${b.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,children:e.jsx(R,{variant:"contained",children:s("team.transferApp.visitDashboard")})})]}):n=e.jsx(D,{popup:!0,open:!0,action:"receive-transfer-app-owner",checkFn:h.get,forceConnected:!1,autoConnect:!1,checkTimeout:10*60*1e3,onSuccess:C,onClose:()=>{},locale:u,messages:{title:s("team.transferApp.receiveDialog.title"),scan:s("team.transferApp.receiveDialog.scan"),confirm:s("team.transferApp.receiveDialog.confirm"),success:s("team.transferApp.receiveDialog.success")},extraParams:{transferId:r,appDid:v},hideCloseButton:!0}),e.jsx(E,{did:(l=window.blocklet)==null?void 0:l.appPid,children:e.jsx(f,{sx:{maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n})})}const q=m(L)`
2
2
  position: fixed;
3
3
  top: 16px;
4
4
  right: 16px;
@@ -1 +1 @@
1
- import{j as i,aa as t,bL as C,bW as w,bX as k,bY as L,T as E}from"./vendor-mui-core-UZpb7wT7.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{u as F,B as u,_ as a,aM as P,j as d}from"./vendor-ux-did-connect-TEE6cGq6.js";import{a as T,u as f,l as S}from"./vendor-hooks-rDgu5KV9.js";import{A as m}from"./vendor-utils-rHXShPKm.js";import{u as _}from"./index-u-w3iMC9.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CN2B_oTr.js";function M(){var c,l;const{api:b}=_(),h=R(),{t:n}=F(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=P(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(v,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{M as default};
1
+ import{j as i,aa as t,bL as C,bW as w,bX as k,bY as L,T as E}from"./vendor-mui-core-D_bnq77o.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{u as F,B as u,_ as a,aM as P,j as d}from"./vendor-ux-did-connect-DHrruicZ.js";import{a as T,u as f,l as S}from"./vendor-hooks-rDgu5KV9.js";import{A as m}from"./vendor-utils-rHXShPKm.js";import{u as _}from"./index-DefO2n6z.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-uz9DVywv.js";function M(){var c,l;const{api:b}=_(),h=R(),{t:n}=F(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=P(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(v,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{M as default};
@@ -1,2 +1,2 @@
1
- import{g as G,r as z,b as he}from"./vendor-react-DEoibe3W.js";import{H as U,j as l,ap as te,s as V,w as me,aa as Y,T as b,y as ge}from"./vendor-mui-core-UZpb7wT7.js";import{f as D,u as Z}from"./vendor-hooks-rDgu5KV9.js";import{j as ne,I as ye}from"./vendor-ux-did-connect-TEE6cGq6.js";import{b as Q,z as re,A as O}from"./vendor-utils-rHXShPKm.js";import{g as ve,n as _e,o as Le,q as xe,s as Ee,c as j,t as Se}from"./vendor-arcblock-CN2B_oTr.js";import{u as Te}from"./session-6XaVDQaE.js";import{z as Ce,X as we,V as Ne}from"./index-u-w3iMC9.js";var K={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(ve),s=u(_e),n=u(Le),a=u(xe),c=u(Ee);function u(o){return o&&o.__esModule?o:{default:o}}function f(o,i){return g(o)||L(o,i)||p(o,i)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(o,i){if(o){if(typeof o=="string")return E(o,i);var d={}.toString.call(o).slice(8,-1);return d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set"?Array.from(o):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?E(o,i):void 0}}function E(o,i){(i==null||i>o.length)&&(i=o.length);for(var d=0,x=Array(i);d<i;d++)x[d]=o[d];return x}function L(o,i){var d=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(d!=null){var x,v,C,w,S=[],h=!0,N=!1;try{if(C=(d=d.call(o)).next,i!==0)for(;!(h=(x=C.call(d)).done)&&(S.push(x.value),S.length!==i);h=!0);}catch(R){N=!0,v=R}finally{try{if(!h&&d.return!=null&&(w=d.return(),Object(w)!==w))return}finally{if(N)throw v}}return S}}function g(o){if(Array.isArray(o))return o}var y={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(o,i){if((0,r.default)(o),!o||/[\s<>]/.test(o)||o.indexOf("mailto:")===0||(i=(0,c.default)(i,y),i.validate_length&&o.length>i.max_allowed_length)||!i.allow_fragments&&o.includes("#")||!i.allow_query_components&&(o.includes("?")||o.includes("&")))return!1;var d,x,v,C,w,S,h,N;if(h=o.split("#"),o=h.shift(),h=o.split("?"),o=h.shift(),h=o.split("://"),h.length>1){if(d=h.shift().toLowerCase(),i.require_valid_protocol&&i.protocols.indexOf(d)===-1)return!1}else{if(i.require_protocol)return!1;if(o.slice(0,2)==="//"){if(!i.allow_protocol_relative_urls)return!1;h[0]=o.slice(2)}}if(o=h.join("://"),o==="")return!1;if(h=o.split("/"),o=h.shift(),o===""&&!i.require_host)return!0;if(h=o.split("@"),h.length>1){if(i.disallow_auth||h[0]===""||(x=h.shift(),x.indexOf(":")>=0&&x.split(":").length>2))return!1;var R=x.split(":"),_=f(R,2),fe=_[0],pe=_[1];if(fe===""&&pe==="")return!1}C=h.join("@"),S=null,N=null;var $=C.match(T);if($?(v="",N=$[1],S=$[2]||null):(h=C.split(":"),v=h.shift(),h.length&&(S=h.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(i.require_port)return!1;return i.host_whitelist?(0,s.default)(v,i.host_whitelist):v===""&&!i.require_host?!0:!(!(0,a.default)(v)&&!(0,n.default)(v,i)&&(!N||!(0,a.default)(N,6))||(v=v||N,i.host_blacklist&&(0,s.default)(v,i.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(K,K.exports);var Oe=K.exports;const Ae=G(Oe),vt=e=>{if(!e||!e.length)return[];const t=[];let r=null,s=[];if(e.forEach(n=>{var g,y,T,A;if(!n.activity||!n.activity.type||!r){r&&(s.length===1?t.push(s[0]):(r.items=s,t.push(r))),n.activity&&n.activity.type?(r=n,s=[n]):(t.push(n),r=null,s=[]);return}const a=s[0].activity,c=a.type,u=(g=a.target)==null?void 0:g.type,f=(y=a.target)==null?void 0:y.id,m=n.activity.type,p=(T=n.activity.target)==null?void 0:T.type,E=(A=n.activity.target)==null?void 0:A.id;if(c&&m&&c===m&&(!a.target&&!n.activity.target||a.target&&n.activity.target&&u===p&&f===E))s.push(n);else{if(s.length===1)t.push(s[0]);else{const o=Object.assign({},r,{items:s});t.push(o)}r=n,s=[n]}}),r)if(s.length===1)t.push(s[0]);else{const n=Object.assign({},r,{items:s});t.push(n)}return t},Ue=e=>!Q(e.activity)&&!!e.activity.type&&!!e.activity.actor,_t=e=>Ue(e)&&!!e.actorInfo&&!!e.actorInfo.did,je=e=>{if(!e)return null;const{meta:t,target:r,actor:s}=e||{};let n=r==null?void 0:r.id;return(r==null?void 0:r.type)==="user"&&(n=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:s})),{metaLink:t==null?void 0:t.id,targetLink:n}},Me=e=>Ae(e),I={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},Ie={[I.COMMENT]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have left ",t," comments on ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["has commented on ",r?"your":"the"," ",e,":"]}),[I.LIKE]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}),[I.FOLLOW]:(e,t)=>t>1?l.jsx(l.Fragment,{children:"have followed you"}):l.jsx(l.Fragment,{children:"has followed you"}),[I.TIPS]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["left tips for ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["left a tip for ",r?"your":"the"," ",e,":"]}),[I.MENTION]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have mentioned you in ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["mentioned you in ",r?"your":"the"," ",e,":"]}),[I.ASSIGN]:()=>l.jsx(l.Fragment,{children:"has assigned you a task: "}),[I.UN_ASSIGN]:()=>l.jsx(l.Fragment,{children:"has revoked your task assignment: "})},F=z.memo(function({user:t,color:r="text.secondary"}){const s=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return l.jsx(te,{href:s,color:r,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});F.propTypes={user:U.shape({did:U.string.isRequired,fullName:U.string.isRequired}).isRequired,color:U.string};F.displayName="UserLink";function Lt({activity:e,users:t,actors:r,extra:s={},mountPoint:n=""}){const{session:a}=Te()||{},{type:c,target:u}=e||{},{type:f,author:m}=u||{},{linkColor:p="text.secondary"}=s||{},E=D(()=>{var d;return m?(((d=a==null?void 0:a.user)==null?void 0:d.did)||(s==null?void 0:s.userDid))===m:!0},[a,m]),L=D(()=>{if(!Array.isArray(t))return new Map;const i=new Map;return t.forEach(d=>{d!=null&&d.did&&!i.has(d.did)&&i.set(d.did,d)}),i},[t]),g=D(()=>Array.isArray(r)?[...new Set(r)].map(d=>d?L.get(d)||{did:d,fullName:"System"}:null):[],[r,L]),y=Z(()=>{if(!Array.isArray(g)||g.length===0)return null;if(g.length===1)return l.jsx(F,{user:g[0],color:p});const i=g.slice(0,-1),d=g[g.length-1];if(g.length===2)return l.jsxs(l.Fragment,{children:[l.jsx(F,{user:i[0],color:p})," and ",l.jsx(F,{user:d,color:p})]});const x=g.length>3,v=x?g.slice(0,2):i;return l.jsxs(l.Fragment,{children:[v.map((C,w)=>l.jsxs(he.Fragment,{children:[l.jsx(F,{user:C,color:p}),w<v.length-1?", ":""]},C.did)),x?`, and ${g.length-2} others`:l.jsxs(l.Fragment,{children:[", and ",l.jsx(F,{user:d,color:p})]})]})}),T=Z(()=>{const i=Ie[c];return i?i(f==="doc"?"document":f,t.length,E):null}),A=D(()=>{const i=y(),d=T();return!i||!d?null:l.jsxs(l.Fragment,{children:[i," ",d]})},[c,f,g,y,T]),o=D(()=>{if(!e)return null;const i=je(e);return i!=null&&i.targetLink?Me(i==null?void 0:i.targetLink)?i==null?void 0:i.targetLink:O(n,i.targetLink):null},[e,n]);return!c||Q(u)?null:l.jsxs(l.Fragment,{children:[A," ",l.jsx(te,{href:o,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:i=>{i.customPreventRedirect=!0},children:u.name||u.desc})]})}const Fe={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};se.propTypes={meta:U.object.isRequired};const Re=V(me)(({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 ${e.palette.divider}`,boxShadow:"none"})),De=V(Y)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),Pe=V(Y)({display:"flex",justifyContent:"space-between",alignItems:"center"});function se({meta:e}){const{amount:t,symbol:r,chainId:s}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${s}`,"_blank")};return l.jsxs(Re,{children:[l.jsxs(De,{children:[l.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),l.jsx(b,{variant:"h5",color:"text.primary",children:"ArcBlock"})]}),l.jsxs(Pe,{children:[l.jsxs(Y,{display:"flex",alignItems:"baseline",gap:1,children:[l.jsxs(b,{component:"span",variant:"h5",color:"text.primary",fontWeight:"bold",children:["+ ",t]}),l.jsx(b,{component:"span",variant:"subtitle2",color:"text.secondary",children:r})]}),l.jsx(ge,{variant:"outlined",size:"small",color:"secondary",endIcon:l.jsx(ye,{icon:Fe}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}ae.propTypes={meta:U.object.isRequired,type:U.string.isRequired,hideTips:U.bool,sx:U.object};ae.defaultProps={hideTips:!1,sx:{}};function ae({meta:e,type:t,hideTips:r=!1,sx:s}){return Q(e)?null:t==="tips"&&!r?l.jsx(se,{meta:e}):l.jsx(b,{variant:"subtitle2",fontSize:16,component:"p",sx:s,color:"text.secondary",children:e.content})}var be=z;function $e(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var B=$e(be);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},q.apply(this,arguments)}function Be(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},W(e,t)}function He(e,t){if(e==null)return{};var r={},s=Object.keys(e),n,a;for(a=0;a<s.length;a++)n=s[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var J={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},Ke=["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 qe(e,t){if(!e||typeof e!="object")return e;var r={};return Object.keys(e).forEach(function(s){t.indexOf(s)>-1||(r[s]=e[s])}),r}var We=["component","className","unsafeHTML"];function ie(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var r=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(u){r.appendChild(ke(u))}),e.parentNode.replaceChild(r,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),a=n.length,c=0;c<a;c++)ie(n[c],t)}function ke(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function ee(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function oe(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);oe(e.parentNode,t)}}function Ge(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 H(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var le={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},ze=Object.keys(le),ce=function(e){Be(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 r=t.prototype;return r.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},r.componentDidUpdate=function(n){n.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==n&&this.reflow(this.props)},r.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},r.setState=function(n,a){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,a)},r.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(J).forEach(function(a){n.style[a]=J[a]}),document.body.appendChild(n)}},r.copyStyleToCanvas=function(){var n=this,a=window.getComputedStyle(this.target);Ke.forEach(function(c){n.canvas.style[c]=a[c]})},r.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var a=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");ie(this.canvas,a);var c=this.putEllipsis(this.calcIndexes()),u={clamped:c,html:this.canvas.innerHTML};this.setState(u,n.onReflow.bind(this,u))},r.calcIndexes=function(){var n=[0],a=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),c=a.length;if(!a.length)return n;var u=a.find(H);if(!u)return n;for(var f=1,m=u.offsetTop,p=1;p<c&&!(H(a[p])&&a[p].offsetTop-m>1&&(f++,n.push(p),m=a[p].offsetTop,f>this.maxLine));p++);return n},r.putEllipsis=function(n){if(n.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,n[this.maxLine]);var a=this.nlUnits.pop(),c=this.makeEllipsisSpan();do oe(a,this.canvas),Ge(a).appendChild(c),a=this.nlUnits.pop();while(a&&(!H(a)||c.offsetHeight>a.offsetHeight||c.offsetTop>a.offsetTop));return a&&ee(a),this.nlUnits.forEach(ee),!0},r.makeEllipsisSpan=function(){var n=this.props,a=n.ellipsisHTML,c=n.ellipsis,u=document.createElement("span");u.appendChild(document.createElement("wbr"));var f=document.createElement("span");return f.className="LinesEllipsis-ellipsis",a?f.innerHTML=a:f.textContent=c,u.appendChild(f),u},r.isClamped=function(){return this.clamped},r.render=function(){var n=this,a=this.state,c=a.html,u=a.clamped,f=this.props,m=f.component,p=f.className,E=f.unsafeHTML,L=He(f,We);return B.default.createElement(m,q({className:"LinesEllipsis "+(u?"LinesEllipsis--clamped":"")+" "+p,ref:function(y){return n.target=y}},qe(L,ze)),B.default.createElement("div",{dangerouslySetInnerHTML:{__html:u?c:E}}))},t}(B.default.Component);ce.defaultProps=le;var Ve=ce;const xt=G(Ve),Ye=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Qe=e=>{try{return new URL(e).host}catch{return e}};var Et={getChainHost:Ye,getUrlHost:Qe},St={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}},Xe={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"}},Ze={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,Je=(e,t)=>{k.set(e,t)},et=(e="en_US")=>k.get(e)||k.get("en_US");var ue={registerLang:Je,getLang:et},tt=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 nt=tt,{getLang:P}=ue,rt=(e,t)=>t===1?e:`${e}s`,st=1e-7;var at=(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 r=P(t.locale),s=[],n=(u,f)=>{const m=Math.floor(u*10**f+st);return(Math.round(m)/10**f).toFixed(f)},a=(u,f,m)=>{if((s.length===0||!t.colonNotation)&&u===0&&!(t.colonNotation&&f==="minute"))return;const{long:p}=r[f]||P("en_US")[f],{short:E}=r[f]||P("en_US")[f];let L=(m||u||"0").toString(),g,y;if(t.colonNotation){g=s.length>0?":":"",y="";const T=L.includes(".")?L.split(".")[0].length:L.length,A=s.length>0?2:1;L="0".repeat(Math.max(0,A-T))+L}else g="",t.locale==="zh_CN"?Object.values(c).filter(T=>T>0).length>1?!c.days&&!c.hours&&c.minutes&&t.compact?y=p:y=E:c.minutes?y=p:y=E:y=t.verbose?` ${rt(p,u)}`:E;s.push(g+L+y)},c=nt(e);if(a(Math.trunc(c.days/365),"year"),a(c.days%365,"day"),a(c.hours,"hour"),a(c.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(a(c.seconds,"second"),t.formatSubMilliseconds)a(c.milliseconds,"millisecond"),a(c.microseconds,"microsecond"),a(c.nanoseconds,"nanosecond");else{const u=c.milliseconds+c.microseconds/1e3+c.nanoseconds/1e6,f=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,m=u>=1?Math.round(u):Math.ceil(u),p=f?u.toFixed(f):m;a(Number.parseFloat(p,10),"millisecond",p)}else{const u=e/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,m=n(u,f),p=t.keepDecimalsOnWholeSeconds?m:m.replace(/\.0+$/,"");a(Number.parseFloat(p,10),"second",p)}if(s.length===0){const u=(r.millisecond||P("en_US").millisecond).long,f=(r.millisecond||P("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${u}`:f}`:`0${t.verbose?` ${u}s`:f}`}if(t.compact)return s[0];if(typeof t.unitCount=="number"){const u=t.colonNotation?"":" ";return s.slice(0,Math.max(t.unitCount,1)).join(u)}return t.colonNotation?s.join(""):s.join(" ")};const it=Xe,ot=Ze,{registerLang:X}=ue,de=at;X("en_US",it);X("zh_CN",ot);de.registerLang=X;var lt=de;const Tt=G(lt),M=(e,t)=>{var s;let r="?v=";return t?r+=we(t):r+=`${(s=e==null?void 0:e.meta)==null?void 0:s.version}${Ne(e==null?void 0:e.status)?"~":""}`,r};function ct({blocklet:e}){var d,x,v,C,w,S,h,N,R;const{inService:t}=Ce(),r=(d=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:d.value,s=(x=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE_DARK))==null?void 0:x.value,n=(v=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:v.value,a=(C=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT_DARK))==null?void 0:C.value,c=(w=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:w.value,u=(S=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))==null?void 0:S.value,f=(h=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))==null?void 0:h.value,m=(N=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_OG_IMAGE))==null?void 0:N.value,p=((R=window.env)==null?void 0:R.apiPrefix)||"/",E=`${O(p,`/blocklet/logo/${t?"":e.meta.did}`)}${M(e,r)}`,L=`${O(p,`/blocklet/logo-dark/${t?"":e.meta.did}`)}${M(e,s)}`,g=`${O(p,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${M(e,n??r)}`,y=`${O(p,`/blocklet/logo-rect-dark/${t?"":e.meta.did}`)}${M(e,a??s)}`,T=`${O(p,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${M(e,c??r)}`,A=`${O(p,`/blocklet/splash/portrait/${t?"":e.meta.did}`)}${M(e,u)}`,o=`${O(p,`/blocklet/splash/landscape/${t?"":e.meta.did}`)}${M(e,f)}`,i=`${O(p,`/blocklet/og-image/${t?"":e.meta.did}`)}${M(e,m)}`;return{logoUrl:E,logoDarkUrl:L,rectLogoUrl:g,rectLogoDarkUrl:y,faviconUrl:T,splashPortraitUrl:A,splashLandscapeUrl:o,ogImageUrl:i}}function Ct({blocklet:e,square:t}={}){const{logoUrl:r,logoDarkUrl:s,rectLogoUrl:n,rectLogoDarkUrl:a}=ct({blocklet:e}),c=z.useMemo(()=>({appLogo:r,appLogoDark:s,appLogoRect:n,appLogoRectDark:a}),[r,s,n,a]);return Se({meta:c,square:t})}export{xt as H,ae as M,Ae as a,Ct as b,Et as c,Me as d,_t as e,Fe as f,je as g,ct as h,Ue as i,vt as m,Tt as p,St as s,Lt as u};
1
+ import{g as G,r as z,b as he}from"./vendor-react-DEoibe3W.js";import{H as U,j as l,ap as te,s as V,w as me,aa as Y,T as b,y as ge}from"./vendor-mui-core-D_bnq77o.js";import{f as D,u as Z}from"./vendor-hooks-rDgu5KV9.js";import{j as ne,I as ye}from"./vendor-ux-did-connect-DHrruicZ.js";import{b as Q,z as re,A as O}from"./vendor-utils-rHXShPKm.js";import{l as ve,m as _e,n as Le,o as xe,q as Ee,c as j,s as Se}from"./vendor-arcblock-uz9DVywv.js";import{u as Te}from"./session-CHdTc1We.js";import{z as Ce,V as we,T as Ne}from"./index-DefO2n6z.js";var K={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(ve),s=u(_e),n=u(Le),a=u(xe),c=u(Ee);function u(o){return o&&o.__esModule?o:{default:o}}function f(o,i){return g(o)||L(o,i)||p(o,i)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(o,i){if(o){if(typeof o=="string")return E(o,i);var d={}.toString.call(o).slice(8,-1);return d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set"?Array.from(o):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?E(o,i):void 0}}function E(o,i){(i==null||i>o.length)&&(i=o.length);for(var d=0,x=Array(i);d<i;d++)x[d]=o[d];return x}function L(o,i){var d=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(d!=null){var x,v,C,w,S=[],h=!0,N=!1;try{if(C=(d=d.call(o)).next,i!==0)for(;!(h=(x=C.call(d)).done)&&(S.push(x.value),S.length!==i);h=!0);}catch(R){N=!0,v=R}finally{try{if(!h&&d.return!=null&&(w=d.return(),Object(w)!==w))return}finally{if(N)throw v}}return S}}function g(o){if(Array.isArray(o))return o}var y={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(o,i){if((0,r.default)(o),!o||/[\s<>]/.test(o)||o.indexOf("mailto:")===0||(i=(0,c.default)(i,y),i.validate_length&&o.length>i.max_allowed_length)||!i.allow_fragments&&o.includes("#")||!i.allow_query_components&&(o.includes("?")||o.includes("&")))return!1;var d,x,v,C,w,S,h,N;if(h=o.split("#"),o=h.shift(),h=o.split("?"),o=h.shift(),h=o.split("://"),h.length>1){if(d=h.shift().toLowerCase(),i.require_valid_protocol&&i.protocols.indexOf(d)===-1)return!1}else{if(i.require_protocol)return!1;if(o.slice(0,2)==="//"){if(!i.allow_protocol_relative_urls)return!1;h[0]=o.slice(2)}}if(o=h.join("://"),o==="")return!1;if(h=o.split("/"),o=h.shift(),o===""&&!i.require_host)return!0;if(h=o.split("@"),h.length>1){if(i.disallow_auth||h[0]===""||(x=h.shift(),x.indexOf(":")>=0&&x.split(":").length>2))return!1;var R=x.split(":"),_=f(R,2),fe=_[0],pe=_[1];if(fe===""&&pe==="")return!1}C=h.join("@"),S=null,N=null;var $=C.match(T);if($?(v="",N=$[1],S=$[2]||null):(h=C.split(":"),v=h.shift(),h.length&&(S=h.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(i.require_port)return!1;return i.host_whitelist?(0,s.default)(v,i.host_whitelist):v===""&&!i.require_host?!0:!(!(0,a.default)(v)&&!(0,n.default)(v,i)&&(!N||!(0,a.default)(N,6))||(v=v||N,i.host_blacklist&&(0,s.default)(v,i.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(K,K.exports);var Oe=K.exports;const Ae=G(Oe),vt=e=>{if(!e||!e.length)return[];const t=[];let r=null,s=[];if(e.forEach(n=>{var g,y,T,A;if(!n.activity||!n.activity.type||!r){r&&(s.length===1?t.push(s[0]):(r.items=s,t.push(r))),n.activity&&n.activity.type?(r=n,s=[n]):(t.push(n),r=null,s=[]);return}const a=s[0].activity,c=a.type,u=(g=a.target)==null?void 0:g.type,f=(y=a.target)==null?void 0:y.id,m=n.activity.type,p=(T=n.activity.target)==null?void 0:T.type,E=(A=n.activity.target)==null?void 0:A.id;if(c&&m&&c===m&&(!a.target&&!n.activity.target||a.target&&n.activity.target&&u===p&&f===E))s.push(n);else{if(s.length===1)t.push(s[0]);else{const o=Object.assign({},r,{items:s});t.push(o)}r=n,s=[n]}}),r)if(s.length===1)t.push(s[0]);else{const n=Object.assign({},r,{items:s});t.push(n)}return t},Ue=e=>!Q(e.activity)&&!!e.activity.type&&!!e.activity.actor,_t=e=>Ue(e)&&!!e.actorInfo&&!!e.actorInfo.did,je=e=>{if(!e)return null;const{meta:t,target:r,actor:s}=e||{};let n=r==null?void 0:r.id;return(r==null?void 0:r.type)==="user"&&(n=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:s})),{metaLink:t==null?void 0:t.id,targetLink:n}},Me=e=>Ae(e),I={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},Ie={[I.COMMENT]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have left ",t," comments on ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["has commented on ",r?"your":"the"," ",e,":"]}),[I.LIKE]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}),[I.FOLLOW]:(e,t)=>t>1?l.jsx(l.Fragment,{children:"have followed you"}):l.jsx(l.Fragment,{children:"has followed you"}),[I.TIPS]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["left tips for ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["left a tip for ",r?"your":"the"," ",e,":"]}),[I.MENTION]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have mentioned you in ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["mentioned you in ",r?"your":"the"," ",e,":"]}),[I.ASSIGN]:()=>l.jsx(l.Fragment,{children:"has assigned you a task: "}),[I.UN_ASSIGN]:()=>l.jsx(l.Fragment,{children:"has revoked your task assignment: "})},F=z.memo(function({user:t,color:r="text.secondary"}){const s=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return l.jsx(te,{href:s,color:r,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});F.propTypes={user:U.shape({did:U.string.isRequired,fullName:U.string.isRequired}).isRequired,color:U.string};F.displayName="UserLink";function Lt({activity:e,users:t,actors:r,extra:s={},mountPoint:n=""}){const{session:a}=Te()||{},{type:c,target:u}=e||{},{type:f,author:m}=u||{},{linkColor:p="text.secondary"}=s||{},E=D(()=>{var d;return m?(((d=a==null?void 0:a.user)==null?void 0:d.did)||(s==null?void 0:s.userDid))===m:!0},[a,m]),L=D(()=>{if(!Array.isArray(t))return new Map;const i=new Map;return t.forEach(d=>{d!=null&&d.did&&!i.has(d.did)&&i.set(d.did,d)}),i},[t]),g=D(()=>Array.isArray(r)?[...new Set(r)].map(d=>d?L.get(d)||{did:d,fullName:"System"}:null):[],[r,L]),y=Z(()=>{if(!Array.isArray(g)||g.length===0)return null;if(g.length===1)return l.jsx(F,{user:g[0],color:p});const i=g.slice(0,-1),d=g[g.length-1];if(g.length===2)return l.jsxs(l.Fragment,{children:[l.jsx(F,{user:i[0],color:p})," and ",l.jsx(F,{user:d,color:p})]});const x=g.length>3,v=x?g.slice(0,2):i;return l.jsxs(l.Fragment,{children:[v.map((C,w)=>l.jsxs(he.Fragment,{children:[l.jsx(F,{user:C,color:p}),w<v.length-1?", ":""]},C.did)),x?`, and ${g.length-2} others`:l.jsxs(l.Fragment,{children:[", and ",l.jsx(F,{user:d,color:p})]})]})}),T=Z(()=>{const i=Ie[c];return i?i(f==="doc"?"document":f,t.length,E):null}),A=D(()=>{const i=y(),d=T();return!i||!d?null:l.jsxs(l.Fragment,{children:[i," ",d]})},[c,f,g,y,T]),o=D(()=>{if(!e)return null;const i=je(e);return i!=null&&i.targetLink?Me(i==null?void 0:i.targetLink)?i==null?void 0:i.targetLink:O(n,i.targetLink):null},[e,n]);return!c||Q(u)?null:l.jsxs(l.Fragment,{children:[A," ",l.jsx(te,{href:o,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:i=>{i.customPreventRedirect=!0},children:u.name||u.desc})]})}const Fe={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};se.propTypes={meta:U.object.isRequired};const Re=V(me)(({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 ${e.palette.divider}`,boxShadow:"none"})),De=V(Y)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),Pe=V(Y)({display:"flex",justifyContent:"space-between",alignItems:"center"});function se({meta:e}){const{amount:t,symbol:r,chainId:s}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${s}`,"_blank")};return l.jsxs(Re,{children:[l.jsxs(De,{children:[l.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),l.jsx(b,{variant:"h5",color:"text.primary",children:"ArcBlock"})]}),l.jsxs(Pe,{children:[l.jsxs(Y,{display:"flex",alignItems:"baseline",gap:1,children:[l.jsxs(b,{component:"span",variant:"h5",color:"text.primary",fontWeight:"bold",children:["+ ",t]}),l.jsx(b,{component:"span",variant:"subtitle2",color:"text.secondary",children:r})]}),l.jsx(ge,{variant:"outlined",size:"small",color:"secondary",endIcon:l.jsx(ye,{icon:Fe}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}ae.propTypes={meta:U.object.isRequired,type:U.string.isRequired,hideTips:U.bool,sx:U.object};ae.defaultProps={hideTips:!1,sx:{}};function ae({meta:e,type:t,hideTips:r=!1,sx:s}){return Q(e)?null:t==="tips"&&!r?l.jsx(se,{meta:e}):l.jsx(b,{variant:"subtitle2",fontSize:16,component:"p",sx:s,color:"text.secondary",children:e.content})}var be=z;function $e(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var B=$e(be);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},q.apply(this,arguments)}function Be(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},W(e,t)}function He(e,t){if(e==null)return{};var r={},s=Object.keys(e),n,a;for(a=0;a<s.length;a++)n=s[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var J={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},Ke=["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 qe(e,t){if(!e||typeof e!="object")return e;var r={};return Object.keys(e).forEach(function(s){t.indexOf(s)>-1||(r[s]=e[s])}),r}var We=["component","className","unsafeHTML"];function ie(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var r=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(u){r.appendChild(ke(u))}),e.parentNode.replaceChild(r,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),a=n.length,c=0;c<a;c++)ie(n[c],t)}function ke(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function ee(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function oe(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);oe(e.parentNode,t)}}function Ge(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 H(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var le={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},ze=Object.keys(le),ce=function(e){Be(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 r=t.prototype;return r.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},r.componentDidUpdate=function(n){n.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==n&&this.reflow(this.props)},r.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},r.setState=function(n,a){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,a)},r.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(J).forEach(function(a){n.style[a]=J[a]}),document.body.appendChild(n)}},r.copyStyleToCanvas=function(){var n=this,a=window.getComputedStyle(this.target);Ke.forEach(function(c){n.canvas.style[c]=a[c]})},r.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var a=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");ie(this.canvas,a);var c=this.putEllipsis(this.calcIndexes()),u={clamped:c,html:this.canvas.innerHTML};this.setState(u,n.onReflow.bind(this,u))},r.calcIndexes=function(){var n=[0],a=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),c=a.length;if(!a.length)return n;var u=a.find(H);if(!u)return n;for(var f=1,m=u.offsetTop,p=1;p<c&&!(H(a[p])&&a[p].offsetTop-m>1&&(f++,n.push(p),m=a[p].offsetTop,f>this.maxLine));p++);return n},r.putEllipsis=function(n){if(n.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,n[this.maxLine]);var a=this.nlUnits.pop(),c=this.makeEllipsisSpan();do oe(a,this.canvas),Ge(a).appendChild(c),a=this.nlUnits.pop();while(a&&(!H(a)||c.offsetHeight>a.offsetHeight||c.offsetTop>a.offsetTop));return a&&ee(a),this.nlUnits.forEach(ee),!0},r.makeEllipsisSpan=function(){var n=this.props,a=n.ellipsisHTML,c=n.ellipsis,u=document.createElement("span");u.appendChild(document.createElement("wbr"));var f=document.createElement("span");return f.className="LinesEllipsis-ellipsis",a?f.innerHTML=a:f.textContent=c,u.appendChild(f),u},r.isClamped=function(){return this.clamped},r.render=function(){var n=this,a=this.state,c=a.html,u=a.clamped,f=this.props,m=f.component,p=f.className,E=f.unsafeHTML,L=He(f,We);return B.default.createElement(m,q({className:"LinesEllipsis "+(u?"LinesEllipsis--clamped":"")+" "+p,ref:function(y){return n.target=y}},qe(L,ze)),B.default.createElement("div",{dangerouslySetInnerHTML:{__html:u?c:E}}))},t}(B.default.Component);ce.defaultProps=le;var Ve=ce;const xt=G(Ve),Ye=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Qe=e=>{try{return new URL(e).host}catch{return e}};var Et={getChainHost:Ye,getUrlHost:Qe},St={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}},Xe={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"}},Ze={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,Je=(e,t)=>{k.set(e,t)},et=(e="en_US")=>k.get(e)||k.get("en_US");var ue={registerLang:Je,getLang:et},tt=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 nt=tt,{getLang:P}=ue,rt=(e,t)=>t===1?e:`${e}s`,st=1e-7;var at=(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 r=P(t.locale),s=[],n=(u,f)=>{const m=Math.floor(u*10**f+st);return(Math.round(m)/10**f).toFixed(f)},a=(u,f,m)=>{if((s.length===0||!t.colonNotation)&&u===0&&!(t.colonNotation&&f==="minute"))return;const{long:p}=r[f]||P("en_US")[f],{short:E}=r[f]||P("en_US")[f];let L=(m||u||"0").toString(),g,y;if(t.colonNotation){g=s.length>0?":":"",y="";const T=L.includes(".")?L.split(".")[0].length:L.length,A=s.length>0?2:1;L="0".repeat(Math.max(0,A-T))+L}else g="",t.locale==="zh_CN"?Object.values(c).filter(T=>T>0).length>1?!c.days&&!c.hours&&c.minutes&&t.compact?y=p:y=E:c.minutes?y=p:y=E:y=t.verbose?` ${rt(p,u)}`:E;s.push(g+L+y)},c=nt(e);if(a(Math.trunc(c.days/365),"year"),a(c.days%365,"day"),a(c.hours,"hour"),a(c.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(a(c.seconds,"second"),t.formatSubMilliseconds)a(c.milliseconds,"millisecond"),a(c.microseconds,"microsecond"),a(c.nanoseconds,"nanosecond");else{const u=c.milliseconds+c.microseconds/1e3+c.nanoseconds/1e6,f=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,m=u>=1?Math.round(u):Math.ceil(u),p=f?u.toFixed(f):m;a(Number.parseFloat(p,10),"millisecond",p)}else{const u=e/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,m=n(u,f),p=t.keepDecimalsOnWholeSeconds?m:m.replace(/\.0+$/,"");a(Number.parseFloat(p,10),"second",p)}if(s.length===0){const u=(r.millisecond||P("en_US").millisecond).long,f=(r.millisecond||P("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${u}`:f}`:`0${t.verbose?` ${u}s`:f}`}if(t.compact)return s[0];if(typeof t.unitCount=="number"){const u=t.colonNotation?"":" ";return s.slice(0,Math.max(t.unitCount,1)).join(u)}return t.colonNotation?s.join(""):s.join(" ")};const it=Xe,ot=Ze,{registerLang:X}=ue,de=at;X("en_US",it);X("zh_CN",ot);de.registerLang=X;var lt=de;const Tt=G(lt),M=(e,t)=>{var s;let r="?v=";return t?r+=we(t):r+=`${(s=e==null?void 0:e.meta)==null?void 0:s.version}${Ne(e==null?void 0:e.status)?"~":""}`,r};function ct({blocklet:e}){var d,x,v,C,w,S,h,N,R;const{inService:t}=Ce(),r=(d=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:d.value,s=(x=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE_DARK))==null?void 0:x.value,n=(v=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:v.value,a=(C=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT_DARK))==null?void 0:C.value,c=(w=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:w.value,u=(S=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))==null?void 0:S.value,f=(h=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))==null?void 0:h.value,m=(N=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_OG_IMAGE))==null?void 0:N.value,p=((R=window.env)==null?void 0:R.apiPrefix)||"/",E=`${O(p,`/blocklet/logo/${t?"":e.meta.did}`)}${M(e,r)}`,L=`${O(p,`/blocklet/logo-dark/${t?"":e.meta.did}`)}${M(e,s)}`,g=`${O(p,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${M(e,n??r)}`,y=`${O(p,`/blocklet/logo-rect-dark/${t?"":e.meta.did}`)}${M(e,a??s)}`,T=`${O(p,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${M(e,c??r)}`,A=`${O(p,`/blocklet/splash/portrait/${t?"":e.meta.did}`)}${M(e,u)}`,o=`${O(p,`/blocklet/splash/landscape/${t?"":e.meta.did}`)}${M(e,f)}`,i=`${O(p,`/blocklet/og-image/${t?"":e.meta.did}`)}${M(e,m)}`;return{logoUrl:E,logoDarkUrl:L,rectLogoUrl:g,rectLogoDarkUrl:y,faviconUrl:T,splashPortraitUrl:A,splashLandscapeUrl:o,ogImageUrl:i}}function Ct({blocklet:e,square:t}={}){const{logoUrl:r,logoDarkUrl:s,rectLogoUrl:n,rectLogoDarkUrl:a}=ct({blocklet:e}),c=z.useMemo(()=>({appLogo:r,appLogoDark:s,appLogoRect:n,appLogoRectDark:a}),[r,s,n,a]);return Se({meta:c,square:t})}export{xt as H,ae as M,Ct as a,Me as b,Et as c,_t as d,Fe as e,Ae as f,je as g,ct as h,Ue as i,vt as m,Tt as p,St as s,Lt as u};
@@ -1 +1 @@
1
- import{e as o,v as r}from"./vendor-mui-core-UZpb7wT7.js";function u({key:e}={key:"sm"}){const s=o();return r(s.breakpoints.down(e))}export{u};
1
+ import{e as o,v as r}from"./vendor-mui-core-D_bnq77o.js";function u({key:e}={key:"sm"}){const s=o();return r(s.breakpoints.down(e))}export{u};
@@ -1 +1 @@
1
- import{e as o,v as r}from"./vendor-mui-core-UZpb7wT7.js";function u({key:e}={key:"sm"}){const s=o();return r(s.breakpoints.down(e))}export{u};
1
+ import{e as o,v as r}from"./vendor-mui-core-D_bnq77o.js";function u({key:e}={key:"sm"}){const s=o();return r(s.breakpoints.down(e))}export{u};
@@ -0,0 +1 @@
1
+ import{g as r}from"./vendor-react-DEoibe3W.js";import{r as s}from"./useAsync-CMWsznMW.js";var o=s();const a=r(o);export{a as u};
@@ -0,0 +1 @@
1
+ import{x as R}from"./vendor-hooks-rDgu5KV9.js";import{r as g}from"./vendor-react-DEoibe3W.js";var i={},l={},v={},M;function h(){if(M)return v;M=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g;function r(){var t=e.useRef(!1),s=e.useCallback(function(){return t.current},[]);return e.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),s}return v.default=r,v}var p;function F(){if(p)return l;p=1,Object.defineProperty(l,"__esModule",{value:!0});var e=R,r=g,t=e.__importDefault(h());function s(d,u,a){u===void 0&&(u=[]),a===void 0&&(a={loading:!1});var f=r.useRef(0),o=t.default(),y=r.useState(a),b=y[0],_=y[1],U=r.useCallback(function(){for(var m=[],c=0;c<arguments.length;c++)m[c]=arguments[c];var A=++f.current;return b.loading||_(function(n){return e.__assign(e.__assign({},n),{loading:!0})}),d.apply(void 0,m).then(function(n){return o()&&A===f.current&&_({value:n,loading:!1}),n},function(n){return o()&&A===f.current&&_({error:n,loading:!1}),n})},u);return[b,U]}return l.default=s,l}var q;function S(){if(q)return i;q=1,Object.defineProperty(i,"__esModule",{value:!0});var e=R,r=g,t=e.__importDefault(F());function s(d,u){u===void 0&&(u=[]);var a=t.default(d,u,{loading:!0}),f=a[0],o=a[1];return r.useEffect(function(){o()},[o]),f}return i.default=s,i}export{S as r};
@@ -1 +1 @@
1
- import{r as S}from"./vendor-react-DEoibe3W.js";import{bc as y}from"./vendor-ux-did-connect-TEE6cGq6.js";var d={};Object.defineProperty(d,"__esModule",{value:!0});var c=S,o=y,z=function(f,i,r){if(!o.isBrowser)return[i,o.noop,o.noop];if(!f)throw new Error("useLocalStorage key may not be falsy");var u=r?r.raw?function(t){return t}:r.deserializer:JSON.parse,n=c.useRef(function(t){try{var a=r?r.raw?String:r.serializer:JSON.stringify,e=localStorage.getItem(t);return e!==null?u(e):(i&&localStorage.setItem(t,a(i)),i)}catch{return i}}),l=c.useState(function(){return n.current(f)}),g=l[0],s=l[1];c.useLayoutEffect(function(){return s(n.current(f))},[f]);var m=c.useCallback(function(t){try{var a=typeof t=="function"?t(g):t;if(typeof a>"u")return;var e=void 0;r?r.raw?typeof a=="string"?e=a:e=JSON.stringify(a):r.serializer?e=r.serializer(a):e=JSON.stringify(a):e=JSON.stringify(a),localStorage.setItem(f,e),s(u(e))}catch{}},[f,s]),v=c.useCallback(function(){try{localStorage.removeItem(f),s(void 0)}catch{}},[f,s]);return[g,m,v]},N=d.default=z;export{N as _};
1
+ import{r as S}from"./vendor-react-DEoibe3W.js";import{bb as y}from"./vendor-ux-did-connect-DHrruicZ.js";var d={};Object.defineProperty(d,"__esModule",{value:!0});var c=S,o=y,b=function(f,i,r){if(!o.isBrowser)return[i,o.noop,o.noop];if(!f)throw new Error("useLocalStorage key may not be falsy");var u=r?r.raw?function(t){return t}:r.deserializer:JSON.parse,n=c.useRef(function(t){try{var a=r?r.raw?String:r.serializer:JSON.stringify,e=localStorage.getItem(t);return e!==null?u(e):(i&&localStorage.setItem(t,a(i)),i)}catch{return i}}),l=c.useState(function(){return n.current(f)}),g=l[0],s=l[1];c.useLayoutEffect(function(){return s(n.current(f))},[f]);var m=c.useCallback(function(t){try{var a=typeof t=="function"?t(g):t;if(typeof a>"u")return;var e=void 0;r?r.raw?typeof a=="string"?e=a:e=JSON.stringify(a):r.serializer?e=r.serializer(a):e=JSON.stringify(a):e=JSON.stringify(a),localStorage.setItem(f,e),s(u(e))}catch{}},[f,s]),v=c.useCallback(function(){try{localStorage.removeItem(f),s(void 0)}catch{}},[f,s]);return[g,m,v]},N=d.default=b;export{N as _};
@@ -0,0 +1,76 @@
1
+ import{H as g,j as t,bp as Ce,bo as we,q as je,aa as v,y as W,v as he,bQ as ke,I as Me,b4 as Se,T as J,bR as ne,w as oe,bt as re,bS as ae,O as Pe,N as Ie,E as ie,ah as xe,bT as Te,bU as Re,m as se,ab as le}from"./vendor-mui-core-D_bnq77o.js";import{A as Ee,j as Be,k as Fe,H as Oe,U as ze}from"./vendor-arcblock-uz9DVywv.js";import{r as s,b as Ne,h as $e,l as Ae}from"./vendor-react-DEoibe3W.js";import{f as O,l as We}from"./vendor-hooks-rDgu5KV9.js";import{b2 as Z,I as ce,d as Le,u as De,j as He}from"./vendor-ux-did-connect-DHrruicZ.js";import{t as me,D as Ue,A as _e}from"./vendor-utils-rHXShPKm.js";import{N as qe,c as de}from"./list-rt6nku1-.js";import{d as Ye}from"./ExpandLess-CkoEHpgk.js";import{B as ue}from"./bundle-avatar-DYTLzqlT.js";import{U as Ke}from"./index-DefO2n6z.js";import"./lottie-web-jYmAQWuC.js";import"./index-BYCeMwoO.js";import"./use-blocklet-logo-BEy8Tnso.js";import"./session-CHdTc1We.js";import"./InfoOutlined-DkG0jjos.js";import"./CheckCircle-Ds4QI0ey.js";import"./index-BIPRCLBG.js";import"./Phone-DcHUzCa-.js";import"./Location-DUEOr9J2.js";import"./Email-DWueGk7t.js";import"./Timezone-B-Ho_Uno.js";import"./util-CEAObyfj.js";import"./base32-_zEVBJUg.js";function Ve(){let o=new Map;function c({root:p,rootMargin:u,threshold:f}){let x=o.get(p);x||(x=new Map,o.set(p,x));let b=JSON.stringify({rootMargin:u,threshold:f}),l=x.get(b);if(!l){let r=new Map;l={observer:new IntersectionObserver(d=>{d.forEach(h=>{var a;(a=r.get(h.target))==null||a(h)})},{root:p,rootMargin:u,threshold:f}),entryCallbacks:r},x.set(b,l)}return{observe:(r,d)=>{l.entryCallbacks.set(r,d),l.observer.observe(r)},unobserve:r=>{l.entryCallbacks.delete(r),l.observer.unobserve(r)}}}return{getObserver:c}}var Ge="0px",Qe=[0],Je=Ve();function Xe(o){let c=(o==null?void 0:o.rootMargin)??Ge,p=(o==null?void 0:o.threshold)??Qe,u=s.useRef(null),f=s.useRef(null),x=s.useRef(null),[b,l]=s.useState(),r=s.useCallback(()=>{let w=u.current;if(!w){l(void 0);return}let j=Je.getObserver({root:f.current,rootMargin:c,threshold:p});j.observe(w,I=>{l(I)}),x.current=j},[c,p]),d=s.useCallback(()=>{let w=x.current,j=u.current;j&&(w==null||w.unobserve(j)),x.current=null},[]),h=s.useCallback(w=>{d(),u.current=w,r()},[r,d]),a=s.useCallback(w=>{d(),f.current=w,r()},[r,d]);return[h,{entry:b,rootRef:a}]}var Ze=Xe;function et(o){var b;let[c,p]=Ze(o),u=!!((b=p.entry)!=null&&b.isIntersecting),[f,x]=s.useState(u);return u&&!f&&x(!0),[c,{...p,isVisible:u,wasEverVisible:f}]}var tt=et,nt=100;function ot({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=nt}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=tt({rootMargin:u});s.useEffect(()=>{b.current=p},[p]);let h=!f&&!o&&d&&c;return s.useEffect(()=>{if(h){let a=setTimeout(()=>{b.current()},x);return()=>{clearTimeout(a)}}},[h,x]),[l,{rootRef:r}]}var rt=ot;const X={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};L.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};L.defaultProps={size:8};function L({severity:o,size:c}){return X[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:X[o]||X.info}}):null}be.propTypes={theme:g.string,type:g.oneOf(["button","line","select"]),onSelectType:g.func,extra:g.node,loading:g.bool,currentTab:g.oneOf(["info","success","warning","error",""])};function be({theme:o="dark",type:c="button",onSelectType:p,extra:u=void 0,currentTab:f="",loading:x=!1,...b}){const{t:l}=s.useContext(Z),r=[{label:l("notification.allSeverity"),value:""},{label:l("notification.severityType.info"),value:"info"},{label:l("notification.severityType.success"),value:"success"},{label:l("notification.severityType.warning"),value:"warning"},{label:l("notification.severityType.error"),value:"error"}],d=i=>{(i!==f||!x)&&p(i)},h=s.useMemo(()=>{const i={width:"100%",bgcolor:o==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:c==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return c==="line"?Object.assign(i,{}):i},[c,o]),a=(i,y,C)=>t.jsx(W,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(W,{variant:"text",disabled:x,onClick:()=>d(i.value),className:`profile-line-button ${y?"active":""}`,...b,children:i.label},i.value||C),j=()=>r==null?void 0:r.map((i,y)=>{const C=f===(i==null?void 0:i.value);return c==="line"?t.jsx(s.Fragment,{children:w(i,C,y)},i.value||y):t.jsx(s.Fragment,{children:a(i,C,y)},i.value||y)}),I=i=>{const{value:y}=i.target;d(y==="all"?"":y)};return c==="select"?t.jsx(Ce,{sx:{maxWidth:300},children:t.jsx(we,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ee,{...i,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:r.map((i,y)=>t.jsx(je,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(L,{severity:i.value}),i.label]})},i.value||y))})}):t.jsxs(v,{className:"severity-tabs",sx:h,children:[t.jsx(v,{sx:{...c==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{display:"flex",gap:"24px"}},children:j()}),u]})}ve.propTypes={paging:g.objectOf(g.any).isRequired,loading:g.bool.isRequired,onChange:g.func.isRequired};function ve({loading:o,paging:c,onChange:p}){const{t:u}=s.useContext(Z),f=he(r=>r.breakpoints.down("md"));if(c.pageCount<=0||f)return null;const x=(r,d)=>{p({page:d+1})},b=r=>{const d=Number(r.target.value);p({page:1,pageSize:d})},l=c.page-1<=0?0:c.page-1;return t.jsx(v,{mt:2,display:"flex",justifyContent:"flex-end",children:t.jsx(ke,{disabled:o,count:c.total,page:l,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:u("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:d,count:h})=>`${r}–${d} / ${h!==-1?h:`${u()}more than ${d}`}`,rowsPerPage:c.pageSize,onPageChange:x,onRowsPerPageChange:b})})}const at=s.memo(ve),it={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},st={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/>'},pe=6,fe={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},lt={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},ge=()=>({...lt,width:"calc(50% - 8px)"});ee.propTypes={loading:g.bool,type:g.oneOf(["server","service"]),onFilterChange:g.func,blockletMap:g.object,filterType:g.oneOf(["component","entity"]),selectedId:g.array,severity:g.array,enableMarkAllAsRead:g.bool,unReadCount:g.number,onReadFilterChange:g.func,currentReadFilter:g.string};ee.defaultProps={loading:!1,onFilterChange:()=>{},type:"service",blockletMap:{},filterType:"component",selectedId:[],severity:[],enableMarkAllAsRead:!0,unReadCount:0,onReadFilterChange:()=>{},currentReadFilter:"all"};function ee({onFilterChange:o,loading:c,type:p,blockletMap:u,filterType:f="component",selectedId:x=[],severity:b=[],enableMarkAllAsRead:l=!0,unReadCount:r=0,onReadFilterChange:d,currentReadFilter:h="all"}){const{t:a}=s.useContext(Z),[w,j]=s.useState(null),I=!!w,[i,y]=s.useState(x),[C,T]=s.useState(b),[S,z]=s.useState(!1),[P,D]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),T(b)},[x,b]);const N=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],H=e=>{(e!==h||!c)&&d(e)},$=[{label:a("notification.severityType.info"),value:"info"},{label:a("notification.severityType.success"),value:"success"},{label:a("notification.severityType.warning"),value:"warning"},{label:a("notification.severityType.error"),value:"error"}],U=e=>{j(e.currentTarget),D(""),z(!1)},K=()=>{j(null)},_=e=>{const n=i.includes(e)?i.filter(m=>m!==e):[...i,e];y(n),o({id:n,severity:C})},q=e=>{const n=C.includes(e)?C.filter(m=>m!==e):[...C,e];T(n),o({severity:n,id:i})},V=e=>{D(e.target.value)},G=()=>{z(!S)},F=Ne.useMemo(()=>{if(!u.size)return[];const e=[];return f==="component"&&e.push({label:a("notification.system"),id:"system"}),Array.from(u).forEach(([,n])=>{var A,k;const m=n.did||((A=n.meta)==null?void 0:A.did),M=n.title||((k=n.meta)==null?void 0:k.title)||"",R=n.appPid||n.appDid;(f==="component"&&R!==m||f==="entity"&&R===m)&&e.push({label:M,id:m,blocklet:n,ancestors:n.ancestors})}),e},[u,f,a]);s.useEffect(()=>{if(P.trim()==="")B(F);else{const e=P.toLowerCase(),n=F.filter(m=>m.label.toLowerCase().includes(e));B(n)}},[P,F]);const Q=P.trim()!==""||S?E:E.slice(0,pe);return t.jsxs(v,{children:[t.jsxs(v,{sx:{display:"flex",justifyContent:l?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[l&&t.jsx(v,{display:"flex",gap:1.5,children:N.map(e=>t.jsxs(W,{disabled:c,onClick:()=>H(e.value),className:`profile-button ${h===e.value?"active":""}`,sx:{...p==="service"&&h===e.value?{color:"secondary.main"}:{},color:"red",fontWeight:h===e.value?"bold":"normal"},children:[e.label,e.value==="unread"&&r>0&&` (${r})`]},e.value))}),t.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Me,{size:"small",onClick:U,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ce,{icon:it,hFlip:!0})}),t.jsx(Se,{open:I,anchorEl:w,onClose:K,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}},children:t.jsxs(v,{children:[t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px",children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",children:a("notification.severity")}),t.jsx(v,{minWidth:"60px",display:"flex",justifyContent:"flex-end",children:(i.length>0||C.length>0)&&t.jsx(W,{size:"small",onClick:()=>{y([]),T([]),o({severity:[],id:[]})},startIcon:t.jsx(Le,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:a("notification.clear")})})]}),t.jsx(v,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:$.map(e=>t.jsx(oe,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ae,{checked:C.includes(e.value),onChange:()=>q(e.value),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,children:[t.jsx(L,{severity:e.value}),e.label]})})},e.value))})}),t.jsxs(v,{mb:2,children:[t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5,children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",width:"calc(100% - 36px)",children:a("notification.from")}),t.jsx(v,{display:"flex",alignItems:"center",width:"calc(100% - 36px)",children:t.jsx(Pe,{size:"small",placeholder:"search",value:P,onChange:V,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},InputProps:{size:"small",startAdornment:t.jsx(Ie,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ce,{icon:st})})}})})]}),t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(oe,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ae,{checked:i.includes(e.id),onChange:()=>_(e.id),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,sx:{minWidth:0,width:"100%"},children:[e.blocklet&&t.jsx(ue,{size:20,blocklet:e.blocklet,ancestors:e.ancestors,style:{borderRadius:4,flexShrink:0}}),t.jsx(J,{noWrap:!0,variant:"body2",component:"span",title:e.label,flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:e.label})]})})},e.id))}),E.length>pe&&P.trim()===""&&t.jsx(W,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ye,{}):t.jsx(Be,{})})]})]})})]})]}),i.length>0||C.length>0?t.jsxs(v,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(e=>{const n=$.find(m=>m.value===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(L,{severity:e}),n?n.label:e]}),onDelete:()=>q(e),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${e}`)}),i.map(e=>{const n=F.find(m=>m.id===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[(n==null?void 0:n.blocklet)&&t.jsx(ue,{size:16,blocklet:n.blocklet,ancestors:n.ancestors,style:{borderRadius:4,flexShrink:0}}),n?n.label:e]}),variant:"outlined",onDelete:()=>_(e),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${e}`)})]}):null]})}const ct=xe(Te)`
2
+ position: fixed;
3
+ bottom: 20px;
4
+ right: 20px;
5
+ z-index: 1000;
6
+ @media (max-width: 600px) {
7
+ bottom: 16px;
8
+ right: 16px;
9
+ transform: scale(0.9);
10
+ }
11
+ `;function dt(){const[o,c]=s.useState(!1);s.useEffect(()=>{const u=me(()=>{c(window.pageYOffset>300)},200);return window.addEventListener("scroll",u),u(),()=>window.removeEventListener("scroll",u)},[]);const p=()=>{try{"scrollTo"in window?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0)}catch{window.scrollTo(0,0)}};return t.jsx(Re,{in:o,children:t.jsx(ct,{color:"primary",size:"small","aria-label":"scroll back to top",onClick:p,children:t.jsx(Fe,{})})})}const ut=xe.div`
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: ${o=>o.inDialog?0:"24px"};
15
+ .MuiContainer-root {
16
+ padding-right: 0;
17
+ }
18
+
19
+ .profile-button.MuiButtonBase-root {
20
+ border-radius: 9999px;
21
+ margin-right: 2px;
22
+ padding: 5px 12px;
23
+ line-height: 22px;
24
+ font-size: 13px;
25
+ border: 1px solid transparent;
26
+ background-color: ${({theme:o})=>o.palette.background.default};
27
+ color: ${({theme:o})=>o.palette.text.primary};
28
+ font-weight: 400;
29
+ border: 1px solid ${({theme:o})=>o.palette.divider} !important;
30
+ }
31
+ .profile-button.active.MuiButtonBase-root,
32
+ .profile-button.active.MuiButtonBase-root:hover {
33
+ color: ${({theme:o})=>o.palette.primary.main};
34
+ font-weight: 600;
35
+ background-color: ${({theme:o})=>se(o.palette.primary.main,.1)};
36
+ border: 1px solid ${({theme:o})=>se(o.palette.primary.main,.24)} !important;
37
+ }
38
+
39
+ .profile-button.MuiButtonBase-root:hover {
40
+ background-color: rgba(0, 0, 0, 0.04);
41
+ }
42
+
43
+ .profile-line-button.MuiButtonBase-root {
44
+ margin-right: 2px;
45
+ color: #4b5563;
46
+ padding: 5px 12px;
47
+ line-height: 22px;
48
+ font-size: 13px;
49
+ border: none !important;
50
+ border-radius: 0;
51
+ }
52
+
53
+ .profile-line-button.active.MuiButtonBase-root {
54
+ color: rgba(3, 7, 18, 1);
55
+ border-bottom: 1px solid rgba(3, 7, 18, 1) !important;
56
+ }
57
+
58
+ .profile-button.MuiButtonBase-root:last-of-type,
59
+ .profile-line-button.MuiButtonBase-root {
60
+ margin-right: 0;
61
+ }
62
+
63
+ .profile-line-button.MuiButtonBase-root:hover {
64
+ color: rgba(3, 7, 18, 1);
65
+ background-color: unset;
66
+ }
67
+
68
+ * {
69
+ scrollbar-width: none; /* Firefox */
70
+ -ms-overflow-style: none; /* IE and Edge */
71
+ }
72
+
73
+ *::-webkit-scrollbar {
74
+ display: none; /* Chrome, Safari and Opera */
75
+ }
76
+ `;ye.propTypes={blocklets:g.array,context:g.object,pagination:g.bool,inDialog:g.bool,filterType:g.oneOf(["component","entity"]),toViewAll:g.func,type:g.oneOf(["server","service"])};function ye({blocklets:o=[],context:c,pagination:p=!0,inDialog:u=!1,filterType:f="component",toViewAll:x=()=>{},type:b="service"}){const{data:l,paging:r,refresh:d,loading:h,params:a,onReadNotification:w,componentDids:j,filterUnReadCount:I,initial:i}=c,y=e=>{d({...a,severity:e&&typeof e=="string"?[e]:e||[],paging:{...a.paging,page:1}})},[C]=$e(),T=O(()=>C.get("id"),[C]),S=he(e=>e.breakpoints.down("md")),[z,P]=s.useState(0),[D,E]=s.useState(!1),B=s.useMemo(()=>a.read===!1?"unread":"all",[a.read]),N=O(()=>me(e=>{if(h)return;const n=l.length,m=l.filter(R=>!de(R)).length;let M={...a,append:!0,paging:{...a.paging,...e,currentPage:(r.currentPage||0)+1}};B==="unread"&&m<n&&e.page>a.paging.page&&(M={...a,append:!0,paging:{...a.paging,...e,page:a.paging.page||1,currentPage:(r.currentPage||0)+1}}),d(M)},500),[l,a,B,r,h,d]);We(()=>{i&&typeof i=="function"&&i()}),s.useEffect(()=>{(!r.currentPage||r.currentPage===1)&&P(r.total)},[r.total,r.currentPage]),s.useEffect(()=>{setTimeout(()=>{const e=document.getElementById(T);e&&e.scrollIntoView({behavior:"smooth",block:"center"}),E(!0)},100),setTimeout(()=>{E(!1)},3e3)},[T]);const H=O(()=>(l==null?void 0:l.length)>0&&l.length<z,[l,z]),$=s.useCallback(e=>{const{blocklet:n={}}=window,m=[n==null?void 0:n.did,...((n==null?void 0:n.ancestors)||[]).map(M=>M)];return(j==null?void 0:j.includes(e))||m.findIndex(M=>M===e)>-1},[j]),U=s.useMemo(()=>{const e=new Map;return o.length&&o.forEach(n=>{var M,R,A;const m=(n==null?void 0:n.did)||((M=n.meta)==null?void 0:M.did);m&&!e.has(m)&&(n.ancestors=[],e.set(m,n),((R=n==null?void 0:n.alsoKnownAs)==null?void 0:R.length)>0&&n.alsoKnownAs.forEach(k=>{e.has(k)||e.set(k,n)})),((A=n==null?void 0:n.children)==null?void 0:A.length)>0&&n.children.forEach(k=>{var te;const Y=(k==null?void 0:k.did)||((te=k.meta)==null?void 0:te.did);Y&&!e.has(Y)&&$(Y)&&(k.ancestors=[n],e.set(Y,k))})}),e},[o,$]),K=s.useCallback(()=>{h||N({page:r.page+1})},[r.page,h,N]),[_]=rt({loading:h,hasNextPage:H,onLoadMore:K}),q=e=>{!e||de(e)||w(e.id).then(()=>{u&&x()})},V=({severity:e,id:n})=>{if(h)return;let m={};f==="component"?m={entityId:[],componentDid:n}:f==="entity"&&(m={componentDid:[],entityId:n}),d({...a,severity:e,...m,paging:{...a.paging,page:1}})},G=e=>{if(h)return;let n={...a,paging:{...a.paging,page:1}};e==="unread"?(n.read=!1,n.paging.currentPage=1):n=Ue(n,"read"),d(n)},F=O(()=>f==="component"?Array.isArray(a.componentDid)?a.componentDid:[]:f==="entity"?Array.isArray(a.entityId)?a.entityId:[]:[],[a,f]),Q=O(()=>(Array.isArray(a.severity)?a.severity:[])[0]||"",[a.severity]);return t.jsxs(ut,{inDialog:!!u,children:[u?t.jsx(be,{currentTab:Q,type:"line",theme:"light",onSelectType:y}):t.jsx(ee,{loading:h,blockletMap:U,unReadCount:I,filterType:f,type:b,selectedId:F,onFilterChange:V,severity:a.severity,onReadFilterChange:G,currentReadFilter:B}),!S&&h?t.jsx(v,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:t.jsx(le,{})}):t.jsx(qe,{data:l,blockletMap:U,onReadNotification:q,onReadBatch:w,inDialog:u,highlightId:T,highlight:!u&&D,type:b}),p&&!S?t.jsx(at,{loading:h,paging:r,onChange:N}):null,p&&S&&(h||H)?t.jsx(v,{ref:_,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:t.jsx(le,{})}):null,!u&&S?t.jsx(dt,{}):null]})}const pt=s.memo(ye);function Nt(){var l;const{t:o}=De(),p=Ae().tab,f=new URLSearchParams(window.location.search).get("embed")||((l=window.sessionStorage)==null?void 0:l.getItem("embed")),x=Ke(),b=O(()=>{var r;return{...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:(r=window==null?void 0:window.blocklet)==null?void 0:r.componentMountPoints.map(d=>({...d,meta:{...d,did:d.did,name:d.name||d.title||"",logo:"logo.png"}}))}});return t.jsxs(t.Fragment,{children:[t.jsx(Oe,{children:t.jsx("title",{children:o("pageTitle.userCenter")})}),t.jsx(ze,{embed:f==="1",currentTab:p?_e(He.WELLKNOWN_SERVICE_PATH_PREFIX,"user",p):"",disableAutoRedirect:p==="settings",children:p==="notifications"?t.jsx(pt,{blocklets:[b],context:x}):null})]})}export{Nt as default};
@@ -1 +1 @@
1
- import{A}from"./vendor-utils-rHXShPKm.js";import{b as E}from"./base32-BbrXtXL6.js";import{j as r}from"./vendor-ux-did-connect-TEE6cGq6.js";function l(e,i,o,s=!1){var R,_;if(e&&e.startsWith(r.USER_AVATAR_URL_PREFIX)){const n=window.env.apiPrefix||"/";if(o){if(s&&((R=window.blocklet)!=null&&R.serverDid)){const t=`https://${E.encode((_=window.blocklet)==null?void 0:_.serverDid)}.${r.DEFAULT_DID_DOMAIN}`;return`${A(t,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return e}const w=(e,i)=>e.nodeOwner&&e.nodeOwner.did===i,U=(e,i)=>e&&e.did===i;export{U as a,w as i,l as p};
1
+ import{A}from"./vendor-utils-rHXShPKm.js";import{b as E}from"./base32-_zEVBJUg.js";import{j as r}from"./vendor-ux-did-connect-DHrruicZ.js";function l(e,i,o,s=!1){var R,_;if(e&&e.startsWith(r.USER_AVATAR_URL_PREFIX)){const n=window.env.apiPrefix||"/";if(o){if(s&&((R=window.blocklet)!=null&&R.serverDid)){const t=`https://${E.encode((_=window.blocklet)==null?void 0:_.serverDid)}.${r.DEFAULT_DID_DOMAIN}`;return`${A(t,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return e}const w=(e,i)=>e.nodeOwner&&e.nodeOwner.did===i,U=(e,i)=>e&&e.did===i;export{U as a,w as i,l as p};