@abtnode/blocklet-services 1.16.37-beta-20250106-134442-ea92021c → 1.16.37-beta-20250108-010153-e4bcd256

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 (157) hide show
  1. package/api/libs/connect/session.js +2 -1
  2. package/api/routes/oauth.js +2 -2
  3. package/api/routes/user.js +2 -1
  4. package/api/socket/channel/did.js +3 -0
  5. package/api/socket/util.js +2 -0
  6. package/api/util/index.js +0 -25
  7. package/dist/assets/Add-WwBlcqNF.js +1 -0
  8. package/dist/assets/{ArrowDropDown-BpEWICfl.js → ArrowDropDown-B6VSNrNX.js} +1 -1
  9. package/dist/assets/CheckCircle-n23HoB1l.js +1 -0
  10. package/dist/assets/ChevronLeft-DV-sPxhr.js +1 -0
  11. package/dist/assets/ChevronRight-UF0hSKpL.js +1 -0
  12. package/dist/assets/DeleteOutline-1Utxk_IX.js +1 -0
  13. package/dist/assets/Done-BbnQSLvu.js +1 -0
  14. package/dist/assets/Download-DRJvwpLt.js +1 -0
  15. package/dist/assets/{EditIcon-tG6wkTV8.js → EditIcon-DDucSncy.js} +1 -1
  16. package/dist/assets/{Error-DJ3gIUKv.js → Error-CL8m4Xu6.js} +1 -1
  17. package/dist/assets/{Google-xPNZ3SW6.js → Google-CSKRQW0F.js} +1 -1
  18. package/dist/assets/{InfoOutlined-C68E276M.js → InfoOutlined-7hC78o3_.js} +1 -1
  19. package/dist/assets/{Launch-BGwEi50t.js → Launch-D9iyATKb.js} +1 -1
  20. package/dist/assets/LaunchOutlined-D37WOXmf.js +1 -0
  21. package/dist/assets/{LockIcon-DkGeStY0.js → LockIcon-BIlUQ2kd.js} +1 -1
  22. package/dist/assets/{Loop-BGNTppkv.js → Loop-Clmz6DRv.js} +1 -1
  23. package/dist/assets/MoreHoriz-CtnQ7uqf.js +1 -0
  24. package/dist/assets/{PlayArrow-D2eSJrmH.js → PlayArrow-IJdeSlbo.js} +1 -1
  25. package/dist/assets/{QuestionMarkCircle-CRU8b9ID.js → QuestionMarkCircle-2fDrHopp.js} +1 -1
  26. package/dist/assets/{ServerLogo-2zkqpStV.js → ServerLogo-DsurTeGQ.js} +1 -1
  27. package/dist/assets/{ViewList-3IpnvMH9.js → ViewList-B-HVv7GT.js} +1 -1
  28. package/dist/assets/_createAggregator-BgG70oKG.js +1 -0
  29. package/dist/assets/{access-control-Cc5_tP4v.js → access-control-BP0rhxZ_.js} +1 -1
  30. package/dist/assets/{actions-DfuRxUKW.js → actions-DsY16tuf.js} +1 -1
  31. package/dist/assets/{add-component-core-CMZl0Aw9.js → add-component-core-C8hvHJq0.js} +12 -12
  32. package/dist/assets/{add-resource-DNWGI5Hi.js → add-resource-DZFTdNIy.js} +1 -1
  33. package/dist/assets/{addon-VajLOBqQ.js → addon-DUnQ9eC0.js} +1 -1
  34. package/dist/assets/{analytics-DjT9BDYe.js → analytics-Cym7YiQM.js} +3 -3
  35. package/dist/assets/{audit-logs-DXIS1eea.js → audit-logs-DtJdynVz.js} +1 -1
  36. package/dist/assets/base32-DZ5GWnEl.js +1 -0
  37. package/dist/assets/{branding-DP6PFXBo.js → branding-DEKXfpdd.js} +2 -2
  38. package/dist/assets/{bundle-avatar-CzB889SV.js → bundle-avatar-CtN88KlG.js} +1 -1
  39. package/dist/assets/button-CPeDg26t.js +1 -0
  40. package/dist/assets/{click-to-copy-oC180fIr.js → click-to-copy-D-rDpTU1.js} +1 -1
  41. package/dist/assets/{complete-Ck7c7oAE.js → complete-DfhluUOU.js} +1 -1
  42. package/dist/assets/{component-BZTnOYBQ.js → component-DET9TWBv.js} +1 -1
  43. package/dist/assets/{config-C-7B0ly9.js → config-Bh1NLHps.js} +1 -1
  44. package/dist/assets/{config-B592SaBl.js → config-Dx3rVqe3.js} +2 -2
  45. package/dist/assets/{config-navigation-BVFjfkWf.js → config-navigation-Cn0fwBBG.js} +5 -5
  46. package/dist/assets/{config-space-D5tEidjS.js → config-space-CT9a0s7Q.js} +1 -1
  47. package/dist/assets/{confirm-vgd_1-1V.js → confirm-DhCXP8vW.js} +1 -1
  48. package/dist/assets/connect-CA2-olTo.js +5 -0
  49. package/dist/assets/connect-GHQ2pLWc.js +1 -0
  50. package/dist/assets/connect-to-kYFiSkqc.js +1 -0
  51. package/dist/assets/{content-layout-D25Q_vVO.js → content-layout-C8ThavEP.js} +1 -1
  52. package/dist/assets/{dashboard-BgW0SYmh.js → dashboard-B3UhGh-u.js} +7 -7
  53. package/dist/assets/{did-address-DAnP601f.js → did-address-B-umhomj.js} +1 -1
  54. package/dist/assets/{domain-b6cmz4S4.js → domain-DzFcoe7i.js} +1 -1
  55. package/dist/assets/{domain-list-DLXeNUEV.js → domain-list-C9eJrdcx.js} +2 -2
  56. package/dist/assets/email-BEr-8TYu.js +18 -0
  57. package/dist/assets/{exchange-passport-Ah6Oc4Hf.js → exchange-passport-DGUT_ZCy.js} +1 -1
  58. package/dist/assets/{form-text-input-f773Hgdy.js → form-text-input-E0Z0s35O.js} +1 -1
  59. package/dist/assets/{fuel-D2M3FXAV.js → fuel-alylOU0b.js} +1 -1
  60. package/dist/assets/{fullpage-Dpka7-iX.js → fullpage-DZPI7F_L.js} +1 -1
  61. package/dist/assets/{get-safe-url-6EgCrTPK.js → get-safe-url-ByH0hntp.js} +1 -1
  62. package/dist/assets/{get-safe-url-BBLBic7f.js → get-safe-url-yHkHYeNB.js} +1 -1
  63. package/dist/assets/{home-DYkbr7a5.js → home-DG81Vlwd.js} +1 -1
  64. package/dist/assets/{iframe-Dh23G9Wt.js → iframe-BB-pL0gd.js} +1 -1
  65. package/dist/assets/{index-YMnfgOF9.js → index-7gknQYQQ.js} +1 -1
  66. package/dist/assets/{index-DTOMtrZi.js → index-B-0OFwWF.js} +1 -1
  67. package/dist/assets/{index-DPVdZRyD.js → index-B8B9jSby.js} +8 -8
  68. package/dist/assets/{index-CeXw2vcO.js → index-BRPzwIuP.js} +1 -1
  69. package/dist/assets/index-BaA1-UNL.js +1 -0
  70. package/dist/assets/{index-CqdCpHy-.js → index-CEyrfuix.js} +1 -1
  71. package/dist/assets/{index-BxUQG_ZS.js → index-CU_Y2Ics.js} +39 -39
  72. package/dist/assets/{index-B_nW8jWg.js → index-CYh2QqLk.js} +1 -1
  73. package/dist/assets/{index-f88YxSnq.js → index-CcsFwEG1.js} +1 -1
  74. package/dist/assets/{index-BUoBUFo9.js → index-CxWy6IEg.js} +1 -1
  75. package/dist/assets/{index-Cy5HwFoQ.js → index-DHmJ4NAw.js} +8 -8
  76. package/dist/assets/{index-BodKukbo.js → index-DNd_40WG.js} +2 -2
  77. package/dist/assets/{index-CDceAH6O.js → index-DjDooCTg.js} +3 -3
  78. package/dist/assets/{index-C6UmPiZc.js → index-Dk8-Ibsd.js} +1 -1
  79. package/dist/assets/{index-8-kTmhK2.js → index-SrY9WLdy.js} +1 -1
  80. package/dist/assets/{index-BEcpBIIf.js → index-e4kRKwa5.js} +1 -1
  81. package/dist/assets/index-jViTGvBx.js +5 -0
  82. package/dist/assets/{index-_s_fLZnI.js → index-tDqjC_e2.js} +38 -38
  83. package/dist/assets/{invitation-CxB-x_xn.js → invitation-BNOVM03D.js} +7 -7
  84. package/dist/assets/invite-CDXZxcmB.js +5 -0
  85. package/dist/assets/issue-passport-1v1d15DW.js +1 -0
  86. package/dist/assets/{item-6MGDbiPN.js → item-DoetJFaA.js} +1 -1
  87. package/dist/assets/{launch-result-message-CDh6C7yN.js → launch-result-message-BEuCq9h1.js} +1 -1
  88. package/dist/assets/{layout-CNG79gdU.js → layout-PlCf3Rtw.js} +1 -1
  89. package/dist/assets/{list-header-CWds6opx.js → list-header-DdT6PG1D.js} +3 -3
  90. package/dist/assets/localization-Cm0dNj2B.js +1 -0
  91. package/dist/assets/{log-BeVAiHHb.js → log-B5iPDWZ_.js} +1 -1
  92. package/dist/assets/login-DvM79Mfd.js +1 -0
  93. package/dist/assets/{login-oauth-callback-CBpbmy7Y.js → login-oauth-callback-CO19RzCL.js} +1 -1
  94. package/dist/assets/{logo-uploader-CC0caghQ.js → logo-uploader-CNnYMPxh.js} +3 -3
  95. package/dist/assets/{lost-passport-HU2qWAuA.js → lost-passport-DsG6aS5u.js} +2 -2
  96. package/dist/assets/{open-window-BvQJJhL_.js → open-window-Km_9DMrz.js} +1 -1
  97. package/dist/assets/overview-Dc_26DuW.js +12 -0
  98. package/dist/assets/{page-header-1PJsLh7u.js → page-header-B3m4UCOV.js} +1 -1
  99. package/dist/assets/{permission-BBg-Yh9T.js → permission-C7OYX2OJ.js} +1 -1
  100. package/dist/assets/{preferences-CB5uOidv.js → preferences-Ci4dS6YC.js} +1 -1
  101. package/dist/assets/publish-resource-BumbS1yx.js +1 -0
  102. package/dist/assets/{react-beautiful-dnd.esm-CCGMJ6tB.js → react-beautiful-dnd.esm-D6d5Zfr8.js} +4 -4
  103. package/dist/assets/{relative-time-gSR-I79i.js → relative-time-BHAJs1ji.js} +1 -1
  104. package/dist/assets/sdk-0UwYHc-i.js +1 -0
  105. package/dist/assets/session-UImnJahL.js +1 -0
  106. package/dist/assets/{setup-IWaLQEGW.js → setup-LHpIYQbe.js} +3 -3
  107. package/dist/assets/{shorten-label-cn1YaOcx.js → shorten-label-CKNjZbhF.js} +1 -1
  108. package/dist/assets/{simple-select-C05FGhNJ.js → simple-select-BMYrmYam.js} +1 -1
  109. package/dist/assets/{slicedToArray-DuBRe18s.js → slicedToArray-BPEJIbVV.js} +1 -1
  110. package/dist/assets/{start-DpxK1ev8.js → start-DxAs4dHz.js} +1 -1
  111. package/dist/assets/{step-actions-DcWKBXOu.js → step-actions-FdD-71wr.js} +1 -1
  112. package/dist/assets/{studio-B_CDfqTQ.js → studio-g2uaz9WG.js} +1 -1
  113. package/dist/assets/{switch-control-VwZyV9qS.js → switch-control-BMO1MVhi.js} +1 -1
  114. package/dist/assets/{toUpper-CD1KHWl4.js → toUpper-DUImrX4s.js} +1 -1
  115. package/dist/assets/{transfer-BjIffkrb.js → transfer-Bq5kjW_S.js} +1 -1
  116. package/dist/assets/{unsubscribe-BdE7c0PR.js → unsubscribe-DUmfJRPR.js} +1 -1
  117. package/dist/assets/{use-mobile-CRGhfnSw.js → use-mobile-DOkke39c.js} +1 -1
  118. package/dist/assets/{useAsync-Barwm_ml.js → useAsync-BfmmMB4I.js} +1 -1
  119. package/dist/assets/{useAsyncRetry-VpCDo2sM.js → useAsyncRetry-m5oMMmVh.js} +1 -1
  120. package/dist/assets/{useLocalStorage-DTPZT3h6.js → useLocalStorage-ganqTrK6.js} +1 -1
  121. package/dist/assets/user-center-CYnDNkIf.js +202 -0
  122. package/dist/assets/{util-D-lyK2FV.js → util-CmcVraD_.js} +1 -1
  123. package/dist/assets/{vendor-arcblock-DrV4Yh4h.js → vendor-arcblock-Dn16DH88.js} +131 -128
  124. package/dist/assets/{vendor-hooks-DHHsWSqV.js → vendor-hooks-DzETutIU.js} +1 -1
  125. package/dist/assets/{vendor-mui-core-BHQ3rDZc.js → vendor-mui-core-COxJgW9_.js} +1 -1
  126. package/dist/assets/{vendor-mui-x-CYVoSAR5.js → vendor-mui-x-Be0GxtOJ.js} +1 -1
  127. package/dist/assets/{wrap-locale-Brk8trIp.js → wrap-locale-DTO386nY.js} +1 -1
  128. package/dist/index.html +4 -4
  129. package/dist/service-worker.js +1 -1
  130. package/package.json +39 -39
  131. package/dist/assets/Add-BWCYHsqO.js +0 -1
  132. package/dist/assets/CheckCircle-CwD9Ke3p.js +0 -1
  133. package/dist/assets/ChevronLeft-DSkEbRl3.js +0 -1
  134. package/dist/assets/ChevronRight-D0L8yvDK.js +0 -1
  135. package/dist/assets/DeleteOutline-CXidpj4T.js +0 -1
  136. package/dist/assets/Done-C64D3evS.js +0 -1
  137. package/dist/assets/Download-Dw32CPvU.js +0 -1
  138. package/dist/assets/LaunchOutlined-Ca3gdurT.js +0 -1
  139. package/dist/assets/MoreHoriz-ByYwcz4x.js +0 -1
  140. package/dist/assets/_createAggregator-CTc4wR3U.js +0 -1
  141. package/dist/assets/base32-DpVKJ4W_.js +0 -1
  142. package/dist/assets/button-D3f-aYWj.js +0 -1
  143. package/dist/assets/connect-LMZbP6sp.js +0 -5
  144. package/dist/assets/connect-gaOu1HRw.js +0 -1
  145. package/dist/assets/connect-to-D-QS37Vn.js +0 -1
  146. package/dist/assets/email-KHVOUytb.js +0 -18
  147. package/dist/assets/index-BCJq3WNv.js +0 -5
  148. package/dist/assets/index-CgyFjfCK.js +0 -1
  149. package/dist/assets/invite-DBeeLtl3.js +0 -5
  150. package/dist/assets/issue-passport-DDvmexL3.js +0 -1
  151. package/dist/assets/localization--GnHWBZu.js +0 -1
  152. package/dist/assets/login-A-Fb7Rrc.js +0 -1
  153. package/dist/assets/overview-DIREa8hS.js +0 -12
  154. package/dist/assets/publish-resource-CmcZx-V_.js +0 -1
  155. package/dist/assets/sdk-BKgHFqrA.js +0 -1
  156. package/dist/assets/session-DjolhruE.js +0 -1
  157. package/dist/assets/user-center-DNT8JJcs.js +0 -202
@@ -0,0 +1,202 @@
1
+ import{E as p,j as n,a3 as g,x as K,aQ as ge,T as N,aa as R,t as _,ah as V,am as ye,a4 as Ke,bC as Ge,aq as Qe,as as Ve,e as Xe,aK as Ye,bD as Je,bE as Ze,bF as et,aP as tt,bG as nt,M as rt,al as ue,a2 as fe}from"./vendor-mui-core-COxJgW9_.js";import{E as st,U as X,af as D,aH as be,aI as ot,aJ as it,aK as at,v as z,g as Y,aL as lt,aM as ct,P as dt,aN as pt,d as ut}from"./vendor-arcblock-Dn16DH88.js";import{r as m,g as ve,l as ft}from"./vendor-react-D-afvo_7.js";import{o as U}from"./vendor-hooks-DzETutIU.js";import{j as ht}from"./vendor-utils-CV7RLr7b.js";import{S as mt}from"./index-CcsFwEG1.js";import{B as je}from"./bundle-avatar-CtN88KlG.js";import{B as xt}from"./index-CYh2QqLk.js";import{R as gt}from"./relative-time-BHAJs1ji.js";import{M as yt,O as A,Q as bt,R as vt}from"./index-tDqjC_e2.js";import{d as jt}from"./InfoOutlined-7hC78o3_.js";we.propTypes={theme:p.string,type:p.oneOf(["button","line"]),onSelectType:p.func,extra:p.node,loading:p.bool,currentTab:p.oneOf(["info","success","warning","error",""])};function we({theme:e="dark",type:t="button",onSelectType:s,extra:r=void 0,currentTab:o="",loading:i=!1,...a}){const c=[{label:"All",value:""},{label:"Info",value:"info"},{label:"Success",value:"success"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}],u=l=>{(l!==o||!i)&&s(l)},y=m.useMemo(()=>{const l={width:"100%",bgcolor:e==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return t==="line"?Object.assign(l,{}):l},[t,e]),f=(l,h,b)=>n.jsx(K,{disabled:i,onClick:()=>u(l.value),className:`profile-button ${h?"active":""}`,...a,children:l.label},l.value||b),d=(l,h,b)=>n.jsx(K,{variant:"text",disabled:i,onClick:()=>u(l.value),className:`profile-line-button ${h?"active":""}`,...a,children:l.label},l.value||b);return n.jsxs(g,{className:"severity-tabs",sx:y,children:[n.jsx("div",{style:t==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{},children:c==null?void 0:c.map((l,h)=>{const b=o===(l==null?void 0:l.value);return t==="line"?n.jsx(m.Fragment,{children:d(l,b,h)},l.value||h):n.jsx(m.Fragment,{children:f(l,b,h)},l.value||h)})}),r]})}var wt=m;function Ct(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var W=Ct(wt);function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},G.apply(this,arguments)}function St(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Q(e,t)}function Q(e,t){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Q(e,t)}function Lt(e,t){if(e==null)return{};var s={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(s[o]=e[o]);return s}var he={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},Tt=["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 Et(e,t){if(!e||typeof e!="object")return e;var s={};return Object.keys(e).forEach(function(r){t.indexOf(r)>-1||(s[r]=e[r])}),s}var Rt=["component","className","unsafeHTML"];function Ce(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var s=document.createDocumentFragment(),r;switch(t){case"words":r=e.textContent.split(/\b|(?=\W)/);break;case"letters":r=Array.from(e.textContent);break}r.forEach(function(c){s.appendChild(kt(c))}),e.parentNode.replaceChild(s,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var o=[].slice.call(e.childNodes),i=o.length,a=0;a<i;a++)Ce(o[a],t)}function kt(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function me(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function Se(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);Se(e.parentNode,t)}}function Pt(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 F(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},Mt=Object.keys(Le),Te=function(e){St(t,e);function t(r){var o;return o=e.call(this,r)||this,o.state={html:r.unsafeHTML,clamped:!1},o.canvas=null,o.maxLine=0,o.nlUnits=[],o}var s=t.prototype;return s.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},s.componentDidUpdate=function(o){o.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==o&&this.reflow(this.props)},s.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},s.setState=function(o,i){return typeof o.clamped<"u"&&(this.clamped=o.clamped),e.prototype.setState.call(this,o,i)},s.initCanvas=function(){if(!this.canvas){var o=this.canvas=document.createElement("div");o.className="LinesEllipsis-canvas "+this.props.className,o.setAttribute("aria-hidden","true"),this.copyStyleToCanvas(),Object.keys(he).forEach(function(i){o.style[i]=he[i]}),document.body.appendChild(o)}},s.copyStyleToCanvas=function(){var o=this,i=window.getComputedStyle(this.target);Tt.forEach(function(a){o.canvas.style[a]=i[a]})},s.reflow=function(o){this.maxLine=+o.maxLine||1,this.canvas.innerHTML=o.unsafeHTML;var i=o.basedOn||(/^[\x00-\x7F]+$/.test(o.unsafeHTML)?"words":"letters");Ce(this.canvas,i);var a=this.putEllipsis(this.calcIndexes()),c={clamped:a,html:this.canvas.innerHTML};this.setState(c,o.onReflow.bind(this,c))},s.calcIndexes=function(){var o=[0],i=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),a=i.length;if(!i.length)return o;var c=i.find(F);if(!c)return o;for(var u=1,y=c.offsetTop,f=1;f<a&&!(F(i[f])&&i[f].offsetTop-y>1&&(u++,o.push(f),y=i[f].offsetTop,u>this.maxLine));f++);return o},s.putEllipsis=function(o){if(o.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,o[this.maxLine]);var i=this.nlUnits.pop(),a=this.makeEllipsisSpan();do Se(i,this.canvas),Pt(i).appendChild(a),i=this.nlUnits.pop();while(i&&(!F(i)||a.offsetHeight>i.offsetHeight||a.offsetTop>i.offsetTop));return i&&me(i),this.nlUnits.forEach(me),!0},s.makeEllipsisSpan=function(){var o=this.props,i=o.ellipsisHTML,a=o.ellipsis,c=document.createElement("span");c.appendChild(document.createElement("wbr"));var u=document.createElement("span");return u.className="LinesEllipsis-ellipsis",i?u.innerHTML=i:u.textContent=a,c.appendChild(u),c},s.isClamped=function(){return this.clamped},s.render=function(){var o=this,i=this.state,a=i.html,c=i.clamped,u=this.props,y=u.component,f=u.className,d=u.unsafeHTML,l=Lt(u,Rt);return W.default.createElement(y,G({className:"LinesEllipsis "+(c?"LinesEllipsis--clamped":"")+" "+f,ref:function(b){return o.target=b}},Et(l,Mt)),W.default.createElement("div",{dangerouslySetInnerHTML:{__html:c?a:d}}))},t}(W.default.Component);Te.defaultProps=Le;var Nt=Te;const $t=ve(Nt),{joinURL:S,withQuery:k}=yt,{toTypeInfo:Ot}=st,{isEVMChain:_t,getExplorerUrl:At}=A,{arcChainConfig:It}=bt,Dt={ROLE_ACCOUNT:"number",ROLE_NODE:"number",ROLE_DEVICE:"number",ROLE_APPLICATION:"number",ROLE_SMART_CONTRACT:"number",ROLE_BOT:"number",ROLE_ASSET:"number",ROLE_STAKE:"number",ROLE_VALIDATOR:"number",ROLE_GROUP:"number",ROLE_TX:"number",ROLE_TETHER:"number",ROLE_SWAP:"number",ROLE_DELEGATION:"number",ROLE_VC:"number",ROLE_BLOCKLET:"number",ROLE_STORE:"number",ROLE_TOKEN:"number",ROLE_FACTORY:"number",ROLE_ROLLUP:"number",ROLE_STORAGE:"number",ROLE_PROFILE:"number",ROLE_ANY:"number"},P="https://explorer.abtnetwork.io/explorer/";var Ht=function({hash:t,asset:s,rollup:r,address:o,token:i,stake:a,chainId:c=""}){if(_t(c)){const d=At(c);return t?S(d,`tx/${t}`):s?S(d,`token/${s}`):S(d,`address/${o}`)}const u=It[c],y=u==null?void 0:u.defaultRPC,f=y?`${y}`:void 0;return r&&Ot(r).role===Dt.ROLE_ROLLUP?t?k(S(P,`rollups/${r}/moves/${t}`),{host:f}):k(S(P,`rollups/${r}`),{host:f}):s?k(S(P,`assets/${s}`),{host:f}):t?k(S(P,`txs/${t}`),{host:f}):i?k(S(P,`tokens/${i}/tx`),{host:f}):a?k(S(P,`stakes/${a}`),{host:f}):k(S(P,`accounts/${o}`),{host:f})},zt={isSameAddr:(e,t)=>String(e).toLowerCase()===String(t).toLowerCase()};const O=Ht,{isSameAddr:M}=zt;class J{constructor({type:t,did:s,chainId:r,text:o}){this.text=o,this.did=s,this.type=t,this.chainId=r}}const Z=e=>{const t=[];try{let s=0;const r=/<(.+?)\(?[tx|nft|token|stake|did|dapp|link]+[:](.+?)\)?>/gi,o=e.matchAll(r);for(const i of o){const a=/\([tx|nft|token|stake|did|dapp|link]+[:](.+?)\)/gi,c=i[0],u=i.index||s,y=u+c.length;if([...c.matchAll(a)].length>1)return[e];let d="";const l=a.exec(c);let h="";if(l){const T=l[0];d=c.replace(T,"").replace(/^</,"").replace(/(>)$/,""),h=T.replace(/\)$/,"").replace(/^\(/,"")}else h=c;const b=h.split(":"),j=(b[0]||"").replace(/^</,"").replace(/^\(/,"").toUpperCase(),w=(b[1]||"").replace(/>$/,"").replace(/\)$/,""),C=(b[b.length-1]||"").replace(/>$/,"").replace(/\)$/,"");t.push(e.substring(s,u)),t.push(new J({type:j,chainId:w,did:C,text:d||j})),s=y}return s<e.length&&t.push(e.substring(s)),t}catch(s){return console.error(s==null?void 0:s.message),[e]}},Ee=e=>{let t;const{type:s,chainId:r,did:o}=e;return M(s,"link")?t=`${r}:${o}`:M(s,"tx")?t=O({hash:o,chainId:r}):M(s,"stake")?t=O({stake:o,chainId:r}):M(s,"nft")?t=O({asset:o,chainId:r}):M(s,"token")?t=O({token:o,chainId:r}):M(s,"did")&&(t=O({address:o,chainId:r})),t},Bt=(e,t=!0)=>Z(e).map(r=>{if(r instanceof J){if(t){const o=Ee(r),{type:i,chainId:a,did:c}=r;return M(i,"dapp")?`<em style="font-weight:bold;" data-type="${i}" data-chain-id="${a}" data-did="${c}">${r.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${o}">${r.text}</a>`:`<em style="font-weight:bold;" data-type="${i}" data-chain-id="${a}" data-did="${c}">${r.text}</em>`}return r.text}return r}).join(""),Ut=e=>Z(e).map(s=>s instanceof J?`<${Ee(s)}|${s.text}>`:s.replace(/:\n/g,": ")).join("");var xe={toClickableSpan:Bt,toTextList:Z,toSlackLink:Ut};function Re({attachment:e}){const{data:t}=e;let s="";try{s=new URL(t.url).host}catch{s=t.url}return n.jsxs(ge,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},children:[!!s&&n.jsx("span",{className:"url",children:s}),!!t.title&&n.jsx(g,{className:"title",children:t.title}),!!t.description&&n.jsx(g,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&n.jsx("img",{srcSet:`${A.getImagePath(t.image)}?w=128&h=128&fit=crop&auto=format&dpr=2 2x`,src:`${A.getImagePath(t.image)}?w=128&h=128&fit=crop&auto=format`,alt:t.title||"",loading:"lazy",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Re.propTypes={attachment:p.object.isRequired};function ke({attachment:e}){const{data:t}=e;return n.jsx("img",{srcSet:`${A.getImagePath(t.url)}?w=128&h=128&fit=crop&auto=format&dpr=2 2x`,src:`${A.getImagePath(t.url)}?w=128&h=128&fit=crop&auto=format`,alt:t.title||"",loading:"lazy",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}ke.propTypes={attachment:p.object.isRequired};function ee({attachment:e,...t}){var c;const{data:s}=e,r=((c=s.color)==null?void 0:c.toLowerCase())||t.color,o=s.size||t.size,i=s.fontWeight||t.fontWeight||400;let a="14px";return o==="small"?a="12px":o==="normal"?a="14px":o==="big"?a="16px":o==="large"&&(a="18px"),n.jsx("span",{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:s.text})}ee.propTypes={attachment:p.object.isRequired};const Wt=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Ft=e=>{try{return new URL(e).host}catch{return e}};var I={getChainHost:Wt,getUrlHost:Ft},B={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}};te.propTypes={locale:p.string,data:p.object.isRequired};te.defaultProps={locale:"en"};function te({locale:e="en",data:t}){const s={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${I.getUrlHost(t.chainHost)||I.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=U(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return n.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:n.jsxs(g,{display:"flex",flexDirection:"column",children:[n.jsxs(g,{sx:c,children:[n.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),n.jsxs(N,{component:"div",align:"right",style:B.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),n.jsxs(g,{sx:c,children:[n.jsx(N,{component:"div",style:{...B.remarkStyle,fontSize:14},children:s}),n.jsx(g,{sx:{maxWidth:"252px",fontSize:"14px"},children:n.jsx(X,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ne.propTypes={locale:p.string,data:p.object.isRequired};ne.defaultProps={locale:"en"};function ne({locale:e,data:t}){var u,y;const s={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",o=I.getUrlHost(t.chainHost)||I.getChainHost(t.chainId),i=t.did||((y=(u=t==null?void 0:t.credential)==null?void 0:u.issuer)==null?void 0:y.id)||"",a=`https://${o}/explorer/assets/${i}`,c=U(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return n.jsx(g,{sx:{pr:1},children:n.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},rel:"noreferrer",children:n.jsxs(g,{display:"flex",flexDirection:"column",children:[n.jsxs(g,{sx:c,children:[n.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),n.jsx(N,{component:"div",align:"right",style:B.summaryStyle,children:"+1 Asset"})]}),i?n.jsxs(g,{sx:c,children:[n.jsx(N,{component:"div",style:{...B.remarkStyle,fontSize:14},children:r}),n.jsx(g,{sx:{maxWidth:"252px",fontSize:"14px"},children:n.jsx(X,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Pe.propTypes={data:p.object.isRequired,locale:p.string};function Pe({data:e,locale:t="en"}){return n.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},rel:"noreferrer",children:[n.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),n.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[n.jsx("div",{style:{marginBottom:"6px"},children:e.title}),n.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:n.jsx(X,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}re.propTypes={locale:p.string,data:p.object.isRequired};re.defaultProps={locale:"en"};function re({locale:e,data:t}){const s=I.getChainHost(t.chainId),r=`https://${s}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return n.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},rel:"noreferrer",children:[n.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:s}),n.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),n.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function Me({data:e,isMd:t=!1}){return n.jsx(g,{display:"flex",flexDirection:t?"row":"column",justifyContent:"space-between",sx:{width:t?"100%":"auto"},children:e.items.map((s,r)=>n.jsx(ee,{attachment:s,color:r===0?"rgba(156, 163, 175, 1)":"",size:r===0?"normal":"big",fontWeight:r===0?400:600},r))})}Me.propTypes={data:p.array.isRequired,isMd:p.bool};function Ne({attachment:e,...t}){const{local:s}=m.useContext(D),r=_(o=>o.breakpoints.down("md"));return n.jsxs(qt,{"data-testid":"attachment-preview",...t,isMd:r,children:[e.type==="link"&&n.jsx(Re,{attachment:e,...t,isMd:r}),e.type==="image"&&n.jsx(ke,{attachment:e,isMd:r}),e.type==="text"&&n.jsx(ee,{attachment:e,isMd:r}),e.type==="token"&&n.jsx(te,{data:e.data,local:s,isMd:r}),e.type==="asset"||e.type==="vc"?n.jsx(ne,{data:e.data,local:s,isMd:r}):null,e.type==="dapp"&&n.jsx(Pe,{data:e.data,local:s,isMd:r}),e.type==="transaction"&&n.jsx(re,{data:e.data,local:s,...t,isMd:r}),e.type==="divider"&&n.jsx(V,{sx:{mb:1,mt:1},style:{color:be.dividerColor}}),e.type==="combined"&&n.jsx(Me,{data:e,isMd:r})]})}const qt=R.div`
2
+ display: ${({sx:e={}})=>e.display||"flex"};
3
+ flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
4
+ gap: ${({sx:e={}})=>e.gap||1};
5
+ width: ${({isMd:e=!1})=>e?"100%":"auto"};
6
+ &:last-child {
7
+ margin-bottom: 0;
8
+ }
9
+ `;Ne.propTypes={attachment:p.object.isRequired};function $e({data:e,...t}){const{items:s}=e;return n.jsx(Kt,{...t,children:s.map(r=>n.jsxs(ye,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[n.jsxs(g,{display:"flex",alignItems:"center",gap:1,children:[r.icon?n.jsx("img",{src:r.icon,alt:r.title,style:{width:16,height:16}}):null,n.jsxs(g,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?n.jsx(Ke,{title:r.subtitle,arrow:!0,placement:"top",children:n.jsx(jt,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),n.jsxs(g,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?n.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const Kt=R(g)`
10
+ display: flex;
11
+ justify-content: flex-start;
12
+ flex-wrap: wrap;
13
+ gap: 16px;
14
+ .metric-number {
15
+ font-size: 18px;
16
+ font-weight: 600;
17
+ .sub-content {
18
+ font-size: 12px;
19
+ font-weight: 400;
20
+ margin-left: 4px;
21
+ }
22
+ }
23
+ .metric-name {
24
+ font-size: 14px;
25
+ color: rgba(156, 163, 175, 1);
26
+ }
27
+ `;$e.propTypes={data:p.object.isRequired};function Oe({data:e}){const{items:t}=e,s=_(a=>a.breakpoints.down("sm")),r=_(a=>a.breakpoints.down("md")),o=_(a=>a.breakpoints.down("lg")),i=()=>s?1:r?3:o?4:6;return n.jsx(Ge,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?n.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:n.jsx(Qe,{children:n.jsx("img",{srcSet:`${c}?w=128&h=128&fit=crop&auto=format&dpr=2 2x`,src:`${c}?w=128&h=128&fit=crop&auto=format`,alt:a.title||"",loading:"lazy",style:{borderRadius:"8px"}})})},c):null})})}Oe.propTypes={data:p.object.isRequired};function se({data:e,feedType:t,...s}){return n.jsxs(Gt,{...s,children:[t==="data-tracker"&&e.type==="table"&&n.jsx($e,{data:e}),(t==="graphic"||t==="gallery")&&n.jsx(Oe,{data:e})]})}const Gt=R.div`
28
+ display: flex;
29
+ flex-direction: column;
30
+ width: 100%;
31
+ margin-bottom: 4px;
32
+ &:last-child {
33
+ margin-bottom: 0;
34
+ }
35
+ `;se.propTypes={data:p.object.isRequired,feedType:p.string};se.defaultProps={feedType:"data-tracker"};var Qt=ot,Vt=it,Xt=at,Yt=Math.ceil,Jt=Math.max;function Zt(e,t,s){(s?Vt(e,t,s):t===void 0)?t=1:t=Jt(Xt(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(Yt(r/t));o<r;)a[i++]=Qt(e,o,o+=t);return a}var en=Zt;const tn=ve(en),nn=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},rn=e=>e.every(t=>t.type==="text"),sn=e=>e.every(t=>t.type==="image"),on=e=>tn(e,2).map(t=>({type:"combined",items:t})),an=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(s=>s.type===t)};function oe({notification:e,severity:t,showSke:s=!0}){const{attachments:r,data:o,...i}=e,a=_(f=>f.breakpoints.down("md"));if((!r||!r.length)&&z(o))return null;const c=nn(t),u=(f,d=!1)=>{if(!f&&!Array.isArray(f))return null;let l=f,h={},b="horizontal";d&&rn(f)&&(l=on(f),b="vertical",h={display:"flex",gap:1,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const j=an(l);return n.jsx(g,{sx:{display:"flex",gap:1,flexDirection:d?"row":"column",justifyContent:"flex-start",alignItems:d?"center":"unset",flexWrap:"wrap"},children:l.map((w,C)=>w.type==="section"?n.jsx(m.Fragment,{children:u(w.fields,!0)},C):n.jsxs(m.Fragment,{children:[n.jsx(Ne,{attachment:w,sx:h,...i}),!(a&&b==="vertical")&&j&&l.length>1&&C!==l.length-1?n.jsx(V,{orientation:b,style:{color:be.dividerColor},sx:b==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},C))})},y=sn(r);return n.jsx(ln,{children:n.jsxs("div",{className:"message-in-list",children:[r.length>0&&n.jsx("div",{className:"message-container",children:y?u(r):n.jsx(ye,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:u(r)})}),!z(o)&&n.jsx("div",{className:"message-container",children:n.jsx("div",{className:"data-container",children:n.jsx(se,{data:o,feedType:e.feedType})})}),r.length===0&&z(o)&&s&&n.jsx(Ve,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const ln=R.div`
36
+ display: flex;
37
+ flex-direction: column;
38
+ .message-in-list {
39
+ padding: 8px 8px 8px 0;
40
+ display: flex;
41
+ border-radius: 8px;
42
+ }
43
+ .message-title {
44
+ color: #25292f;
45
+ font-size: 18px;
46
+ font-weight: bold;
47
+ word-break: break-all;
48
+ }
49
+
50
+ .attach-ske {
51
+ position: relative;
52
+ margin-left: 10px;
53
+ &::after {
54
+ content: '';
55
+ position: absolute;
56
+ left: -10px;
57
+ top: 0;
58
+ height: 100%;
59
+ width: 4px;
60
+ background-color: ${e=>e.leftLineColor};
61
+ }
62
+ }
63
+
64
+ .message-body {
65
+ color: #25292f;
66
+ font-size: 16px;
67
+ word-break: break-all;
68
+ white-space: pre-line;
69
+ }
70
+ .message-container {
71
+ display: flex;
72
+ flex-direction: column;
73
+ justify-content: flex-start;
74
+ .data-container,
75
+ .attachment-container {
76
+ display: flex;
77
+ flex-direction: column;
78
+ width: 100%;
79
+ }
80
+ }
81
+ .actions-container {
82
+ margin-top: 10px;
83
+ .actions-item {
84
+ margin-right: 8px;
85
+ }
86
+ }
87
+ `;oe.propTypes={severity:p.string.isRequired,notification:p.object.isRequired,showSke:p.bool};oe.defaultProps={showSke:!0};const q=e=>lt.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]});_e.propTypes={notification:p.object,rows:p.number};function _e({notification:e,rows:t=2}){const[s,r]=m.useState(!1),{t:o}=Y(),i=m.useMemo(()=>{const{attachments:l}=e||{};if(!l)return!1;try{return l.length>0}catch{return!1}},[e]),a=m.useMemo(()=>{const{blocks:l}=e||{};if(!l)return!1;try{return l.length>0}catch{return!1}},[e]),c=m.useMemo(()=>{const{description:l}=e||{};return!!l},[e]),u=m.useMemo(()=>{const{data:l}=e||{};return!z(l)},[e]);if(!m.useMemo(()=>i||a||c||u,[i,a,c,u]))return null;const f=()=>t===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${o("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${o("common.expand")}</span>`,d=l=>{const{target:h}=l;h.getAttribute("data-name")==="toggle-expanded"&&r(!s)};return n.jsxs(cn,{children:[n.jsx(g,{className:"text-container",children:n.jsx(g,{component:"div",sx:{marginBottom:"4px"},onClick:d,children:!s&&t>0?n.jsx($t,{basedOn:"letters",unsafeHTML:q(xe.toClickableSpan((e==null?void 0:e.description)??"")),maxLine:t,ellipsisHTML:q(f())}):n.jsx(N,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important",fontSize:"14px"},dangerouslySetInnerHTML:{__html:q(xe.toClickableSpan(`${(e==null?void 0:e.description)??""}${f()}`))}})})}),i||u?n.jsx(oe,{severity:e.severity,notification:e}):null]})}const cn=R(g)`
88
+ margin-bottom: 6px;
89
+ color: rgba(75, 85, 99, 1);
90
+ .text-container {
91
+ word-wrap: break-word;
92
+ font-size: 14px;
93
+ color: rgba(75, 85, 99, 1);
94
+ .toggle-btn {
95
+ display: inline-block;
96
+ white-space: nowrap;
97
+ cursor: pointer;
98
+ margin-left: 4px;
99
+ font-size: 14px;
100
+ color: rgba(59, 130, 246, 1);
101
+ }
102
+ .content.ellipsis {
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ display: block
106
+ display: -webkit-box;
107
+ -webkit-box-orient: vertical;
108
+ max-height: 3em;
109
+ line-height: 1.5em;
110
+ }
111
+ }
112
+ `,dn=m.memo(_e);Ie.propTypes={data:p.array,blockletMap:p.object,onReadNotification:p.func,inDialog:p.bool};Ae.propTypes={notification:p.object,blocklet:p.object,onReadNotification:p.func,inDialog:p.bool};function Ae({notification:e,blocklet:t,onReadNotification:s=()=>{},inDialog:r=!1}){var f;const{locale:o}=m.useContext(D),i=Xe(),a=m.useMemo(()=>{const{receivers:d=[]}=e;return d.length?d[0].read:!0},[e]),c=m.useMemo(()=>{const{actions:d,action:l}=e;let h=d??[];return!h.length&&l&&(h=[{name:"Visit",link:l}]),h},[e]),u=(t==null?void 0:t.did)||((f=t==null?void 0:t.meta)==null?void 0:f.did)||"",y=((t==null?void 0:t.alsoKnownAs)||[]).concat((t==null?void 0:t.appId)||(t==null?void 0:t.appDid)||(t==null?void 0:t.appPid)||"");return n.jsxs(pn,{className:"notification-row",display:"flex",gap:2,sx:{padding:"8px"},onClick:()=>s(e),children:[n.jsx(Ye,{variant:"dot",color:"error",invisible:a,children:t?n.jsx(g,{children:y.includes(u)?n.jsx(xt,{blocklet:t}):n.jsx(je,{blocklet:t,ancestors:t.ancestors??[]})}):n.jsx(mt,{width:"40",height:"40"})}),n.jsxs(g,{className:"notification",display:"flex",flexDirection:"column",alignItems:"start",children:[n.jsxs(g,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,sx:{width:"100%"},children:[n.jsx(g,{className:"title",children:e.title}),"·",n.jsx(gt,{value:e.createdAt,locale:o,shouldUpdate:!0,style:{color:i.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),n.jsx(dn,{notification:e,rows:r?0:2}),c.length>0?n.jsx(g,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,children:c.map((d,l)=>n.jsxs(m.Fragment,{children:[n.jsx(ge,{href:d.link,target:"_blank",className:"link",sx:{fontSize:"15px"},children:d.name},d.link),l<c.length-1?n.jsx(V,{orientation:"vertical",sx:{ml:1,mr:1,height:12,borderWidth:"1px"}}):null]},d.link))}):null]})]})}function Ie({data:e,blockletMap:t,onReadNotification:s=()=>{},inDialog:r=!1}){const{t:o}=Y(),i=m.useMemo(()=>r?e==null?void 0:e.slice(0,5):e,[r,e]);return e!=null&&e.length?n.jsx(g,{display:"flex",flexDirection:"column",sx:{mt:1,...r?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:i==null?void 0:i.map(a=>{var u;const c=a.source==="system"?t.get(a.entityId||a.sender):t.get(a.componentDid||a.sender);return((u=a==null?void 0:a.type)==null?void 0:u.toLowerCase())==="passthrough"?null:n.jsx(Ae,{inDialog:r,notification:a,blocklet:c,onReadNotification:()=>s(a)},a.id)})}):n.jsx(ct,{children:o("common.emptyData")})}const pn=R(g)`
113
+ cursor: pointer;
114
+
115
+ .notification {
116
+ width: calc(100% - 50px);
117
+
118
+ .title {
119
+ min-width: 0;
120
+ overflow: hidden;
121
+ text-overflow: ellipsis;
122
+ white-space: nowrap;
123
+ color: rgba(3, 7, 18, 1);
124
+ font-size: 16px;
125
+ }
126
+ .link {
127
+ color: rgba(59, 130, 246, 1);
128
+ font-size: 14px;
129
+ text-decoration: none;
130
+ }
131
+ }
132
+ `;De.propTypes={paging:p.objectOf(p.any).isRequired,loading:p.bool.isRequired,onChange:p.func.isRequired};function De({loading:e,paging:t,onChange:s}){const{t:r}=m.useContext(D);if(t.pageCount<=0)return null;const o=(c,u)=>{s({page:u+1})},i=c=>{const u=Number(c.target.value);s({page:1,pageSize:u})},a=t.page-1<=0?0:t.page-1;return n.jsx(g,{mt:2,display:"flex",justifyContent:"flex-end",children:n.jsx(Je,{disabled:e,count:t.total,page:a,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:r("pagination.rowsPerPage"),labelDisplayedRows:({from:c,to:u,count:y})=>`${c}–${u} / ${y!==-1?y:`${r()}more than ${u}`}`,rowsPerPage:t.pageSize,onPageChange:o,onRowsPerPageChange:i})})}const un=m.memo(De);He.propTypes={selectedId:p.string,blockletMap:p.object,onSelectChange:p.func,loading:p.bool,filterType:p.oneOf(["component","entity"])};const fn=R.div`
133
+ display: flex;
134
+ justify-items: flex-start;
135
+ align-items: center;
136
+ gap: 8px;
137
+ .name {
138
+ display: block;
139
+ max-width: 260px;
140
+ white-space: nowrap;
141
+ overflow: hidden;
142
+ text-overflow: ellipsis;
143
+ }
144
+ `;function He({selectedId:e="",filterType:t="component",blockletMap:s=new Map,onSelectChange:r=()=>{},loading:o=!1}){const[i,a]=m.useState(""),{t:c}=m.useContext(D),u=d=>{if(o)return;const l=d.target.value;r(l==="all"?"":l)},y=m.useMemo(()=>{if(!s.size)return[];const d=[];return Array.from(s).forEach(([,l])=>{var C,T;const h=l.did||((C=l.meta)==null?void 0:C.did),b=l.title||((T=l.meta)==null?void 0:T.title)||"",j=l.appPid||l.appDid,w=b.toLowerCase().includes(i.toLowerCase());(t==="component"&&j!==h&&w||t==="entity"&&j===h&&w)&&d.push(l)}),d},[s,i,t]),f=m.useMemo(()=>{var l;const d=y.find(h=>{var b;return(h.did||((b=h.meta)==null?void 0:b.did))===e});return(d==null?void 0:d.did)||((l=d==null?void 0:d.meta)==null?void 0:l.did)||"all"},[y,e]);return s.size?n.jsxs(Ze,{sx:{minWidth:240,maxWidth:300},children:[n.jsx(et,{id:"demo-simple-select-label",children:"Sender"}),n.jsxs(tt,{MenuProps:{autoFocus:!1},value:f,onChange:u,onClose:()=>a(""),size:"small",label:"Sender",variant:"outlined",children:[n.jsx(nt,{children:n.jsx(rt,{autoFocus:!0,value:i,placeholder:"Search",variant:"outlined",size:"small",fullWidth:!0,onChange:d=>a(d.target.value),onKeyDown:d=>{d.key!=="Escape"&&d.stopPropagation()}})}),n.jsx(ue,{value:"all",children:c("common.all")}),y.map(d=>{var b,j;const l=d.did||((b=d.meta)==null?void 0:b.did),h=d.title||((j=d.meta)==null?void 0:j.title);return n.jsx(ue,{value:l,children:n.jsxs(fn,{children:[n.jsx(je,{size:24,blocklet:d,ancestors:d.ancestors}),n.jsx("span",{className:"name",children:h})]})},l)})]})]}):null}const hn=m.memo(He),mn=R.div`
145
+ .MuiContainer-root {
146
+ padding-right: 0;
147
+ }
148
+
149
+ .profile-button.MuiButtonBase-root {
150
+ border-radius: 9999px;
151
+ margin-right: 2px;
152
+ color: #4b5563;
153
+ padding: 5px 12px;
154
+ line-height: 22px;
155
+ font-size: 13px;
156
+ border: 1px solid transparent;
157
+ }
158
+ .profile-button.active.MuiButtonBase-root {
159
+ background-color: #ffffff;
160
+ color: #030712;
161
+ border: 1px solid #e5e7eb !important;
162
+ }
163
+
164
+ .profile-line-button.MuiButtonBase-root {
165
+ margin-right: 2px;
166
+ color: #4b5563;
167
+ padding: 5px 12px;
168
+ line-height: 22px;
169
+ font-size: 13px;
170
+ border: none !important;
171
+ border-radius: 0;
172
+ }
173
+
174
+ .profile-line-button.active.MuiButtonBase-root {
175
+ color: rgba(3, 7, 18, 1);
176
+ border-bottom: 1px solid rgba(3, 7, 18, 1) !important;
177
+ }
178
+
179
+ .profile-button.MuiButtonBase-root:last-of-type,
180
+ .profile-line-button.MuiButtonBase-root {
181
+ margin-right: 0;
182
+ }
183
+
184
+ .profile-button.MuiButtonBase-root:hover {
185
+ background-color: #ffffff;
186
+ color: #030712;
187
+ border: 1px solid #e5e7eb;
188
+ }
189
+ .profile-line-button.MuiButtonBase-root:hover {
190
+ color: rgba(3, 7, 18, 1);
191
+ background-color: unset;
192
+ }
193
+
194
+ * {
195
+ scrollbar-width: none; /* Firefox */
196
+ -ms-overflow-style: none; /* IE and Edge */
197
+ }
198
+
199
+ *::-webkit-scrollbar {
200
+ display: none; /* Chrome, Safari and Opera */
201
+ }
202
+ `;ze.propTypes={blocklets:p.array,context:p.object,pagination:p.bool,inDialog:p.bool,filterType:p.oneOf(["component","entity"]),toViewAll:p.func,tabType:p.oneOf(["button","line"]),enableMarkAllAsRead:p.bool};function ze({blocklets:e=[],context:t,pagination:s=!0,tabType:r="button",inDialog:o=!1,filterType:i="component",toViewAll:a=()=>{},enableMarkAllAsRead:c=!1}){const{data:u,paging:y,refresh:f,loading:d,params:l,onReadNotification:h,unReadCount:b,componentDids:j}=t,w=v=>{f({...l,severity:v,paging:{...l.paging,page:1}})},{t:C}=m.useContext(D),[T,ie]=m.useState(!1),Be=async()=>{ie(!0),t.makeAllAsRead&&typeof t.makeAllAsRead=="function"&&await t.makeAllAsRead(),ie(!1)},ae=m.useCallback(v=>{const{blocklet:x={}}=window,E=[x==null?void 0:x.did,...((x==null?void 0:x.ancestors)||[]).map($=>$)];return(j==null?void 0:j.includes(v))||E.findIndex($=>$===v)>-1},[j]),le=m.useMemo(()=>{const v=new Map;return e.length&&e.forEach(x=>{var $,ce,de;const E=(x==null?void 0:x.did)||(($=x.meta)==null?void 0:$.did);E&&!v.has(E)&&(x.ancestors=[],v.set(E,x),((ce=x==null?void 0:x.alsoKnownAs)==null?void 0:ce.length)>0&&x.alsoKnownAs.forEach(L=>{v.has(L)||v.set(L,x)})),((de=x==null?void 0:x.children)==null?void 0:de.length)>0&&x.children.forEach(L=>{var pe;const H=(L==null?void 0:L.did)||((pe=L.meta)==null?void 0:pe.did);H&&!v.has(H)&&ae(H)&&(L.ancestors=[x],v.set(H,L))})}),v},[e,ae]),Ue=v=>{f({...l,paging:{...l.paging,...v}})},We=v=>{var x,E;!v||(E=(x=v.receivers)==null?void 0:x[0])!=null&&E.read||h(v.id).then(()=>{o&&a()})},Fe=v=>{if(d)return;let x={};i==="component"?x={entityId:"",componentDid:v}:i==="entity"&&(x={componentDid:"",entityId:v}),f({...l,...x,paging:{...l.paging,page:1}})},qe=U(()=>i==="component"?l.componentDid||"":i==="entity"&&l.entityId||"",[l,i]);return n.jsxs(mn,{children:[n.jsx(we,{currentTab:l.severity,type:r,theme:"light",onSelectType:w,extra:o?null:[b>0&&c&&n.jsxs(K,{disabled:T||d,onClick:Be,sx:{ml:"auto"},children:[T&&n.jsx(fe,{size:16,style:{marginRight:"1em"}}),C("notification.markAllAsRead")]},"make-all-read"),n.jsx(hn,{onSelectChange:Fe,selectedId:qe,filterType:i,blockletMap:le,loading:d},"component-filter")]}),d?n.jsx(g,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:n.jsx(fe,{sx:{color:"#4598fa"}})}):n.jsx(Ie,{data:u,blockletMap:le,onReadNotification:We,inDialog:o}),s?n.jsx(un,{loading:d,paging:y,onChange:Ue}):null]})}const xn=m.memo(ze);function Rn(){const t=ft().tab,{t:s}=Y(),r=vt(),{makeAllAsRead:o}=r,i=U(()=>{var a;return{...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:(a=window==null?void 0:window.blocklet)==null?void 0:a.componentMountPoints.map(c=>({...c,meta:{...c,did:c.did,name:c.name||c.title||"",logo:"logo.png"}}))}});return m.useEffect(()=>{t==="notifications"&&o&&o()},[t,o]),n.jsxs(n.Fragment,{children:[n.jsx(dt,{children:n.jsx("title",{children:s("pageTitle.userCenter")})}),n.jsx(pt,{currentTab:t?ht(ut.WELLKNOWN_SERVICE_PATH_PREFIX,"user",t):"",disableAutoRedirect:t==="settings",children:t==="notifications"?n.jsx(xn,{blocklets:[i],context:r}):null})]})}export{Rn as default};
@@ -1 +1 @@
1
- import{a1 as d,j as l}from"./vendor-mui-core-BHQ3rDZc.js";import{ai as h,d as u}from"./vendor-arcblock-DrV4Yh4h.js";import{g as c}from"./vendor-react-D-afvo_7.js";import{aa as p,ab as P,h as x}from"./index-_s_fLZnI.js";var f={},v=d;Object.defineProperty(f,"__esModule",{value:!0});var E=f.default=void 0,R=v(h()),g=l;E=f.default=(0,R.default)((0,g.jsx)("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"}),"ShoppingCart");const s=p;var m=(e,t)=>s(e)===s(t);const _=c(m),y=(e,t)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${t("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${t("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(t("router.validation.didRequired"));return null},q=(e,t)=>{const r=y(e,t);return r||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(t("router.validation.pathPrefixTooLong",{length:150})):null:new Error(t("router.validation.pathPrefixCannotBeEmpty")))},T=({params:e,blocklet:t})=>{if(t){const r=(t.children||[]).find(n=>P.hasStartEngine(n.meta)&&_(n.mountPoint,e.pathPrefix));let i="";return r&&(i=r.mountPoint),t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i}return""},C=({params:e,blocklets:t,blocklet:r,locale:i="en"})=>{if(r&&T({params:e,blocklet:r}))return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[i];const n=t.find(a=>a.meta.did===e.did);if(!n)return"";const o=n.meta.interfaces.find(a=>a.type==="web");return o&&o.prefix!==x.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==o.prefix?{zh:`该 blocklet 只能挂载在 ${o.prefix}`,en:`This blocklet can only be mounted on ${o.prefix}`}[i]:""},$=e=>{if(!e||typeof e!="string")return e;let t=e.trim();try{return t=t.toLowerCase(),t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t}catch(r){return console.error("format domain failed",r),t}};export{q as a,E as d,T as e,$ as p,C as v};
1
+ import{a1 as d,j as l}from"./vendor-mui-core-COxJgW9_.js";import{ad as h,d as u}from"./vendor-arcblock-Dn16DH88.js";import{g as c}from"./vendor-react-D-afvo_7.js";import{a9 as p,aa as P,h as x}from"./index-tDqjC_e2.js";var f={},v=d;Object.defineProperty(f,"__esModule",{value:!0});var E=f.default=void 0,R=v(h()),g=l;E=f.default=(0,R.default)((0,g.jsx)("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"}),"ShoppingCart");const s=p;var m=(e,t)=>s(e)===s(t);const _=c(m),y=(e,t)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${t("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${t("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(t("router.validation.didRequired"));return null},q=(e,t)=>{const r=y(e,t);return r||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(t("router.validation.pathPrefixTooLong",{length:150})):null:new Error(t("router.validation.pathPrefixCannotBeEmpty")))},T=({params:e,blocklet:t})=>{if(t){const r=(t.children||[]).find(n=>P.hasStartEngine(n.meta)&&_(n.mountPoint,e.pathPrefix));let i="";return r&&(i=r.mountPoint),t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i}return""},C=({params:e,blocklets:t,blocklet:r,locale:i="en"})=>{if(r&&T({params:e,blocklet:r}))return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[i];const n=t.find(a=>a.meta.did===e.did);if(!n)return"";const o=n.meta.interfaces.find(a=>a.type==="web");return o&&o.prefix!==x.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==o.prefix?{zh:`该 blocklet 只能挂载在 ${o.prefix}`,en:`This blocklet can only be mounted on ${o.prefix}`}[i]:""},$=e=>{if(!e||typeof e!="string")return e;let t=e.trim();try{return t=t.toLowerCase(),t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t}catch(r){return console.error("format domain failed",r),t}};export{q as a,E as d,T as e,$ as p,C as v};